Search code examples
javaandroidapkobfuscationapktool

How can I completely hide classes from Android app package?


A while ago I was decompiling an application with apktool in order to understand some snippets. the curious thing was that the application was obfuscated, in fact , the app presented just one class called "Protection.class" full of method like "class.forName" or "class.getMethod"..

Searching on google this is of course the reflection structure, but, seeing some tutorials I ve understood that the classes called by reflection have to be in the application package. And in my case there are no classes except the "protection" one.

In conclusion my questions are: Is it possible to completly take off classes from package and nevertheless use their methods in someway? Where they are stored in the apk folder (if they are)? Is there a way to interact with the apk building process in order to obfuscate code or (like in this case) hide classes from package?

NOTE: Proguard can't do it, I have already tested it in the past


Solution

  • Your screenshot shows that this is an app that is protected by DexGuard (the commercial development of ProGuard that goes a lot further).

    See also this answer: What methods are being used to protect this Android APK: Reflection? Encryption? How do I reverse engineer it and analyze it?