package com.ttstd.adbloopback.adb;

/** ADB 网络协议常量（协议字段均为小端序 / little-endian）。 */
public final class AdbConstants {
    // 消息命令（4 字节 ASCII，按小端读取）
    public static final int CNXN = 0x4e584e43; // "CNXN"
    public static final int AUTH = 0x48545541; // "AUTH"
    public static final int OPEN = 0x4e45504f; // "OPEN"
    public static final int OKAY = 0x59414b4f; // "OKAY"
    public static final int CLSE = 0x45534c43; // "CLSE"
    public static final int WRTE = 0x45545257; // "WRTE"

    // AUTH 子类型
    public static final int AUTH_TOKEN = 1;        // 服务端下发的随机挑战
    public static final int AUTH_SIGNATURE = 2;    // 客户端对挑战的签名
    public static final int AUTH_RSAPUBLICKEY = 3; // 客户端公钥

    public static final int VERSION = 0x01000000;  // ADB 协议版本 1.0（小端）
    public static final int MAX_PAYLOAD = 4096;

    public static final String TAG = "AdbLoopback";

    private AdbConstants() {}
}
