rebootFunction: Allow reboot function in ADB without root

This commit is contained in:
2025-08-10 22:16:12 +03:00
parent 6ccead8532
commit f9eea8aef7
6 changed files with 17 additions and 4 deletions

View File

@@ -112,9 +112,11 @@ int Main(int argc, char **argv) {
"directory with -S "
"(--search-path)");
if (!Helper::hasSuperUser())
throw Error(
"Partition Manager Tool is requires super-user privileges!\n");
if (!Helper::hasSuperUser()) {
if (!(FuncManager.isUsed("reboot") && Helper::hasAdbPermissions()))
throw Error(
"Partition Manager Tool is requires super-user privileges!\n");
}
return FuncManager.handleAll() == true ? EXIT_SUCCESS : EXIT_FAILURE;
} catch (Helper::Error &error) {