3

I have made a signed apk of an android project. Whenever my client try to run it on the emulator, he faces the following error message:

D:\Android\android-sdk-
windows\tools>adb install -r abc.apk
500 KB/s (6940708 bytes in 13.534s)
        pkg: /data/local/tmp/abc.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

What is the resolution?

Scott Merritt
  • 1,284
  • 2
  • 13
  • 24
Muhammad Maqsoodur Rehman
  • 33,681
  • 34
  • 84
  • 124

6 Answers6

15

In my case it was because I signed it on a machine running JDK 7. Downgrading to JDK 6 fixed the problem. Thanks java.lang.SecurityException when install apk for the suggestion!

Community
  • 1
  • 1
Dan Osipov
  • 1,429
  • 12
  • 15
8

As mentioned by steelbytes, the error INSTALL_PARSE_FAILED_NO_CERTIFICATES suggests that the APK isn't signed like you think it is.

Run this command to verify which certificate was used to sign the APK:
jarsigner -verify -verbose -certs abc.apk

For each entry in the APK, you should see something like this:

sm    152412 Wed Oct 14 14:16:52 CEST 2009 classes.dex

      X.509, CN=Meebo, OU=Meebo, O=Meebo, L=Mountain View, ST=California, C=US
      [certificate is valid from 28/10/08 06:49 to 13/08/82 07:49]

Otherwise, if the APK isn't signed, you'll get the message jar is unsigned.

Christopher Orr
  • 110,418
  • 27
  • 198
  • 193
2

try below code it's worked for me.

Below line run when your jdk version is 6 for singing the apk

H:\Keytool>"C:\Program Files\Java\jdk1.6.0_09\bin\jarsigner.exe" -verbose -keystore donate.keystore "H:\Keytool\yourapkName.apk.apk" donate.keystore 

Below line run when your jdk version is 7 for singing the apk

H:\Keytool>"C:\Program Files\Java\jdk1.7.0_21\bin\jarsigner.exe" -verbose -keyst
ore denote.keyStore "H:\Keytool\yourapkName.apk" denote.keyStore -digestalg SHA1 -sigalg MD5withRSA
Emran Hamza
  • 3,829
  • 1
  • 24
  • 20
1

As Dan pointed out, check if you're running JDK 7. More info: http://code.google.com/p/android/issues/detail?id=19567

Scott Merritt
  • 1,284
  • 2
  • 13
  • 24
0

You can run the Command:

C:\Program Files\Android\android-sdk\platform-tools>adb logcat

It will give you a more detail on which exact file is not signed:

Package has no certificates at entry assets/META-INF/AIR/application.xml; ignoring! 
Khattab
  • 737
  • 1
  • 10
  • 20
-1

You could check if the client has not disabled installation of unsigned apps in the emulator.

the100rabh
  • 4,077
  • 4
  • 32
  • 40
  • All apps must be signed; an Android device (or emulator) will not accept an unsigned APK for installation. – Christopher Orr Apr 01 '10 at 17:39
  • If you're referring to allowing non-Market apps, this setting doesn't apply when "sideloading" via `adb`. – Christopher Orr Apr 01 '10 at 17:40
  • No I am specifically referring to allowing unsigned application to be allowed to be installed. – the100rabh Apr 02 '10 at 05:33
  • Ok, I haven't seen this setting before. I tried uploading an unsigned APK to a device and to an emultor and both refused it with `INSTALL_PARSE_FAILED_NO_CERTIFICATES`. Where would this be configured? – Christopher Orr Apr 02 '10 at 10:06
  • The setting I am talking of is at Settings->Applications->Unknown Sources – the100rabh Apr 02 '10 at 19:21
  • 1
    That's the setting I referred to in my second comment (it allows non-Market apps, not unsigned apps). Try it for yourself; loading an unsigned APK onto either a device or emulator with "Unknown Sources" enabled *still* results in the device rejecting the APK. The PackageParser will say "Package com.example has no certificates at entry AndroidManifest.xml; ignoring!". – Christopher Orr Apr 04 '10 at 13:30