Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Sign application using jarsigner

Android uses sign.jar file to sign some of its system applications (Eg: setting). Inorder to gain some extra permissions i need to sign my app using the same signature (platform) as that of setting. I did the signing and it works great.

Is it possible to sign my app using jarsigner instead sign.jar ? My project is using maven so switching from jarsigner to sign.jar for this app alone will break compatibly with other apps.

like image 499
Vinoth Avatar asked Mar 25 '26 01:03

Vinoth


2 Answers

On Java 1.7 you must user this:

jarsigner -sigalg MD5withRSA -digestalg SHA1 -keystore *pathtokey* -storepass *yourpass* -keypass *yourpass* *app.apk* *keyalias*
like image 156
ATom Avatar answered Mar 26 '26 14:03

ATom


You can use this command line

jarsigner -verbose -keystore yourKeyStore.keystore theFile.apk password

like image 25
Pedro Fraca Avatar answered Mar 26 '26 16:03

Pedro Fraca