From: Erfan Abdi Date: Thu, 20 May 2021 17:54:44 +0000 (+0430) Subject: anbox: Fix NFC and consumer IR X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/commitdiff_plain/7c09cea9204412a9087472c975a0de674b4ab4e0 anbox: Fix NFC and consumer IR --- diff --git a/scripts/run-container.sh b/scripts/run-container.sh index 3df5657..d982f07 100644 --- a/scripts/run-container.sh +++ b/scripts/run-container.sh @@ -24,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 @@ -35,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