Frida

All the following main commands are implemented in HacknDroid.
Installation
Install frida-tools
pip install frida-toolsIdentify the current
fridaversion
frida --versionFrida-server setup
Download frida-server for the current version of frida (for Android) from here
Move the frida-server on the mobile device
adb push frida-server /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/frida-server"
adb shell "su -c '/data/local/tmp/frida-server &'"Cheat sheet
List applications
Command
Description
frida-ps -U
List apps on USB device
frida-ps -Ua
List apps including system processes
Attaching a running process
Command
Description
frida -U -n <package_name>
Attach by package name
frida -U <pid>
Attach by PID
Spawn an app and inject script immediately
frida -U -f com.example.app -l myscript.js --no-pauseOther frida tools
frida-trace
Trace native open() calls:
frida-trace -U -i "open" <package_name>Trace Java methods:
frida-trace -U -j -i "java.io.*" <package_name>Auto-instrument functions by pattern:
frida-trace -U -i "ssl*" <package_name>REPL
Interactive JS REPL after attach:
frida -U -n <package_name>frida-compile
Convert JS module into single file to load simpler:
frida-compile script/ -o script.compiled.jsLast updated