Nexus设备刷入原厂系统

注意

Warning: Installing a factory image will erase all data from the device, and unlocking the bootloader will make your device less secure. In most cases it should be possible to sideload the full OTA image instead. This does not require a data wipe, and does not require the bootloader to be unlocked.
警告:安装工厂映像将清除设备中的所有数据,解锁引导加载程序将使您的设备安全性降低。 在大多数情况下,应该可以改装完整的OTA图像。 这不需要数据擦除,也不需要解锁引导加载程序。 —— [Google APIs for Android]

引言

前年买了nexus4做测试机,不过项目做完也就放在一边了。最近想用个原厂系统,于是网上查了下教程,发现都不太好用,试了好几次都没成功,竟然还有Nexus4-toolkit这种专用的脚本,但是觉得效果不怎么样,解BL锁可以用用。
几番转折,还用专用网站好用,每个系统都有专用脚本flash-all.sh,在Windows系统上用flash-all.bat,很顺利的就完成了工作。
原厂系统下载:https://developers.google.com/android/images(Over wall)

ps:手机因为按网上教程刷了好几次,已经无法开机,所以我用的是fastboot。关机后同时按音量–和关机键进入,想要双清的话进入recovery。

图1
图1 手机系统信息
这里写图片描述
图2 Android4.4.4原厂系统主界面

教程

刷入系统映像:
1.为设备下载适当的系统映像,然后将其解压缩到安全目录。
2.连接设备并调好驱动,工具安装
3.进入fastboot模式,官方提供以下两种方法:

-Using the adb tool: With the device powered on, execute:
使用adb工具:开机后执行命令:

adb reboot bootloader

-Using a key combo: Turn the device off, then turn it on and immediately hold down the relevant key combination for your device.
使用组合键,引文中提到的方法

解锁请参考另一篇?
4.打开cmd或terminal并解压系统映像到指定位置。
5.执行flash-all脚本,将安装bl,基带和操作系统。

fastboot flash bootloader bootloader-mako-makoz30d.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.03.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-occam-ktu84p.zip

6.脚本执行后,为了确保安全,应该对bl加锁。

重新进入fastboot,执行fastboot flashing lock或者对于型号较老的设备执行fastboot oem lock。锁定BL后会擦除某些设备上的数据,如果要再次刷入系统,需要运行fastboot oem unlock,会擦除数据。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值