通过官方的说明,我一步步执行到fastBoot,发现官方提供的解锁工具只有Windows版本
所以我。。。
进入正题
Mac环境小米手机刷机
1:在 MAC上先安装 ADB (Android调试桥)
刷机需要先安装adb工具,在终端输入
brew cask install android-platform-tools
如果网络没有问题的话:会出现
-----@OB ~ % brew cask install android-platform-tools
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 44, done.
remote: Counting objects: 100% (44/44), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 543804 (delta 23), reused 20 (delta 6), pack-reused 543760
Receiving objects: 100% (543804/543804), 239.69 MiB | 1.81 MiB/s, done.
Resolving deltas: 100% (383791/383791), done.
Warning: Unexpected method 'livecheck' called on Cask imageoptim.
Follow the instructions here:
https://github.com/Homebrew/homebrew-cask#reporting-bugs
Warning: Unexpected method 'livecheck' called on Cask sentinel.
.....
出现这样的就算成功了
2:下载系统镜像
系统镜像下载:小米系统如果不能用了,自己上网去找找下一个吧
3:刷机
1: 连接手机
2: 进入fastboot
模式:
- 开机状态:终端输入
adb reboot bootloader
- 关机状态:
开机键+音量下长按
3: 检测adb(可能环境变量没设置好)是否可以用:
xxx@OB ~ % fastboot devices
add0720 fastboot #---> 这就是连接的手机
记住前面的编号:add0720
4: 将下载好的小米系统压缩包解压,然后cd到该目录下
udoctor@OB ~ % cd /Users/xxx/Downloads/ugglite_images_9.8.29_20190829.0000.00_7.1_cn
5:执行刷机指令
sh ./flash_all.sh -s add0720
然后就是等待
xxx@OB ugglite_images_9.8.29_20190829.0000.00_7.1_cn % sh ./flash_all.sh -s add0720
product: ugglite
Sending 'tz' (1499 KB) OKAY [ 0.054s]
Writing 'tz' OKAY [ 0.048s]
Finished. Total time: 0.147s
Sending 'sbl1' (337 KB) OKAY [ 0.014s]
Writing 'sbl1' OKAY [ 0.012s]
Finish
.......
最后成功!