Jooyung Han | 4df1a54 | 2021-06-09 14:17:32 +0900 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | syntax = "proto3"; |
| 18 | |
| 19 | package android.microdroid; |
| 20 | |
| 21 | // This .proto is for the schema of a VM payload config (JSON) |
| 22 | |
| 23 | message PayloadConfig { |
| 24 | uint32 version = 1; |
| 25 | |
| 26 | OsConfig os = 2; |
| 27 | |
| 28 | Task task = 3; |
| 29 | |
| 30 | repeated ApexConfig apexes = 4; |
| 31 | } |
| 32 | |
| 33 | message OsConfig { |
| 34 | // for now "microdroid" is the only type we support |
| 35 | string name = 1; |
| 36 | } |
| 37 | |
| 38 | message Task { |
Jooyung Han | 634e2d7 | 2021-06-10 16:27:38 +0900 | [diff] [blame] | 39 | 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 Han | 4df1a54 | 2021-06-09 14:17:32 +0900 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | message 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 | } |