From: luka177 Date: Fri, 30 Apr 2021 15:29:38 +0000 (+0300) Subject: Initial scripts X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/da80e34ad3335eb64221eacda22cad8c4c97bb6a Initial scripts --- diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100644 index 0000000..4b64e73 --- /dev/null +++ b/scripts/install.sh @@ -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 index 0000000..04662df --- /dev/null +++ b/scripts/mount.sh @@ -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 index 0000000..0010a20 --- /dev/null +++ b/scripts/run-container.sh @@ -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