I am using ProcessBuilder
, into my Android app, to start a service but it starts only if I put su
before the actual command.
This works just fine:
su -c am startservice -a com.companyname.app.HELLO --ef opt 6 --ef ert -9
This one doesn't work:
am startservice -a com.companyname.app.HELLO --ef opt 6 --ef ert -9
What am I doing wrong?
I am not doing anything wrong. am startservice
will not work without root privileges.
Thanks to @CommonsWare for his answer.