These are my personal notes.
Sign APK
1. Generate Keystore (Only Once)
1 | keytool -genkey -v -keystore chaos.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias app |
2. Zipalign
1 | /home/chaos/Android/Sdk/build-tools/26.0.1/zipalign -p -v 4 '/home/chaos/Websites/App/chaos/app-release.apk' '/home/chaos/Websites/App/chaos/chaos-1.0.6-aligned.apk' |
3.Sign & Verify
The script file can be found in %ANDROID_HOME%/sdk/build-tools/24.0.3/ (the .jar is in the /lib subfolder). Use it like this
1 | /home/chaos/Android/Sdk/build-tools/26.0.1/apksigner sign --ks '/home/chaos/.apkstudio/vendor/chaos.keystore' --out '/home/chaos/Websites/Nethunter/themes/Dreamhunter/source/app/download/chaos-1.0.6.apk' '/home/chaos/Websites/App/chaos/chaos-1.0.6-aligned.apk' |
Verify:
1 | /home/chaos/Android/Sdk/build-tools/26.0.1/apksigner verify '/home/chaos/Websites/App/chaos/chaos-1.0.6.apk' |
Decomplie
Tools
Apktool:
1 | apktool d chaos.apk |
Apk Studio:
1 | '/home/chaos/Softwares/APK Studio/apkstudio/apkstudio' |
Install Qt5 on Debian
1 | apt install qt5-default qttools5-dev-tools |
Check Download Permisson:
1 | grep -r download /home/chaos/Websites/App/chaos/app-release/ |
Summary
Decomplie
Remove a$c.smali link and array_data
Turn Toast to Toastr in a$c.smali
Remove b$a.smali link
Remove b$b.smali link
Remove v.smali link
Build
Sign