问题描述
我在AnBox设置中运行Android,我为android-x86_64下载了AnBox的frida服务器版本。
我遵循了以下步骤
adb push frida-server-12.11.18-android-x86_64
/data/local/tmp/
adb shell "chmod 755 /data/local/tmp/frida-server-12.11.18-android-x86_64
"
adb shell "/data/local/tmp/frida-server-12.11.18-android-x86_64
&"
如果我尝试的话,现在好了
# frida-ps -Uai
Failed to enumerate applications: unable to find process with name 'system_server'
但是如果没有AI的帮助,问题是无法看到正在运行的应用程序
frida-ps -U
PID Name
---- ------------------------------------
2333 frida-server-12.11.18-android-x86_64
1571 logcat
2335 logcat
48 sh
我的猜测是,这与在AnBox中运行的frida-server的权限有关,我试图以root身份启动它,但它使整个环境崩溃。
x86_64:/data/local/tmp $ ls -ll
total 110648
-rwxr-xr-x 1 u1_root u1_root 56645256 2020-10-15 16:11 frida-server-12.11.18-android-x86_64
drwxr-xr-x 2 root root 4096 2020-10-17 07:41 re.frida.server
关于如何使frida服务器可见的任何线索?
解决方法
您必须是sudo用户
注意:确保Frida-Server与您的Frida安装版本相同。 不过,只要主版本相同,您就可以在主机端安全地运行较新的版本。
已测试
user@user:~$ adb push frida-server /data/local/tmp/frida-server
user@user:~$ adb shell
x86_64:/ $ su
x86_64:/ # chmod 777 ./data/local/tmp/frida-server
x86_64:/ # ./data/local/tmp/frida-server
,
今天调试这个问题后,我发现 frida-agent-32.so 由于某种原因导致 zygote 崩溃。 zygote 崩溃后,Anbox 也立即崩溃。
因为我很懒,所以我决定寻找一种解决方法而不是修复这个错误。经过反复试验,我发现 64 位版本的代理 (frida-agent-64.so) 中不存在此错误。因此,禁用 32 位代理后,Frida 仍然可以注入并执行每个 64 位或 libhoudini (arm/arm64) 应用程序。
为了防止 frida-server 将代理注入 zygote(32 位),我简单地修改了两行,参见 the last commit。
如果您想避免自己编译 frida-server 的麻烦,您可以使用我的 compiled version。