4 if [ ! -e /dev
/anbox
-hwbinder ] || [ ! -e /dev
/ashmem
]; then
5 modprobe binder_linux devices
="anbox-binder,anbox-hwbinder,anbox-vndbinder"
8 mount
-t binder binder
/dev
/binderfs
9 ln -s /dev
/binderfs
/* /dev
/
11 if [ ! -e /dev
/anbox
-hwbinder ] || [ ! -e /dev
/ashmem
]; then
12 echo "ERROR: Binder and ashmem nodes not found!"
16 # just in case, stop Anbox 7
17 stop anbox
-container || true
19 # start cgroup-lite, else container may fail to start.
21 umount
-l /sys
/fs
/cgroup
/schedtune
26 # start anbox-net, that sets up lxc bridge
27 /home
/anbox
/anbox
-net.sh start
29 # stop nfcd to not conflict with anbox
32 # umount rootfs if it was mounted
33 umount
-l rootfs
|| true
35 mount anbox_
*_system.img rootfs
36 mount
-o remount
,ro rootfs
37 mount anbox_
*_vendor.img rootfs
/vendor
38 mount
-o remount
,ro rootfs
/vendor
39 mount
-o bind anbox.prop rootfs
/vendor
/anbox.prop
41 if mountpoint
-q -- /odm
; then
42 mount
-o bind /odm rootfs
/odm_extra
44 if [ -d /vendor
/odm
]; then
45 mount
-o bind /vendor
/odm rootfs
/odm_extra
49 # Anbox binder permissions
50 chmod 666 /dev
/anbox
-*binder
53 # Wayland and pulse socket permissions
54 XDG_PATH
=`cat anbox.prop | grep anbox.xdg_runtime_dir | cut -f 2- -d "="`
55 PULSE_PATH
=`cat anbox.prop | grep anbox.pulse_runtime_path | cut -f 2- -d "="`
56 chmod 777 -R $PULSE_PATH
57 chmod 777 -R $XDG_PATH
59 # Set sw_sync permissions
60 chmod 777 /dev
/sw_sync
61 chmod 777 /sys
/kernel
/debug
/sync
/sw_sync
63 # Media nodes permissions
65 chmod 777 /dev
/MTK_SMI
66 chmod 777 /dev
/mdp_sync
67 chmod 777 /dev
/mtk_cmdq
68 chmod 777 /dev
/video32
69 chmod 777 /dev
/video33
71 # Graphics nodes permissions
72 chmod 777 -R /dev
/dri
/*
73 chmod 777 -R /dev
/graphics
/*
76 lxc
-start -n anbox
-F -- /init