robotnix
robotnix copied to clipboard
waydroid: initial implementation
Successfully builds, but currently untested in a linux environment.
Built using: nix-build --arg configuration '{ device="x86_64"; flavor="waydroid; }' -A config.build.waydroid
Notes:
-
external/mesa3d
relies on the system/usr/bin/python
and needsMako
to be installed. - Required a manual fix for: https://github.com/WayDroid/anbox-halium/issues/22
@danielfullmer
I rebased and built from your branch, converted the image to raw image with simg2img, and copied generated image to /var/lib/waydroid/images
and run, but it doesn't mount as read-write.
(024099) [17:43:14] % mount /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(024099) [17:43:14] % mount -o remount,ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(024099) [17:43:14] % mount /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(024099) [17:43:14] % mount -o remount,ro /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(024099) [17:43:14] % touch /var/lib/waydroid/rootfs/vendor/waydroid.prop
touch: cannot touch '/var/lib/waydroid/rootfs/vendor/waydroid.prop': Read-only file system
(024099) [17:43:14] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(024099) [17:43:14] NOTE: The failed command's output is above the ^^^ line in the log file: /var/lib/waydroid/waydroid.log
(024099) [17:43:14] ERROR: Command failed: % touch /var/lib/waydroid/rootfs/vendor/waydroid.prop
(024099) [17:43:14] See also: <https://github.com/waydroid>
(024099) [17:43:14] Traceback (most recent call last):
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/__init__.py", line 69, in main
actions.container_manager.start(args)
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/actions/container_manager.py", line 132, in start
helpers.images.mount_rootfs(args, cfg["waydroid"]["images_path"])
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/helpers/images.py", line 113, in mount_rootfs
helpers.mount.bind_file(args, args.work + "/waydroid.prop",
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/helpers/mount.py", line 69, in bind_file
tools.helpers.run.user(args, ["touch", destination])
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/helpers/run.py", line 58, in user
return tools.helpers.run_core.core(args, msg, cmd, working_dir, output,
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/helpers/run_core.py", line 343, in core
check_return_code(args, code, log_message)
File "/nix/store/gadlk5s2wnkhv8srya51zwiksp51lk3g-waydroid-1.2.1/lib/python3.9/site-packages/tools/helpers/run_core.py", line 219, in check_return_code
raise RuntimeError("Command failed: " + log_message)
RuntimeError: Command failed: % touch /var/lib/waydroid/rootfs/vendor/waydroid.prop
~ via ❄️ impure (shell)
❯ mount | grep waydroid
/var/lib/waydroid/images/system.img on /var/lib/waydroid/rootfs type ext4 (ro,relatime)
/var/lib/waydroid/images/vendor.img on /var/lib/waydroid/rootfs/vendor type ext4 (ro,relatime)
My rebased waydroid branch: https://github.com/vroad/robotnix/tree/waydroid-old
Well it should mount as read-only, not read-write as waydroid is trying to mount images with mount -o remount,ro
, so what's the cause of the error?
I'm trying to update your scripts to build the image in a way closer to official guide, current script seems to be based on older version of waydroid, and no longer matches waydroid's current project structure.
I've just built images that at least boots successfully on waydroid! https://github.com/vroad/robotnix/commit/e414e42e46090107b0a70ad0ba617d755d7b715d