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.09k stars 285 forks source link

Apk crashes after obfuscation #140

Closed AnkitaAngane closed 2 years ago

AnkitaAngane commented 2 years ago

Hello!

I have followed each and every steps mentioned in the guide. Obfuscation process has done absolutely fine. I haven't encountered any error in between the process. But when I try to install obfuscated.apk file on android, It throws "App not installed as package appears to be invalid" I have python 3.7.8 and using below command for obfuscation.

python -m obfuscapk.cli -p -o ClassRename -o ConstStringEncryption -o Rebuild -o NewAlignment -o ResStringEncryption -o FieldRename D:\Check\m.apk

Would appreciate your guide further on this.

image

Dado1513 commented 2 years ago

Hi @AnkitaAngane, you should add NewSignature option.

AnkitaAngane commented 2 years ago

@Dado1513 Thank you, It worked!

AnkitaAngane commented 2 years ago

@Dado1513 I have one more query wrt to NewSignature, I don't want to add NewSignature and use the one from .jks file, So instead of using -o NewSignature, I am using appending command --keystore-file to pass .jks file followed with --keystore-password, --key-alias, --key-password

As earlier, everything is working fine but It throws "App not installed as package appears to be invalid"

Thanks in advance :)

ClaudiuGeorgiu commented 2 years ago

-o NewSignature is always needed, even when you use a custom keystore. If you don't use -o NewSignature the app won't be signed and every parameter regarding the keystore will be ignored.