I tried to get the progress when pushing a file to device. It works when I "set ADB_TRACE=adb" in cmd (found in this page)
Then I want to use it in python 2.7.
cmd = "adb push file /mnt/sdcard/file"
os.putenv('ADB_TRACE', 'adb')
os.popen(cmd)
print cmd.read()
It shows nothing. How can I get these details?
OS:win7
os.popen
is deprecated:Use
subprocess
instead: