Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35847566 authored by Michael Bestas's avatar Michael Bestas
Browse files

init: Don't run update_sys_usb_config if /data isn't mounted

* When /data is not mounted / not yet decrypted,
  persistent property overrides are not loaded yet
  so persist.sys.usb.config value is the one from default.prop.

  This caused adb to always be disabled on boot even if
  it was enabled in development settings.

Change-Id: Ic2a51591ad6b77f3463cfa91e9d7362410a021f2
parent 201fa1a7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -919,8 +919,10 @@ void property_load_boot_defaults(bool load_debug_prop) {
    property_initialize_ro_product_props();
    property_derive_build_fingerprint();

    if (android::base::GetBoolProperty("ro.persistent_properties.ready", false)) {
        update_sys_usb_config();
    }
}

static int SelinuxAuditCallback(void* data, security_class_t /*cls*/, char* buf, size_t len) {
    auto* d = reinterpret_cast<PropertyAuditData*>(data);