4 # just in case, stop Anbox 7
5 stop anbox
-container || true
7 # start cgroup-lite, else container may fail to start.
13 # start lxc-net, that sets up lxc bridge
16 # umount rootfs if it was mounted
17 umount
-l rootfs
|| true
19 mkdir -p /home
/anbox
/rootfs
20 mkdir -p /home
/anbox
/data
21 mount anbox_arm64_system.img rootfs
22 mount
-o remount
,ro rootfs
23 mount anbox_arm64_vendor.img rootfs
/vendor
24 mount
-o remount
,ro rootfs
25 mount
-o bind anbox.prop rootfs
/vendor
/anbox.prop
27 if mountpoint
-q -- /odm
; then
28 mount
-o bind /odm rootfs
/odm_extra
30 if [ -d /vendor
/odm
]; then
31 mount
-o bind /vendor
/odm rootfs
/odm_extra
35 # Anbox binder permissions
36 chmod 666 /dev
/anbox
-*binder
38 # Wayland socket permissions
39 chmod 777 -R /run
/user
/32011
41 # Set sw_sync permissions
42 chmod 777 /dev
/sw_sync
43 chmod 777 /sys
/kernel
/debug
/sync
/sw_sync
45 # Media nodes permissions
47 chmod 777 /dev
/MTK_SMI
48 chmod 777 /dev
/mdp_sync
49 chmod 777 /dev
/mtk_cmdq
50 chmod 777 /dev
/video32
51 chmod 777 /dev
/video33
53 lxc
-start -n anbox
-F -- /init