Recompile Android Application using APKTool

1 comment
Simple step to recompile android application using apktool


apktool b <folder> <new apk name>

Example:
apktool b myapp myapp-new.apk

Not done yet, you need to sign the application.
Following command to generate keystore and sign the application.
keytool -genkey -v -keystore <keystore file name> -alias <alias> -keyalg RSA -keysize 2048 -validity 7300

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore <keystore file name> <apk name> <alias>

Example:
keytool -genkey -v -keystore myapp.keystore -alias myapp -keyalg RSA -keysize 2048 -validity 7300

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore myapp.keystore app-new.apk myapp

1 comment :

Post a Comment

Easiest way to extract certificate information from android application

No comments
unzip -l <file> | grep -i rsa | cut -d'/' -f2 | xargs -I{} unzip -p <file> META-INF/{} | keytool -printcert


Example Output:
Ramadhan:~ rz$ unzip -l Cyber999-release\ v2.apk | grep -i rsa | cut -d'/' -f2 | xargs -I{} unzip -p Cyber999-release\ v2.apk META-INF/{} | keytool -printcert 
Owner: CN=MyCERT, OU=Cyber999, O=CyberSecurity Malaysia, L=Seri Kembangan, ST=Selangor, C=MY
Issuer: CN=MyCERT, OU=Cyber999, O=CyberSecurity Malaysia, L=Seri Kembangan, ST=Selangor, C=MY
Serial number: 52b13a15
Valid from: Wed Dec 18 14:00:53 MYT 2013 until: Sun May 05 14:00:53 MYT 2041
Certificate fingerprints:
  MD5:  9B:7C:68:A0:8F:BB:BE:8F:C7:40:BB:CD:53:1B:69:D7
  SHA1: A6:A9:A1:67:0A:1F:07:07:0B:9E:4E:74:B2:86:2B:D4:B6:79:05:83
  Signature algorithm name: SHA1withRSA
  Version: 3

No comments :

Post a Comment

NodeJS - Installing node-steam on Ubuntu

No comments
Installing node-steam package via npm a bit tricky since its depend on ursa.

To make it easier, run following command, and you should be ok.

apt-get install build-essential libssl-dev

and you can continue install node-steam via npm
npm install steam

No comments :

Post a Comment

Hello World

2 comments
H e L L o W o R L d

2 comments :

Post a Comment