fastboot与fastbootd介绍

前言

在项目中遇到使用fastboot刷机场景,刷vendor分区出现异常,从而对fastboot和fastbootd有一个更深入的了解,进行一个总结。
fastboot刷vendor partition出现错误

一、fastboot和fastbootd介绍

fastboot:fastboot是一种用于Android设备上的刷机协议,便于系统开发者快速烧录系统。fastboot是一个简单的、基于文本的协议,能使用在手机与电脑链接的USB信道上。fast并不代表速度快,而是代表实现起来很easy。进入命令为:adb reboot bootloader。
fastbootd:代表Moving Fastboot to Userspace之后,用户空间中的fastboot。Google介绍:Android 10 and higher supports resizable partitions by relocating the fastboot implementation from bootloader to userspace. This relocation enables moving the flashing code into a maintainable and testable common location with only the vendor-specific parts of fastboot implemented by a hardware abstraction layer (HAL)。进入命令为:adb reboot fastboot。

二、fastbootd与fastbootd区别

  • 随着AOSP的发展,谷歌在Android Q版本引入了super动态分区功能,实现system、vendor和product等分区大小的灵活配置,避免了系统升级带来频繁修改分区表的问题。同时引入了手机端侧fastboot模式实现super分区的擦写,之前版本的fastboot刷写功能通常实现在bootloader模式(一般由SOC厂家提供原始实现),新引入的fastboot模式实现在recovery系统中集成了fastbootd二进制程序,在recovery系统中可复用系统的usb、网络等驱动,降低了开发难度,具有更好的可移植性。
  • 动态分区手机中,data、system、vendor等原来的物理分区,现在都被放到一个共同的super分区下,这种虚拟分区只在用户空间(Android系统中)可见,也就是说Android 10之后的fastboot只能识别到整个super,而super中的vendor分区却无法识别和flash刷机,使用fastboot刷vendor就会失败。所以只能使用fastbootd识别super分区下面的各种子分区(vendor、data等)刷机。
    Android10系统版本前后partition区别

参考文献

  1. Fastbootd实现原理分析
  2. Moving Fastboot to Userspace
  • 12
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值