def get_file_size(adb, remote_path):
try:
output = adb.run_cmd('shell', 'ls', '-l', remote_path)
m = re.search(r'\s(\d+)', output)
if not m:
return 0
return int(m.group(1))
except subprocess.CalledProcessError as e:
log.warn("call error: %s", e)
time.sleep(.1)
return 0
评论列表
文章目录