Thursday, July 14, 2011

ADB Commands for sign in the apk files

Signing Android apk
Open cmd prompt , by default it will be C:\\Users\ganesh.v
Create a key store:
keytool -genkey -v -keystore Navionicskey.keystore -alias Navionics -keyalg RSA -keysize 2048 -validity 10000
Navionicskey.keystore will be generated in the path C:\\Users\ganesh.v
Sign the apk:
Jarsigner  -verbose  -keystore  Navionicskey.keystore  D:\Project\Android\it.navionics.norway.apk Navionics
D:\Project\Android\it.navionics.norway.apk  : absolute path to apk or you can copy apk to the current path
Verify if the apk is signed properly or not:
jarsigner  -verify  -verbose  -certs  D:\Project\Android\it.navionics.norway.apk


Sign in With Other Keys  Like  Shared keys ,Platform Keys and Etc


1) Export unsigned apk to keys folder.
 2) keys path > java -jar signapk.jar testkey.x509.pem testkey.pk8 apkname newname.apk
 3) path > adb install signed.apk
 4) run command: adb shell am instrument -w packagename/android.test.InstrumentationTestRunner

No comments:

Post a Comment