Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

在 Linux 下用命令列刷機:adb 與 fastboot 完整流程

不用出門下載刷機精靈,Linux 只要有 adb 與 fastboot 兩支工具,就能完成整機刷寫。

第一步:確認 adb 連線

adb devices

若無法列出裝置,先切到 SDK 的 platform-tools 目錄並重啟伺服器:

cd AndroidSDK/platform-tools
adb kill-server
adb start-server

第二步:進入 bootloader 並刷入核心分區

adb reboot bootloader
sudo ./fastboot devices
sudo ./fastboot flash boot xx/xx/xx/boot.img
sudo ./fastboot flash system xx/xx/xx/system.img
sudo ./fastboot flash userdata xx/xx/xx/userdata.img
sudo ./fastboot reboot

完整 Partition 清單

若要做全機重刷, Qualcomm 平台常見的順序如下:

fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash aboot emmc_appsboot.mbn
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash persist persist.img
fastboot flash recovery recovery.img

幾個提醒:Linux 下操作 fastboot 通常需要 root,前置 sudo 最省事;userdata 會清空使用者資料,刷之前務必備份;persist 分區存放感測器校準資訊,一般情況下不要隨便動它。

Copyright © Linux教程網 All Rights Reserved