I want to execute a series of commands adb one of them is to obtain the path of the user's apps, but I do not know if it is possible to place adb commands in my app. If you know please help.
I want to execute a series of commands adb one of them is to obtain the path of the user's apps, but I do not know if it is possible to place adb commands in my app. If you know please help.
This can be done in this way by:
try {
Process process = Runtime.getRuntime().exec("adb ....");
} catch (IOException e) {
e.printStackTrace();
}
It intrigues me to know for what kind of application you would like to run the ADB from your application since You regularly run the ADB from the command line, this to perform some action on the device. Something important is that from the command line you can have more privileges than executing your process from the device.
Friend Jose, I've seen you ask this question:
That's probably why you ask about the ADB , as I said earlier, if you run from the device you probably do not have the same privileges and move the application you probably could not do it.
Example move application to external memory:
adb shell pm install -i "com.myapp.elenasys" -s -r /data/app/com.myapp.elenasys.apk