blob: b485234eaeb83a89e0cc8c933e379f1736a2b258 [file] [log] [blame]
Zhomart Mukhamejanovf4d280c2018-04-17 13:20:22 -07001/*
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
17package com.example.android.systemupdatersample.util;
18
Zhomart Mukhamejanovda7e2372018-05-01 12:50:55 -070019/** Utility class for an OTA package. */
20public final class PackageFiles {
Zhomart Mukhamejanovf4d280c2018-04-17 13:20:22 -070021
Zhomart Mukhamejanovda7e2372018-05-01 12:50:55 -070022 /**
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 */
Zhomart Mukhamejanovf4d280c2018-04-17 13:20:22 -070030 public static final String PAYLOAD_BINARY_FILE_NAME = "payload.bin";
31
Zhomart Mukhamejanovda7e2372018-05-01 12:50:55 -070032 /**
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 */
Zhomart Mukhamejanovf4d280c2018-04-17 13:20:22 -070043 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
Zhomart Mukhamejanovda7e2372018-05-01 12:50:55 -070058 private PackageFiles() {}
Zhomart Mukhamejanovf4d280c2018-04-17 13:20:22 -070059}