From: Erfan Abdi Date: Sat, 1 May 2021 13:46:35 +0000 (+0430) Subject: anbox: Cleanup lxc configs X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/8ef2f6ddcd44f5465fd4e49ed37f1874261a6bf9?ds=sidebyside anbox: Cleanup lxc configs --- diff --git a/lxc-configs/bsp_config b/lxc-configs/bsp_config deleted file mode 100644 index 1b7a932..0000000 --- a/lxc-configs/bsp_config +++ /dev/null @@ -1,37 +0,0 @@ -lxc.mount.entry = /dev/anbox-hwbinder dev/hwbinder none bind,create=file 0 0 -lxc.mount.entry = /dev/hwbinder dev/host_hwbinder none bind,create=file 0 0 -lxc.mount.entry = /home/anbox/data data none bind 0 0 -#lxc.mount.entry = /vendor/lib/hw vendor/lib/hw none bind,create=dir 0 0 -#lxc.mount.entry = /vendor/lib64/hw vendor/lib64/hw none bind,create=dir,optional 0 0 -lxc.mount.entry = tmpfs odm tmpfs defaults -lxc.mount.entry = /vendor vendor_extra none bind 0 0 -#lxc.mount.entry = /vendor/lib odm/lib none bind,create=dir 0 0 -#lxc.mount.entry = /vendor/lib64 odm/lib64 none bind,create=dir,optional 0 0 -#lxc.mount.entry = /dev/video dev/video none bind,create=dir 0 0 -#lxc.mount.entry = /dev/video0 dev/video0 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video1 dev/video1 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video2 dev/video2 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video3 dev/video3 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video32 dev/video32 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video33 dev/video33 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video4 dev/video4 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video5 dev/video5 none bind,create=file 0 0 -#lxc.mount.entry = /dev/video6 dev/video6 none bind,create=file 0 0 -#lxc.mount.entry = /system/etc/apns-conf.xml system/etc/apns-conf.xml none bind,create=file 0 0 -#lxc.mount.entry = /run/display run/display none bind,create=dir 0 0 -lxc.mount.entry = /run run none rbind,create=dir 0 0 -#lxc.mount.entry = /home/defaultuser mnt/media_rw/sailfishos_storage none bind,ro,create=dir 0 0 -#lxc.mount.entry = /run/media/defaultuser mnt/media_rw/alien_external_storage none rbind,rw,create=dir 0 0 -#lxc.mount.entry = /home/defaultuser/android_storage data/media/0 none bind,create=dir 0 0 -#lxc.net.0.type = none -lxc.mount.entry = /dev/kgsl-3d0 dev/kgsl-3d0 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/mali0 dev/mali0 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/pmsg0 dev/pmsg0 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/fb0 dev/fb0 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/graphics/fb0 dev/graphics/fb0 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/fb1 dev/fb1 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/graphics/fb1 dev/graphics/fb1 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/fb2 dev/fb2 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/graphics/fb2 dev/graphics/fb2 none bind,create=file,optional 0 0 -lxc.mount.entry = /dev/dri dev/dri none bind,create=dir,optional 0 0 -lxc.mount.entry = /dev/char dev/char none bind,create=dir,optional 0 0 diff --git a/lxc-configs/config b/lxc-configs/config index ce4d72c..118810f 100644 --- a/lxc-configs/config +++ b/lxc-configs/config @@ -1,4 +1,5 @@ -#lxc.rootfs.path = loop:/home/alien/system.img +# Anbox LXC Config + lxc.rootfs.path = /home/anbox/rootfs lxc.utsname = anbox lxc.arch = aarch64 @@ -17,40 +18,48 @@ lxc.network.name = eth0 lxc.network.hwaddr = 00:16:3e:f9:d3:03 lxc.network.mtu = 1500 +# Necessary dev nodes lxc.mount.entry = tmpfs dev tmpfs nosuid 0 0 lxc.mount.entry = /dev/zero dev/zero none bind,create=file,optional 0 0 -#lxc.mount.entry = /dev/random dev/random none bind,create=file,optional 0 0 -#lxc.mount.entry = /dev/null dev/null none bind,create=file,optional 0 0 lxc.mount.entry = /dev/full dev/full none bind,create=file,optional 0 0 lxc.mount.entry = /dev/ashmem dev/ashmem none bind,create=file,optional 0 0 lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/ion dev/ion none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/char dev/char none bind,create=dir,optional 0 0 + +# Graphic dev nodes +lxc.mount.entry = /dev/kgsl-3d0 dev/kgsl-3d0 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/mali0 dev/mali0 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/pmsg0 dev/pmsg0 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/fb0 dev/fb0 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/graphics/fb0 dev/graphics/fb0 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/fb1 dev/fb1 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/graphics/fb1 dev/graphics/fb1 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/fb2 dev/fb2 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/graphics/fb2 dev/graphics/fb2 none bind,create=file,optional 0 0 +lxc.mount.entry = /dev/dri dev/dri none bind,create=dir,optional 0 0 -# necessary dev nodes (renamed) +# Binder dev nodes lxc.mount.entry = /dev/anbox-binder dev/binder none bind,create=file 0 0 lxc.mount.entry = /dev/anbox-vndbinder dev/vndbinder none bind,create=file 0 0 +lxc.mount.entry = /dev/anbox-hwbinder dev/hwbinder none bind,create=file 0 0 +lxc.mount.entry = /dev/hwbinder dev/host_hwbinder none bind,create=file 0 0 -# necessary device nodes (same name) -lxc.mount.entry = /dev/ashmem dev/ashmem none bind,create=file 0 0 - -#lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file 0 0 -lxc.mount.entry = /dev/ion dev/ion none bind,create=file,optional 0 0 +# Necessary device nodes for adb +lxc.mount.entry = none dev/pts devpts defaults,mode=644,ptmxmode=666,create=dir 0 0 +lxc.mount.entry = /dev/uhid dev/uhid none bind,create=file,defaults,optional 0 0 -# temp - allow access to /dev/input -#lxc.mount.entry = /dev/input dev/input none bind,create=dir,optional 0 0 +# Low memory killer sys node lxc.mount.entry = /sys/module/lowmemorykiller sys/module/lowmemorykiller none bind,create=dir,optional 0 0 -# Mount /data - always /home/.android now -lxc.mount.entry = tmpfs mnt tmpfs mode=0755,uid=0,gid=1000 - -# useful device properties from the host -# lxc.mount.entry = /home/anbox/generated_props system/vendor/alien.prop none bind,create=file 0 0 -# Xkb - required for on screen keyboard -# lxc.mount.entry = /usr/share/X11/xkb usr/share/X11/xkb none bind 0 0 +# Mount /data +lxc.mount.entry = tmpfs mnt tmpfs mode=0755,uid=0,gid=1000 +lxc.mount.entry = /home/anbox/data data none bind 0 0 -# necessary device nodes for adb -lxc.mount.entry = none dev/pts devpts defaults,mode=644,ptmxmode=666,create=dir 0 0 -lxc.mount.entry = /dev/uhid dev/uhid none bind,create=file,defaults,optional 0 0 +# Mount host /vendor to /vendor_extra +lxc.mount.entry = /vendor vendor_extra none bind,optional 0 0 -lxc.include = /var/lib/lxc/anbox/bsp_config +# Recursive mount /run to provide necessary host sockets +lxc.mount.entry = /run run none rbind,create=dir 0 0 lxc.hook.post-stop = /dev/null