Android Apk Deompile and resign tools
NOTICE:
When use jarsigner to resign the new apk, it should use Java 1.6, 1.7 has some problems.
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/
./apktool D name.apk
./apktool B name/
sh /path/to/dex2jar-version/d2j-dex2jar.sh /path/to/someApk.apk
If you are still using the old version dex2jar-0.0.9.15
, then use
cd dex2jar-0.0.9.15
./dex2jar.sh classes.dex
keytool -genkey -v -keystore android_apk_tool.keystore -alias android_apk_tool -keyalg RSA -keysize 2048 -validity 1000000
alias:android_apk_tool pass:pjq.me
cd resign_tool
./resign_apk.sh path_to_apk.apk
keytool -genkey -v -keystore android_apk_tool.keystore -alias android_apk_tool -keyalg RSA -keysize 2048 -validity 1000000
alias:android_apk_tool pass:pjq.me
cd resign_tool
./resign_apk.sh path_to_apk.apk
adb wrapper bash script for the situation when more than one devices are connected.
./adbw.sh logcat
./adbw.sh install path_to_apk.apk
Or you can move the adbw.sh to /usr/local/bin, this would be better
cp adbw.sh /usr/local/bin/adbw
Usage:
pengjianqings-iMac:android_apk_tool pengjianqing$ adbw logcat
Find more than one device:
1:192.168.56.101:5555 device
2:0149B33D1600C014 device
Please select your devices: 2
Lunch the jd-gui to read the jar file generated by dex2jar
tool to setup the Java home