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

Commit a8ca503b authored by Koushik K. Dutta's avatar Koushik K. Dutta Committed by Koushik Dutta
Browse files

adb shell command should also prefer /sbin/sh if a command is passed in...

adb shell command should also prefer /sbin/sh if a command is passed in directly, such as "adb shell date"
parent d831cd97
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -394,7 +394,14 @@ int service_to_fd(const char *name)
#endif
    } else if(!HOST && !strncmp(name, "shell:", 6)) {
        if(name[6]) {
            struct stat filecheck;
            ret = -1;
            if (stat(ALTERNATE_SHELL_COMMAND, &filecheck) == 0) {
                ret = create_subprocess(ALTERNATE_SHELL_COMMAND, "-c", name + 6);
            }
            if (ret == -1) {
                ret = create_subprocess(SHELL_COMMAND, "-c", name + 6);
            }
        } else {
            struct stat filecheck;
            ret = -1;