Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 模拟器运行问题 #6

Closed
StarHeartHunt opened this issue Jun 22, 2022 · 5 comments
Closed

Android 模拟器运行问题 #6

StarHeartHunt opened this issue Jun 22, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@StarHeartHunt
Copy link

环境为 AVD 启动的 Android 12.0 Pixel 2,使用 63e6e2eActions 构建版本

eadb prepare 后执行 eadb shell,产生如下报错后连接被关闭

WARNING: linker: Warning: failed to find generated linker configuration from "/linkerconfig/ld.config.txt"
CANNOT LINK EXECUTABLE "/system/bin/ndk_translation_program_runner_binfmt_misc_arm64": library "libicu.so" not found: needed by /system/lib64/libharfbuzz_ng.so in namespace (default)
@StarHeartHunt StarHeartHunt changed the title Bug: 文件系统依赖缺失 Bug: 文件系统依赖库缺失 libicu Jun 22, 2022
@tiann
Copy link
Owner

tiann commented Jun 22, 2022

你可能需要自行构建 x86_64 的 image,Android 模拟器里面的 ndk_translation 会把 arm 指令转译成 x86 的,但很可能在 chroot 出来的 debian 系统不生效

@tiann
Copy link
Owner

tiann commented Jun 22, 2022

你可以试下这个 https://github.com/tiann/eadb/actions/runs/2541671847

@StarHeartHunt
Copy link
Author

你可以试下这个 https://github.com/tiann/eadb/actions/runs/2541671847

使用这个版本后可以成功进入 SSH了,感谢大佬。

不过没有找到演示视频里一样的 vmlinux 路径,可能需要出厂 Android 12 的真机才有完整的 eBPF 支持?

@SeeFlowerX
Copy link

可能需要一些内核头文件?

内核是4.19,我编译通过后,执行报错,提示没有开启CONFIG_IKHEADERS

Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module) or installing the kernel development package for your running kernel version.

不过提示可以指定内核源代码目录,根据bcc文档,可以在编译前设置BCC_KERNEL_SOURCE环境变量指定内核源代码目录

下载了手机内核的源代码,指定了重新编译测试,还是会找不到部分头文件,后来确认是结构不一样

然后发现安卓内核源代码一般都有个kernel_headers.py,感觉有办法生成bcc需要的一致的源代码结构

这样的话可能可以适配更多4.x系列内核的手机

@tiann
Copy link
Owner

tiann commented Jun 23, 2022

不过没有找到演示视频里一样的 vmlinux 路径,可能需要出厂 Android 12 的真机才有完整的 eBPF 支持?

我看过 Android 12 模拟器的内核配置,从参数上看是可以的;如果有问题,可以把日志或者输出啥的贴出来。

@tiann tiann changed the title Bug: 文件系统依赖库缺失 libicu Android 模拟器运行问题 Jun 23, 2022
@tiann tiann closed this as completed Jun 30, 2022
@tiann tiann added the help wanted Extra attention is needed label Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants