Merge "Fix sdk-mac build."
diff --git a/fs_mgr/tests/adb-remount-test.sh b/fs_mgr/tests/adb-remount-test.sh
index a849578..825109f 100755
--- a/fs_mgr/tests/adb-remount-test.sh
+++ b/fs_mgr/tests/adb-remount-test.sh
@@ -378,7 +378,7 @@
D=`echo / /
echo "${D}" | grep -v /dev/root`
fi
-D=`echo "${D}" | cut -s -d' ' -f1`
+D=`echo "${D}" | cut -s -d' ' -f1 | sort -u`
D=`adb_sh df -k ${D} </dev/null`
echo "${D}"
if [ X"${D}" = X"${D##* 100[%] }" ]; then
@@ -506,7 +506,9 @@
echo "${D}" &&
echo "${D}" | grep "^overlay .* /system\$" >/dev/null ||
die "overlay takeover after remount"
- !(adb_sh grep "^overlay " /proc/mounts </dev/null | grep -v "^overlay /vendor/..* overlay ro," | grep " overlay ro,") &&
+ !(adb_sh grep "^overlay " /proc/mounts </dev/null |
+ grep -v "^overlay /\(vendor\|system\)/..* overlay ro," |
+ grep " overlay ro,") &&
!(adb_sh grep " rw," /proc/mounts </dev/null |
skip_administrative_mounts data) ||
die "remount overlayfs missed a spot (ro)"
diff --git a/init/README.md b/init/README.md
index 8d47e0a..3a7c71c 100644
--- a/init/README.md
+++ b/init/README.md
@@ -482,9 +482,8 @@
-f: force installation of the module even if the version of the running kernel
and the version of the kernel for which the module was compiled do not match.
-`load_all_props`
-> Loads properties from /system, /vendor, et cetera.
- This is included in the default init.rc.
+`load_system_props`
+> (This action is deprecated and no-op.)
`load_persist_props`
> Loads persistent properties when /data has been decrypted.
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 4a66e46..43a520f 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -972,7 +972,7 @@
}
static Result<Success> do_load_system_props(const BuiltinArguments& args) {
- load_system_props();
+ LOG(INFO) << "deprecated action `load_system_props` called.";
return Success();
}
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 5328869..3199d45 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -699,22 +699,6 @@
}
}
-void property_load_boot_defaults() {
- if (!load_properties_from_file("/system/etc/prop.default", NULL)) {
- // Try recovery path
- if (!load_properties_from_file("/prop.default", NULL)) {
- // Try legacy path
- load_properties_from_file("/default.prop", NULL);
- }
- }
- load_properties_from_file("/product/build.prop", NULL);
- load_properties_from_file("/product_services/build.prop", NULL);
- load_properties_from_file("/odm/default.prop", NULL);
- load_properties_from_file("/vendor/default.prop", NULL);
-
- update_sys_usb_config();
-}
-
static void load_override_properties() {
if (ALLOW_LOCAL_PROP_OVERRIDE) {
load_properties_from_file("/data/local.prop", NULL);
@@ -779,12 +763,29 @@
close(fd);
}
-void load_system_props() {
+void property_load_boot_defaults() {
+ // TODO(b/117892318): merge prop.default and build.prop files into one
+ // TODO(b/122864654): read the prop files from all partitions and then
+ // resolve the duplication by their origin so that RO and non-RO properties
+ // have a consistent overriding order.
+ if (!load_properties_from_file("/system/etc/prop.default", NULL)) {
+ // Try recovery path
+ if (!load_properties_from_file("/prop.default", NULL)) {
+ // Try legacy path
+ load_properties_from_file("/default.prop", NULL);
+ }
+ }
+ load_properties_from_file("/product/build.prop", NULL);
+ load_properties_from_file("/product_services/build.prop", NULL);
+ load_properties_from_file("/odm/default.prop", NULL);
+ load_properties_from_file("/vendor/default.prop", NULL);
load_properties_from_file("/system/build.prop", NULL);
load_properties_from_file("/odm/build.prop", NULL);
load_properties_from_file("/vendor/build.prop", NULL);
load_properties_from_file("/factory/factory.prop", "ro.*");
load_recovery_id_prop();
+
+ update_sys_usb_config();
}
static int SelinuxAuditCallback(void* data, security_class_t /*cls*/, char* buf, size_t len) {
diff --git a/rootdir/init.rc b/rootdir/init.rc
index b34399d..9b20964 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -346,12 +346,6 @@
trigger boot
on post-fs
- # Load properties from
- # /system/build.prop,
- # /odm/build.prop,
- # /vendor/build.prop and
- # /factory/factory.prop
- load_system_props
start vold
exec - system system -- /system/bin/vdc checkpoint markBootAttempt