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

利用docker构建redroid,容器启动失败,exited129 #790

Open
2 tasks
sugarcane99 opened this issue Nov 26, 2024 · 5 comments
Open
2 tasks

利用docker构建redroid,容器启动失败,exited129 #790

sugarcane99 opened this issue Nov 26, 2024 · 5 comments

Comments

@sugarcane99
Copy link

sugarcane99 commented Nov 26, 2024

Describe the bug
请详细描述问题(ZH_CN)
使用redroid-doc中的命令打包镜像【sudo tar --xattrs -c vendor -C system --exclude="./vendor" . | docker import --platform=linux/arm64 -c 'ENTRYPOINT ["/init", "qemu=1", "androidboot.hardware=redroid"]' - redroid】,运行容器时无法正常启动,显示exited129,dmesg -T查看有如下报错:

[Tue Nov 26 15:52:55 2024] init: mount("sysfs", "/sys", "sysfs", 0, NULL) failed Device or resource busy
[Tue Nov 26 15:52:55 2024] init: mount("selinuxfs", "/sys/fs/selinux", "selinuxfs", 0, NULL) failed No such file or directory
[Tue Nov 26 15:52:55 2024] init: Init encountered errors starting first stage, aborting
[Tue Nov 26 15:52:55 2024] init: InitFatalReboot: signal 6
[Tue Nov 26 15:52:55 2024] init: #00 pc 0000000000126498  /system/bin/init (android::init::InitFatalReboot(int)+104)
[Tue Nov 26 15:52:55 2024] init: #01 pc 00000000000bd894  /system/bin/init (android::init::InitAborter(char const*)+48)
[Tue Nov 26 15:52:55 2024] init: #02 pc 000000000001595c  /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
[Tue Nov 26 15:52:55 2024] init: #03 pc 0000000000014f8c  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+364)
[Tue Nov 26 15:52:55 2024] init: #04 pc 00000000000e70c4  /system/bin/init (android::init::FirstStageMain(int, char**)+5320)
[Tue Nov 26 15:52:55 2024] init: #05 pc 00000000000ab100  /system/bin/init (main+160)
[Tue Nov 26 15:52:55 2024] init: #06 pc 00000000000488c8  /system/lib64/bootstrap/libc.so (__libc_init+96)

尝试禁用SELinux,已经尝试过临时禁用【setenforce 0】和永久禁用【在/etc/selinux/config中写入SELINUX=disabled】
但启动docker容器仍是同样的报错

make sure the required kernel modules present
确保必须的内核功能已开启(ZH_CN)

  • grep binder /proc/filesystems
  • grep ashmem /proc/misc (optional)
    已经确保开启
@sugarcane99
Copy link
Author

tmp.zip

@zhouziyang
Copy link
Member

Check system/core, did you forget to apply the required redroid patches?

@sugarcane99
Copy link
Author

Check system/core, did you forget to apply the required redroid patches?

我之前已经执行了:

apply redroid patches

git clone https://github.com/remote-android/redroid-patches.git ~/redroid-patches
~/redroid-patches/apply-patch.sh ~/redroid

system/core下面应该是什么样子呢,我的路径下文件如图片所示
image

还想请教一下,应该如何正确关闭redroid中的selinux

@sugarcane99
Copy link
Author

发现虽然之前执行了打补丁的指令,但好像没起作用,我手动打了补丁,docker容器可以正常启动了,但是adb连接失败,报错:/system/bin/sh: No controlling tty: open /dev/tty: No such device or address

@sugarcane99
Copy link
Author

tmp.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants