device/rockchip/common$ git log -p
Edge2: add preinstall support and add Aptoide.apk & Chrome.apk[2/2]
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
index 58c44b5..6193791 100644
--- a/sepolicy/vendor/file_contexts
+++ b/sepolicy/vendor/file_contexts
@@ -140,6 +140,7 @@
/vendor/lib(64)?/libgpudataproducer\.so u:object_r:same_process_hal_file:s0
# default hal
/vendor/bin/hw/android\.hardware\.drm@1\.2-service\.widevine u:object_r:hal_drm_widevine_exec:s0
+/system/bin/preinstall\.sh u:object_r:shell_exec:s0
/vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.widevine u:object_r:hal_drm_widevine_exec:s0
/vendor/bin/hw/android\.hardware\.drm@1\.2-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
/vendor/bin/hw/android\.hardware\.drm@1\.2-service-lazy\.clearkey u:object_r:hal_drm_clearkey_exec:s0
diff --git a/sepolicy/vendor/preinstall.te b/sepolicy/vendor/preinstall.te
new file mode 100644
index 0000000..fefd356
--- /dev/null
+++ b/sepolicy/vendor/preinstall.te
@@ -0,0 +1,9 @@
+########################################
+# sepolicy rules for preinstall
+########################################
+
+type preinstall, domain;
+
+type preinstall_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(preinstall);