如果命令行支持grep和awk命令:
adb shell kill `adb shell ps | grep browser | awk '{ print $2 }'`
或者
adb shell ps | grep com.myapp | awk '{print $2}' | xargs adb shell kill?
?
如果命令行不支持grep和awk命令,但是手机中装有busybox工具:
adb shell "kill `ps | busybox grep browser | busybox awk '{ print $2 }'`"