Different application signatures - android

I made a few updates to the code for my android app and tried to test it in my phone but Eclipse gives me an error saying Re-installation failed due to different application signatures. Now I understand by googling that I have to uninstall the package using adb but I don't know how to do it? I mean it asks me to use adb uninstall in a shell but I have no experience in developing android apps using command line.
Any help will be appreciated!

You could also just delete the application from your phone going to "Settings" -> "Applications" -> "Manage applications". Find your app and delete it.

Connect the device and run
adb uninstall com.mypackagename.myappname

Related

Can't delete self-programmed app

Recently I bought a new computer and installed Android Studio on it. I transferred all te files necessary from my old computer so I could continue my work on my app.The code was built and ready to upload to my device, but I got the message ' INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES', and Android Studio advised me to uninstall my app from my phone and try again.Whe I tried this, I noticed the 'delete' button was greyed out, and in Settings -> Apps -> TestApp (name of my app) I noticed the buttons for 'Force quit', 'Move to SD-card', and 'Clear Cache' were all greyed out.Is there anything I can do to make my phone delete my app, and to enable these functions in the future?EDIT: after running adb uninstall mypackagename I got the result Failure [DELETE_FAILED_DEVICE_POLICY_MANAGER]. My app uses the Device Policy Manager for locking and unlocking the phone.
SOLVED: After looking up the error code, I found the solution here at StackOverflow.
Thank you very much everyone!
Try this command from adb, after connecting your phone to pc in usb debugging mode
adb uninstall yourapppackagename
Package name you can see from the app info in the phone or packageid from your app gradle file
After running adb uninstall mypackagename like Umar Hussain pointed out, I got the result Failure [DELETE_FAILED_DEVICE_POLICY_MANAGER]. My app uses the Device Policy Manager for locking and unlocking the phone.
After looking up the error code, I found the solution here at StackOverflow.

Cant Deploy To Real Android Device Xamarin

