blob: d61e3d3cb1251cf71f3a7df5d2decfbde5471bd5 [file] [log] [blame]
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -07001// 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
15syntax = "proto2";
16
17package android.vts;
18
19
20// Type of a command.
21enum CommandType {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070022 UNKNOWN_COMMAND_TYPE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070023 // To get a list of available HAL modules.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070024 LIST_HALS = 1;
Keun Soo Yim82b2d782016-06-20 11:29:38 -070025 // To set the host information (e.g., callback server port).
26 SET_HOST_INFO = 2;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070027
28 // To check whether fuzzer's binder service is available.
Keun Soo Yim14f22722016-06-29 09:49:38 -070029 CHECK_DRIVER_SERVICE = 101;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070030 // To start a fuzzer binary service and select a HAL module.
Keun Soo Yim14f22722016-06-29 09:49:38 -070031 LAUNCH_DRIVER_SERVICE = 102;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070032
33 // To get a list of available functions.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070034 LIST_APIS = 201;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070035 // To call a function.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070036 CALL_API = 202;
Keun Soo Yim63d67512016-07-01 17:13:47 -070037
38 // To execute a shell command;
39 VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND = 301;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070040}
41
42
43// Type of a response.
44enum ResponseCode {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070045 UNKNOWN_RESPONSE_CODE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070046 // successful
47 SUCCESS = 1;
48 // failed
49 FAIL = 2;
50}
51
52
Keun Soo Yima066dd52016-07-01 15:18:28 -070053// VTS driver type.
54enum 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 Yime0c0cdd2016-05-09 19:43:43 -070070// To specify a command.
71message AndroidSystemControlCommandMessage {
72 // Command type.
73 optional CommandType command_type = 1;
74
Keun Soo Yim8e07a092016-05-04 16:30:35 -070075 // for LIST_HALS
76 repeated bytes paths = 1001;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070077
Keun Soo Yim82b2d782016-06-20 11:29:38 -070078 // for SET_HOST_INFO
79 optional int32 callback_port = 1101;
80
Keun Soo Yim14f22722016-06-29 09:49:38 -070081 // for CHECK_DRIVER_SERVICE
Keun Soo Yim8e07a092016-05-04 16:30:35 -070082 // the binder service name
83 optional bytes service_name = 2001;
84
Keun Soo Yim14f22722016-06-29 09:49:38 -070085 // for LAUNCH_DRIVER_SERVICE
Keun Soo Yima066dd52016-07-01 15:18:28 -070086 optional VtsDriverType driver_type = 3001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070087
Keun Soo Yima066dd52016-07-01 15:18:28 -070088 // 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 Yim8e07a092016-05-04 16:30:35 -070092 optional int32 bits = 3003;
93
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070094 // target class
Keun Soo Yim8e07a092016-05-04 16:30:35 -070095 optional int32 target_class = 3004;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070096 // target type
Keun Soo Yim8e07a092016-05-04 16:30:35 -070097 optional int32 target_type = 3005;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070098 // target version (should be divided by 100) - float has a compatibility issue
99 // between C/C++ and python protoc.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700100 optional int32 target_version = 3006;
101
Keun Soo Yim34067de2016-05-17 09:46:37 -0700102 // the name of a HAL module to open.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700103 optional bytes module_name = 3007;
104
105 // for LIST_APIS
106 // none
107
Yuexi Maddb4e9e2016-07-11 12:45:41 -0700108 // for CALL_API and VTS_AGENT_COMMAND_INVOKE_SYSCALL
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700109 optional bytes arg = 4001;
Keun Soo Yim63d67512016-07-01 17:13:47 -0700110
111 // for VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND
112 repeated bytes shell_command = 5001;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -0700113}
114
115
116// To specify a response.
117message AndroidSystemControlResponseMessage {
118 // Response type.
119 optional ResponseCode response_code = 1;
120
121 // The reason.
122 optional bytes reason = 1001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700123
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700124 // for the found component files.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700125 repeated bytes file_names = 1002;
126
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700127 // for the found API specification.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700128 optional bytes spec = 1003;
129
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700130 // for the API call result including result value, profiling data, and
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700131 // coverage measurement data.
132 optional bytes result = 1004;
Keun Soo Yim63d67512016-07-01 17:13:47 -0700133
134 repeated bytes stdout = 2001;
135 repeated bytes stderr = 2002;
Sahil Jain41d3be92016-06-20 18:25:11 -0700136}
137
138
139// To specify a callback request message for the TCP server.
140message 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.
147message AndroidSystemCallbackResponseMessage {
148 // Response code in a Callback response from TCP server.
149 optional ResponseCode response_code = 1;
150}