2

Git Bash version is "Git-2.16.2-32-bit".

After installing the Git Bash, and set up the env PATH. adb.exe has no response when I execute "adb shell".

I can do "adb devices" or "adb push", but adb shell has no response

Please refer below's picture :

enter image description here

KimmyYang@KimmyYang-3020 MINGW64 /d/Git $ env

HOMEPATH=\Users\kimmyyang
MANPATH=/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man:
APPDATA=C:\Users\kimmyyang\AppData\Roaming
ProgramW6432=C:\Program Files
HOSTNAME=KimmyYang-3020
SHELL=/usr/bin/bash
TERM=xterm
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
WINDIR=C:\Windows
TMPDIR=/tmp
PUBLIC=C:\Users\Public
OLDPWD=/d
USERDOMAIN=FIHTDC
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
OS=Windows_NT
ALLUSERSPROFILE=C:\ProgramData
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
TEMP=/tmp
COMMONPROGRAMFILES=C:\Program Files\Common Files
USERNAME=KimmyYang
PROCESSOR_LEVEL=6
ProgramFiles(x86)=C:\Program Files (x86)
PATH=/c/platform-tools:/c/Users/kimmyyang/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/kimmyyang/bin:/c/Program Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/PuTTY:/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/c/Python27:/c/Python27/Scripts:/c/Python27/Lib/site-packages:/c/Python27/Lib/site-packages/gensim:/c/Python27/Lib/site-packages/scipy/extra-dll:/c/platform-tools:/usr/bin/vendor_perl:/usr/bin/core_perl
EXEPATH=D:\Git
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
FP_NO_HOST_CHECK=NO
PWD=/d/Git
SYSTEMDRIVE=C:
LANG=zh_TW.UTF-8
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
USERPROFILE=C:\Users\kimmyyang
PS1=\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]\n\[\033[32m\]\u@\h \[\033[35m\]$MSYSTEM \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n$
LOGONSERVER=\\HC-A01
CommonProgramW6432=C:\Program Files\Common Files
PROCESSOR_ARCHITECTURE=AMD64
LOCALAPPDATA=C:\Users\kimmyyang\AppData\Local
SSH_ASKPASS=/mingw64/libexec/git-core/git-gui--askpass
ProgramData=C:\ProgramData
SHLVL=1
HOME=/c/Users/kimmyyang
USERDNSDOMAIN=FIHTDC.COM
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PLINK_PROTOCOL=ssh
HOMEDRIVE=C:
MSYSTEM=MINGW64
COMSPEC=C:\Windows\system32\cmd.exe
TMP=/tmp
SYSTEMROOT=C:\Windows
PRINTER=\\tpe-f01\DingPu-3F
PROCESSOR_REVISION=3c03
PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/share/info:
PROGRAMFILES=C:\Program Files
DISPLAY=needs-to-be-defined
NUMBER_OF_PROCESSORS=4
SESSIONNAME=Console
COMPUTERNAME=KIMMYYANG-3020
_=/usr/bin/env

Why adb shell has no response on Git Bash?

Thank you.

KimmyYang
  • 111
  • 1
  • 4

4 Answers4

2

This is an old question, but it's worth pointing out that you are receiving a response while running adb shell, but it's just that the terminal prompt is not visible. You'd be able to issue commands and view the responses just fine, as shown below.

Image showing windows console with ADB shell Image showing git bash console with ADB shell

1

I only used adb.exe in a CMD session, not a bash session.

As detailed here, git bash provides mintty, with a better POSIX compatibility. That does not work with some Windows programs.

If you use a simplified PATH, you still can access most Linux commands directly from a CMD session (without needing the bash)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

you can try : winpty adb shell.Please refer below's picture : image

UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92
hewy
  • 11
0

Just adding to the knowledge base. Git bash on my windows 10 will work doing an adb shell into my oculus quest 2, but there is no prompt or echo of what you time later. Otoh, vs code says hollywood/ and echoes what you type. Haven't tried winpty yet. Iirc, windows bash works also.

Ray Tayek
  • 9,841
  • 8
  • 50
  • 90