I need to use adb connect pc to device and do some checking.
So I try to use
java.lang.Runtime.getRuntime().exec(cmd)
to get adb
shell result into my program.
But I don't know how to write the adb shell commend in the exec
call,
something like:
String cmd =adkHome + "adb.exe -s " + device + " shell ls";
then cd data/app
How do I do this?
If you mean to run this on the phone from your java app, you just need:
This may be what you're looking for?
As far as preforming actions in a shell, I would recommend writing a shell script that you execute. In this case instead of
Replace it withCheers!