blob: b3d8d3aded9e4b204c2d8bbc9d2f826a3397ba60 [file] [log] [blame]
Jooyung Han4df1a542021-06-09 14:17:32 +09001/*
2 * Copyright (C) 2021 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
19package android.microdroid;
20
21// This .proto is for the schema of a VM payload config (JSON)
22
23message PayloadConfig {
24 uint32 version = 1;
25
26 OsConfig os = 2;
27
28 Task task = 3;
29
30 repeated ApexConfig apexes = 4;
31}
32
33message OsConfig {
34 // for now "microdroid" is the only type we support
35 string name = 1;
36}
37
38message Task {
Jooyung Han634e2d72021-06-10 16:27:38 +090039 enum TaskType {
40 EXECUTABLE = 0, // "executable" in JSON
41 MICRODROID_LAUNCHER = 1, // "microdroid_launcher" in JSON
42 }
43 // when the type is "microdroid_launcher", command is searched in /mnt/apk/lib/{arch}"
44 TaskType type = 1;
45
46 string command = 2;
47 repeated string args = 3;
Jooyung Han4df1a542021-06-09 14:17:32 +090048}
49
50message ApexConfig {
51 string name = 1;
52
53 // TODO(b/186396080) An APEX can be identified either by
54 // (1) its name
55 // (2) name and public key (or cert)
56 // or (3) name and exact hash.
57 // Rollback index should be supported for the case (2).
58}