Use RUN_COMMAND intent using adb, requires permission, how do I grant one?

❱ adb shell am startservice --user 0 -n com.termux/com.termux.app.RunCommandService \
-a com.termux.RUN_COMMAND \
--es com.termux.RUN_COMMAND_PATH '/data/data/com.termux/files/usr/bin/sleep' \
--esa com.termux.RUN_COMMAND_ARGUMENTS '10' \
--es com.termux.RUN_COMMAND_WORKDIR '/data/data/com.termux/files/home' \
--ez com.termux.RUN_COMMAND_BACKGROUND 'true' \
--es com.termux.RUN_COMMAND_SESSION_ACTION '0'
Starting service: Intent { act=com.termux.RUN_COMMAND cmp=com.termux/.app.RunCommandService (has extras) }
Error: Requires permission com.termux.permission.RUN_COMMAND
❱ adb shell am startservice --user 0 -n com.termux/com.termux.app.RunCommandService \
-a com.termux.RUN_COMMAND \
--es com.termux.RUN_COMMAND_PATH '/data/data/com.termux/files/usr/bin/sleep' \
--esa com.termux.RUN_COMMAND_ARGUMENTS '10' \
--es com.termux.RUN_COMMAND_WORKDIR '/data/data/com.termux/files/home' \
--ez com.termux.RUN_COMMAND_BACKGROUND 'true' \
--es com.termux.RUN_COMMAND_SESSION_ACTION '0'
Starting service: Intent { act=com.termux.RUN_COMMAND cmp=com.termux/.app.RunCommandService (has extras) }
Error: Requires permission com.termux.permission.RUN_COMMAND
I am using adb to invoke a command in termux I get this error Error: Requires permission com.termux.permission.RUN_COMMAND Kindly I need some help here, thanks!
3 Replies
Catinette
Catinette4mo ago
be sure to have allow-external-apps=true in your termux config file
Kulothungan U.G
Kulothungan U.GOP4mo ago
uncommented that like and temux-reload-settings + force killed still having the same problem is adb is considered as an app to termux?
Catinette
Catinette4mo ago
weird maybe cause you are invoking it on a device via adb mh maybe you need root to do that donno i guess you'll have to wait to see if someone who tested that already respond
Want results from more Discord servers?
Add your server