Posted on 2012-01-04 16:07
在路上... 閱讀(566)
評論(0) 編輯 收藏 所屬分類:
JAVA相關(guān)
1、使用apktool反編譯
apktool d [file.apk] [path]
2、根據(jù)需要修改配置文件、smali文件,如果需要反編譯成jar文件,可以使用dex2jar,然后使用jd-gui查看代碼
3、重新編譯成apk文件
apktool b [path] file.apk
4、簽名
使用JDK自帶工具keytool創(chuàng)建keystore
c:\>keytool -genkey -alias android.keystore -keyalg RSA -validity 10000 -keystore mystore.keystore
其中validity 為有效期天數(shù),這里創(chuàng)建的keystore文件也可以供eclipse打包apk時使用,注意記住密碼。
使用JDK自帶工具jarsigner簽名apk文件,需要輸入keystore的密碼
c:\>jarsigner -verbose -keystore mystore.jks -signedjar [簽名后的文件.jar] [需要簽名的文件.apk] my
5、安裝到手機上面測試
adb -d install -r signed-file.apk