Run frida-server in the emulator or device
Upload frida-server
First, let's test to make sure that we have working connectivity over ADB (Android Debug Bridge).
1. Open a command line and type adb devices

2. In order for frida to work, you need it's companion frida-server
, to be running on the device. You can download it from the frida releases page on Github.
Make sure you get the one corresponding with your device architecture. It could be "android-x86", "android-arm", etc. To see how to get the architecture, please refer to https://stackoverflow.com/questions/6630386/how-to-find-arm-processor-version-on-android-device
Make sure you have exactly the same frida version on device and on the PC. If not, you will get many errors.
3. Push it to /data/local/tmp
with adb push frida-server-XX.Y.ZZ-android-ARCH /data/local/tmp

4. Obtain root with adb root
, then connect to your device with adb shell
. Navigate to the /data/local/tmp
directory with cd /data/local/tmp
.
5. At this point it's preferred to rename frida-server-XX.Y.ZZ-android-ARCH
to something a little less annoying to type: mv frida-server-XX.Y.ZZ-android-ARCH frida-server
6. Make the server executable with chmod 777 frida-server
Run frida-server persistently using nohup
7. Start the server with nohup ./frida-server &
The reason we are using nohup
is to keep the process running even if we close our ADB terminal. You can absolutely just run ./frida-server
but then you must be mindful not to close the window.
Summary
Download frida from releases page on Github and then:
adb push frida-server-XX.Y.ZZ-android-ARCH /data/local/tmp
adb root
adb shell
cd /data/local/tmp
mv frida-server-XX.Y.ZZ-android-ARCH frida-server
chmod 777 frida-server
nohup ./frida-server &
Last updated