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

Commit 16c5a133 authored by Josh Gao's avatar Josh Gao
Browse files

adb: redirect stdout/stderr before initializing usb.

Avoid printing USB logging to the console.

Test: None
Change-Id: Ib8ad0ad6c559689d0f8feec2e66b42380edd26fb
parent 3cfc1ab8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -125,6 +125,11 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply
    });
#endif

    if (is_daemon) {
        close_stdin();
        setup_daemon_logging();
    }

    android::base::at_quick_exit(adb_server_cleanup);

    init_transport_registration();
@@ -148,11 +153,6 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply
        std::this_thread::sleep_for(100ms);
    }

    if (is_daemon) {
        close_stdin();
        setup_daemon_logging();
    }

    adb_auth_init();

    if (is_daemon) {