我发现问题了,这个app他双进程的,frida默认hook到的进程居然不是这个app的业务进程。
可以通过查找进程的pid来hook。
先进入shell
blueline:/ # ps -A | grep com.example
u0_a293 9729 1118 49252836 153964 futex_wait_queue_me 0 S com.example.script1719198634987:script
u0_a293 9765 1118 15142616 55960 SyS_epoll_wait 0 S com.example.script1719198634987
发现2个pid。要hook谁?
dump当前堆栈。得到:
ACTIVITY com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity d2bc28e pid=8729
ACTIVITY com.google.android.apps.nexuslauncher/.NexusLauncherActivity aa9a841 pid=2829
ACTIVITY com.example.script1719198634987/com.stardust.autojs.inrt.SplashActivity 77b9e69 pid=9729
看这里:9729,就是他了。
接着frida:
firda -U -p 9729 -l test.js
└─[0] <> frida -U -p 9729 -l sun.js
____
/ _ | Frida 16.4.7 - A world-class dynamic instrumentation toolkit
| (_| |
> _ | Commands:
/_/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://frida.re/docs/home/
. . . .
. . . . Connected to Pixel 3 (id=)
[Pixel 3::PID::9729 ]-> onResume hook ~~~
p8.e is called: str=https://360mixup.com/feature/pack/verify, map=[object Object], f3Var=cd.xi$a@8b7ac87
C0115.m2849 is called: obj=android.app.ContextImpl@8a0594c, obj2=卡密无效, i7=1
C0115.m2849 result=android.widget.Toast@1c93e11
|