Loading init/reboot.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -834,6 +834,10 @@ static void UserspaceRebootWatchdogThread() { } static void HandleUserspaceReboot() { if (!android::sysprop::InitProperties::userspace_reboot_in_progress().value_or(false)) { LOG(ERROR) << "Attempted a userspace reboot on a device that doesn't support it"; return; } // Spinnig up a separate thread will fail the setns call later in the boot sequence. // Fork a new process to monitor userspace reboot while we are investigating a better solution. pid_t pid = fork(); Loading init/sysprop/InitProperties.sysprop +9 −0 Original line number Diff line number Diff line Loading @@ -25,3 +25,12 @@ prop { integer_as_bool: true } # Shows whenever the device supports userspace reboot or not. prop { api_name: "is_userspace_reboot_supported" type: Boolean scope: System access: Readonly prop_name: "ro.init.userspace_reboot.is_supported" integer_as_bool: true } init/sysprop/api/com.android.sysprop.init-current.txt +5 −0 Original line number Diff line number Diff line props { module: "android.sysprop.InitProperties" prop { api_name: "is_userspace_reboot_supported" prop_name: "ro.init.userspace_reboot.is_supported" integer_as_bool: true } prop { api_name: "userspace_reboot_in_progress" access: ReadWrite Loading Loading
init/reboot.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -834,6 +834,10 @@ static void UserspaceRebootWatchdogThread() { } static void HandleUserspaceReboot() { if (!android::sysprop::InitProperties::userspace_reboot_in_progress().value_or(false)) { LOG(ERROR) << "Attempted a userspace reboot on a device that doesn't support it"; return; } // Spinnig up a separate thread will fail the setns call later in the boot sequence. // Fork a new process to monitor userspace reboot while we are investigating a better solution. pid_t pid = fork(); Loading
init/sysprop/InitProperties.sysprop +9 −0 Original line number Diff line number Diff line Loading @@ -25,3 +25,12 @@ prop { integer_as_bool: true } # Shows whenever the device supports userspace reboot or not. prop { api_name: "is_userspace_reboot_supported" type: Boolean scope: System access: Readonly prop_name: "ro.init.userspace_reboot.is_supported" integer_as_bool: true }
init/sysprop/api/com.android.sysprop.init-current.txt +5 −0 Original line number Diff line number Diff line props { module: "android.sysprop.InitProperties" prop { api_name: "is_userspace_reboot_supported" prop_name: "ro.init.userspace_reboot.is_supported" integer_as_bool: true } prop { api_name: "userspace_reboot_in_progress" access: ReadWrite Loading