Modifying and recompiling the application
Often, it is necessary to not just reverse engineer the application, but also change something, and then repack it. To create a modified APK, you will need to recompile the modified code and then sign the APK again.
Let's say we want to modify the encryption key in the application and then recompile it. To do so, you will need to perform the following steps:
- Decompile the APK. We have already decompiled the SecureStorage application using
apktool
, with the#apktool d app-debug.apk
command. - The decompilation process will provide us with the required
smali
files. So, let's open theEncryptionUtils.smali
file. - In this
smali
file, we can change the value of the encryption key to something else, such asabcdef12345
. - To recompile the application, we can again use
apktool
. Run the#apktool b
command. Ensure that this command runs in the same directory where the application was extracted. It will compile the new...