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
17syntax = "proto3";
18
19package android.microdroid;
20
21option java_package = "com.android.virt";
22option java_outer_classname = "PayloadMetadataProtos";
23
24// Metadata is the body of the "metadata" partition
25message Metadata {
26  uint32 version = 1;
27
28  repeated ApexPayload apexes = 2;
29
30  ApkPayload apk = 3;
31
32  oneof payload {
33    // Path to JSON config file inside the APK.
34    string config_path = 4;
35    PayloadConfig config = 5;
36  }
37}
38
39message ApexPayload {
40  // Next id: 9
41
42  // Required.
43  string name = 1;
44  string partition_name = 2;
45
46  // Optional.
47  // When specified, apex payload should be verified against these values.
48  bytes public_key = 3;
49  bytes root_digest = 4;
50  int64 manifest_version = 7;
51  string manifest_name = 8;
52
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;
57
58  // Required.
59  // Whether the APEX is a factory version or not.
60  bool is_factory = 6;
61}
62
63message ApkPayload {
64  // Required.
65  // The name of APK.
66  string name = 1;
67
68  string payload_partition_name = 2;
69
70  string idsig_partition_name = 3;
71}
72
73message PayloadConfig {
74  // Required.
75  // Name of the payload binary file inside the APK.
76  string payload_binary_name = 1;
77
78  // Optional.
79  // The number of extra APKs that are present.
80  uint32 extra_apk_count = 2;
81}
82