Converting DEX files to smali
Let's try to convert the same APK to smali
files, using another tool we used in Chapter 2, Setting Up a Mobile App Reverse Engineering Environment Using Modern Tools.
In order to decompile the APK, run the following command:
# apktool d app-debug.apk
apktool
uses smali
/baksmali
internally, while decompiling an APK file. The following figure shows that apktool
is decoding the app-debug.apk
file provided:
Once the APK has been decompiled, navigate to the folder created (in this case app-debug
), and you will find several subfolders inside it with the name smali*
. These folders contain the converted smali
files from the .dex
files in the APK:
Opening any of the smali
files will show the respective version of the code. Let's look at the content of the smali
files for...