mac os android 线刷,Mac系统下使用Fastboot线刷安卓设备

安装Homebrew(已安装跳过)

raw.githubusercontent.com域名被污染,如果报错,host文件添加

199.232.68.133 raw.githubusercontent.com

安装安卓工具

brew cask install android-platform-tools

解压fastboot线刷固件,cd到含boot.img、system.img、cache.img等文件的文件夹下

开始刷机

1.设备打开USB选项

【关于设备】连续点击内核版本 直到弹出已处于开发者模式

【设置】--> 【开发者选项】--> 【USB调试】

2.adb查看设备连接状态

[email protected] emmc % adb devices

List of devices attached

1af7de5device

3.adb进入fastboot模式

[email protected] emmc % adb reboot bootloader

4.fastboot查看设备

[email protected] emmc % fastboot devices

1af7de5fastboot

5.fastboot抹掉旧系统,写入新系统,依次执行以下命令

抹掉旧版本分区内容

1. fastboot erase boot

2. fastboot erase system

3. fastboot erase userdata

4. fastboot erase recovery

刷入对应分区内容

1. fastboot flash boot boot.img

2. fastboot flash system system.img

3. fastboot flash userdata userdata.img

4. fastboot flash recovery recovery.img

重启搞定

fastboot reboot

[email protected] emmc % fastboot erase boot

Erasing ‘boot‘ OKAY [ 0.004s]

Finished. Total time: 0.012s

[email protected] emmc % fastboot erase system

Erasing ‘system‘ OKAY [ 0.004s]

Finished. Total time: 0.011s

[email protected] emmc % fastboot erase userdata

Erasing ‘userdata‘ OKAY [ 0.005s]

Finished. Total time: 0.013s

[email protected] emmc % fastboot erase recovery

Erasing ‘recovery‘ OKAY [ 0.004s]

Finished. Total time: 0.013s

[email protected] emmc % fastboot flash boot boot.img

Sending ‘boot‘ (6388 KB) OKAY [ 0.207s]

Writing ‘boot‘ OKAY [ 0.506s]

Finished. Total time: 0.724s

[email protected] emmc % fastboot flash system system.img

Sending ‘system‘ (511318 KB) ERROR: usb_write failed with status e00002eb // 此处如果有类似报错,可以报错后等待3min左右的写入时间(我这边虽然报错,但实际上正在Writing),再执行下一步

FAILED (Write to device failed in SendBuffer() (No such file or directory))

fastboot: error: Command failed

[email protected] emmc % fastboot flash userdata userdata.img

Sending ‘userdata‘ (35889 KB) OKAY [ 1.198s]

Writing ‘userdata‘ OKAY [ 2.083s]

Finished. Total time: 3.300s

[email protected] emmc % fastboot flash recovery recovery.img

Sending ‘recovery‘ (6778 KB) OKAY [ 0.229s]

Writing ‘recovery‘ OKAY [ 0.331s]

Finished. Total time: 0.572s

[email protected] emmc % fastboot reboot

Rebooting

6.Okay!

原文:https://www.cnblogs.com/chao8888/p/13094854.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值