Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run command as background process using ADB?

Tags:

android

adb

I am trying to run logcat in background using adb.

adb shell "logcat -r 2000 -f /data/local/test.log &"

But it does not work. If I do adb shell ps | grep logcat I dont see logcat process running.

like image 746
Oak Bytes Avatar asked Aug 22 '12 09:08

Oak Bytes


1 Answers

Adding nohup seems to work.
adb shell "nohup logcat -r 2000 -f /data/local/test.log &"

like image 138
Oak Bytes Avatar answered Oct 04 '22 07:10

Oak Bytes