bstar55
bstar55

Reputation: 3624

Android: How do I uninstall a platform-signed package via the command line

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:

  1. Go into Settings->Apps and click Uninstall
  2. 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?

Upvotes: 0

Views: 576

Answers (1)

DigCamara
DigCamara

Reputation: 5578

Do you know the app's package? If so, try

adb uninstall *com.name.of.package*

(as documented, for instance, at this site ).

Upvotes: 1

Related Questions