Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

“unable to inject library into process without libc” when attach to child process that origin=exec

未关闭
#200 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
android, python

调研方向

从 examples/child_gating.py 开始,复现 Android 中 origin 从 fork 变为 exec 的 child-added 序列。沿着 frida/core.py 以及 frida_tools/application.py 中报告的调用点跟踪 attach 路径,对比成功的 fork attach 与失败的 exec attach。当报告的 exec 情况得到解决,或明确确定其属于不受支持的行为并由适当的回归检查覆盖时,即可视为完成。

由索引模型根据 Issue 内容生成。

描述

this is my environment:
genymotion: 3.2.1 + Samsung Galaxy S7 6.0-API 23,also test on Google Nexus 5X 8.0-API 26
frida-server: frida-server-15.1.17-android-x86,also tested frida-server-15.1.14-android-x86 and frida-server-15.0.0-android-x86
script: https://github.com/frida/frida-python/blob/master/examples/child_gating.py
I only changed the argv to myappid
def _start(self):
argv = [myappid]

and I got these outputs:

✔ spawn(argv=['myappid'])
✔ attach(pid=4486)
✔ enable_child_gating()
✔ create_script()
✔ resume(pid=4486)
⚡ child_added: Child(pid=4602, parent_pid=4486, origin=fork)
✔ attach(pid=4602)
✔ enable_child_gating()
✔ create_script()
✔ resume(pid=4602)
⚡ child_removed: Child(pid=4602, parent_pid=4486, origin=fork)
⚡ child_added: Child(pid=4602, parent_pid=4602, origin=exec, ......)
✔ attach(pid=4602)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/nothing/miniconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/nothing/miniconda3/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/nothing/miniconda3/lib/python3.7/site-packages/frida_tools/application.py", line 765, in _run
work()
File "lavpn.usa_spawn_gating.py", line 20, in
self._device.on("child-added", lambda child: self._reactor.schedule(lambda: self._on_child_added(child)))
File "lavpn.usa_spawn_gating.py", line 61, in _on_child_added
self._instrument(child.pid, child)
File "lavpn.usa_spawn_gating.py", line 45, in _instrument
session = self._device.attach(pid)
File "/home/nothing/miniconda3/lib/python3.7/site-packages/frida/core.py", line 26, in wrapper
return f(*args, **kwargs)
File "/home/nothing/miniconda3/lib/python3.7/site-packages/frida/core.py", line 165, in attach
return Session(self._impl.attach(self._pid_of(target), *args, **kwargs))
frida.NotSupportedError: unable to inject library into process without libc

We can see that when attach the child process which origin is fork,it's ok.
but when attach the same process which origin changed to exec,the error occurs.
I searched and find https://github.com/frida/frida/issues/936,but no lucky.
I think maybe because I used genymotion emulator, but why first attach is ok?

主要语言
Python
星标
873
派生
173
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

frida/frida-python 的其他 Issue

查看 frida/frida-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。