1.在ida的安装目录下..\IDA Pro 7.0 Windows\idapro7\IDA 7.0\dbgsrv 下的android_server64 push到/data/local/tmp
2. 到 /data/local/tmp 下给与权限 chmod 777 android_server64 ,并 ./android_server64 运行脚本
3. adb forward tcp:23946 tcp:23946 通过命令进行端口映射
4.通过dumpsys activity | grep -i run 获取调试应用的包名和actvity
5.通过命令启动 adb shell am start -D -n com.netease.pm02/com.netease.ntunisdk.unisdk4UnityPlugin.AndroidPlugin
6. 通过ddms 获取应用的端口 (需要先关闭android studio 然后打开 \Sdk\tools\lib\monitor-x86_64\monitor.exe)
7. 打开ida -》 go -》 Debugger -> Attach -> Remote ARMLinux/Android debugger(在ida pro 64 位中,使用 Remote Linux 生效)
8.填入 127.0.0.1 端口 23946
9.选择要打开的应用包名
10. Debugger -> Debugger options 勾选suspend on process ,suspend on thread ,suspend on library 之后点击f9
11。通过 jdb -connect com.sun.jdi.SocketAttach:hostname=127.0.0.1,port=8616 恢复应用启动
12.通过点击ida Debugger-》Debugger windows -》Module list
---------------------------------------------------------------------------------------------------------------------------------
内存中dump数据使用脚本内容
在ida中使用 shift + F2 (File -> script command) 打开内存dump界面
dump 内存使用方法
static main(void)
{
auto fp,begin,end,lua;
fp = fopen("D:\\czymf.lua","wb");
begin = 0x7ce309d0;
end = begin + 0x000010c6;
for(lua = begin;lua<end;lua++)
{
fputc(Byte(lua),fp);
}
}
------------------------------------------------------------------------------------------------------------------
参考:https://blog.csdn.net/PLA12147111/article/details/98944803