This question already has answers here:
remove or update Google play service on emulator
(5 answers)
Closed 9 years ago.
good morning
i would like to delete the google play services package from my android emulator because i tried to update it by a new version.
When i taped this command in my terminal:
./adb install com.google.android.gms.apk
I receive this message :"install failed already exist "
I tried to unistall this package by this command:
./adb -e uninstall com.google.android.gms
It show me "failure".
My version is 3.1.36 and i would like to install 4 version to run my android map app
regards.....
AFAIK You will not be able to uninstall play services as its only can be uninstalled by the administrator level. You can not uninstall it on your own as it requires root level access..
Try adb install -r com.google.android.gms.apk
Related
This question already has answers here:
Failure [INSTALL_FAILED_ALREADY_EXISTS] when I tried to update my application
(7 answers)
Closed 4 years ago.
command
When I try to update a new version from server by downloading apk,
then enter install it, but failed to get installed, so I used adb command to install error found pkg:
/data/local/tmp/ntsj_2018012614.apk *
Failure [INSTALL_FAILED_ALREADY_EXISTS]**
adb can't install an apk if the device already have an apk installed where the package name is the same. So, you need to remove it by using:
adb uninstall com.your.package.name
where com.your.package.name is your apk package name. Or you can use the following if you want to keep all the apk data (in case you want to update the apk):
adb uninstall -k com.your.package.name
Then you can install the apk with:
adb install yourpackage.apk
In case you don't know the package name, please read more about it at Read the package name of an Android APK
This question already has an answer here:
Difference between adb "install" command and "pm install" command?
(1 answer)
Closed 6 years ago.
I have one apk file which is stored internally on my samsung phone. I want to install that apk using cmd. I mean is there any command or any code available for that??? So, I can install that app via usb or is there any code to install app or is there any soure code to update my app.
Any help would be appreciated.
I tried following command which couldn't worked for me...
adb install example.apk
adb install -s example.apk
Before you can run your app on a device, you must enable USB debugging on your device. You can find the option under Settings > Developer options.
Once your device is set up and connected via USB, you can install your app using the adb tool:
adb -d install path/to/your_app.apk
For More details refer
https://developer.android.com/studio/build/building-cmdline.html
I'm trying to install com.google.android.gms v 3.0.27 on my android 4.2 emulator . But when I run adb install. it execute some minuets and the say:
INSTALLATION_FAILURE_PACKAGE_EXIST
the emulator by defualt has version 2... of this package but I want to update it. What should I do?
EDIT
I tried to uninstall. After executing command, CMD just show the help of adb unistall.
I tried to install it on another emulator, Now I get this error:
Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
This will reinstall it:
adb install -r com.google.android.gms.apk
You will have to uninstall the the old version first. You can do this with ADB:
adb uninstall com.google.android.gms
The emulator by default doesn't has those files, this is one of the reasons that Google Map API V2 doesn't work on the emulator environment. So you can just create a new AVD and install you .apk file there or use the uninstall option as mentioned.
This question already has answers here:
install / uninstall APKs programmatically (PackageManager vs Intents)
(10 answers)
Closed 10 years ago.
Is it possible to install / uninstall applications on device by android code without user interaction ?
yeah it's possible You need to use Process and Runtime for execute adb command in Android grammatically.Suppose you wanna install an apk then you need to run ./adb install ~/Desktop/apkname.Similarly you need to use ./adb install command for this.
Process process=Runtime.getRuntime().exec("./adb install 'complete path of your apk file'");
Hope this will work Good luck.
This question already has answers here:
Failure [INSTALL_FAILED_ALREADY_EXISTS] when I tried to update my application
(7 answers)
Closed 9 years ago.
I know that adb install will not replace an existing package if it's of a different build type (i.e. debug vs. release).
Eclipse also successfully replaces the debug apks whenever I run a debug session.
But when I attempt adb install for replacing an existing release apk with another release apk (same package name!), I get a failure message:
adb install myapp-release.apk
pkg: /data/local/tmp/myapp-release.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
745 KB/s (34310 bytes in 0.044s)
Wasn't that supposed to work? What am I missing?
I suppose if the app is already installed, you need to supply the -r key:
adb install -r myapp-release.apk
From the adb help:
'-r' means reinstall the app, keeping its data