frida官方文档地址:https://www.frida.re/docs/javascript-api
1、python pip下载frida包
pip install frida
2、python安装frida-tools(提供cli工具命令,跟frida-server交互)
pip install frida-tools
3、下载frida server,放在手机上执行,注意手机cpu型号(一般模拟器都是x86型号)
下载地址:https://github.com/frida/frida/releases
可以在adb命令行输入下面命令查询cpu型号:
getprop ro.product.cpu.abi
找到对应frida版本且对应cpu型号的frida-server下载
如,当前frida版本是14.2.15,mumu模拟器cpu是x86
使用adb命令,将解压后的文件传入到手机
adb push frida-server-14.2.15-android-x86 /data/local/tmp/frida-server
给frida-server设置权限
cd /data/local/tmp
chmod 777 frida-server
4、测试是否安装,连接成功
手机命令行启动frida-server
adb shell
./data/local/tmp/frida-server
重开一个命令行窗口,运行frida-ps -U
frida-ps -U
最后,连接手机调试的,转发端口:
adb forward tcp:27042 tcp:27042
adb forward tcp:27043 tcp:27043