X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/35d7a20f02d4195de72ac749a0dae665c17e6fff..7b9630794a6da4d7f2111189ada7b2729d0f77bb:/scripts/run-container.sh diff --git a/scripts/run-container.sh b/scripts/run-container.sh index 19a782d..d982f07 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,19 @@ 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 +mount -o remount,ro rootfs/vendor + # Anbox binder permissions chmod 666 /dev/anbox-*binder