diff options
author | Hung-ying Tyan <tyanh@google.com> | 2017-06-13 12:50:13 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2017-06-13 21:22:50 +0800 |
commit | 75801ab5e333a844a68f2d9d85abd883696262fd (patch) | |
tree | 0e4a37457546415b6931cad59cf587eaf6dacd37 | |
parent | 12ea2d12ef3f708832facef96f5cf9bd84894928 (diff) | |
download | core-75801ab5e333a844a68f2d9d85abd883696262fd.tar.gz |
Load /prop.default in recovery mode
Bug: 37815285
Bug: 62525809
Test: Tested with ag/2398663 and ag/2400523. Booted pixel phones,
checked the location of prop.default, verified the symlink,
checked a few properties via adb shell and manually tested
a few apps.
Booted to recovery and ran 'adb sideload' successfully.
Change-Id: I034b700fcd60b0104873131e94864b16ef4bd9f6
-rw-r--r-- | init/property_service.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp index 60c1895f1..73954fe4f 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -594,8 +594,11 @@ static void update_sys_usb_config() { void property_load_boot_defaults() { if (!load_properties_from_file("/system/etc/prop.default", NULL)) { - // legacy path - load_properties_from_file("/default.prop", 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("/odm/default.prop", NULL); load_properties_from_file("/vendor/default.prop", NULL); |