Reputation:
I have developed a small application that consists of 5 different apk files. I'm developing on a lot of PCs and have a lot of developing phones. Every time I change the PC, the signature of the generated APK file is changed and I have to uninstall the applications on the phone. This is very time consuming. So is there a possibility to write a batch/file script that i can run on the PC so that the defined applications are uninstalled on the device?
I tried to do it the following way:
for %%f in (adb devices) do (
adb -s %%f uninstall bla.bli.blub
)
But unfortunately it doesn't work correctly ;)
Upvotes: 1
Views: 3319
Reputation: 52229
So I finally was able to get a working version of the script:
FOR /F "skip=1" %%P IN ('adb devices') DO (
adb -s %%P uninstall bla.blub.application1
adb -s %%P uninstall bla.blub.application2
)
Upvotes: 2
Reputation: 27549
cd
to the directory where you've installed the android sdkcd tools/
adb uninstall package-name
And of course you can put these steps in a shell script and uninstall several packages.
Upvotes: 1