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?