summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHung-ying Tyan2017-05-04 03:54:53 -0500
committerHung-ying Tyan2017-05-24 19:41:08 -0500
commit723f1a2b318a455983d21ccf3598885f766bb8c9 (patch)
treeca6778aa214d3b619bae3e6ede51c358a934800c /libcutils/fs_config.cpp
parent62db5fcee052980759ecb977cab4c63491e01e56 (diff)
downloadplatform-system-core-723f1a2b318a455983d21ccf3598885f766bb8c9.tar.gz
platform-system-core-723f1a2b318a455983d21ccf3598885f766bb8c9.tar.xz
platform-system-core-723f1a2b318a455983d21ccf3598885f766bb8c9.zip
Load {default,build}.prop from /{system,vendor,odm}/etc/
/default.prop may be moved to /system/etc/ and renamed as prop.default. /{system,vendor,odm}/build.prop may be moved to /{system,vendor,odm}/etc/ and renamed as prop.build. This patch makes property_service load prop.* from the new locations first. Also replaces NULL with nullptr for C++ cleanup. Bug: 37815285 Test: Booted pixel phones, checked the locations of prop.*, verified symlinks, checked a few properties (via adb shell getprop) and manually tested a few apps (Camera, Maps etc). ODM is not tested as it does not exist on the tested device. Change-Id: Id8eeb3c1a5728dd04005dfad4733b8e6336f9093
Diffstat (limited to 'libcutils/fs_config.cpp')
-rw-r--r--libcutils/fs_config.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/libcutils/fs_config.cpp b/libcutils/fs_config.cpp
index 919b65bc3..dd1ad3a38 100644
--- a/libcutils/fs_config.cpp
+++ b/libcutils/fs_config.cpp
@@ -134,9 +134,10 @@ static const struct fs_path_config android_files[] = {
134 { 00640, AID_ROOT, AID_SHELL, 0, "data/nativetest64/tests.txt" }, 134 { 00640, AID_ROOT, AID_SHELL, 0, "data/nativetest64/tests.txt" },
135 { 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest/*" }, 135 { 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest/*" },
136 { 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest64/*" }, 136 { 00750, AID_ROOT, AID_SHELL, 0, "data/nativetest64/*" },
137 { 00600, AID_ROOT, AID_ROOT, 0, "default.prop" }, 137 { 00600, AID_ROOT, AID_ROOT, 0, "default.prop" }, // legacy
138 { 00600, AID_ROOT, AID_ROOT, 0, "odm/build.prop" }, 138 { 00600, AID_ROOT, AID_ROOT, 0, "system/etc/prop.default" },
139 { 00600, AID_ROOT, AID_ROOT, 0, "odm/default.prop" }, 139 { 00600, AID_ROOT, AID_ROOT, 0, "odm/etc/prop.build" },
140 { 00600, AID_ROOT, AID_ROOT, 0, "odm/etc/prop.default" },
140 { 00444, AID_ROOT, AID_ROOT, 0, odm_conf_dir + 1 }, 141 { 00444, AID_ROOT, AID_ROOT, 0, odm_conf_dir + 1 },
141 { 00444, AID_ROOT, AID_ROOT, 0, odm_conf_file + 1 }, 142 { 00444, AID_ROOT, AID_ROOT, 0, odm_conf_file + 1 },
142 { 00444, AID_ROOT, AID_ROOT, 0, oem_conf_dir + 1 }, 143 { 00444, AID_ROOT, AID_ROOT, 0, oem_conf_dir + 1 },
@@ -148,7 +149,8 @@ static const struct fs_path_config android_files[] = {
148 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/install-recovery.sh" }, 149 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/install-recovery.sh" },
149 { 00700, AID_ROOT, AID_ROOT, 0, "system/bin/secilc" }, 150 { 00700, AID_ROOT, AID_ROOT, 0, "system/bin/secilc" },
150 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/uncrypt" }, 151 { 00750, AID_ROOT, AID_ROOT, 0, "system/bin/uncrypt" },
151 { 00600, AID_ROOT, AID_ROOT, 0, "system/build.prop" }, 152 { 00600, AID_ROOT, AID_ROOT, 0, "system/build.prop" }, // legacy
153 { 00600, AID_ROOT, AID_ROOT, 0, "system/etc/prop.build" },
152 { 00444, AID_ROOT, AID_ROOT, 0, sys_conf_dir + 1 }, 154 { 00444, AID_ROOT, AID_ROOT, 0, sys_conf_dir + 1 },
153 { 00444, AID_ROOT, AID_ROOT, 0, sys_conf_file + 1 }, 155 { 00444, AID_ROOT, AID_ROOT, 0, sys_conf_file + 1 },
154 { 00440, AID_ROOT, AID_SHELL, 0, "system/etc/init.goldfish.rc" }, 156 { 00440, AID_ROOT, AID_SHELL, 0, "system/etc/init.goldfish.rc" },
@@ -157,8 +159,9 @@ static const struct fs_path_config android_files[] = {
157 { 00555, AID_ROOT, AID_ROOT, 0, "system/etc/ppp/*" }, 159 { 00555, AID_ROOT, AID_ROOT, 0, "system/etc/ppp/*" },
158 { 00555, AID_ROOT, AID_ROOT, 0, "system/etc/rc.*" }, 160 { 00555, AID_ROOT, AID_ROOT, 0, "system/etc/rc.*" },
159 { 00440, AID_ROOT, AID_ROOT, 0, "system/etc/recovery.img" }, 161 { 00440, AID_ROOT, AID_ROOT, 0, "system/etc/recovery.img" },
160 { 00600, AID_ROOT, AID_ROOT, 0, "vendor/build.prop" }, 162 { 00600, AID_ROOT, AID_ROOT, 0, "vendor/build.prop" }, // legacy
161 { 00600, AID_ROOT, AID_ROOT, 0, "vendor/default.prop" }, 163 { 00600, AID_ROOT, AID_ROOT, 0, "vendor/etc/prop.build" },
164 { 00600, AID_ROOT, AID_ROOT, 0, "vendor/etc/prop.default" },
162 { 00444, AID_ROOT, AID_ROOT, 0, ven_conf_dir + 1 }, 165 { 00444, AID_ROOT, AID_ROOT, 0, ven_conf_dir + 1 },
163 { 00444, AID_ROOT, AID_ROOT, 0, ven_conf_file + 1 }, 166 { 00444, AID_ROOT, AID_ROOT, 0, ven_conf_file + 1 },
164 167