Why I get permission denied on ADB on Android phone? 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 &quot;11.0.9.1&quot; 2020-11-04
I tried getting permissions with chmod +rwx of the folder where adbcontrol.jar is located but the error persists.
Any ideas?
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