]> glassweightruler.freedombox.rocks Git - waydroid.git/blob - scripts/run-container.sh
anbox: Bind mount media dev nodes needed by qcom
[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 # stop sensorfw
11 # NOTE: it is temporary solution, that workes only on halium devices.
12 stop sensorfw
13
14 # start lxc-net, that sets up lxc bridge
15 start lxc-net
16
17 # umount rootfs if it was mounted
18 umount -l rootfs || true
19
20 mkdir -p /home/anbox/rootfs
21 mkdir -p /home/anbox/data
22 mount anbox_arm64_system.img rootfs
23 mount -o remount,ro rootfs
24 mount anbox_arm64_vendor.img rootfs/vendor
25 mount -o remount,ro rootfs
26 mount -o bind anbox.prop rootfs/vendor/anbox.prop
27
28 # Anbox binder permissions
29 chmod 666 /dev/anbox-*binder
30
31 # Wayland socket permissions
32 chmod 777 -R /run/user/32011
33
34 # Set sw_sync permissions
35 chmod 777 /dev/sw_sync
36 chmod 777 /sys/kernel/debug/sync/sw_sync
37
38 # Media nodes permissions
39 chmod 777 /dev/Vcodec
40 chmod 777 /dev/MTK_SMI
41 chmod 777 /dev/mdp_sync
42 chmod 777 /dev/mtk_cmdq
43 chmod 777 /dev/video32
44 chmod 777 /dev/video33
45
46 lxc-start -n anbox -F -- /init