From: Nolen Johnson Date: Wed, 21 Jul 2021 23:52:32 +0000 (-0400) Subject: sabrina: Import device-specific init-files/properties X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce6cf9b70149886eb443bb348f5170f20407a6fb;p=GitHub%2FLineageOS%2FG12%2Fandroid_device_google_sabrina.git sabrina: Import device-specific init-files/properties Change-Id: I36e872979960d98e6cde9c8fbfbf64b76508ad69 --- diff --git a/device.mk b/device.mk index 91180bb..971ddb6 100644 --- a/device.mk +++ b/device.mk @@ -16,6 +16,9 @@ PRODUCT_PACKAGES += \ ## Init-Files PRODUCT_COPY_FILES += \ + $(DEVICE_PATH)/init-files/tee_hdcp.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/tee_hdcp.rc \ + $(DEVICE_PATH)/init-files/tee_key_inject.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/tee_key_inject.rc \ + $(DEVICE_PATH)/init-files/init.amlogic.sku.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.sku.rc \ $(DEVICE_PATH)/init-files/init.amlogic.wifi_buildin.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.wifi_buildin.rc ## Kernel Modules diff --git a/init-files/init.amlogic.sku.rc b/init-files/init.amlogic.sku.rc new file mode 100644 index 0000000..438f25f --- /dev/null +++ b/init-files/init.amlogic.sku.rc @@ -0,0 +1,71 @@ +on early-init && property:ro.boot.hardware.sku=* + setprop ro.boot.product.hardware.sku ${ro.boot.hardware.sku} + +on init + # Set sku to US if it was not set by the bootloader + setprop ro.boot.product.hardware.sku US + trigger sku-init + +on sku-init + # Allow PAI targeting per hardware SKU + setprop ro.oem.key1 ATV00100020-${ro.boot.product.hardware.sku} + +on sku-init && property:ro.boot.product.hardware.sku=US + setprop ro.boot.wificountrycode US + setprop ro.boot.oem.locales en-US,es-US + +on sku-init && property:ro.boot.product.hardware.sku=CA + setprop ro.boot.wificountrycode CA + setprop ro.boot.oem.locales en-US,fr-CA + +on sku-init && property:ro.boot.product.hardware.sku=GB + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales en-GB + +on sku-init && property:ro.boot.product.hardware.sku=IE + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales en-GB + +on sku-init && property:ro.boot.product.hardware.sku=DE + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales de-DE + +on sku-init && property:ro.boot.product.hardware.sku=FR + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales fr-FR + +on sku-init && property:ro.boot.product.hardware.sku=NL + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales de-DE,fr-FR,nl-NL + +on sku-init && property:ro.boot.product.hardware.sku=NO + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales en-GB,nb-NO,sv-SE,da-DK,fi-FI + +on sku-init && property:ro.boot.product.hardware.sku=IT + setprop ro.boot.wificountrycode EU + setprop ro.boot.oem.locales es-ES,it-IT + +on sku-init && property:ro.boot.product.hardware.sku=AU + setprop ro.boot.wificountrycode AU + setprop ro.boot.oem.locales en-AU + +on sku-init && property:ro.boot.product.hardware.sku=JP + setprop ro.boot.wificountrycode JP + setprop ro.boot.oem.locales ja-JP + +on sku-init && property:ro.boot.product.hardware.sku=KR + setprop ro.boot.wificountrycode KR + setprop ro.boot.oem.locales ko-KR + +on sku-init && property:ro.boot.product.hardware.sku=IN + setprop ro.boot.wificountrycode US + setprop ro.boot.oem.locales hi-IN,en-IN + +on sku-init && property:ro.boot.product.hardware.sku=MX + setprop ro.boot.wificountrycode US + setprop ro.boot.oem.locales es-US + +on sku-init && property:ro.boot.product.hardware.sku=TW + setprop ro.boot.wificountrycode US + setprop ro.boot.oem.locales zh-TW,en-US diff --git a/init-files/init.amlogic.wifi_buildin.rc b/init-files/init.amlogic.wifi_buildin.rc index 7979822..ee31023 100644 --- a/init-files/init.amlogic.wifi_buildin.rc +++ b/init-files/init.amlogic.wifi_buildin.rc @@ -1,3 +1,5 @@ +import /vendor/etc/init/hw/init.amlogic.sku.rc + on boot insmod /vendor/lib/modules/dhd.ko firmware_path=/vendor/etc/wifi/buildin/ nvram_path=/vendor/etc/wifi/buildin/ chown root wifi /sys/module/dhd/parameters/firmware_path diff --git a/init-files/tee_hdcp.rc b/init-files/tee_hdcp.rc new file mode 100644 index 0000000..ff0e675 --- /dev/null +++ b/init-files/tee_hdcp.rc @@ -0,0 +1,8 @@ +on property:vold.post_fs_data_done=1 + start tee_hdcp + +service tee_hdcp /vendor/bin/tee_hdcp + oneshot + user root + group system + seclabel u:r:tee:s0 diff --git a/init-files/tee_key_inject.rc b/init-files/tee_key_inject.rc new file mode 100644 index 0000000..5bfd630 --- /dev/null +++ b/init-files/tee_key_inject.rc @@ -0,0 +1,71 @@ +on late-fs + restorecon_recursive /mnt/vendor/factory + exec_start tee_provision_otp + rm /mnt/vendor/factory/otp.pkg + + mount ext4 /dev/block/factory /mnt/vendor/factory ro remount + + exec_start tee_provision_password_hash + + exec_start tee_key_inject_wv_key + exec_start tee_key_inject_pr3_key + exec_start tee_key_inject_pr3_crt + exec_start tee_key_inject_hdcp14tx + exec_start tee_key_inject_hdcp22tx + exec_start tee_key_inject_attestation_key + exec_start tee_key_inject_nf + + +service tee_provision_otp /vendor/bin/tee_provision /mnt/vendor/factory/otp.pkg + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_provision_password_hash /vendor/bin/tee_provision_password_hash + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_wv_key /vendor/bin/tee_key_inject -t 0x11 -i /mnt/vendor/factory/wv.key -p vendor.sys.tee_key_inject_wv_key + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_pr3_key /vendor/bin/tee_key_inject -t 0x21 -i /mnt/vendor/factory/pr3.key -p vendor.sys.tee_key_inject_pr3_key + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_pr3_crt /vendor/bin/tee_key_inject -t 0x22 -i /mnt/vendor/factory/pr3.crt -p vendor.sys.tee_key_inject_pr3_crt + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_hdcp14tx /vendor/bin/tee_key_inject -t 0x31 -i /mnt/vendor/factory/hdcp14tx.key -p vendor.sys.tee_key_inject_hdcp14tx + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_hdcp22tx /vendor/bin/tee_key_inject -t 0x32 -i /mnt/vendor/factory/hdcp22tx.key -p vendor.sys.tee_key_inject_hdcp22tx + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_attestation_key /vendor/bin/tee_key_inject -t 0x42 -i /mnt/vendor/factory/android_attestation.key -n attestationkeybox -p vendor.sys.tee_key_inject_attestation_key + oneshot + user root + group system + seclabel u:r:tee:s0 + +service tee_key_inject_nf /vendor/bin/tee_key_inject -t 0x61 -i /mnt/vendor/factory/nf.key -p vendor.sys.tee_key_inject_nf + oneshot + user root + group system + seclabel u:r:tee:s0 diff --git a/vendor.prop b/vendor.prop index 7288b60..be63608 100644 --- a/vendor.prop +++ b/vendor.prop @@ -7,6 +7,12 @@ ## Bluetooth ro.bt.bdaddr_path=/sys/class/bt_addr/value +## Dolby +persist.vendor.sys.dolbyvision.enable=true +persist.vendor.sys.tv.dolbyvision.enable=true +ro.vendor.platform.support.dolbyvision=true +vendor.media.support.dolbyvision=true + ## FRP ro.frp.pst=/dev/block/by-name/frp