]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
anbox: Better odm mountpoint selection
authorErfan Abdi <erfangplus@gmail.com>
Thu, 20 May 2021 14:52:38 +0000 (19:22 +0430)
committerErfan Abdi <erfangplus@gmail.com>
Thu, 20 May 2021 14:52:38 +0000 (19:22 +0430)
lxc-configs/config
scripts/run-container.sh

index 7211572539fcddabdd196caebbcd4bc865738e3a..5c62ec70dc71168a4d4e4d152ceeb182fdca007f 100644 (file)
@@ -58,7 +58,6 @@ lxc.mount.entry = /home/anbox/data data none bind 0 0
 
 # Mount host /vendor to /vendor_extra
 lxc.mount.entry = /vendor vendor_extra none bind,optional 0 0
-lxc.mount.entry = /odm odm_extra none bind,optional 0 0
 
 # Recursive mount /run to provide necessary host sockets
 lxc.mount.entry = /run run none rbind,create=dir 0 0
index b620138a873ea298cb3d28792ea123a7c26dea17..19a782daa548f953dc39bfd0854fcefc2fef8591 100644 (file)
@@ -24,6 +24,14 @@ mount anbox_arm64_vendor.img rootfs/vendor
 mount -o remount,ro rootfs
 mount -o bind anbox.prop rootfs/vendor/anbox.prop
 
+if mountpoint -q -- /odm; then
+    mount -o bind /odm rootfs/odm_extra
+else
+    if [ -d /vendor/odm ]; then
+        mount -o bind /vendor/odm rootfs/odm_extra
+    fi
+fi
+
 # Anbox binder permissions
 chmod 666 /dev/anbox-*binder