Obfuscapk icon indicating copy to clipboard operation
Obfuscapk copied to clipboard

Obfuscation paused in between

Open ArchanaNair opened this issue 4 years ago • 3 comments

Hi,

I am trying to run a basic command like below, but obfuscation paused in between, what could be the error here?

python3.7 -m obfuscapk.cli -p -d /.../obfuscated.apk -o Rebuild -o NewSignature -o NewAlignment /.../app-dev-release.apk

Running obfuscators (NewSignature): 33%|█████████████▋ |[00:31<01:02, 31.09s/obfuscator]

ArchanaNair avatar Apr 16 '21 15:04 ArchanaNair

Hi, try enabling the verbose logging to better understand what's going on. If the obfuscation is stuck on NewSignature maybe there is some problem with the underlying apksigner.

ClaudiuGeorgiu avatar Apr 16 '21 15:04 ClaudiuGeorgiu

@ClaudiuGeorgiu , thanks for the quick response. I have enabled log, As you said it got stuck in newsignature.

I have set the path of apksigner as below in MAC OS, environment variable.

export APKSIGNER_PATH=/../Library/Android/sdk/build-tools/29.0.3/apksigner
export ZIPALIGN_PATH=/../Library/Android/sdk/build-tools/29.0.3/zipalign export APKTOOL_PATH=/usr/local/Cellar/apktool/2.5.0/bin/apktool

I am not sure what causing apksigner issue? Please advise

ArchanaNair avatar Apr 16 '21 15:04 ArchanaNair

I am using comment like below

python3.7 -m obfuscapk.cli -o ConstStringEncryption -o Goto -o Rebuild -o NewSignature -o NewAlignment -p /Users/.../app-dev-release.apk --keystore-file /Users/.../key/xxxkeystore --[keystore-password storepwd] [--key-alias alias] [--key-password keypass]

O/P: Without any error, it is executing. But when I am trying to install obfuscated apk on my Device, It gives me an error that "App Not Installed". Is there any chance of apk got corrupted?,

Encrypting constant strings: 100%|██████████████████████████████████|[00:11<00:00, 634.70file/s] Inserting "goto" instructions in smali files: 100%|████████████████|[00:05<00:00, 1278.08file/s] Running obfuscators (NewAlignment): 100%|██████████████████████|[00:49<00:00, 9.91s/obfuscator]

I read in FAQ that, if app uses any anti-tampering technique or any sort of encryption, the application may not install My app uses androidx.security.crypto.EncryptedSharedPreferences and I have enabled the Proguard (shrink resource/ minify enables as true) also it is published via Intune( plugins are added in build.gradle) If this what causing an issue, how can I resolve it , Please help. I tried --ignore libs, but that doesn't seem working

I ran below basic command, which is executed without any error but app can't be installed python3.7 -m obfuscapk.cli -o Rebuild -o NewSignature -o NewAlignment <YOUR_APP.APK>

ArchanaNair avatar Apr 17 '21 09:04 ArchanaNair