Signing system apps

61 views
Skip to first unread message

Stephan

unread,
Jul 8, 2016, 12:11:56 PM7/8/16
to > warpx.io
Hi all,

I have an app for the WaRP that needs system permissions. I've been unsuccessful so far in signing it properly. I was wondering what procedure you guys used for the other system apps currently on the device.

What I've been doing is grabbing the app-debug.apk from app/build/outputs/apk and signing it using the keys from the github with the following syntax:

    java -jar signapk.jar testkey.x509.pem testkey.pk8 app-debug.apk app-signed.apk

When I put it it in /system/app I get:

    E/PackageParser( 2651): Package com.google.my.app has no certificates at entry AndroidManifest.xml; ignoring!

As well as

   W/PackageParser( 2651): Exception reading AndroidManifest.xml in /system/app/com.google.my.app-1.apk

The app runs fine when when installed normally (aside from the permission issues of course).

Another thing is when I run: jarsigner -verify -verbose -certs app-signed.apk I get:

    jarsigner: java.lang.SecurityException: cannot verify signature block file META-INF/CERT

Should I be using a different key or be using jarsigner in order to sign the certificate?

Cheers,
Stephan
Message has been deleted
Message has been deleted
Message has been deleted

Stephan

unread,
Jul 8, 2016, 4:26:36 PM7/8/16
to > warpx.io

It also says: W/PackageParser( 2651): java.lang.SecurityException: Incorrect signature (forgot to include this in the original post)

Diego Rondini

unread,
Jul 12, 2016, 6:02:14 AM7/12/16
to wa...@googlegroups.com, Stephan
In data venerdì 8 luglio 2016 09:11:55, Stephan ha scritto:
> Hi all,
>
> I have an app for the WaRP that needs system permissions. I've been
> unsuccessful so far in signing it properly. I was wondering what procedure
> you guys used for the other system apps currently on the device.
>
> What I've been doing is grabbing the app-debug.apk from
> app/build/outputs/apk and signing it using the keys from the github with
> the following syntax:
>
> * java -jar signapk.jar testkey.x509.pem testkey.pk8 app-debug.apk
> app-signed.apk*When I put it it in /system/app I get:
>
> * E/PackageParser( 2651): Package com.google.my.app has no certificates
> at entry AndroidManifest.xml; ignoring!*As well as
>

Hi Stephan,

I think you might try adding the "-w" option to your command line, as in this
example:
https://community.nxp.com/thread/380866#comment-593773

Let us know if this fixes your problem.

Bests,
Diego

Stephan

unread,
Jul 12, 2016, 1:31:20 PM7/12/16
to > warpx.io, 10.mail...@gmail.com
Hi Diego,

Thanks for the suggestion!
I tried adding the "-w" flag, but unfortunately the results were exactly the same as without it.

Best,
Stephan

davide...@kynetics.it

unread,
Aug 19, 2016, 5:54:37 AM8/19/16
to >warpx.io, 10.mail...@gmail.com
Hi Stephan,

you could try the "standard procedure" to sign an app
I noticed that you are usign app-debug.apk, so an apk signed with the debug key. You could try to sign as another test the unsigned apk generated by the gradle builds (as you can see from the link).

So my hint is to try your procedure with the unsigned apk and try the "standard procedure"

Bests
Davide
Reply all
Reply to author
Forward
0 new messages