• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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 package com.example.android.systemupdatersample.util;
18 
19 /** Utility class for an OTA package. */
20 public final class PackageFiles {
21 
22     /**
23      * Directory used to perform updates.
24      */
25     public static final String OTA_PACKAGE_DIR = "/data/ota_package";
26 
27     /**
28      * update payload, it will be passed to {@code UpdateEngine#applyPayload}.
29      */
30     public static final String PAYLOAD_BINARY_FILE_NAME = "payload.bin";
31 
32     /**
33      * Currently, when calling {@code UpdateEngine#applyPayload} to perform actions
34      * that don't require network access (e.g. change slot), update_engine still
35      * talks to the server to download/verify file.
36      * {@code update_engine} might throw error when rebooting if {@code UpdateEngine#applyPayload}
37      * is not supplied right headers and tokens.
38      * This behavior might change in future android versions.
39      *
40      * To avoid extra network request in {@code update_engine}, this file has to be
41      * downloaded and put in {@code OTA_PACKAGE_DIR}.
42      */
43     public static final String PAYLOAD_METADATA_FILE_NAME = "payload_metadata.bin";
44 
45     public static final String PAYLOAD_PROPERTIES_FILE_NAME = "payload_properties.txt";
46 
47     /** The zip entry in an A/B OTA package, which will be used by update_verifier. */
48     public static final String CARE_MAP_FILE_NAME = "care_map.txt";
49 
50     public static final String METADATA_FILE_NAME = "metadata";
51 
52     /**
53      * The zip file that claims the compatibility of the update package to check against the Android
54      * framework to ensure that the package can be installed on the device.
55      */
56     public static final String COMPATIBILITY_ZIP_FILE_NAME = "compatibility.zip";
57 
PackageFiles()58     private PackageFiles() {}
59 }
60