]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
Initial scripts
authorluka177 <lukapanio@gmail.com>
Fri, 30 Apr 2021 15:29:38 +0000 (18:29 +0300)
committerluka177 <lukapanio@gmail.com>
Fri, 30 Apr 2021 15:29:38 +0000 (18:29 +0300)
scripts/install.sh [new file with mode: 0644]
scripts/mount.sh [new file with mode: 0644]
scripts/run-container.sh [new file with mode: 0644]

diff --git a/scripts/install.sh b/scripts/install.sh
new file mode 100644 (file)
index 0000000..4b64e73
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# run as root/with sudo
+
+# disable MTP/ADB to have USB network
+echo "manual" > /etc/init/mtp-state.override
+
+# remove LD_LIBRARY_PATH from /etc/environment to make life easier
+sed -i -e "s/^LD_LIBRARY_PATH/#LD_LIBRARY_PATH/" /etc/environment
+
+mount -o remount,rw /
+apt update
+apt install -y qtwayland5 qml-module-qtwayland-compositor
+mount -o remount,ro /
+
+chown -R phablet:phablet /home/phablet/pure-qml
+
+cd /home/anbox
+tar xfpz data.tar.gz --numeric-owner
+mkdir -p rootfs
diff --git a/scripts/mount.sh b/scripts/mount.sh
new file mode 100644 (file)
index 0000000..04662df
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+mkdir -p /home/anbox/rootfs
+cd /home/anbox
+mount anbox_arm64_system.img rootfs
+#mount -o remount,ro rootfs
+mount -o ro anbox_arm64_vendor.img rootfs/vendor
+mount -o bind default.prop rootfs/vendor/default.prop
+#mount -o bind rootfs/system/lib64/vndk-sp-28 rootfs/system/lib64/vndk-sp-29
diff --git a/scripts/run-container.sh b/scripts/run-container.sh
new file mode 100644 (file)
index 0000000..0010a20
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/bash
+cd /home/anbox
+
+# just in case, stop Anbox 7
+stop anbox-container || true
+# umount rootfs if it was mounted
+umount -l rootfs || true
+./mount.sh
+
+# Anbox binder permissions
+chmod 666 /dev/anbox-*binder
+
+# Wayland socket permissions
+chmod 777 /run/user/32011
+chmod 777 /run/user/32011/wayland-1
+
+lxc-start -n anbox -F -- /init