#!/usr/bin/env python
import os
import time
import re
import os
from time import sleep
cmd3=“adb pull /resources/map/BaiduMapAuto/bnav/log /Users/shixinfa/Desktop/0630/log”
os.system(cmd3)
while True:
file1 = os.stat(’/Users/shixinfa/Desktop/0630/InssdkLog’) # initial file size
os.system(“adb pull /sdcard/InssdkLog /Users/shixinfa/Desktop/0630/InssdkLog”);
sleep(2)
file2 = os.stat(’/Users/shixinfa/Desktop/0630/InssdkLog’) # updated file size
comp = file2.st_size - file1.st_size # compares sizes
if comp == 0:
file22 =os.stat("/Users/shixinfa/Desktop/0630/NaviEngineLog")
os.system(“adb pull /resources/map/BaiduMapAuto/bnav/NaviEngineLog /Users/shixinfa/Desktop/0630/NaviEngineLog”)
sleep(2)
file22after = os.stat("/Users/shixinfa/Desktop/0630/NaviEngineLog")
chazhi=file22after.st_size-file22.st_size;
if chazhi == 0: file33=os.stat("/Users/shixinfa/Desktop/0630/BaiduLocationService")
os.system(“adb pull sdcard/BaiduLocationService /Users/shixinfa/Desktop/0630/BaiduLocationService”)
sleep(2) file33after=os.stat("/Users/shixinfa/Desktop/0630/BaiduLocationService")
cz=file33after.st_size - file33.st_size;
else:
os.system(“adb pull sdcard/BaiduLocationService /Users/shixinfa/Desktop/0630/BaiduLocationService”);
if cz == 0:
print(“copy finshed …”)
else:
os.system(“adb pull /sdcard/InssdkLog /Users/shixinfa/Desktop/0630/InssdkLog”);