小米10 刷機LineageOS 17.1的詳細教程


1,准備

  1. platform-tools
  2. Mac/Linux/windows
  3. 會簡單的命令行命令

2,解鎖你的小米設備

http://en.miui.com/unlock/
按照小米官方說明的步驟進行解鎖你的小米設備。

3,Installing a custom recovery using fastboot

注意,下面的步驟請在你解鎖你的小米設備后才能進行。

  1. Download a custom recovery - you can download TWRP. Simply download the latest recovery file, named something like twrp-x.x.x-x-gemini.img.
  2. Connect your device to your PC via USB.
  3. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
gaoshiweideMacBook-Pro:~ gaoshiwei$ adb devices
List of devices attached
289dedcc    device
// 如果成功的話會列出你的設備
// 繼續進行下面的步驟
gaoshiweideMacBook-Pro:~ gaoshiwei$ adb reboot bootloader
gaoshiweideMacBook-Pro:~ gaoshiwei$ fastboot devices
289dedcc    fastboot
// 注意下面的命令,/Users/gaoshiwei/Downloads/是我Mac上存放img的路徑。(用過命令行的都懂哈)
gaoshiweideMacBook-Pro:~ gaoshiwei$ fastboot flash recovery /Users/gaoshiwei/Downloads/twrp-3.1.1-0-gemini.img 
target reported max download size of 536870912 bytes
sending 'recovery' (20200 KB)...
OKAY [  0.601s]
writing 'recovery'...
OKAY [  0.127s]
finished. total time: 0.727s
// 上面的一條命令成功后進行下面的。
gaoshiweideMacBook-Pro:~ gaoshiwei$ fastboot boot /Users/gaoshiwei/Downloads/twrp-3.1.1-0-gemini.img 
downloading 'boot.img'...
OKAY [  0.517s]
booting...
OKAY [  0.427s]
finished. total time: 0.945s

// finished 后,等下一下,一會就能看到圖像界面了。可以操作哦,英文一般的可以選擇語言哦,有簡體中文。

// 把電腦上下載好的系統push到手機里面去,記得push到 /sdcard/ 下
gaoshiweideMacBook-Pro:~ gaoshiwei$ adb push /Users/gaoshiwei/Downloads/lineage-17.1-nightly-gemini-signed.zip /sdcard/
/Users/gaoshiwei/Downloads/lineage-14.1-20171128-nightly-gemini...gned.zip: 1 file pushed. 12.6 MB/s (552332426 bytes in 41.791s)

// 到達這一步,我們的刷機前戲工作基本已經完成的差不多了。

4,開始刷機

  1. 選擇清除,然后進入高級清除
  2. 選擇Cache,System,Data分區,然后滑動下面的滑動圖標進行清除。
  3. 返回主菜單界面,然后選擇安裝。
  4. 導航到/sdcard,然后選擇 LineageOS系統的.zip包
  5. 先不要勾選驗證和安裝后重啟
  6. 開始安裝,如果沒有出現錯誤的話,等他安裝吧。(出現錯誤的話看下面的備注)
  7. 等待安裝完成后,返回主菜單,選擇重啟,然后選擇系統。

5,備注:解決LineageOS刷機 錯誤7 問題

如果當你選擇好zip,開始安裝的時候,出現錯誤,出現error 7. 出現驗相關的問題,那么高潮來了。

  1. 先在你的電腦找你下載的LineageOS.zip的文件,用壓縮軟件解壓。
  2. 找到這個文件 META-INF/com/google/updater-script
  3. 用記事本之類的文本編輯器打開(我用的sublime)
  4. 選擇前面幾行的中的所有assert的行,進行刪除,包括空行也刪除。刪除后保存文件。
  5. 重新打包,把你之前解壓的所有文件,重新打進一個壓縮包,用zip的壓縮方式,包名起什么都無所謂,盡量簡單點,我就起了個mi5.zip
// 再次把系統包push到我們手機中
gaoshiweideMacBook-Pro:~ gaoshiwei$ adb push /Users/gaoshiwei/Downloads/mi5.zip /sdcard/
/Users/gaoshiwei/Downloads/mi5.zip: 1 file pushed. 16.1 MB/s (552345568 bytes in 32.774s)

push進去之后,下面就是開始刷機了。那就看前面的刷機步驟嘍。



 
 
 

鏈接:https://www.jianshu.com/p/1cdd45b3343d

 
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM