1

I'm trying to install via ADB an .APK on an Android box.

So I connect to it via ADP and try to install.

$adb connect 192.168.0.33
connected to 192.168.0.33:5555
$adb -s 192.168.0.33:5555 install -r Myapk.apk
    pkg: /data/local/tmp/Myapk.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATIOTES]

Myapk.apk is an apk that I lost source code, so I've extract, edit it, compile and signed it back. That app works on my Nexus 5.

Edit: It was a visual bug. I just had to reboot the device.

BeGreen
  • 765
  • 1
  • 13
  • 39
  • Is the app still installed on the target device? – S.L. Barth is on codidact.com May 30 '16 at 14:47
  • 1
    Possible duplicate of [How to deal with INSTALL\_PARSE\_FAILED\_INCONSISTENT\_CERTIFICATES without uninstallation](http://stackoverflow.com/questions/3185444/how-to-deal-with-install-parse-failed-inconsistent-certificates-without-uninstal) – tynn May 30 '16 at 14:48
  • 2
    I've uninstalled the package with $adb pm uninstall – BeGreen May 30 '16 at 14:49
  • @tynn So creating a new signature would make my app work? – BeGreen May 30 '16 at 15:02
  • Make sure all of your SDK tools and plugins are up to date after upgrading Android Studio. this was my problem. see my answer with screenshot on this similar question. https://stackoverflow.com/questions/58688663/adb-install-failed/61434394#61434394 – Mathieu J. Apr 26 '20 at 00:38

1 Answers1

0

Try to -> pm uninstall "com.yourpackage.example" before. Examine if there sais "Success"

Perhaps there iss only mismatch on apk signing

  • I've done it too, but shouldn't -r reinstall over the package? – BeGreen May 30 '16 at 14:52
  • 2
    @BeGreen I believe that `-r` will _not_ reinstall over the package if the new version has a different signature than the old one. Otherwise, if the signature is the same, yes, it will. – Jonas Czech May 30 '16 at 14:55
  • @Nothingsoul Yes the uninstallation of the package does fails... I'm having this package : "/data/app/com.eureva.playertestgamepas-1.apk=com.eureva.playertestgamepad" So I do $adb shell pm uninstall com.eureva.playertestgamepas-1.apk=com.eureva.playertestgamepad But I have "Failure" – BeGreen May 30 '16 at 15:18
  • Did you try with titanium backup or similar to force the uninstalling? – Nothingsoul May 30 '16 at 15:22
  • Did you try to remove your app dir from /data/app/com.package.example? – Nothingsoul May 30 '16 at 15:55
  • @Nothingsoul No it is still at /data/app/com... But i don't want do to rm com.* because it will moslty cause more problem... – BeGreen May 31 '16 at 07:46
  • It's was a visual bug. It's has uninstalled the packages. It was telleming "FAILURE" because it was in fact uninstalled. So I had to reboot the device, and everything went well. – BeGreen Jun 02 '16 at 15:38