I created a sample package listener application which get launched when user clicks any other application. But currently I am not able to uninstall old version and even not able install updated version. The application is not allowing me to open settings or task manager or anything else. i am not able to do anything Please help me out. My phone get hacked by the application.
Is there any way to uninstall application?
You can use adb to uninstall your application. Connect your device to your computer, and execute the following command from a terminal or command prompt:
adb uninstall <package name>
(Assuming you have Android SDK installed and adb is in the application PATH)
Related
My native settings app crushing when I start it, how to install the different settings application or from another shell/environment?
You mean same package name but not same app currently installed device?
I think you should install using adb with some option.
Please try,
adb install -r -d [your app].apk
I've built a silly app to share among a few friends. No need to put it up on the app-store.
I built the first apk (signed), uploaded it to a web-server and all worked well.
A small issue arose, I fixed it, re-built, signed with the same keystore and uploaded it again. It now seems that I am unable to install from the new apk. The debugger tells me:
signatures do not match the previously installed version
So I uninstalled the old version by opening the app drawer and dragging it onto the "uninstall" button. When opening "Settings -> Apps", I don't see it anywhere anymore. I don't see any traces of the app on my device.
Yet I still get the above error message.
Is it possible some information still lingers on the device somewhere? Is there any way I can verify that?
Yes It is possible if somehow your old application is not removed 100% or its data is not removed.
Try:
adb uninstall "com.yourapp.yourapp"
If you don't know exactly what to put as replacement for "com.yourapp.yourapp", then you just open Android studio, Run your app while it is connected to a device and then look at Debug window.
It says:
Waiting for device.
Target device: samsung-sm_t531-xxxxxxxxx
Uploading file
local path: C:\Users\myapp\app\build\outputs\apk\myapp.apk
remote path: /data/local/tmp/com.myapp.myapp
Installing com.myapp.myapp
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.myapp.myapp"
pkg: /data/local/tmp/com.myapp.myapp
Success
com.myapp.myapp in this case is the name of the package you must use to uninstall.
I had the same issue and the adb uninstall solution did not work for me.
What worked was
On your device go to to Settings->Apps
Select your app, and in the menu select "Uninstall for all users"
Even if I had previously uninstalled the app it was still in the list there.
To me, if the app is meant to be distributed, the adb solution is a no-go: you can't ask one's friend to have the android sdk installed on their machine !
The way to go here is to edit the AndroidManifest.xml and to increment the android:versionCodeattribute in the <manifest>tag (which is the root element).
This would update your installed application
If you are seeing this while conducting connected tests, make sure to include .test when uninstalling via adb because uninstalling via app -> settings does not get rid of the test package
adb uninstall your.broken.package.test
if you just uninstall via
adb uninstall your.broken.package
your test package will still be there. This was only something i noticed while using the gradle command line, haven't come across this problem within android studio
Uninstall the old app from your phone or emulator and try to run again.
I got that error while trying to install release while signing it's certificate.
fixed with the :app Gradle task uninstallRelease and then installRelease again
If you are going in install the same app with a different signature, you may want to uninstall but keep the app's data.
adb -d shell pm uninstall -k <packageName>
adb -d install -r -t -d app.apk
For Unity users who come to this question, the best answer is indeed the one above by #Ehsan
adb uninstall "com.yourapp.yourapp"
I had already installed a previous version on my Android device then selected Development Build in Unity > Build Settings which caused the APK to use a different signature. If you install through the Android GUI it doesn't actually remove everything so you have to use ADB.
I had face same problem With POCO Mobile and Moto G30 Mobile while developing application in flutter
My Solution is:
I have open android project which automatically create in your project, in android studio and run project in connected device. It will automatically ask to uninstall old app with same package name and different signature. After click ok button it will install app.
I'm running on a device with a custom Android platform for which I have the platform.keystore certificate. I was able to build an application, sign it with the platform key, and install it on my device. However, now that the package has been installed, I can't seem to uninstall it from the command line.
Since the device is running a production build of the OS, I can't run adb root from the command line to gain permissions. Also, I'm unable to run su from adb shell since I don't have permissions, so I can't go into /data/data and force remove the package.
I can think of a couple ways of uninstalling the package NOT from the command line:
Go into Settings->Apps and click Uninstall
Create another platform-signed app that uses reflection to access the uninstall API from PackageManager to uninstall it. Along these same lines, I could have the app send an Intent to PackageManager to prompt the user to uninstall the package.
That's great, but I'd really like to be able to uninstall the package from the command line. It seems like there should be parity here. Is there a way to uninstall a platform-signed package from the command line considering I have access to the signing certificate?
Do you know the app's package? If so, try
adb uninstall *com.name.of.package*
(as documented, for instance, at this site ).
I am having a lot of trouble trying to get my computer to run an android app on my phone. My computer is running Ubuntu 11.10 and my phone is HTC Desire running 2.2. Here is the error I am getting in Console in Eclipse:
[2011-12-13 19:35:05 - InitialChoice2] Re-installation failed due to different application signatures.
[2011-12-13 19:35:05 - InitialChoice2] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-12-13 19:35:05 - InitialChoice2] Please execute 'adb uninstall com.android.taskreminder' in a shell.
[2011-12-13 19:35:05 - InitialChoice2] Launch canceled!
I have tried renaming the package but have just gotten the same error. My phone is also in HTC Sync mode and I have tried changing that around. I have tried to open the adb shell but to no avail. I am a bit confused how to use it in linux and when I navigate to the directory in Terminal that the adb is located in, I get another error that says it does not recognize adb command. I suppose I am not sure how to execute "adb uninstall com.android.taskreminder" properly. Any help is really appreciated.
try to uninstall it from your phone. go to "Settings" > "Applications" > "Manage Applications" Look for the application name. Select it. There should be an option to uninstall it.
if you want to use adb in a shell, try sudo adb....
Try uninstalling the application through the phone first. This error is usually when you have installed the application in two different ways, so it has a different development signature so cannot update or reinstall.
What is the easiest way to upgrade an application that was installed on the OS? I cannot delete this application from Setting->Application List - "Uninstall" option is unselectable.
BTW: I have changed a few things on androidmanifest.xml, like added more activities, changed the start up(launch/main) activity. The package is the same. I have updated version name and code.
When I try to download a new version of the application, the OS installs TWO applications with the same name. Of course I want the previous to be replaced by the new one.
Have you tried uninstalling it through adb?
You'll need to connect your device to your computer via the USB cable and try this:
adb uninstall your.package
This is all assuming that you have the Android SDK installed and updated with the tools (adb).
And here is some more info on adb:
http://developer.android.com/guide/developing/tools/adb.html
You can delete the app in Command Prompt (Windows) or Terminal (OSX/Linux) with the command: adb uninstall com.packagename.package from your phone/simulator. Be sure to have 1 phone or 1 simulator open at the moment you execute this code.
Here is some more info about the ADB: http://developer.android.com/guide/developing/tools/adb.html