
批處理如何實現ADB和Fastboot之間的判斷首先判斷手機是否是fastboot模式,不是就用命令adb wait-for-devices reboot bootloader把手機強制啟動到fastboot模式
想了半天想不出好辦法,各位有什么好的建議?謝謝!nclick="copycode($('code0'));">復制代碼
- @echo off
- fastboot devices >d:fastboot.log
- //如果手機是fastboot 模式,fastboot.log里面有fasboot字符串
- //如果手機不是fastboot模式,會一直等待,命令不往下走。
- adb wait-for-devices reboot bootloader
- :fastboot
- fastboot flash bootloader u-boot.bin

