]> glassweightruler.freedombox.rocks Git - waydroid.git/blob - scripts/run-container.sh
anbox: Use anbox-sensors service
[waydroid.git] / scripts / run-container.sh
1 #!/bin/bash
2 cd /home/anbox
3
4 # just in case, stop Anbox 7
5 stop anbox-container || true
6
7 # start cgroup-lite, else container may fail to start.
8 start cgroup-lite
9
10 # start sensors hal
11 start anbox-sensors
12
13 # start lxc-net, that sets up lxc bridge
14 start lxc-net
15
16 # umount rootfs if it was mounted
17 umount -l rootfs || true
18
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
26
27 # Anbox binder permissions
28 chmod 666 /dev/anbox-*binder
29
30 # Wayland socket permissions
31 chmod 777 -R /run/user/32011
32
33 # Set sw_sync permissions
34 chmod 777 /dev/sw_sync
35 chmod 777 /sys/kernel/debug/sync/sw_sync
36
37 # Media nodes permissions
38 chmod 777 /dev/Vcodec
39 chmod 777 /dev/MTK_SMI
40 chmod 777 /dev/mdp_sync
41 chmod 777 /dev/mtk_cmdq
42 chmod 777 /dev/video32
43 chmod 777 /dev/video33
44
45 lxc-start -n anbox -F -- /init