I have catch a strange problem about Android decomplie.
For research, I decomplie an Android apk by apktool and dex2jar, every thing seems ok, but when I use JD-GUI to open the decomplied .jar file, I cannot found any Android Activity class file in it, the interested was I saw the AndroidManifest.xml file which has wrote some activity path in it, and I promise I cannot found these classes file from those path, what's wrong with it? and how can do it?
--[Updated]--
I found that not only Activity class file not exists, but also some custom widget class file too, I saw some layout xml has used custom widget, but cannot found them real file. is there really in some way can hide the class file prevent others decompile?
Disassembling the .dex
file contains only the Java source code. This file is commonly classes.dex
, but for multi dex applications can exist anywhere in the classes#.dex
where #
is some number >= 1
.
You will not find AndroidManifest.xml
and various layout files in the .dex
file. These are located elsewhere (resources.arsc
, AndroidManifest.xml
and res/
) and only decoded to human-readable form with something like apktool.
Additionally, you can't hide anything. If the application runs on Android, there is a good chance it can be decoded. Obfuscation can help, but won't prevent viewing of source.