blob: 99943f1b10c37ff68cc23432529e975fd833b02b [file] [log] [blame]
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// These apex definitions will generate the prebuilt test data. The modules
// are disabled so as not to pollute the build.
apex_key {
name: "com.android.apex.test_package.key",
public_key: "com.android.apex.test_package.avbpubkey",
private_key: "com.android.apex.test_package.pem",
installable: false,
}
apex {
name: "apex.apexd_test",
manifest: "manifest.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
min_sdk_version: "29", // test requires hashtree to be present.
}
apex {
name: "apex.apexd_test_f2fs",
manifest: "manifest.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
min_sdk_version: "current",
payload_fs_type: "f2fs",
}
apex {
name: "apex.apexd_test_no_hashtree",
manifest: "manifest.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
test_only_no_hashtree: true,
}
// This APEX has same name and version as apex.apexd_test_no_hashtree, but has
// different content. It's used to test that staging a same version of already
// active APEX without hashtree doesn't impact already active one.
apex {
name: "apex.apexd_test_no_hashtree_2",
manifest: "manifest.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: [
"another_prebuilt_file",
"sample_prebuilt_file",
],
key: "com.android.apex.test_package.key",
installable: false,
test_only_no_hashtree: true,
}
apex {
name: "apex.apexd_test_v2",
manifest: "manifest_v2.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
}
apex {
name: "apex.apexd_test_v2_legacy",
manifest: "manifest_v2.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
min_sdk_version: "29", // add apex_manifest.json as well
}
genrule {
name: "apex.apexd_test_v2_no_pb",
srcs: [":apex.apexd_test_v2_legacy"],
out: ["apex.apexd_test_v2_no_pb.apex"],
tools: ["zip2zip"],
cmd: "$(location zip2zip) -i $(in) -x apex_manifest.pb -o $(out)", // remove apex_manifest.pb
}
apex {
name: "apex.apexd_test_v3",
manifest: "manifest_v3.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
}
apex_key {
name: "com.android.apex.test_package.preinstall.key",
public_key: "com.android.apex.test_package.preinstall.avbpubkey",
private_key: "com.android.apex.test_package.preinstall.pem",
installable: false,
}
apex {
name: "apex.apexd_test_preinstall",
manifest: "manifest_preinstall.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.preinstall.key",
binaries: ["apex_test_preInstallHook"],
installable: false,
}
apex_key {
name: "com.android.apex.test_package.postinstall.key",
public_key: "com.android.apex.test_package.postinstall.avbpubkey",
private_key: "com.android.apex.test_package.postinstall.pem",
installable: false,
}
apex {
name: "apex.apexd_test_postinstall",
manifest: "manifest_postinstall.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.postinstall.key",
binaries: ["apex_test_postInstallHook"],
installable: false,
}
apex_key {
name: "com.android.apex.test_package.prepostinstall.fail.key",
public_key: "com.android.apex.test_package.prepostinstall.fail.avbpubkey",
private_key: "com.android.apex.test_package.prepostinstall.fail.pem",
installable: false,
}
apex {
name: "apex.apexd_test_prepostinstall.fail",
manifest: "manifest_prepostinstall.fail.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.prepostinstall.fail.key",
binaries: ["apex_test_prePostInstallHookFail"],
installable: false,
}
apex_key {
name: "com.android.apex.test_package.no_inst_key.key",
public_key: "com.android.apex.test_package.no_inst_key.avbpubkey",
private_key: "com.android.apex.test_package.no_inst_key.pem",
installable: true, // set to true to prevent bundling into the APEX
}
apex {
name: "apex.apexd_test_no_inst_key",
manifest: "manifest_no_inst_key.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.no_inst_key.key",
installable: false,
}
apex {
name: "apex.apexd_test_f2fs_no_inst_key",
manifest: "manifest_no_inst_key.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.no_inst_key.key",
installable: false,
payload_fs_type: "f2fs",
}
apex_key {
name: "com.android.apex.test_package_2.key",
public_key: "com.android.apex.test_package_2.avbpubkey",
private_key: "com.android.apex.test_package_2.pem",
installable: false,
}
apex {
name: "apex.apexd_test_different_app",
manifest: "manifest_different_app.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package_2.key",
installable: false,
}
sh_binary {
name: "apex_test_preInstallHook",
src: "preInstallHook.sh",
}
sh_binary {
name: "apex_test_postInstallHook",
src: "postInstallHook.sh",
}
sh_binary {
name: "apex_test_prePostInstallHookFail",
src: "fail.sh",
}
apex {
name: "apex.apexd_test_nocode",
manifest: "manifest_nocode.json",
file_contexts: ":apex.test-file_contexts",
prebuilts: ["sample_prebuilt_file"],
key: "com.android.apex.test_package.key",
installable: false,
}
prebuilt_etc {
name: "another_prebuilt_file",
src: "another_prebuilt_file",
}