Take out the try exec for home adb shell
Not necessary in the android tree. It was nice to have so the port to
the android tree from cloud-android-containerization could be a direct
copy to start, but now they're diverging.
Bug: 111445481
Test: copy to gce and connect
Change-Id: Ibf2dd4b47afe0fc4951e2fac8d0764d42eb74f1a
diff --git a/host/commands/adbshell/main.cpp b/host/commands/adbshell/main.cpp
index 62a68de..d1d4392 100644
--- a/host/commands/adbshell/main.cpp
+++ b/host/commands/adbshell/main.cpp
@@ -91,29 +91,9 @@
return nullptr;
}
-std::string VsocUserName() {
- const char kVsocUserPrefix[] = "vsoc-";
- auto num = InstanceNumberAsStr();
- return std::string{kVsocUserPrefix} + num;
-}
-
-std::string VsocHomeAdbShellPath() {
- return std::string{"/home/"} + VsocUserName() + "/bin/adbshell";
-}
-
-void TryExecHomeAdbShell(char* argv[]) {
- auto home_shell = VsocHomeAdbShellPath();
- if (access(home_shell.c_str(), X_OK) != -1 && home_shell != argv[0]) {
- home_shell.push_back('\0');
- argv[0] = &home_shell[0];
- execv(argv[0], argv);
- assert(0 && "execv() returned");
- }
-}
} // namespace
int main(int argc, char* argv[]) {
- TryExecHomeAdbShell(argv);
auto instance = InstanceStr();
std::vector<char*> new_argv = {
const_cast<char*>("/usr/bin/adb"), const_cast<char*>("-s"),