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

Commit aef9606b authored by Luca Stefani's avatar Luca Stefani
Browse files

adb: Also check for ALLOW_ADBD_ROOT

Change-Id: I7458df323412ad348996d5053d84825ec2826698
parent c5894714
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ void restart_root_service(unique_fd fd) {

#if defined(__ANDROID__) && !defined(__ANDROID_RECOVERY__)
    bool enabled = false;
    if (auto status = service->getEnabled(&enabled); !status.isOk()) {
    if (auto status = service->getEnabled(&enabled); !status.isOk() || !ALLOW_ADBD_ROOT) {
#endif
    if (!__android_log_is_debuggable()) {
        WriteFdExactly(fd.get(), "adbd cannot run as root in production builds\n");