summaryrefslogtreecommitdiffstats
path: root/adb/protocol.txt
diff options
context:
space:
mode:
Diffstat (limited to 'adb/protocol.txt')
-rw-r--r--adb/protocol.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/adb/protocol.txt b/adb/protocol.txt
index 398d042..c9d3c24 100644
--- a/adb/protocol.txt
+++ b/adb/protocol.txt
@@ -72,7 +72,25 @@ large maxdata value, the connection with the other side must be closed.
The system identity string should be "<systemtype>:<serialno>:<banner>"
where systemtype is "bootloader", "device", or "host", serialno is some
kind of unique ID (or empty), and banner is a human-readable version
-or identifier string (informational only).
+or identifier string. The banner is used to transmit useful properties.
+
+
+--- AUTH(type, 0, "data") ----------------------------------------------
+
+The AUTH message informs the recipient that authentication is required to
+connect to the sender. If type is TOKEN(1), data is a random token that
+the recipient can sign with a private key. The recipient replies with an
+AUTH packet where type is SIGNATURE(2) and data is the signature. If the
+signature verification succeeds, the sender replies with a CONNECT packet.
+
+If the signature verification fails, the sender replies with a new AUTH
+packet and a new random token, so that the recipient can retry signing
+with a different private key.
+
+Once the recipient has tried all its private keys, it can reply with an
+AUTH packet where type is RSAPUBLICKEY(3) and data is the public key. If
+possible, an on-screen confirmation may be displayed for the user to
+confirm they want to install the public key on the device.
--- OPEN(local-id, 0, "destination") -----------------------------------
@@ -166,6 +184,7 @@ to send across the wire.
#define A_SYNC 0x434e5953
#define A_CNXN 0x4e584e43
+#define A_AUTH 0x48545541
#define A_OPEN 0x4e45504f
#define A_OKAY 0x59414b4f
#define A_CLSE 0x45534c43