Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • If the system is using ash not bash, shall I use -ash? If so, I will try that and update my result here. Commented Mar 2, 2024 at 12:32
  • Yes. Although you could technically set it to any value that includes - as the first character, using the name of the shell that's being invoked is the expected behavior. Commented Mar 3, 2024 at 1:41
  • I am not sure if I really got your point. I changed the source code of adbd to launch shell as /bin/sh -ash, is it correct or not? I got following result, PS C:\Users\test> adb shell - exec '/bin/sh --login' failed: No such file or directory (2) - Commented Mar 5, 2024 at 6:19