hhstore / blog

My Tech Blog: about Mojo / Rust / Golang / Python / Kotlin / Flutter / VueJS / Blockchain etc.
https://github.com/hhstore/blog/issues
295 stars 24 forks source link

Adroid Rom: Flash a Android(XiaoMi) ROM on Mac #326

Open hhstore opened 3 years ago

hhstore commented 3 years ago

related:

hhstore commented 3 years ago

Mac 下 Android ROM 刷机(小米手机):

刷机环境:

刷机步骤:

0. 准备:

下载小米官方 ROM 包:

ROM 包解压:

image

1. 安装 adb:

安装:


brew cask install android-platform-tools

配置环境变量:


adb

fastboot --version

2. 手机连接 mac, 准备刷机:

mac 终端下:

🕙 [2021-11-04 Thu 13:17:48] ➜  fastboot devices
b6da3c35    fastboot

ROM 包解压, 进入解压后文件夹(内含 flash_all.sh)


cd  ROM-包解压缩文件夹/

# 执行: 
sh ./flash_all.sh -s b6da3c35

# 刷机完成, 手机会自动重启.

image

3. 刷机结束:

image

FAQ:

报错: adb reboot bootloader error: no devices/emulators found

lsof -i tcp:5037

kill -9 adb-pid

image

ref: