目录

  • 0x0 背景
  • 0x1 下载刷机包
  • 0x2 安装
    • 0x20 刷机包文件解析
    • 0x21 进入fasterboot模式
    • 0x22 刷机

0x0 背景

需要使用Piexl 3a手机刷Android 11系统。

0x1 下载刷机包

先访问Google的官方刷机包下载地址:https://developer.android.google.cn/preview/download
选择对应机型的刷机包:

0x2 安装

0x20 刷机包文件解析

解压刷机包,得到如下的文件:

核心文件:

  1. bootloader-sargo-b4s4-0.3-6622442.img :引导程序
  2. radio-sargo-g670-00067-200702-b-6648702.img:射频相关程序
  3. image-sargo-rpb3.200720.005.zip:刷机包镜像相关程序

脚本:

  1. flash-all.bat
@ECHO OFF
:: Copyright 2012 The Android Open Source Project
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
::      http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-sargo-b4s4-0.3-6622442.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-sargo-g670-00067-200702-b-6648702.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot -w update image-sargo-rpb3.200720.005.zipecho Press any key to exit...
pause >nul
exit

实际可以看成3个部分:

1. fastboot flash bootloader bootloader-sargo-b4s4-0.3-6622442.img
2. fastboot flash radio radio-sargo-g670-00067-200702-b-6648702.img
3. fastboot -w update image-sargo-rpb3.200720.005.zip

.bat脚本方便windows平台下使用,但是需要安装adb工具。双击这个.bat文件就能运行。

  1. flash-all.sh
    该部分内容和上面的flash-all.bat相识,只不过使用shell脚本写了一遍
    在Linux下使用该脚本的方式:
chmod a+x flash-all.sh #先给shell脚本文件可执行权限
bash flash-all.sh # 触发shell脚本运行

内容如下:

#!/bin/sh# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.if ! [ $($(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 2802 ]; thenecho "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html"exit 1
fi
fastboot flash bootloader bootloader-sargo-b4s4-0.3-6622442.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-sargo-g670-00067-200702-b-6648702.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-sargo-rpb3.200720.005.zip
  1. flash-base.sh
    该文件比flash-all.sh就少了下面这一句。
fastboot -w update image-sargo-rpb3.200720.005.zip

flash-base.sh内容如下:

#!/bin/sh# Copyright 2012 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.if ! [ $($(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 2802 ]; thenecho "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html"exit 1
fi
fastboot flash bootloader bootloader-sargo-b4s4-0.3-6622442.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-sargo-g670-00067-200702-b-6648702.img
fastboot reboot-bootloader
sleep 5

0x21 进入fasterboot模式

开机状态下长按“电源键 + 音量下键” 10s左右。

补充:如果机器是locked状态,需要先解锁
fastboot flashing unlock

0x22 刷机

Windows:
双击flash-all.bat文件即可

Linux:

chmod a+x flash-all.sh #先给shell脚本文件可执行权限
bash flash-all.sh # 触发shell脚本运行

这个过程会有一点慢,不用点击任何手机上任何键,等着就好,下面是安装过程中的命令行的输出:

➜  sargo-rpb3.200720.005 bash flash-all.sh
Sending 'bootloader_a' (8369 KB)                   OKAY [  0.370s]
Writing 'bootloader_a'                             (bootloader) Flashing Pack version b4s4-0.3-6622442
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition xbl_a
(bootloader) Flashing partition xbl_config_a
(bootloader) Flashing partition tz_a
(bootloader) Flashing partition aop_a
(bootloader) Flashing partition hyp_a
(bootloader) Flashing partition keymaster_a
(bootloader) Flashing partition cmnlib_a
(bootloader) Flashing partition cmnlib64_a
(bootloader) Flashing partition abl_a
(bootloader) Flashing partition devcfg_a
(bootloader) Flashing partition qupfw_a
(bootloader) Flashing partition storsec_a
OKAY [  0.308s]
Finished. Total time: 0.883s
Rebooting into bootloader                          OKAY [  0.051s]
Finished. Total time: 0.151s
Sending 'radio_a' (73340 KB)                       OKAY [  2.470s]
Writing 'radio_a'                                  (bootloader) Flashing Pack version SSD:g670-00067-200702-B-6648702
(bootloader) Flashing partition modem_a
OKAY [  0.578s]
Finished. Total time: 3.248s
Rebooting into bootloader                          OKAY [  0.051s]
Finished. Total time: 0.201s
--------------------------------------------
Bootloader Version...: b4s4-0.3-6622442
Baseband Version.....: g670-00067-200702-B-6648702
Serial Number........: 97GAY10NQN
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
Checking 'product'                                 OKAY [  0.060s]
Checking 'version-bootloader'                      OKAY [  0.060s]
Checking 'version-baseband'                        OKAY [  0.060s]
Setting current slot to 'a'                        OKAY [  0.066s]
extracting boot.img (64 MB) to disk... took 0.202s
archive does not contain 'boot.sig'
Sending 'boot_a' (65536 KB)                        OKAY [  2.210s]
Writing 'boot_a'                                   OKAY [  0.424s]
extracting dtbo.img (8 MB) to disk... took 0.017s
archive does not contain 'dtbo.sig'
Sending 'dtbo_a' (8192 KB)                         OKAY [  0.360s]
Writing 'dtbo_a'                                   OKAY [  0.125s]
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting vbmeta.img (0 MB) to disk... took 0.000s
archive does not contain 'vbmeta.sig'
Sending 'vbmeta_a' (4 KB)                          OKAY [  0.120s]
Writing 'vbmeta_a'                                 OKAY [  0.068s]
archive does not contain 'vbmeta_system.img'
archive does not contain 'vendor_boot.img'
extracting super_empty.img (0 MB) to disk... took 0.000s
Rebooting into fastboot                            OKAY [  0.060s]
< waiting for any device >
Sending 'system_a' (4 KB)                          OKAY [  0.001s]
Updating super partition                           OKAY [  0.006s]
Resizing 'product_a'                               OKAY [  0.005s]
Resizing 'system_a'                                OKAY [  0.004s]
Resizing 'system_ext_a'                            OKAY [  0.004s]
Resizing 'vendor_a'                                OKAY [  0.004s]
archive does not contain 'boot_other.img'
archive does not contain 'odm.img'
extracting product.img (1697 MB) to disk... took 6.635s
archive does not contain 'product.sig'
Resizing 'product_a'                               OKAY [  0.005s]
Sending sparse 'product_a' 1/7 (262140 KB)         OKAY [  8.542s]
Writing 'product_a'                                OKAY [  2.831s]
Sending sparse 'product_a' 2/7 (262140 KB)         OKAY [  8.556s]
Writing 'product_a'                                OKAY [  1.798s]
Sending sparse 'product_a' 3/7 (262140 KB)         OKAY [  8.543s]
Writing 'product_a'                                OKAY [  1.814s]
Sending sparse 'product_a' 4/7 (262140 KB)         OKAY [  8.527s]
Writing 'product_a'                                OKAY [  1.817s]
Sending sparse 'product_a' 5/7 (262140 KB)         OKAY [  8.557s]
Writing 'product_a'                                OKAY [  1.784s]
Sending sparse 'product_a' 6/7 (262140 KB)         OKAY [  8.546s]
Writing 'product_a'                                OKAY [  1.808s]
Sending sparse 'product_a' 7/7 (165268 KB)         OKAY [  5.393s]
Writing 'product_a'                                OKAY [  1.204s]
extracting system.img (785 MB) to disk... took 3.159s
archive does not contain 'system.sig'
Resizing 'system_a'                                OKAY [  0.005s]
Sending sparse 'system_a' 1/4 (262140 KB)          OKAY [  8.542s]
Writing 'system_a'                                 OKAY [  2.817s]
Sending sparse 'system_a' 2/4 (262140 KB)          OKAY [  8.533s]
Writing 'system_a'                                 OKAY [  1.811s]
Sending sparse 'system_a' 3/4 (262140 KB)          OKAY [  8.507s]
Writing 'system_a'                                 OKAY [  1.817s]
Sending sparse 'system_a' 4/4 (18120 KB)           OKAY [  0.592s]
Writing 'system_a'                                 OKAY [  0.168s]
extracting system_ext.img (181 MB) to disk... took 0.645s
archive does not contain 'system_ext.sig'
Resizing 'system_ext_a'                            OKAY [  0.005s]
Sending 'system_ext_a' (186144 KB)                 OKAY [  6.002s]
Writing 'system_ext_a'                             OKAY [  2.317s]
extracting system_other.img (72 MB) to disk... took 0.242s
archive does not contain 'system.sig'
Sending 'system_b' (74668 KB)                      OKAY [  2.391s]
Writing 'system_b'                                 OKAY [  0.511s]
extracting vendor.img (452 MB) to disk... took 1.819s
archive does not contain 'vendor.sig'
Resizing 'vendor_a'                                OKAY [  0.005s]
Sending sparse 'vendor_a' 1/2 (262140 KB)          OKAY [  8.513s]
Writing 'vendor_a'                                 OKAY [  2.843s]
Sending sparse 'vendor_a' 2/2 (201016 KB)          OKAY [  6.546s]
Writing 'vendor_a'                                 OKAY [  1.415s]
archive does not contain 'vendor_other.img'
Erasing 'userdata'                                 OKAY [  0.093s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Erasing 'metadata'                                 OKAY [  0.006s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 167.524s

然后就能看到首次启动的设置界面了,恭喜你可以体验Android11 了。

如果对你有帮助点点关注,支持一下作者吧。

Android11 刷机教程相关推荐

  1. android rom 评测,腾讯定制Android 4.0 ROM评测 附tati刷机教程

    从Nexus S刷过tita后的截图来看,该ROM的UI界面非常简单,而系统设置界面基本保持了原生界面风格.出乎人意料的是,tita并没有捆绑过多腾讯自己的应用程序(不知是不是测试版的原因). 此外, ...

  2. 三星 Nexus S刷MIUI ROM最新图文刷机教程

    三星 Nexus S怎么刷刷机,三星 Nexus S怎么刷MIUI,下面带来三星 Nexus S刷MIUI ROM最新图文刷机教程. 一.下载刷机工具和ROM包 下载刷机工具,下载完成后解压,解压后会 ...

  3. android 4.0.3固件,Vi30豪华版_Android4.0.3-1.0测试版固件刷机教程【MM刷机】

    本帖最后由 ㄣ溡绱MM 于 2012-4-9 08:58 编辑 今晚有些睡不着,就到官网逛了一下刷一下,下面是具体刷的固件介绍及教程: [固件名称]Vi30豪华版_Android4.0.3-1.0测试 ...

  4. 小米8 twrp recovery_小米手机、红米手机通用刷机教程

    ​​小米.红米全系机型通用刷机教程: (1)部分机型刷前需解BL锁(没有BL锁的机型请忽略此步),请先到www.miui.com/unlock/index.html申请解锁! 解锁 (2)刷入第三方R ...

  5. 三星a7108android 7.0,三星A7108系统运行速度变慢变卡顿了_怎么进行具体的刷机教程...

    这个三星2016版GALAXY A7(A7108/双4G)手机也是在2016年2月就上市的一款手机了,现在用的机友也是不少的,有的机友也是在用这个手机的时候遇到了这些或那样的问题,其中比较常见的问题也 ...

  6. htc服务器更新系统,HTC U11刷机教程_HTC U11卡刷官方ruu升级更新系统

    下面是咱们的HTC U11手机的刷机教程,咱们的这个手机也是分为卡刷教程和线刷教程,在这里说的卡刷教程主要是针对官方的ruu包来说的,刷官方的卡刷格式的ruu包的话,需要在手机的download模式下 ...

  7. android是乐视手机刷机,乐视MAX(乐视 X900+)一键刷机教程,轻松刷机

    经常会有机友提问,乐视MAX(乐视 X900+)手机支不支持一键刷机?由于奇兔刷机已经支持多达上千款安卓手机一键刷机,所以有时候小编也无法及时回答上来,最简单的办法就是把手机连上奇兔刷机,即可看到手机 ...

  8. 乐视X625手机刷机(全三个版本)官方包附刷机教程OEM解锁

    乐视X625刷机包 乐视X625手机刷机(全三个版本)官方包附刷机教程OEM解锁 乐视X625刷机包,来自官方售后的刷机包,一起有三个版本,分16G,32,以及64G版的刷机资料.刷机前先区分好.ht ...

  9. 三星GT-P1000完美刷机教程,附ROM刷机包下载

    原文地址为: 三星GT-P1000完美刷机教程,附ROM刷机包下载 http://www.ml.tc/p1000_shuaji/ 今天刷了个三星P1000,将刷机方法陈述如下,方便搜索前来有需要的网友 ...

最新文章

  1. RESTful Android
  2. Chrome 正在测试标签页的预览功能
  3. 一位 CEO 在战略沟通会上的员工问答实录
  4. 简单介绍join,outer-join,semi-join,anti-join的区别
  5. app式成语_疯狂的成语app
  6. orcad自上而下_开发自上而下的Web服务项目
  7. redis配置认证密码以及远程访问
  8. CAP 原理这样理解最简单
  9. 归并排序java版_归并排序Java实现
  10. 二叉树查找结点及父结点
  11. 1vcpu等于几核?vcpu是什么意思
  12. MacBook使用U盘重装系统
  13. 批量插入测试数据的存储过程
  14. Python基础学习:operator模块
  15. 哪个相机可以拍gif动图_魅族手机如何拍摄Gif图片 魅族手机拍摄Gif动图的方法图解...
  16. 狂神说JAVA 数组、三种初始化和内存分析
  17. wire和reg的区别
  18. 机顶盒CM311-1a的EMMC各分区范围
  19. java开发中常见的延时消息解决方案
  20. 网易实习生算法组编程题二:求数组的两个子数组和的最大值

热门文章

  1. 用ffmpeg录制小程序直播开发高清视频并实现直播推流
  2. 使用cmake安装nuget
  3. 【转载】知名企业薪酬模式比较及启示
  4. Python+Selenium自动化测试项目实战
  5. [ XSS-labs通关宝典 ] xss-labs 通关宝典之 less1 - less5
  6. 活着的每一天都是特别的日子
  7. 泛微E9二次开发资料完整总结版
  8. G - 。。。。。。。
  9. office2016和office visio2016同时安装包你一次成功
  10. 曲线回归------(二)多项式回归