Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I attempted to force uninstall in ADB, but failed:

$ adb shell pm uninstall -k org.openintents.filemanager
$ adb shell pm list packages -f | grep -i manager
package:/system/app/FileManager.apk=org.openintents.filemanager

What went wrong here? What can I do?

I used the internal application manager and there isn't an option to delete it.

share|improve this question

migrated from stackoverflow.com Aug 12 '11 at 18:06

This question came from our site for professional and enthusiast programmers.

Tapemaster has made a Stack Overflow post which demonstrates the necessary trick.

Do this:

1. Install adb on your computer.

2. Root your phone.

3. Enter these commands into your computer:

adb shell
su
mount -o remount,rw /system
rm /system/app/UnwantedApp*
pm uninstall org.unwantedapp
exit
exit

The third command remounts /system read-write. The fourth command deletes the app's .apk and/or .odex files. The fifth command finishes the uninstallation.

In my experience: If you have already entered the the fourth command, then the fifth command will return Success. Otherwise, the fifth command will return Failure.

When entering the above commands, you must replace UnwantedApp with the app's real filename (without the extension), and org.unwantedapp with the app's real Java package name.

share|improve this answer
    
Can you justify the existence of your answer, when the majority of the content as well as the essence is already covered in an existing answer? – Firelord Dec 15 '15 at 18:41
    
@Firelord: 1. When "pm uninstall" reports "Success", it gives users confirmation which reassures them that they've done everything right. Sadly, rm -rf /data/data/org.openintents.filemanager doesn't provide such confirmation. 2. I speculate that pm uninstall might do more than just removing the app's data directory even in current Android versions. And definitely it might do more in Android versions which will be released a decade from now. Really, pm uninstall is the Right Way to uninstall packages. I urge you to choose the Right Way instead of trying to kludge things yourself. – unforgettableid Dec 15 '15 at 18:57

I get this issue quite often while developing applications.

Often just doing:

adb uninstall org.openintents.filemanager

If this doesn't work then the following will often work for me:

adb shell
cd /data/local/tmp
ls

If you see your package in that directory you can remove it with:

rm -R org.openintents.filemanager

Hope this helps.

share|improve this answer

Well, since the FileManager.apk package resides in a /system/app/ directory it is a system app. So the general way to remove it is:

adb shell
su
mount -o rw,remount /system
rm -rf /system/app/FileManager.apk
rm -rf /data/data/org.openintents.filemanager
mount -o ro,remount /system
exit
exit
share|improve this answer

The 'Failure' problem has more to do with the adb shell appending a DOS line ending ^M (on CentOS Linux anyway). Put the list of applications to uninstall in a file and copy to the android device directly.

root@android:/root # dos2unix list-of-apps-to-uninstall.txt     
root@android:/root # for f in `cat list-of-apps-to-uninstall.txt` ; do echo $f; pm uninstall $f; done;
share|improve this answer

When manually deleting application from /system remember to delete their corresponding data folder in /data/data/«identifier»

There is also a track of the previous apk signature in /data/system/packages.xml that can prevent a reinstall of a rebuilt package with a different key.

share|improve this answer

Edit: when I saw the comment to CommonsWare answer I did not realize it was the same as the asker... anyways, a little explanation may be useful for somebody.

As yourself commented, the easiest way to uninstall a system app is plainly to delete the .apk file. The adb install / adb uninstall commands are useful for regular apps, not system apps. Since this apk is located in /system/app, adb uninstall will not remove it.

You can use the command suggested (rm /system/app/YourApp.apk), but before the /system folder need to have write access. You will need to see how to remount /system in your specific device, try searchig for "android remount +rw /system" and your device).

Alternatively, you may use any app that can do both deletion and remounting and has root access, such as Root Explorer and Astro

share|improve this answer
    
thanks aleadam... plot thickens because the rm that i did removed the apk but, maybe, not the cache.. Im unable to install from the market .. that fails .. looks like i either have to clear the dalvik cache or just revert the entire ROM to a backup image... install at cmd line with adb ==> [INSTALL_FAILED_UPDATE_INCOMPATIBLE] ... unable to use market to download install ... get "installation error incompatible update" ... im on a custom rom and have a backup thats 2 weeks old and i may just revert to that. – Robert Rowntree Apr 10 '11 at 0:01
    
link what i should have done is in the 2nd post on this thread – Robert Rowntree Apr 10 '11 at 0:52

Use adb uninstall org.openintents.filemanager.

share|improve this answer
3  
adb remount ... adb shell rm -f /system/app/FileManager.apk – Robert Rowntree Apr 9 '11 at 23:18
    
thanks commonsware – Robert Rowntree Apr 9 '11 at 23:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.