/vendor is not mounted in recovery and so the property initialization
must not fail if the vendor property context is not found.
Bug:
38212419
Test: boot into recovery, mount system and run adb shell getprop
Change-Id: I9f7c2fe2b20da86194eff8e7bf94b2352e50bf27
Signed-off-by: Sandeep Patil <sspatil@google.com>
if (!initialize_properties_from_file("/system/etc/selinux/plat_property_contexts")) {
return false;
}
- if (!initialize_properties_from_file("/vendor/etc/selinux/nonplat_property_contexts")) {
- return false;
- }
+ // Don't check for failure here, so we always have a sane list of properties.
+ // E.g. In case of recovery, the vendor partition will not have mounted and we
+ // still need the system / platform properties to function.
+ initialize_properties_from_file("/vendor/etc/selinux/nonplat_property_contexts");
} else {
if (!initialize_properties_from_file("/plat_property_contexts")) {
return false;
}
- if (!initialize_properties_from_file("/nonplat_property_contexts")) {
- return false;
- }
+ initialize_properties_from_file("/nonplat_property_contexts");
}
return true;