繁体   English   中英

Frida生成过程在Android上失败

[英]Frida spawn process failed on Android

运行命令“ frida-trace -U -i open -f com.example.hellojni”后,将正常设置应用程序HelloJni。 但是,当我执行了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()

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM