--- /dev/null
+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
--- /dev/null
+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