blob: b03d466521c390726917b2ddea67b3609ed2c321 [file] [log] [blame]
Jooyung Han97277ee2021-04-14 15:34:24 +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
Jooyung Han62fe1b42023-02-15 17:49:17 +090021option java_package = "com.android.virt";
22option java_outer_classname = "PayloadMetadataProtos";
23
Jooyung Han74573482021-06-08 17:10:21 +090024// Metadata is the body of the "metadata" partition
25message Metadata {
Jooyung Han97277ee2021-04-14 15:34:24 +090026 uint32 version = 1;
27
Jooyung Han74573482021-06-08 17:10:21 +090028 repeated ApexPayload apexes = 2;
Jooyung Han57d895e2021-05-13 21:58:41 +090029
Jooyung Han74573482021-06-08 17:10:21 +090030 ApkPayload apk = 3;
Jooyung Han347d9f22021-05-28 00:05:14 +090031
Alan Stokes0d1ef782022-09-27 13:46:35 +010032 oneof payload {
33 // Path to JSON config file inside the APK.
34 string config_path = 4;
35 PayloadConfig config = 5;
36 }
Jooyung Han97277ee2021-04-14 15:34:24 +090037}
38
Jooyung Han74573482021-06-08 17:10:21 +090039message ApexPayload {
Alan Stokes185e34c2023-11-24 12:28:39 +000040 // Next id: 9
41
Jooyung Han97277ee2021-04-14 15:34:24 +090042 // Required.
Jooyung Han97277ee2021-04-14 15:34:24 +090043 string name = 1;
Jooyung Han74573482021-06-08 17:10:21 +090044 string partition_name = 2;
Jooyung Han97277ee2021-04-14 15:34:24 +090045
46 // Optional.
Alan Stokes185e34c2023-11-24 12:28:39 +000047 // When specified, apex payload should be verified against these values.
Jooyung Han4a9b3bf2021-09-10 17:19:00 +090048 bytes public_key = 3;
Jooyung Hanc8deb472021-09-13 13:48:25 +090049 bytes root_digest = 4;
Alan Stokes185e34c2023-11-24 12:28:39 +000050 int64 manifest_version = 7;
51 string manifest_name = 8;
Andrew Walbran40be9d52022-01-19 14:32:53 +000052
53 // Required.
54 // The timestamp in seconds when the APEX was last updated. This should match the value in
55 // apex-info-list.xml.
56 uint64 last_update_seconds = 5;
Jiyong Parkd6502352022-01-27 01:07:30 +090057
58 // Required.
59 // Whether the APEX is a factory version or not.
60 bool is_factory = 6;
Jooyung Han97277ee2021-04-14 15:34:24 +090061}
Jooyung Han57d895e2021-05-13 21:58:41 +090062
Jooyung Han74573482021-06-08 17:10:21 +090063message ApkPayload {
Jooyung Han57d895e2021-05-13 21:58:41 +090064 // Required.
65 // The name of APK.
66 string name = 1;
67
68 string payload_partition_name = 2;
Jooyung Han74573482021-06-08 17:10:21 +090069
Jooyung Han57d895e2021-05-13 21:58:41 +090070 string idsig_partition_name = 3;
Jooyung Han347d9f22021-05-28 00:05:14 +090071}
Alan Stokes0d1ef782022-09-27 13:46:35 +010072
73message PayloadConfig {
74 // Required.
Alan Stokes8f12f2b2023-01-09 09:19:20 +000075 // Name of the payload binary file inside the APK.
76 string payload_binary_name = 1;
Alan Stokes0d1ef782022-09-27 13:46:35 +010077}