2

I'm trying to cast my Android device to a PC with adbcontrol (tutorial here). The phone has a broken (black) screen and when I input the command java -jar adbcontrol.jar I get this error:

java.io.IOException:Cannot run program..error=13, Permission denied.

I have Java version: OpenJDK version "11.0.9.1" 2020-11-04

I tried getting permissions with chmod +rwx of the folder where adbcontrol.jar is located but the error persists.

Any ideas?

8
  • Is the phone rooted? Dec 24, 2020 at 17:46
  • No,the phone is not rooted
    – fkjdxyz
    Dec 24, 2020 at 17:47
  • I'm on LInux Mint.I have two android phones,the one with broken screen has USB Debugging disabled,and on the other phone is enabled but the error is the same.
    – fkjdxyz
    Dec 24, 2020 at 18:56
  • I do have adb from Android SDK
    – fkjdxyz
    Dec 24, 2020 at 19:12
  • 2
    You should state what Android version your devices are using. If the Android devices are 5.0+ then I would recommend scrcpy Dec 24, 2020 at 19:46

1 Answer 1

0

before actually running adbcontrol you must specify paths in config file

check adb connection is working fine (previously authorized) and find a writeable location on device, for example

/sdcard
/storage/emulated/0
/data/local/tmp

depending on encryption and lock screen the location might not be available in this boot state, so better double check adb push is working

adb push ~/file.txt /sdcard

now open the config.properties file and define paths

adbCommand = adb
screenshotDelay = 100
localImageFilePath = adbcontrol_screenshot.png
phoneImageFilePath = /sdcard/adbcontrol_screenshot.png

if your adb binary is not in env you must specify path in first line. for windows paths backslash should escaped like

adbCommand = C:\\Android\\platform_tools\\adb.exe

when configured you can finally run adbcontrol from command line. the terminal will floated by debugging log (you can minimize). another window will open showing your phone screen. your keyboard and mouse input is recognized in android now

java -jar adbcontrol.jar
4
  • while running this on SGJ3 2016 i get: 'adb push ~/file.txt /sdcard' i get this:adb: error: failed to get feature set: no devices/emulators found.This is how my config look like:'adbCommand = /media/enq/5F53DF292609C82D/Kit/LinuxStuff/adbcontrol/adbcontrol.jar screenshotDelay = 100 localImageFilePath = /home/enq/adbcontrol_screenshot.png phoneImageFilePath = /mnt/sdcard/adbcontrol_screenshot.png'
    – fkjdxyz
    Dec 25, 2020 at 9:02
  • I've managed to cast Xiaomi with adbcontrol(after folowing your instructions and typing "which adb"(it was in usr/bin/adb),but how to control the phone from pc?
    – fkjdxyz
    Dec 25, 2020 at 9:23
  • Ok,thank you so much
    – fkjdxyz
    Dec 25, 2020 at 9:34
  • android.stackexchange.com/q/224214
    – alecxs
    Dec 25, 2020 at 10:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .