fastboot - platform/system/core - Git at Google
Sun Jul 14 2024 07:36:26 GMT+0000 (Coordinated Universal Time)
Saved by
@Dewaldt
Query
The host sends a query packet once on startup to sync with the device.
The host will not know the current sequence number, so the device must
respond to all query packets regardless of sequence number.
The response data field should contain a 2-byte big-endian value
giving the next expected sequence number.
Init
The host sends an init packet once the query response is returned. The
device must abort any in-progress operation and prepare for a new
fastboot session. This message is meant to allow recovery if a
previous session failed, e.g. due to network error or user Ctrl+C.
The data field contains two big-endian 2-byte values, a protocol
version and the max UDP packet size (including the 4-byte header).
Both the host and device will send these values, and in each case
the minimum of the sent values must be used.
Fastboot
These packets wrap the fastboot protocol. To write, the host will
send a packet with fastboot data, and the device will reply with an
empty packet as an ACK. To read, the host will send an empty packet,
and the device will reply with fastboot data. The device may not give
any data in the ACK packet.
Error
The device may respond to any packet with an error packet to indicate
a UDP protocol error. The data field should contain an ASCII string
describing the error. This is the only case where a device is allowed
to return a packet ID other than the one sent by the host.
content_copyCOPY
https://android.googlesource.com/platform/system/core/+/master/fastboot/#fastboot
Comments