簡體   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