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 // Required. 41 string name = 1; 42 string partition_name = 2; 43 44 // Optional. 45 // When specified, apex payload should be verified with the public key and root digest. 46 bytes public_key = 3; 47 bytes root_digest = 4; 48 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; 53 54 // Required. 55 // Whether the APEX is a factory version or not. 56 bool is_factory = 6; 57} 58 59message ApkPayload { 60 // Required. 61 // The name of APK. 62 string name = 1; 63 64 string payload_partition_name = 2; 65 66 string idsig_partition_name = 3; 67} 68 69message PayloadConfig { 70 // Required. 71 // Name of the payload binary file inside the APK. 72 string payload_binary_name = 1; 73} 74