--- /dev/null
+# Anbox LXC Config
+
+lxc.rootfs.path = /home/anbox/rootfs
+lxc.utsname = anbox
+lxc.arch = LXCARCH
+lxc.autodev = 0
+# lxc.autodev.tmpfs.size = 25000000
+lxc.aa_profile = unconfined
+
+lxc.init_cmd = /init
+
+lxc.mount.auto = cgroup:ro sys:ro proc
+
+lxc.network.type = veth
+lxc.network.flags = up
+lxc.network.link = anbox0
+lxc.network.name = eth0
+lxc.network.hwaddr = 00:16:3e:f9:d3:03
+lxc.network.mtu = 1500
+
+lxc.include = /var/lib/lxc/anbox/config_nodes
+
+lxc.hook.post-stop = /dev/null
--- /dev/null
+# Anbox LXC Config
+
+lxc.rootfs.path = /home/anbox/rootfs
+lxc.uts.name = anbox
+lxc.arch = LXCARCH
+lxc.autodev = 0
+# lxc.autodev.tmpfs.size = 25000000
+lxc.apparmor.profile = unconfined
+
+lxc.init.cmd = /init
+
+lxc.mount.auto = cgroup:ro sys:ro proc
+
+lxc.net.0.type = veth
+lxc.net.0.flags = up
+lxc.net.0.link = anbox0
+lxc.net.0.name = eth0
+lxc.net.0.hwaddr = 00:16:3e:f9:d3:03
+lxc.net.0.mtu = 1500
+
+lxc.include = /var/lib/lxc/anbox/config_nodes
+
+lxc.hook.post-stop = /dev/null
# Anbox LXC Config
-lxc.rootfs.path = /home/anbox/rootfs
-lxc.utsname = anbox
-lxc.arch = LXCARCH
-lxc.autodev = 0
-# lxc.autodev.tmpfs.size = 25000000
-lxc.aa_profile = unconfined
-
-lxc.init_cmd = /init
-
-lxc.mount.auto = cgroup:ro sys:ro proc
-
-lxc.network.type = veth
-lxc.network.flags = up
-lxc.network.link = anbox0
-lxc.network.name = eth0
-lxc.network.hwaddr = 00:16:3e:f9:d3:03
-lxc.network.mtu = 1500
-
# Necessary dev nodes
lxc.mount.entry = tmpfs dev tmpfs nosuid 0 0
lxc.mount.entry = /dev/zero dev/zero none bind,create=file,optional 0 0
# Media dev nodes (for Qcom)
lxc.mount.entry = /dev/video32 dev/video32 none bind,create=file,optional 0 0
lxc.mount.entry = /dev/video33 dev/video33 none bind,create=file,optional 0 0
-
-lxc.hook.post-stop = /dev/null
echo "Geting latest lxc config"
mkdir /var/lib/lxc/anbox
cd /var/lib/lxc/anbox
-rm -f config
-wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/lxc-configs/config
+rm -f config*
+if [ `lxc-info --version | cut -d "." -f 1` -gt 2 ]; then
+ wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/lxc-configs/config_2
+else
+ wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/lxc-configs/config_1
+fi
+mv config_* config
sed -i "s/LXCARCH/$UNAME_ARCH/" config
+wget https://github.com/Anbox-halium/anbox-halium/raw/lineage-17.1/lxc-configs/config_nodes
if ! grep -q "module-native-protocol-unix auth-anonymous=1" /etc/pulse/touch-android9.pa; then
echo "Pulseaudio config patching"