http://en.miui.com/unlock/
按照小米官方说明的步骤进行解锁你的小米设备。
注意,下面的步骤请在你解锁你的小米设备后才能进行。
twrp-x.x.x-x-gemini.img
.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)
// 到达这一步,我们的刷机前戏工作基本已经完成的差不多了。
如果当你选择好zip,开始安装的时候,出现错误,出现error 7
. 出现验相关的问题,那么高潮来了。
// 再次把系统包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.cnblogs.com/ls1519/p/12837957.html