X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/35d7a20f02d4195de72ac749a0dae665c17e6fff..6fe8fc2149b6fd44b542eb1b77c9afb8b9946c6a:/scripts/run-container.sh diff --git a/scripts/run-container.sh b/scripts/run-container.sh index 19a782d..04c8818 100644 --- a/scripts/run-container.sh +++ b/scripts/run-container.sh @@ -13,6 +13,9 @@ start anbox-sensors # start lxc-net, that sets up lxc bridge start lxc-net +# stop nfcd to not conflict with anbox +stop nfcd + # umount rootfs if it was mounted umount -l rootfs || true @@ -21,7 +24,7 @@ mkdir -p /home/anbox/data mount anbox_arm64_system.img rootfs mount -o remount,ro rootfs mount anbox_arm64_vendor.img rootfs/vendor -mount -o remount,ro rootfs +mount -o remount,ro rootfs/vendor mount -o bind anbox.prop rootfs/vendor/anbox.prop if mountpoint -q -- /odm; then @@ -32,6 +35,29 @@ else fi fi +# TODO: Move this to installer script +SKU=`getprop ro.boot.product.hardware.sku` +mount -o remount,rw rootfs/vendor +cp -p /vendor/etc/permissions/android.hardware.nfc.* rootfs/vendor/etc/permissions/ +cp -p /vendor/etc/permissions/android.hardware.consumerir.xml rootfs/vendor/etc/permissions/ +cp -p /odm/etc/permissions/android.hardware.nfc.* rootfs/vendor/etc/permissions/ +cp -p /odm/etc/permissions/android.hardware.consumerir.xml rootfs/vendor/etc/permissions/ +if [ ! -z $SKU ]; then + cp -p /odm/etc/permissions/sku_${SKU}/android.hardware.nfc.* rootfs/vendor/etc/permissions/ + cp -p /odm/etc/permissions/sku_${SKU}/android.hardware.consumerir.xml rootfs/vendor/etc/permissions/ +fi +if [ -f /vendor/lib/libladder.so ] && [ ! -f rootfs/vendor/lib/libladder.so ]; then + cd rootfs/vendor/lib + wget https://github.com/GS290-dev/gigaset_gs290_dump/raw/full_k63v2_64_bsp-user-10-QP1A.190711.020-1597810494-release-keys/vendor/lib/libladder.so + cd ../../.. +fi +if [ -f /vendor/lib64/libladder.so ] && [ ! -f rootfs/vendor/lib64/libladder.so ]; then + cd rootfs/vendor/lib64 + wget https://github.com/GS290-dev/gigaset_gs290_dump/raw/full_k63v2_64_bsp-user-10-QP1A.190711.020-1597810494-release-keys/vendor/lib64/libladder.so + cd ../../.. +fi +mount -o remount,ro rootfs/vendor + # Anbox binder permissions chmod 666 /dev/anbox-*binder