Search code examples
androidandroid-studioinstallationapkadb

Can't Install app adb: failed to install app-release-unsigned.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES


I wanted to make my old phone into a spotify mp3 player and make spotify the home launcher app. I found this on github: https://github.com/joshmcarthur/spotify-launcher It is from 2016 and it says "app not installed when I try." I tried using adb but it says: "adb: failed to install app-release-unsigned.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed collecting certificates for /data/app/vmdl1324514741.tmp/base.apk: Failed to collect certificates from /data/app/vmdl1324514741.tmp/base.apk: Attempt to get length of null array]"

Can anyone please give me a working version or help me make one.

Thank You so Much.

Tryed regular .apk install and adb install.


Solution

  • The APK you can find in the project's release section has the name app-release-unsigned.apk that means it is not signed.

    As Android does only install signed APKs you have to sign it before you can install it. The common approach is to generate a self-signed certificate & key using keytool from Java JDK and then sign the APk file using apksigner from Android SDK.

    Alternatively you can use an "all-in-one" tool like uber-apk-signer allows to sign an APK using the built-in keystore, so you just have to execute it to sign the APK file.

    There are also Android apps that allow to signa APK files. So you would have to copy the APK file to the phone (not install) and then process it using one of those APK signer apps.