Android‎ > ‎

Unpacking and Repacking Apk

posted Feb 13, 2013, 1:04 AM by Akash Khaitan   [ updated Mar 9, 2013, 7:56 AM ]
Unpacking and repacking of Apk can be done using apktool

Get the Apktool from here

The apk tool folder should contain the apktool executable and the apktool.jar

 Uncompress  apktool d file.apk
 Modify Files
 Modify desired values, drawables etc
 Repackage to Apk
 apktool b foldername new_akp.apk
 Sign the Repackaged Apk
jarsigner -verbose -keystore my-release-key.keystore ./HelloWorld/dist/HelloWorld.apk alias_name

java -jar signapk.jar certificate.pem key.pk8 app.apk  app-signed.apk

Modified Apk needs to be signed.
In order to sign the modified Apk, use jarsigner or Signapk

Jarsigner (Asuming you have the keystore)
Use Jarsigner with java 1.6 and not 1.7
Issues with jar signer check below
Check the Jarsigner differences in java 1.6 and 1.7

Generating keys for Signapk

For Clear implementation, refer

Akash Khaitan,
Feb 13, 2013, 1:04 AM