adb相关脚本

 

@echo off
adb wait-for-device
adb shell date
set file_path=%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%_thanos.log

setlocal enabledelayedexpansion
:loop
for /f %%a in ('adb devices') do (
 
    set device_id=%%a
    echo !device_id!
    if not "!device_id!" == "List" (
        if not exist !device_id! (
            mkdir !device_id!
        )

        cd !device_id!
        adb pull /data/log/charge-log .
        ::adb pull /sdcard/log/thanos.log .
        ::rename thanos.log %file_path%
        cd ../        
    ) 
)

endlocal

pause

 

posted @ 2024-11-12 15:22  牧 天  阅读(7)  评论(0)    收藏  举报