Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 1 | // Copyright 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | syntax = "proto2"; |
| 16 | |
| 17 | package android.vts; |
| 18 | |
| 19 | |
| 20 | // Type of a command. |
| 21 | enum CommandType { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 22 | UNKNOWN_COMMAND_TYPE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 23 | // To get a list of available HAL modules. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 24 | LIST_HALS = 1; |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 25 | // To set the host information (e.g., callback server port). |
| 26 | SET_HOST_INFO = 2; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 27 | |
| 28 | // To check whether fuzzer's binder service is available. |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 29 | CHECK_DRIVER_SERVICE = 101; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 30 | // To start a fuzzer binary service and select a HAL module. |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 31 | LAUNCH_DRIVER_SERVICE = 102; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 32 | |
| 33 | // To get a list of available functions. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 34 | LIST_APIS = 201; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 35 | // To call a function. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 36 | CALL_API = 202; |
Keun Soo Yim | 63d6751 | 2016-07-01 17:13:47 -0700 | [diff] [blame] | 37 | |
| 38 | // To execute a shell command; |
| 39 | VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND = 301; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | |
| 43 | // Type of a response. |
| 44 | enum ResponseCode { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 45 | UNKNOWN_RESPONSE_CODE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 46 | // successful |
| 47 | SUCCESS = 1; |
| 48 | // failed |
| 49 | FAIL = 2; |
| 50 | } |
| 51 | |
| 52 | |
Keun Soo Yim | a066dd5 | 2016-07-01 15:18:28 -0700 | [diff] [blame] | 53 | // VTS driver type. |
| 54 | enum VtsDriverType { |
| 55 | UKNOWN_VTS_DRIVER_TYPE = 0; |
| 56 | // for various HALs. |
| 57 | VTS_DRIVER_TYPE_HAL_CONVENTIONAL = 1; |
| 58 | VTS_DRIVER_TYPE_HAL_LEGACY = 2; |
| 59 | VTS_DRIVER_TYPE_HAL_HIDL = 3; |
| 60 | VTS_DRIVER_TYPE_HAL_HIDL_WRAPPED_CONVENTIONAL = 4; |
| 61 | |
| 62 | // for shared libraries. |
| 63 | VTS_DRIVER_TYPE_LIB_SHARED = 11; |
| 64 | |
| 65 | // for shell. |
| 66 | VTS_DRIVER_TYPE_SHELL = 21; |
| 67 | } |
| 68 | |
| 69 | |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 70 | // To specify a command. |
| 71 | message AndroidSystemControlCommandMessage { |
| 72 | // Command type. |
| 73 | optional CommandType command_type = 1; |
| 74 | |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 75 | // for LIST_HALS |
| 76 | repeated bytes paths = 1001; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 77 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 78 | // for SET_HOST_INFO |
| 79 | optional int32 callback_port = 1101; |
| 80 | |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 81 | // for CHECK_DRIVER_SERVICE |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 82 | // the binder service name |
| 83 | optional bytes service_name = 2001; |
| 84 | |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 85 | // for LAUNCH_DRIVER_SERVICE |
Keun Soo Yim | a066dd5 | 2016-07-01 15:18:28 -0700 | [diff] [blame] | 86 | optional VtsDriverType driver_type = 3001; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 87 | |
Keun Soo Yim | a066dd5 | 2016-07-01 15:18:28 -0700 | [diff] [blame] | 88 | // The name of a target. |
| 89 | optional bytes file_path = 3002; |
| 90 | |
| 91 | // Whether a target driver binary is 64-bits or 32-bits. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 92 | optional int32 bits = 3003; |
| 93 | |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 94 | // target class |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 95 | optional int32 target_class = 3004; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 96 | // target type |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 97 | optional int32 target_type = 3005; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 98 | // target version (should be divided by 100) - float has a compatibility issue |
| 99 | // between C/C++ and python protoc. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 100 | optional int32 target_version = 3006; |
| 101 | |
Keun Soo Yim | 34067de | 2016-05-17 09:46:37 -0700 | [diff] [blame] | 102 | // the name of a HAL module to open. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 103 | optional bytes module_name = 3007; |
| 104 | |
| 105 | // for LIST_APIS |
| 106 | // none |
| 107 | |
Yuexi Ma | ddb4e9e | 2016-07-11 12:45:41 -0700 | [diff] [blame] | 108 | // for CALL_API and VTS_AGENT_COMMAND_INVOKE_SYSCALL |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 109 | optional bytes arg = 4001; |
Keun Soo Yim | 63d6751 | 2016-07-01 17:13:47 -0700 | [diff] [blame] | 110 | |
| 111 | // for VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND |
| 112 | repeated bytes shell_command = 5001; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | |
| 116 | // To specify a response. |
| 117 | message AndroidSystemControlResponseMessage { |
| 118 | // Response type. |
| 119 | optional ResponseCode response_code = 1; |
| 120 | |
| 121 | // The reason. |
| 122 | optional bytes reason = 1001; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 123 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 124 | // for the found component files. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 125 | repeated bytes file_names = 1002; |
| 126 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 127 | // for the found API specification. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 128 | optional bytes spec = 1003; |
| 129 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 130 | // for the API call result including result value, profiling data, and |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 131 | // coverage measurement data. |
| 132 | optional bytes result = 1004; |
Keun Soo Yim | 63d6751 | 2016-07-01 17:13:47 -0700 | [diff] [blame] | 133 | |
| 134 | repeated bytes stdout = 2001; |
| 135 | repeated bytes stderr = 2002; |
Sahil Jain | 41d3be9 | 2016-06-20 18:25:11 -0700 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | |
| 139 | // To specify a callback request message for the TCP server. |
| 140 | message AndroidSystemCallbackRequestMessage { |
| 141 | // callback id for the message sent to the TCP Server. |
| 142 | optional bytes id = 1; |
| 143 | } |
| 144 | |
| 145 | |
| 146 | // To specify a callback response message from the TCP server. |
| 147 | message AndroidSystemCallbackResponseMessage { |
| 148 | // Response code in a Callback response from TCP server. |
| 149 | optional ResponseCode response_code = 1; |
| 150 | } |