1. fastboot -- 安卓线刷协议.
协议: uboot/doc/README.android-fastboot
uboot/doc/README.android-fastboot-protocol
2. 源码
uboot及android-platform-system-core中都有.
3. 配置uboot usb外设模式启动.
* uboot中不能动态切换主从角色(DRD role switch.)
* xilinx zynqmp 中配置uboot usb启动模式.
Build u-boot for DFU
In order to test DFU at u-boot ensure that usb node has below two properties as shown.
dr_mode = "peripheral";
maximum-speed = "high-speed";
The dr_mode with "peripheral" informs u-boot to act as usb device and maximum-speed is used to inform about max-speed that driver supports.
NOTE: For ZynqMP maximum-speed can be super-speed also but as of now u-boot doesn't support USB 3.0 so, always ensure that maximum-speed was set to high-speed.
4. Linux PC配置
* sudo apt-get install fastboot
* 配置51-android.rules (udev规则)
如果您在 Ubuntu Linux 上开发,则需要为想要在开发中使用的每一种设备类型添加一个包含 USB 配置的 udev
规则文件。在规则文件中,每一个设备制造商都由一个唯一的供应商 ID(如 ATTR{idVendor}
属性所指定)标识。要查看供应商 ID 列表,请参见下文的 USB 供应商 ID。要在 Ubuntu Linux 上设置设备检测,请执行以下操作:
- 以 root 身份登录,并创建此文件:
/etc/udev/rules.d/51-android.rules
。使用下面的格式将各个供应商添加到文件中:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
在本例中,供应商 ID 为 HTC 的 ID。MODE
赋值指定读/写权限,GROUP
则定义哪个 Unix 组拥有设备节点。注:取决于您的环境,规则语法可能稍有不同。如有需要,请查阅适用于您的系统的
udev
文档。有关规则语法的概述,请参阅编写 udev 规则的指南。 - 现在,请执行:
chmod a+r /etc/udev/rules.d/51-android.rules
5. Windows PC配置