Browse Source

Fixed the copy function so it shows progress while still maintaining the error code so that move doesn't nuke stuff it's not supposed to yet

master
Raphael Roberts 8 years ago
parent
commit
e632eb5004
  1. 6
      adb.py
  2. 32
      defaults.json
  3. 53086
      out.txt

6
adb.py

@ -66,7 +66,9 @@ def _adb(*args,out = False):
if out:
return subprocess.check_output(args,shell = False).decode().rstrip('\r\n')
else:
subprocess.call(args,shell = False)
ret = subprocess.call(args,shell = False)
if ret:
raise subprocess.CalledProcessError(ret,args)
def get_info():
thing = _adb("devices","-l",out = True)
@ -158,7 +160,7 @@ fi'''
local = os.path.join(defaults['local']['temp'],last)
flag = True
try:
self.adb("pull","-a",remote,local,out=True)
self.adb("pull","-a",remote,local)
except subprocess.CalledProcessError as e:
if ignore_error:
pass

32
defaults.json

@ -1,16 +1,18 @@
{
"exe": "c:\\Program Files (x86)\\ADB\\adb.exe",
"date_format":"%Y-%m-%d_%H.%M.%S",
"local": {
"TWRP": "%userprofile%\\Android\\TWRP",
"titanium_backup": "%userprofile%\\Android\\TitaniumBackup",
"temp": "%userprofile%\\Android\\harbor",
"screenshots": "%userprofile%\\Pictures\\Screenshots",
"updates": "%userprofile%\\Downloads\\sort\\phone_updates"
},
"remote": {
"screenshots": "/sdcard/Pictures/Screenshots",
"titanium_backup": "/sdcard/TitaniumBackup",
"updates": "/data/lineageos_updates"
}
}
"date_format": "%Y-%m-%d_%H.%M.%S",
"exe": "c:\\Program Files (x86)\\ADB\\adb.exe",
"local": {
"TWRP": "%userprofile%\\Android\\TWRP",
"messages": "%userprofile%\\Android\\messages",
"screenshots": "%userprofile%\\Pictures\\Screenshots",
"temp": "%userprofile%\\Android\\harbor",
"titanium_backup": "%userprofile%\\Android\\TitaniumBackup",
"updates": "%userprofile%\\Downloads\\sort\\phone_updates"
},
"remote": {
"messages": "/data/user_de/0/com.android.providers.telephony/databases/mmssms.db",
"screenshots": "/sdcard/Pictures/Screenshots",
"titanium_backup": "/sdcard/TitaniumBackup",
"updates": "/data/lineageos_updates"
}
}

53086
out.txt
File diff suppressed because it is too large
View File

Loading…
Cancel
Save