Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 433
sid123 Avatar asked Mar 26 '13 11:03

sid123


People also ask

Why won't my APK install on my Device?

Another way to get this error is to build using ant on macOS and have a Finder icon file ( Icon) in the source tree of the app. It appears jarsigner can't cope with the carriage return in the filename and, although it will claim the signing is valid if you -verify the APK, it always results in an APK that wont install on a device.

Why can't I install Android studio release install?

In newer Android Studio versions 3.2+, if you are trying to run release install, and you have not defined any signing configurations, it will show the error prompt and install will fail. What you need to do is either run the debug build or set up the signing configuration (V1 or V2) correctly.

Why do I need to sign every Android APK file?

Every Android .apk needs to be signed if it is going to be installed on a phone, even if you're not installing through the Market. The development tools work round this by signing with a development certificate but the .apk is still signed.

Why won't jarsigner sign my APKs?

It appears jarsigner can't cope with the carriage return in the filename and, although it will claim the signing is valid if you -verify the APK, it always results in an APK that wont install on a device. Ironically, the Google Drive Finder plugin is a great source of Finder icon files.


2 Answers

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.

like image 155
laaptu Avatar answered Oct 06 '22 17:10

laaptu


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.

like image 20
Raghav Sood Avatar answered Oct 06 '22 17:10

Raghav Sood