2

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?

2
  • copy binary to the apk folder residing into the device, and than directly running the application by clicking the apk file which will ask to install the app. Commented Oct 25, 2012 at 6:37
  • my binary is not *.apk, Alex P.'s method works for me. Commented Oct 31, 2012 at 2:43

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

thank you, i think it can work. but the busybox on my device has no applet of nohup.
i try just run: '[my bin] &' in adb shell. it works, not really use busybox. thank you
I've done this by doing '[my bin] &', but now how do I find the process later and kill it?
0

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.