1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto3"; 18 19option java_package = "com.android.server.adb.protos"; 20option java_outer_classname = "DevicesProto"; 21 22package adb.proto; 23 24// This mirrors adb.h's "enum ConnectionState" 25enum ConnectionState { 26 ANY = 0; 27 CONNECTING = 1; 28 AUTHORIZING = 2; 29 UNAUTHORIZED = 3; 30 NOPERMISSION = 4; 31 DETACHED = 5; 32 OFFLINE = 6; 33 BOOTLOADER = 7; 34 DEVICE = 8; 35 HOST = 9; 36 RECOVERY = 10; 37 SIDELOAD = 11; 38 RESCUE = 12; 39} 40 41enum ConnectionType { 42 UNKNOWN = 0; 43 USB = 1; 44 SOCKET = 2; 45} 46 47message Device { 48 string serial = 1; 49 ConnectionState state = 2; 50 string bus_address = 3; 51 string product = 4; 52 string model = 5; 53 string device = 6; 54 ConnectionType connection_type = 7; 55 int64 negotiated_speed = 8; 56 int64 max_speed = 9; 57 int64 transport_id = 10; 58} 59 60message Devices { 61 repeated Device device = 1; 62} 63