My problem is related to this post
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed
I am not able to deploy my app on a real device it works properly on the emulator , i get deployment error, but nothing in the errors tab.
This is from build output
2>Build succeeded.
2>An error occured. See full exception on logs for more details.
2>The installed package is incompatible. Please manually uninstall and
try again.
2>
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
even after uninstalling the app i was not able to deploy my app on my real device , other apps install fine thorough VS.
There is no specific solution available for this problem , i think the reason is your phone OS doesn't completely uninstall your app, the app signature still lingers on(happens with heavily customized android, in my case its MIUI 8 ).
I found out using logcat - signatures do not match the previously installed version
Potential Solution 1:
Use Titanium Backup (Requires Root) to remove the app folder completely after uninstalling the app.
Potential Solution 2:
Go to settings and remove the app from there , make sure to use the option uninstall for all users(in MIUI 8 this wasn't available)
Potential Solution 3:
Use adb to uninstall your app completely its same as uninstall for all users.
adb uninstall yourpackagename
Incase you dont know it check in properties of your android solution.
Another way to find it
how to delete an app from adb without knowing it's package name
adb root
Then enter adb shell
adb shell
Find out your apps package name:
pm list packages | grep "your app name/something related to your app
name"
Then use:
adb uninstall
OR
pm uninstall
Potential Solution 4:(Not really a Solution)
Change the app package name - wont conflict with the one you have already installed
Note:Doing a hard reset of your device should solve the issue obviously.
In my case 4th option worked, if anyone knows how to remove the previously installed app signature from android please let me know i will update the answer accordingly(probably requires an in-depth knowledge of the file system).
There have a Simple hack
if a Brand new application - then simply Change Android Package Name and Deploy from VS
if already play store publish one - then install app through play store and uninstall. then deploy from VS
this Works for me
A quickly solution is by changing the package name in android manifest.
Go to real device Settings->Apps->All Apps, Now uninstall all the xamarin and mono packages as well as if the Debugging App is there also uninstall it and run again, This solved my same problem.
I know this is an old question, but it could be due to your build configuration. The Release and Debug configurations can and should be different w/r/t manifest entries, etc. I get the ADB0030 error if I try to deploy my Debug configuration. FYI.
I've tried to uninstall app and it has disappeared from Finder. However I received this error. Then I've used a utility (ie. Service Disabler) and the utility listed the app, then I've uninstalled by using utility's Uninstall menu. All gone.
If you have this problem, that's simple, if you have an older .apk of your application, then install this .apk, and after you uninstall.
This is the simple solution.
I had the same problem and I solved it by disable ransomware protection in Windows 10
I installed the app from Play Store, and then uninstalled from there. This seemed to remove it correctly from the device.

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed

When trying to deploy my app to the Android device I am getting the following error:
Deployment failed because of an internal error: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I am aware of this question but the app is not installed. It has been removed/partially removed by Visual Studio during the attempt to deploy.
In the past I solved this by downloading the app from the google play store and then removing it from settings->Application manager. However, now i am getting the error "incompatible update" when it is trying to install it.
I tried to remove it using Titanium Backup and few other things but no luck.
EDIT 1
I realised (from #Motz) that I haven't mentioned that the obvious solution doesn't work. Namely, the app doesn't appear in Settings->Apps
I've seen this several times. Usually, it's due to having a signed release version on my phone, then trying to deploy the debug version on top. It gets stuck in an invalid state where it's not fully uninstalled.
The solution that works for me is to open a command prompt and type:
adb uninstall my.package.id
That usually completes the uninstall in order for me to continue development.
No need to do an adb uninstall, just go to your settings->apps and then do uninstall from there. You will see your application grayed out.
The issues usually has to do with a release vs debug version such as #Kiliman noted here.
Uninstalling the application would be enough to avoid this problem.
INSTALL_FAILED_UPDATE_INCOMPATIBLE
but sometimes even uninstalling the message is raised again, it occurs in Android OS 5.0 +, so this is the solution:
Go to Settings > Apps and you will find your app with the message:
"Not installed for this user"
, we have to uninstall manually for all users with the option:
"Uninstall for all users"
You have to make sure the application is uninstalled.
In your phone, try going to settings/applications and show the list of all your installed applications, then make sure the application is uninstalled for all users (in my case I had uninstalled the application but still for others).
I usually face this issue on Android 5.0+ version devices. Since it has multi-user profiles accounts on the same devices. Every app will install as a separate instance for all users. Make sure to uninstall for all the users as below screenshot.
I accidentally had two devices connected.
After removing one device, INSTALL_FAILED_UPDATE_INCOMPATIBLE error has gone.
Uninstall the apk(app that you are working) from your android device and then run again.
You can just add a parameter to run, see:
Run --> Parameters
In field parameters add -cleaninstall
Now just run, they always will do a deep clean before install.
If you are using Samsung Device and by any chance marked your app for Samsung Knox, then you need to uninstall it from My Knox app.
Uninstalling just from General apps won't uninstall it from Knox App. It has to be done explicitly!
Ok uninstall the app, but we admit that the data not must be lost?
This can be resolve, upgrading versionCode and versionName and try the application in "Release" mode.
For example, this is important when we want to try the migration of our Database.
We can compare the our application on play store with actual application not release yet.
In my case. I installed the release-version app. And after uninstall the app from my device. Thing works fine.
Signature Mismatch your Previous Present APP and new APK
So Please uninstall the previous app and gradlew clean and again install apk
react-native run-android
react-native run-ios
Uninstall your app from connected device(emulator or mobile)
got terminal into project folder cd android
3 next run ./gradlew clean it clean your build
4 cd.. and run below
5 react-native run-android
the first, you must uninstall your app in emulator or device, after that you can cd ./android -> ./gradlew clean then build project again (run android or ios) -> solve
uninstall the app from emulate or smart phone and try to run again
In my case i was getting this when switched the Minimum target version of the android and when i changed back to original one (when i created project at first).
So for that uninstalling worked. But when i changed my android version to latest i was getting it again. To fix that, i went to properties of android project and in Android manifest section, i added a package name e.g com.dotnetdreamer.net. If you have already a package name then you can simply rename it to something else.
One simple way is rename your package name and run again
Delete all app files from Phone
To automate the deletion of an app on your phone you can use the steps below. It can be very useful to delete your app and app data on a quick and clean way.
Make a textfile with this code and save it as Uninstall.sh. Go to the folder (where you've put it) of this script in the terminal and do: sh Uninstall.sh YOURNAMESPACE
Now your namespacefolder (including saved appfiles and database) will be deleted.
echo "Going to platform tools $HOME/Library/Android/sdk/platform-tools"
cd $HOME/Library/Android/sdk/platform-tools
echo "uninstalling app with packagae name $1"
./adb uninstall $1
Delete all app files from pc
Make a textfile with this code and save it as DeleteBinObj.sh.
find . -iname "bin" -o -iname "obj" | xargs rm -rf
Go to the folder of your project where you place this script and do in the terminal: sh DeleteBinObj.sh
In case this helps someone,
I deployed my app to google play, when I uninstalled it and tried to run a debug on my device (new version) I was getting this failed update message.
I couldn't see the app in my device (it was already uninstalled) so I:
Installed the first version again from google play
Opened Settings/App/App name
Cleared the Data
Cleared the Cache
Uninstalled the app
Now you can deploy the debug version again to the device :)
Using Ionic with Cordova via command line...
ionic cordova run android --prod
I ran into this and found that I had deleted the release version from a previous test install, but had an old debug version that was hanging out in apps drawer that I missed. I unplugged my device from the computer, opened the app drawer and used "Search apps.." to find all instances of the app to uninstall them. Then I re-plugged in the device to the computer and viola, it worked!
Thanks for the help everyone!
I Hope this will help somebody in the future but simply go to you config.xml, inside the widget tag, change the default id(io.ionic.starter) to your own id. Have a look at this for android package naming.
Uninstalling the application from all users may be the correct solution, but also be sure to check the Secure Folder or something like that for other devices.
I spent 2 hours of my life trying to figure out the reason for the problem (I only have one user on my personal tablet)
The reason I was unable to install the application is because I mistakenly installed the application via direct link from the "Internal Testing" to both current user and my secure folders.
When you have the Secure Folder active, the tablet name appears twice: one or these is the Secure Folder. (accidentally installed on both)
Example here

Android App: Nothing was installed

I did a lot of searching, but couldn't find a solution for my problem. I have a complete Android app which runs perfectly in the emulator. The signing process works fine, but as I copy the .apk-file on my phone and try to install it, it says, that nothing was installed.
Installing the app via eclipse and a USB cable works, but I can't share the app that way.
Additionally unknown sources for apps are accepted.
Do you have any idea? I'm quite embarassed, that I have to ask this here, but I don't see another way...
If you have previously debug signed application installed. Then you need to uninstall the app first. Open terminal and type adb uninstall <your app package name>

Re-installation failed Zxing import to Android project

I had import to my project the example of Zxing for Android Application. I dont have errors and when i try to run on device, the console give this output:
[2011-08-26 20:57:06 - CaptureActivity] Re-installation failed due to different application signatures.
[2011-08-26 20:57:06 - CaptureActivity] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-08-26 20:57:06 - CaptureActivity] Please execute 'adb uninstall com.google.zxing.client.android' in a shell.
[2011-08-26 20:57:06 - CaptureActivity] Launch canceled
I try to execute the adb command in shell but give me "permission denied". Before i never have this app in my phone, sometimes with this error i uninstall app from device, run again and works but at this time i dont know what i can do. any suggestion?
You have a copy of Barcode Scanner installed from the Market. You are installing your app under the same name and package. For security reasons, Android does not allow you do to this, since you have not signed the app in the way we have of course.
You would need to uninstall Barcode Scanner first. If you can't, it is perhaps not uninstallable since it is pre-installed on the phone.
However, the problem is that you are trying to create an application using our package and our app name. In fact I assume you have mostly copied our source code. We do not find this acceptable. Please write your own application. If you need to re-use pieces of ours, that's OK -- it's open source. But it is not OK to copy and paste it so much as you are doing here.

Categories

Resources