diff --git a/adb/daemon/shell_service.cpp b/adb/daemon/shell_service.cpp index da1222bc7..401c99c54 100644 --- a/adb/daemon/shell_service.cpp +++ b/adb/daemon/shell_service.cpp @@ -344,7 +344,8 @@ bool Subprocess::ForkAndExec(std::string* error) { } if (command_.empty()) { - execle(_PATH_BSHELL, _PATH_BSHELL, "-", nullptr, cenv.data()); + // Spawn a login shell if we don't have a command. + execle(_PATH_BSHELL, "-" _PATH_BSHELL, nullptr, cenv.data()); } else { execle(_PATH_BSHELL, _PATH_BSHELL, "-c", command_.c_str(), nullptr, cenv.data()); }