openatx / adbutils

pure python adb library for google adb service.
MIT License
736 stars 173 forks source link

adb push failed on windows #72

Closed yinkh closed 1 year ago

yinkh commented 2 years ago

adbutils==1.0.2

use like: device.push("resource/Gallery/AutoTest/A_GIF/rain.gif", "/storage/emulated/0/DCIM/") return error

Command ''D:\python_workspace\TestKit\venv\lib\site-packages\adbutils\binaries\adb.exe' -s 6a6b10bd push resource/Gallery/. /storage/emulated/0/DCIM/' returned non-zero exit status 1.

push source code: self.adb_output("push", local, remote)

adb_output -> list2cmdline -> map(shlex.quote, args)

shlex.quote will convert 'D:\\python_workspace\\TestKit\\venv\\lib\\site-packages\\adbutils\\binaries\\adb.exe' to '\'D:\\python_workspace\\TestKit\\venv\\lib\\site-packages\\adbutils\\binaries\\adb.exe\'' , this will lead this error

image

yinkh commented 2 years ago

new pr https://github.com/openatx/adbutils/pull/73

yinkh commented 1 year ago

fixed