Build Android (6.0/7.0) - system ui has stopped

You can try to modify the source code following below
###On Mmallow

  • external/sepolicy/app.te
  • external/sepolicy/platform_app.te
diff --git a/app.te b/app.te
index a939a92..77d6bef 100644
--- a/app.te
+++ b/app.te
@@ -261,7 +261,7 @@ neverallow appdomain socket_device:sock_file write;
 # Unix domain sockets.
 neverallow appdomain adbd_socket:sock_file write;
 neverallow appdomain installd_socket:sock_file write;
-neverallow { appdomain -bluetooth -radio -shell -system_app -nfc }
+neverallow { appdomain -bluetooth -radio -shell -system_app -platform_app  -nfc }
     property_socket:sock_file write;
 neverallow { appdomain -radio } rild_socket:sock_file write;
 neverallow appdomain vold_socket:sock_file write; # Ability to set system properties.
-neverallow { appdomain -system_app -radio -shell -bluetooth -nfc }
+neverallow { appdomain -system_app -platform_app -radio -shell -bluetooth -nfc }
     property_type:property_service set;


diff --git a/platform_app.te b/platform_app.te
index 2afe4d8..3d0c634 100644
--- a/platform_app.te
+++ b/platform_app.te
@@ -41,3 +41,5 @@ allow platform_app radio_service:service_manager find;
 allow platform_app surfaceflinger_service:service_manager find;
 allow platform_app app_api_service:service_manager find;
 allow platform_app system_api_service:service_manager find;
+
+allow platform_app property_socket:sock_file write;
+allow platform_app system_prop:property_service set

###On Nougat

  • system/sepolicy/platform_app.te
diff --git a/platform_app.te b/platform_app.te
index d4a27ad..08cd720 100644
--- a/platform_app.te
+++ b/platform_app.te
@@ -56,3 +56,5 @@ allow platform_app vr_manager_service:service_manager find;
 # Access to /data/preloads
 allow platform_app preloads_data_file:file r_file_perms;
 allow platform_app preloads_data_file:dir r_dir_perms;
+allow platform_app property_socket:sock_file write;
+allow platform_app system_prop:property_service set;
1 Like