blob: 6b999af13377d1b2e5cce55a9e5310d618b46363 [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 {
Jooyung Han97277ee2021-04-14 15:34:24 +090040 // Required.
Jooyung Han97277ee2021-04-14 15:34:24 +090041 string name = 1;
Jooyung Han74573482021-06-08 17:10:21 +090042 string partition_name = 2;
Jooyung Han97277ee2021-04-14 15:34:24 +090043
44 // Optional.
Jooyung Hanc8deb472021-09-13 13:48:25 +090045 // When specified, apex payload should be verified with the public key and root digest.
Jooyung Han4a9b3bf2021-09-10 17:19:00 +090046 bytes public_key = 3;
Jooyung Hanc8deb472021-09-13 13:48:25 +090047 bytes root_digest = 4;
Andrew Walbran40be9d52022-01-19 14:32:53 +000048
49 // Required.
50 // The timestamp in seconds when the APEX was last updated. This should match the value in
51 // apex-info-list.xml.
52 uint64 last_update_seconds = 5;
Jiyong Parkd6502352022-01-27 01:07:30 +090053
54 // Required.
55 // Whether the APEX is a factory version or not.
56 bool is_factory = 6;
Jooyung Han97277ee2021-04-14 15:34:24 +090057}
Jooyung Han57d895e2021-05-13 21:58:41 +090058
Jooyung Han74573482021-06-08 17:10:21 +090059message ApkPayload {
Jooyung Han57d895e2021-05-13 21:58:41 +090060 // Required.
61 // The name of APK.
62 string name = 1;
63
64 string payload_partition_name = 2;
Jooyung Han74573482021-06-08 17:10:21 +090065
Jooyung Han57d895e2021-05-13 21:58:41 +090066 string idsig_partition_name = 3;
Jooyung Han347d9f22021-05-28 00:05:14 +090067}
Alan Stokes0d1ef782022-09-27 13:46:35 +010068
69message PayloadConfig {
70 // Required.
Alan Stokes8f12f2b2023-01-09 09:19:20 +000071 // Name of the payload binary file inside the APK.
72 string payload_binary_name = 1;
Alan Stokes0d1ef782022-09-27 13:46:35 +010073}