Frida installation (I)
1. Objectives
Frida is a hook framework based on python+javascript, which can run on various platforms such as android, ios, linux, win, etc. It mainly uses dynamic binary instrumentation technology. It is also a widely used reverse engineering tool.
2. Installation
Install frida on Mac
pip install frida
Tip:
pip install frida
If you have installed an old version before, you must uninstall the old version first.
pip uninstall frida
Then install frida-tools
pip install frida-tools
Tip:
If prompted PermissionError: [Errno 13] Permission denied: 'PKG-INFO'
, you can addsudo
After the installation is complete, check the installed frida version
frida --version
12.11.18
Install frida on android
Install frida-server on a rooted device
-
First check the phone model and download the corresponding version of https://github.com/frida/frida/releases[frida-server]
adb shell getprop ro.product.cpu.abi arm64-v8a
-
My phone model is arm64-v8a, so I downloaded frida-server-12.11.18-android-arm64.xz and unzipped it intofrida-server-12.11.18-android-arm64
-
Push the unzipped file to the device, specify the path /data/local/tmp and rename it to frida-server
adb push frida-server-12.11.18-android-arm64 /data/local/tmp/frida-server
-
Run frida-server in the android device
adb shell su cd /data/local/tmp chmod 755 frida-server ./frida-server
After the execution is completed, it is in the running state. This shell cannot be closed. If you close it, Frida will stop.
-
Perform port forwarding monitoring
adb forward tcp:27042 tcp:27042 adb forward tcp:27043 tcp:27043
-
Check whether the frida-ps -U command is successfully executed and the process list is successfully output, as shown below
MacBook-Pro:~ h1yx$ frida-ps -U PID Name ----- ------------------------------------- 3973 .dataservices 484 adbd 527 adsprpcd 3891 android.ext.services ...
This way frida is installed successfully.