I'm porting a Linux script to Windows & MinGW, which accesses the Android phone through ADB.
Sometime I need to pass the Android's file path as ADB command line option.
However, when invoking the ADB.exe, MinGW translates it to Windows' path.
For example,
adb shell cat /proc/version
Is translated as follows, resulting "No such file or directory" error in Android.
adb shell cat C:/Program Files (x86)/Git/proc/version
I found double-quotation helps to prevent that.
adb shell "cat /proc/version"
But is there any global siwtches or env variables to prevent MinGW for this converstion ?
The MinGW I'm using came with the "Git for Windows" package.
EDITED : I also hit another scnario, I cannot work-around with the double quotation.
$ adb push test1.mp3 /data
failed to copy 'test1.mp3' to 'C:/Program Files (x86)/Git/data': No such file or directory
$ adb push test1.mp3 "/data"
failed to copy 'test1.mp3' to 'C:/Program Files (x86)/Git/data': No such file or directory