문제

I'm trying to pass a unix style path to the Android adb command using a git bash (msysgit) but the shell is interpreting my path incorrectly. This is what I've tried so far:

$ adb push myfile /mnt/sdcard/
failed to copy 'myfile' to 'C:/Program Files (x86)/Git/mnt/sdcard/': No such file or directory

$ adb push myfile "/mnt/sdcard/"
failed to copy 'myfile' to 'C:/Program Files (x86)/Git/mnt/sdcard/': No such file or directory

$ adb push myfile '/mnt/sdcard/'
failed to copy 'myfile' to 'C:/Program Files (x86)/Git/mnt/sdcard/': No such file or directory

What is the correct way to do this?

도움이 되었습니까?

해결책

According to this answer, the MSYS shell is mangling the file name according to these rules. According to the mangling rules, the following should work for you:

adb push myfile '//mnt\sdcard\'

(replace the first slash with two slashes and all remaining slashes with a backslash)

다른 팁

adb push myfile //mnt/sdcard

linux isn't picky about duplicate /s

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top