I have a .dex
file, call it classes.dex
.
Is there a way to "read" the contents of that classes.dex
and get a list of all classes in there as full class names, including their package, com.mypackage.mysubpackage.MyClass
, for exmaple?
I was thinking about com.android.dx.dex.file.DexFile
, but I cannot seem to find a method for retrieving an entire set of classes.
Use the command line tool dexdump
from the Android-SDK. It's in $ANDROID_HOME/build-tools/<some_version>/dexdump
. It prints a lot more info than you probably want. I didn't find a way to make dexdump
less verbose, but
dexdump classes.dex | grep 'Class descriptor'
should work.