Hello all! I'm Hai Nguyen, and today I'll post my very first reversing Android tutorial. In this blog, I'll write about the preparation of setup tools related to Android.
First, you need to install these things:
- Android Studio
frida-tools(pip install frida-tools)
- In Android Studio installation, you just follow the setup wizard and install any recommended SDK packages.
- After finishing the installation, you should go to
Virtual Device Managerand create a new device. - In the
Select Hardwarewindow, you can choose your device as you want: in that case, you should choose the smallest size of device to display all the screens easily. - Then click
Nextto go to theSystem Imagewindow. You must select a device that supports root permission. I prefer to selectGoogle APIsfor the new device, and it will support root permission. - Note: You should look at the
Play Storecolumn and select a device with noPlay Storeicon, that device should haveGoogle APIs. Click on theNextbutton to verify your new device and finish the installation.
- First, you should set the environment path for
adb.exein system variables (make sure fileadb.exeis located in theplatform-toolsfolder). - Download the latest
frida-serveron this GitHub release. - Note that you have to select a
frida-serverthat matches your device architecture. The format is the following:frida-server-xx.xx.xx-android-your_arch.xz - Then make sure your version of
frida-serveris the same as yourfrida-tools:frida --version - If you were successful in the previous step, you can start your Android emulator and try this command to see your connected devices:
adb devices - Next, type
adb rootto promote your current permission to root. If it does not show anything, it means youradbhas been run with root. - Then use the commands below:
$ adb push <frida-server-file-path> /data/local/tmp
$ adb shell "chmod 755 /data/local/tmp/frida-server"
$ adb shell "/data/local/tmp/frida-server &"
- Now you can verify the
frida-serverfile is running by using this command in another terminal:adb shell "ps -A | grep frida" - You should see your
frida-serverrunning as root. So that is the final step in setting upfrida-serverin your Android emulator. Thanks for reading!