Aylwyn Lake
Aylwyn Lake

Reputation: 2037

how to run binary in android without adb shell

when you run a binary in adb shell, if you exit adb, then the process is over too.

So is there a way to run a binary without adb's help?

Upvotes: 2

Views: 2412

Answers (2)

trusktr
trusktr

Reputation: 45464

This works for me:

sh -c "your-binary-or-command" &

Then you can exit the adb shell by pressing ctrl+D and it will continue to run.

You can kill it by going back into the adb shell then

kill -s KILL <PID>

Upvotes: 0

Alex P.
Alex P.

Reputation: 31676

If you have busybox installed on your device, then you could use 'busybox nohup [your binary] &' command. This way it will keep running even after you close adb

Upvotes: 1

Related Questions