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 # stop nfcd to not conflict with anbox
19 # umount rootfs if it was mounted
20 umount
-l rootfs
|| true
22 mkdir -p /home
/anbox
/rootfs
23 mkdir -p /home
/anbox
/data
24 mount anbox_arm64_system.img rootfs
25 mount
-o remount
,ro rootfs
26 mount anbox_arm64_vendor.img rootfs
/vendor
27 mount
-o remount
,ro rootfs
28 mount
-o bind anbox.prop rootfs
/vendor
/anbox.prop
30 if mountpoint
-q -- /odm
; then
31 mount
-o bind /odm rootfs
/odm_extra
33 if [ -d /vendor
/odm
]; then
34 mount
-o bind /vendor
/odm rootfs
/odm_extra
38 # Anbox binder permissions
39 chmod 666 /dev
/anbox
-*binder
41 # Wayland socket permissions
42 chmod 777 -R /run
/user
/32011
44 # Set sw_sync permissions
45 chmod 777 /dev
/sw_sync
46 chmod 777 /sys
/kernel
/debug
/sync
/sw_sync
48 # Media nodes permissions
50 chmod 777 /dev
/MTK_SMI
51 chmod 777 /dev
/mdp_sync
52 chmod 777 /dev
/mtk_cmdq
53 chmod 777 /dev
/video32
54 chmod 777 /dev
/video33
56 lxc
-start -n anbox
-F -- /init