Flash xiaomi.eu for Redmi K40

envirnment

首先是环境准备,我用的是 MacOS,这里都是 MacOS 适用。

1
2
3
4
5
6
brew install android-platform-tools
# brew install android-file-transfer
brew install [email protected]
sudo ln -sfn /usr/local/opt/[email protected]/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-11.jdk
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
export PATH="/usr/local/opt/[email protected]/bin:$PATH"'

unlook the bootloader

官方工具只支持 windows,而我用的是 MacOS,所以我就用了一个叫 XiaoMiToolV2 的东西。因为其 release 的版本过老,需要重新自己编译,具体使用步骤如下:

1
2
3
4
5
6
git clone https://github.com/francescotescari/XiaoMiToolV2
cd XiaoMiToolV2
cp /usr/local/bin/adb res/tools/
cp /usr/local/bin/fastboot res/tools/
sudo ./gradlew build
sudo ./gradlew run

flash rom via fastboot

1
2
3
4
5
adb reboot fastboot
mkdir temp
cd temp
unzip unzip ../xiaomi.eu_multi_HMK40_POCOF3_V13.0.3.0.SKHCNXM_v13-12-fastboot.zip -d .
./macos_fastboot_first_install_with_data_format.sh
如果您觉得我的经验能够帮助到您,请不吝赏赐,非常感谢!