ClaudiuGeorgiu / Obfuscapk

An automatic obfuscation tool for Android apps that works in a black-box fashion, supports advanced obfuscation features and has a modular architecture easily extensible with new techniques
MIT License
1.11k stars 288 forks source link

Simple -o Rebuild -o NewSignature -o NewAlignment makes APK broken #77

Closed trafficteam7 closed 3 years ago

trafficteam7 commented 3 years ago

Hello! I used next command: python3 -m obfuscapk.cli -o Rebuild -o NewSignature -o NewAlignment -i -p app-debug.apk The operation was successful. But I can't install result APK. I receive such error: Error

trafficteam7 commented 3 years ago

Found solution for me. Chose obfuscators, the last one is -o Rebuild. Than align obfuscated apk file with zipalign, I used the next command: zipalign -p 4 app-debug_obfuscated.apk outline.apk After that sign outline.apk with apksigner, I used the next command: apksigner sign --ks key.jks signed.apk - you should paste your keystore pass and key pass. And thats all, you receive signed apk.

ClaudiuGeorgiu commented 3 years ago

Hi @trafficteam7, thanks for reporting the issue and the solution. We will use apksigner instead of jarsigner in a future release of Obfuscapk, so issues like this should be solved (hopefully).