diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc index da6273eb..483864a6 100644 --- a/prebuilt/common/etc/init.local.rc +++ b/prebuilt/common/etc/init.local.rc @@ -104,6 +104,9 @@ on boot setprop net.tcp.usercfg.wifi 1 setprop net.tcp.usercfg.lte 1 + # Persistent properties (only created if persist exists) + mkdir /persist/properties 0770 system system + # adb over network on property:service.adb.tcp.port=5555 stop adbd diff --git a/sepolicy/file.te b/sepolicy/file.te index d44a050d..91b89a3b 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -11,3 +11,6 @@ type sysfs_devices_system_iosched, file_type, sysfs_type; # Recovery's "cache" type recovery_cache_file, file_type, mlstrustedobject; + +# Persistent property storage +type persist_property_file, file_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 4f82c380..4c6baecb 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -34,3 +34,6 @@ # Lockscreen wallpaper /data/system/users/[0-9]+/keyguard_wallpaper u:object_r:wallpaper_file:s0 + +# Persistent properties +/persist/properties u:object_r:persist_property_file:s0 diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te index 4728a44c..b6a65ee2 100644 --- a/sepolicy/system_server.te +++ b/sepolicy/system_server.te @@ -1,2 +1,6 @@ allow system_server recovery_cache_file:dir rw_dir_perms; allow system_server recovery_cache_file:file create_file_perms; + +# Persistent properties +allow system_server persist_property_file:dir rw_dir_perms; +allow system_server persist_property_file:file { create_file_perms unlink };