INSTALL_PARSE_FAILED_NO_CERTIFICATES on installing rebuilt apk

6,403 views
Skip to first unread message

Greg Milette

unread,
Mar 27, 2013, 6:33:55 AM3/27/13
to apk...@googlegroups.com
I take a perfectly good .apk file

run:
./apktool d myapp.apk ./myappcontents
./apktool b ./myappcontents redo.apk
adb install redo.apk

Then I get this error:
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

Any idea why?

Thanks!

Jeffrey Walton

unread,
Mar 27, 2013, 6:36:16 AM3/27/13
to apk...@googlegroups.com
On Wed, Mar 27, 2013 at 6:33 AM, Greg Milette <greg...@gmail.com> wrote:
> I take a perfectly good .apk file
>
> run:
> ./apktool d myapp.apk ./myappcontents
> ./apktool b ./myappcontents redo.apk
> adb install redo.apk
>
> Then I get this error:
> Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
You did not sign the APK after re-assembling.

Tools like Eclipse perform the signing for you.
http://developer.android.com/tools/publishing/app-signing.html may
help. Debug signing is OK.

Jeff

Ryszard Wiśniewski

unread,
Mar 27, 2013, 6:43:08 AM3/27/13
to apk...@googlegroups.com
I think there are many tools available to simplify this process. I won't recommend you any, search for keywords like: apk signer auto, etc.

Greg Milette

unread,
Mar 27, 2013, 6:50:23 AM3/27/13
to apk...@googlegroups.com
There is this:

But it is indeed complex to understand. I get this error:

$ jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore keystore release.apk 
Enter Passphrase for keystore: 
jarsigner: Certificate chain not found for: release.apk.  release.apk must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.



On Wed, Mar 27, 2013 at 6:43 AM, Ryszard Wiśniewski <brut...@gmail.com> wrote:
I think there are many tools available to simplify this process. I won't recommend you any, search for keywords like: apk signer auto, etc.

--
You received this message because you are subscribed to a topic in the Google Groups "apktool" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/apktool/dVstYfXV5Ls/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to apktool+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jeffrey Walton

unread,
Mar 27, 2013, 7:56:46 AM3/27/13
to apk...@googlegroups.com
On Wed, Mar 27, 2013 at 6:50 AM, Greg Milette <greg...@gmail.com> wrote:
> There is this:
> http://developer.android.com/tools/publishing/app-signing.html
>
> But it is indeed complex to understand. I get this error:
>
> $ jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore keystore
> release.apk
> Enter Passphrase for keystore:
> jarsigner: Certificate chain not found for: release.apk. release.apk must
> reference a valid KeyStore key entry containing a private key and
> corresponding public key certificate chain.
Argument placement is critical. Its a lot like LD and "libraries must
be last". Here's what I use when using a debug key:

jarsigner -verbose -keystore C:\Users\<user>\.android\debug.keystore
-storepass android -keypass android -digestalg SHA1 -sigalg
SHA1withRSA <package name>.apk androiddebugkey

Jeff

Jeffrey Walton

unread,
Mar 27, 2013, 2:31:44 PM3/27/13
to apktool


On Mar 27, 6:33 am, Greg Milette <grego...@gmail.com> wrote:
> ...
>
> Then I get this error:
> *Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
> *
>
> Any idea why?
A good treatment of signing (both apps and platform components if
building the AOSP tree) can be found at "Android Security
Underpinnings from Android Builders Summit", http://www.youtube.com/watch?v=NS46492qyJ8.
Check near 13:00 minutes.

My apologies if you are not interested.

Jeff

ly...@hotmail.com

unread,
Apr 16, 2013, 1:02:58 AM4/16/13
to apk...@googlegroups.com
The Jeff´s solution works fine. Only replace the <...> with your data.
Reply all
Reply to author
Forward
0 new messages