1

I'm trying to build a simple support app to execute some of adb shell commands like "adb shell wm overscan -35,0,-55,0" to hide Black Bottom Bar. I will run this app as system on rooted device.

The problem is that I couldn't find any working solution in the internet. I already tried next solutions:

https://stackoverflow.com/a/74190894/22536158

https://stackoverflow.com/a/13381888/22536158

These do nothing if i write command without adb shell like: "wm overscan -35,0,-55,0" and if I add adb shell then it throws:

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

Moreover, I've tried to use ProcessBuilder:

ProcessBuilder("wm overscan -35,0,-55,0").start()

and it throws

java.io.IOException: Cannot run program "wm overscan -35,0,-55,0": error=13, Permission denied

Can someone please explain me what am I doing wrong?

1
  • I suggest you using Shizuku API which enable "adb" command for other android apps.
    – Loc Huynh
    Commented Sep 13, 2023 at 15:55

0