Frida 生成过程在 Android 上失败
Frida spawn process failed on Android
在运行命令"frida-trace -U -i open -f com.example.hellojni"之后,应用程序HelloJni就可以正常设置了。但是在我执行fellowing python脚本后,我崩溃了。
device = frida.get_device_manager().enumerate_devices()[-1]
session = device.attach(device.spawn(["com.example.hellojni"]))
ss = '''
console.log("hello")
'''
script = session.create_script(ss)
script.load()
session.detach()
日志 "hello" 显示在控制台中。但是应用程序刚刚崩溃,甚至 UI 也没有出现。 logcat 打印出如下内容:
04-17 06:14:58.279: E/WindowManager(570): Starting window AppWindowToken{41e429c0 token=Token{41f753c8 ActivityRecord{41ea5dc0 u0 com.example.hellojni/.view.MainActivity t39}}} timed out
04-17 06:14:58.279: W/ActivityManager(570): Process ProcessRecord{41dffd18 16943:com.example.hellojni/u0a203} failed to attach
04-17 06:14:58.289: I/ActivityManager(570): Killing 16943:com.example.hellojni/u0a203 (adj -100): start timeout
我的脚本错了吗?我正在使用 android4.4.4(dalvik 模式)、windows7、frida7.0.11..
任何帮助将不胜感激。
好吧,该工具非常出色,但是他们真的需要更新他们的文档。我花了将近一周的时间深入研究源代码试图解决同样的问题,结果发现根本没有问题。只是我们需要在一切设置完成后调用 device.resume() 。你的情况:
device = frida.get_device_manager().enumerate_devices()[-1]
pid = device.spawn(["com.example.hellojni"])
session = device.attach(pid)
ss = '''
console.log("hello")
'''
script = session.create_script(ss)
script.load()
device.resume(pid)
session.detach()
在运行命令"frida-trace -U -i open -f com.example.hellojni"之后,应用程序HelloJni就可以正常设置了。但是在我执行fellowing python脚本后,我崩溃了。
device = frida.get_device_manager().enumerate_devices()[-1]
session = device.attach(device.spawn(["com.example.hellojni"]))
ss = '''
console.log("hello")
'''
script = session.create_script(ss)
script.load()
session.detach()
日志 "hello" 显示在控制台中。但是应用程序刚刚崩溃,甚至 UI 也没有出现。 logcat 打印出如下内容:
04-17 06:14:58.279: E/WindowManager(570): Starting window AppWindowToken{41e429c0 token=Token{41f753c8 ActivityRecord{41ea5dc0 u0 com.example.hellojni/.view.MainActivity t39}}} timed out
04-17 06:14:58.279: W/ActivityManager(570): Process ProcessRecord{41dffd18 16943:com.example.hellojni/u0a203} failed to attach
04-17 06:14:58.289: I/ActivityManager(570): Killing 16943:com.example.hellojni/u0a203 (adj -100): start timeout
我的脚本错了吗?我正在使用 android4.4.4(dalvik 模式)、windows7、frida7.0.11.. 任何帮助将不胜感激。
好吧,该工具非常出色,但是他们真的需要更新他们的文档。我花了将近一周的时间深入研究源代码试图解决同样的问题,结果发现根本没有问题。只是我们需要在一切设置完成后调用 device.resume() 。你的情况:
device = frida.get_device_manager().enumerate_devices()[-1]
pid = device.spawn(["com.example.hellojni"])
session = device.attach(pid)
ss = '''
console.log("hello")
'''
script = session.create_script(ss)
script.load()
device.resume(pid)
session.detach()