APK is not being obfuscated in Release / Debug flag off
Obfuscating debuggable version of any app works.
I did alot of testing. I noticed that if an app in debug mode BUT the debuggable flag in build.gradle is switched to false the app will not be obfuscated using CallIndirection / Reflection / AdvancedReflection.
When turned off, then the app can be obfuscated via mentioned methods.
apktool version 2.5.0
Command used:
python3 -m obfuscapk.cli -p -d /home/test/Obfuscapk/src/conversations-free-compat-universal-debug_ON_OBFUSCATED.apk -o CallIndirection -o Rebuild -o NewAlignment /home/test/Obfuscapk/src/Conversations-2.9.13-conversations-free-compat-universal-debug_ON.apk
I also observed something strange.
I was able to get CallIndirection obfuscation to work on debuggable = false apk.
The trick was to use ClassRename before using CallIndirection.
I decompiled the APK and it showed classes changed and CallIndirection being applied.
The result was the APK was not working
I found a work around, but it is tedious to execute.
I found out the main problem, it is with apktool.
It seems like it is not decompiling apk's with debug flag enabled properly. when the flag is enabled I see the folder has many smali files compared to debug disabled apk's