Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Android: Solution "install parse failed no certificates"

DZone's Guide to

Android: Solution "install parse failed no certificates"

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

When I am trying to install third party apk using ADB tool, I have faced "Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]" error.

To resolve the issue, I have followed few steps.

Open command prompt; Go to your debug.keystore location.

For eg:

You can find the debug.keystore file in the following location

C:\Documents and Settings\User\.android

1.Using Zip align copied apk.

zipalign -v 4 D:\Test.apk D:\Testc.apk

2.keytool -genkey -v -keystore debug.keystore -alias sampleName -keyalg RSA -keysize 2048 -validity 20000

Now a prompt will ask for

  • Password
  • First and lastname
  • Name of Organization unit
  • Name of Organization
  • City
  • State
  • Country
After entering these fields we get our Certificate

3. jarsigner -verbose -keystore debug.keystore D:\Testc.apk sampleName

In some cases we need add -sigalg SHA1withRSA -digestalg SHA1 arguments to work out the step 3

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore debug.keystore D:\Testc.apk sampleNameNow it will ask for the password and then it will replace the apk with the signed one.

To check whether it is working or not, you can check using the following command.

jarsigner -verify D:\Testc.apk

Then I have installed apk using ADB.

Adb install D:\Testc.apk


Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}