Failure [install_parse_failed_no_certificates] when attempting to install APK to the emulator

AndroidCmdEmulationApk

Android Problem Overview


I downloaded Myfiles.apk from the internet and I'm trying to install it to my Android emulator.

While installing Myfiles.apk file through the command prompt, I'm getting this error.

I tried following in command prompt

C:\android-sdk\tools> adb -s emulator-5554 install C:\Users\Me\Desktop\MyFiles.apk

How do I install this APK to the emulator correctly?

Android Solutions


Solution 1 - Android

This site helped me a lot to properly sign the unsigned apk. But,for the last process i.e. for jarsigner,following command need to be used

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore    my_application.apk alias_name.

Further do look upon this unable to sign zipexception if you encounter with any zipexception error . So overall,use following procedure

  1. keytool -genkey -v -keystore debug.keystore -alias android -keyalg RSA -keysize 2048 -validity 20000
  2. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore yourapkalign.apk alias_name
  3. zipalign -v 4 yourapk.apk yourapkalign.apk

Now,you can successfully install the apk file.

Solution 2 - Android

It means that the apk you downloaded hasn't been signed with any certificate, debug or otherwise.

You can sign it from the command line, as described here.

Solution 3 - Android

You can use the androiddebugkey the sign the apk.

The keystore lives in ~/.android, named debug.keystore.

Run

keytool -list -keystore ~/.android/debug.keystore

To see the debug key, we can see its name is androiddebugkey

Run the following command to sign the apk.

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.android/debug.keystore yourapp-release.apk androiddebugkey

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionsid123View Question on Stackoverflow
Solution 1 - AndroidlaaptuView Answer on Stackoverflow
Solution 2 - AndroidRaghav SoodView Answer on Stackoverflow
Solution 3 - AndroidEric LiuView Answer on Stackoverflow