Install the latest version
# Install frida
pip3 install frida-tools
# Install objection
pip3 install objectionInstall an older version
setup.py look at
install_requires. It tells you what frida version it’s
supported. In this case frida-tools 13.6.1 supports
frida >= 16.2.2, < 17.0.0. If we choose
frida-tools 11.0.0, it supports
frida >= 15.2.0, < 16.0.0 so it will not
work.pip install frida==15.2.0 frida-tools==11.0.0pip listPro: you don’t need to have a rooted device.
# Inject Frida into an APK
objection patchapk -s target.apk
# Inject specific version of frida into an APK
objection patchapk -V 14.2.8 -s target.apkThis quickly extracts, patches, re-packs, aligns, and signs the
APK [↗].
The patch is applied with the frida-gadget.so
Note: The app will pause at launch, waiting for Frida. Start it with:
frida -U <package_name>Requirement: a rooted device
Download the right frida-server version from Github
Extract it
Push it on the device
adb push frida-server /data/local/tmp/Note: We choose this path because other parts,
such as /sdcard, are commonly mounted no-exec.
Run frida-server
adb shell
su
cd /data/local/tmp
chmod +x frida-server
# Launch the server
./frida-serverNow we can connect to the application by running:
frida -U <package_name>Guide: https://github.com/frida/frida/discussions/2411
# List the available devices for frida
frida-ls-devices
# Connect Frida to a device over USB and list running processes
frida-ps -U
# List running applications
frida-ps -Ua
# List installed applications
frida-ps -Uai
# Connect Frida to the specific device
frida-ps -D 0216027d1d6d3a03
# Spawn application with frida
frida -U -f <package_name>
# Spawn application with frida
frida -U -f <package_name> --pause
# Spawn application with a script
frida -U -f <package_name> -l <script.js>
# Attach to application
frida -U <package_name>When frida doesn’t work correctly, try to downgrade. A lot of time it’s a regression.