diff options
author | Cole Faust <colefaust@google.com> | 2024-04-04 09:55:10 -0700 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2024-04-04 09:55:10 -0700 |
commit | cd8f9ea746c95ce65b7e7acd3d86d81ae76bd9e0 (patch) | |
tree | 0bba2a3b5e177ba1efcc62331bd2190e0e1aa7f3 | |
parent | 65502eef3e16a8e03c3c16eab8aab29fbfcc9e6a (diff) | |
download | apex-cd8f9ea746c95ce65b7e7acd3d86d81ae76bd9e0.tar.gz |
Bpfmt files in system/apex
Test: Presubmits
Change-Id: Ia82a54ab75f92fed3828db7024494c437d33b30a
21 files changed, 1739 insertions, 1660 deletions
diff --git a/apexd/Android.bp b/apexd/Android.bp index 76c73b05..20265812 100644 --- a/apexd/Android.bp +++ b/apexd/Android.bp @@ -5,666 +5,695 @@ package { } tidy_errors = [ - "android-*", - "bugprone-infinite-loop", - "bugprone-macro-parentheses", - "bugprone-misplaced-widening-cast", - "bugprone-move-forwarding-reference", - "bugprone-sizeof-container", - "bugprone-sizeof-expression", - "bugprone-string-constructor", - "bugprone-terminating-continue", - "bugprone-undefined-memory-manipulation", - "bugprone-undelegated-constructor", - // "bugprone-unhandled-self-assignment", // found in apex_manifest.proto - "bugprone-unused-raii", - "cert-err34-c", - "google-default-arguments", - // "google-explicit-constructor", // found in com_android_apex.h - "google-readability-avoid-underscore-in-googletest-name", - "google-readability-todo", - "google-runtime-int", - "google-runtime-member-string-references", - "misc-move-const-arg", - "misc-move-forwarding-reference", - // "misc-unused-parameters", // found in apexd_utils.h - "misc-unused-using-decls", - "misc-use-after-move", - // "modernize-pass-by-value", // found in apex_database.h - "performance-faster-string-find", - "performance-for-range-copy", - "performance-implicit-conversion-in-loop", - "performance-inefficient-vector-operation", - "performance-move-const-arg", - // "performance-move-constructor-init", // found in apexd_loop.h - "performance-noexcept-move-constructor", - "performance-unnecessary-copy-initialization", - "performance-unnecessary-value-param", - // "readability-avoid-const-params-in-decls", // found in apexd.h + "android-*", + "bugprone-infinite-loop", + "bugprone-macro-parentheses", + "bugprone-misplaced-widening-cast", + "bugprone-move-forwarding-reference", + "bugprone-sizeof-container", + "bugprone-sizeof-expression", + "bugprone-string-constructor", + "bugprone-terminating-continue", + "bugprone-undefined-memory-manipulation", + "bugprone-undelegated-constructor", + // "bugprone-unhandled-self-assignment", // found in apex_manifest.proto + "bugprone-unused-raii", + "cert-err34-c", + "google-default-arguments", + // "google-explicit-constructor", // found in com_android_apex.h + "google-readability-avoid-underscore-in-googletest-name", + "google-readability-todo", + "google-runtime-int", + "google-runtime-member-string-references", + "misc-move-const-arg", + "misc-move-forwarding-reference", + // "misc-unused-parameters", // found in apexd_utils.h + "misc-unused-using-decls", + "misc-use-after-move", + // "modernize-pass-by-value", // found in apex_database.h + "performance-faster-string-find", + "performance-for-range-copy", + "performance-implicit-conversion-in-loop", + "performance-inefficient-vector-operation", + "performance-move-const-arg", + // "performance-move-constructor-init", // found in apexd_loop.h + "performance-noexcept-move-constructor", + "performance-unnecessary-copy-initialization", + "performance-unnecessary-value-param", + // "readability-avoid-const-params-in-decls", // found in apexd.h ] cc_defaults { - name: "apex_flags_defaults", - cflags: [ - "-Wall", - "-Wextra", - "-Werror", - "-Wno-unused-parameter", + name: "apex_flags_defaults", + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + "-Wno-unused-parameter", - // Some extra flags. - "-fstrict-aliasing", - "-Wredundant-decls", - "-Wshadow", - "-Wstrict-aliasing", - "-Wthread-safety", - "-Wthread-safety-negative", - "-Wunreachable-code", - "-Wunreachable-code-break", - "-Wunreachable-code-return", - "-Wunused", - "-Wused-but-marked-unused", - ], - tidy: true, - tidy_checks: tidy_errors, - tidy_checks_as_errors: tidy_errors, - tidy_flags: [ - "-format-style=file", - "-header-filter=system/apex/", - ], + // Some extra flags. + "-fstrict-aliasing", + "-Wredundant-decls", + "-Wshadow", + "-Wstrict-aliasing", + "-Wthread-safety", + "-Wthread-safety-negative", + "-Wunreachable-code", + "-Wunreachable-code-break", + "-Wunreachable-code-return", + "-Wunused", + "-Wused-but-marked-unused", + ], + tidy: true, + tidy_checks: tidy_errors, + tidy_checks_as_errors: tidy_errors, + tidy_flags: [ + "-format-style=file", + "-header-filter=system/apex/", + ], } cc_defaults { - name: "libapexd-deps", - defaults: ["libapex-deps"], - shared_libs: [ - "liblog", - "liblogwrap", - "libvintf", - ], - static_libs: [ - "lib_microdroid_metadata_proto", - "libapex", - "libavb", - "libdm", - "libext2_uuid", - "libsigningutils", - "libtinyxml2", - "libverity_tree", - "libvold_binder", - ], - whole_static_libs: ["libcom.android.sysprop.apex"], + name: "libapexd-deps", + defaults: ["libapex-deps"], + shared_libs: [ + "liblog", + "liblogwrap", + "libvintf", + ], + static_libs: [ + "lib_microdroid_metadata_proto", + "libapex", + "libavb", + "libdm", + "libext2_uuid", + "libsigningutils", + "libtinyxml2", + "libverity_tree", + "libvold_binder", + ], + whole_static_libs: ["libcom.android.sysprop.apex"], } aidl_interface { - name: "apex_aidl_interface", - unstable: true, - srcs: [ - "aidl/android/apex/ApexInfo.aidl", - "aidl/android/apex/ApexInfoList.aidl", - "aidl/android/apex/ApexSessionInfo.aidl", - "aidl/android/apex/ApexSessionParams.aidl", - "aidl/android/apex/CompressedApexInfo.aidl", - "aidl/android/apex/CompressedApexInfoList.aidl", - "aidl/android/apex/IApexService.aidl", - ], - local_include_dir: "aidl", - backend: { - java: { - sdk_version: "28", - }, - ndk: { - enabled: false, - }, - }, + name: "apex_aidl_interface", + unstable: true, + srcs: [ + "aidl/android/apex/ApexInfo.aidl", + "aidl/android/apex/ApexInfoList.aidl", + "aidl/android/apex/ApexSessionInfo.aidl", + "aidl/android/apex/ApexSessionParams.aidl", + "aidl/android/apex/CompressedApexInfo.aidl", + "aidl/android/apex/CompressedApexInfoList.aidl", + "aidl/android/apex/IApexService.aidl", + ], + local_include_dir: "aidl", + backend: { + java: { + sdk_version: "28", + }, + ndk: { + enabled: false, + }, + }, } cc_binary { - name: "apexd", - defaults: [ - "apex_flags_defaults", - "libapex-deps", - "libapexd-deps", - "libapexservice-deps", - ], - srcs: [ - "apexd_main.cpp", - ], - static_libs: [ - "libapex", - "libapexd", - "libapexd_checkpoint_vold", - "libapexservice", - ], - init_rc: ["apexd.rc"], - // Just like the init, apexd should be able to run without - // any APEX activated. To do so, it uses the bootstrap linker - // and the bootstrap bionic libraries. - bootstrap: true, + name: "apexd", + defaults: [ + "apex_flags_defaults", + "libapex-deps", + "libapexd-deps", + "libapexservice-deps", + ], + srcs: [ + "apexd_main.cpp", + ], + static_libs: [ + "libapex", + "libapexd", + "libapexd_checkpoint_vold", + "libapexservice", + ], + init_rc: ["apexd.rc"], + // Just like the init, apexd should be able to run without + // any APEX activated. To do so, it uses the bootstrap linker + // and the bootstrap bionic libraries. + bootstrap: true, } cc_binary { - name: "apexd.microdroid", - defaults: [ - "apex_flags_defaults", - "libapex-deps", - "libapexd-deps", - ], - srcs: [ - "apexd_microdroid.cpp", - ], - static_libs: [ - "libapex", - "libapexd", - // Prefer static-link as, in microdroid, apexd is the only client. - // Using the -ndk variant since libprotobuf-cpp-full is supposed to be - // used as a shared lib in general in Android. - "libprotobuf-cpp-full-ndk", - ], - exclude_shared_libs: [ - "libprotobuf-cpp-full", - "libvintf", - ], - // Just like the init, apexd should be able to run without - // any APEX activated. To do so, it uses the bootstrap linker - // and the bootstrap bionic libraries. - bootstrap: true, - // This variant is for microdroid. - installable: false, - // init depends on the name "apexd". - stem: "apexd", + name: "apexd.microdroid", + defaults: [ + "apex_flags_defaults", + "libapex-deps", + "libapexd-deps", + ], + srcs: [ + "apexd_microdroid.cpp", + ], + static_libs: [ + "libapex", + "libapexd", + // Prefer static-link as, in microdroid, apexd is the only client. + // Using the -ndk variant since libprotobuf-cpp-full is supposed to be + // used as a shared lib in general in Android. + "libprotobuf-cpp-full-ndk", + ], + exclude_shared_libs: [ + "libprotobuf-cpp-full", + "libvintf", + ], + // Just like the init, apexd should be able to run without + // any APEX activated. To do so, it uses the bootstrap linker + // and the bootstrap bionic libraries. + bootstrap: true, + // This variant is for microdroid. + installable: false, + // init depends on the name "apexd". + stem: "apexd", } cc_library_static { - name: "libapexd", - defaults: [ - "apex_flags_defaults", - "libapexd-deps", - ], - srcs: [ - "apex_classpath.cpp", - "apex_database.cpp", - "apex_file_repository.cpp", - "apexd.cpp", - "apexd_lifecycle.cpp", - "apexd_loop.cpp", - "apexd_private.cpp", - "apexd_session.cpp", - "apexd_verity.cpp", - "apexd_vendor_apex.cpp", - ], - export_include_dirs: ["."], - generated_sources: ["apex-info-list-tinyxml"], - // Don't add shared/static libs here; add to libapexd_defaults instead. + name: "libapexd", + defaults: [ + "apex_flags_defaults", + "libapexd-deps", + ], + srcs: [ + "apex_classpath.cpp", + "apex_database.cpp", + "apex_file_repository.cpp", + "apexd.cpp", + "apexd_lifecycle.cpp", + "apexd_loop.cpp", + "apexd_private.cpp", + "apexd_session.cpp", + "apexd_verity.cpp", + "apexd_vendor_apex.cpp", + ], + export_include_dirs: ["."], + generated_sources: ["apex-info-list-tinyxml"], + // Don't add shared/static libs here; add to libapexd_defaults instead. } cc_library_static { - name: "libapexd_checkpoint_vold", - defaults: ["apex_flags_defaults"], - srcs: [ "apexd_checkpoint_vold.cpp" ], - static_libs: [ - "libbase", - "libutils", - "libvold_binder", - ], - export_include_dirs: ["."], + name: "libapexd_checkpoint_vold", + defaults: ["apex_flags_defaults"], + srcs: ["apexd_checkpoint_vold.cpp"], + static_libs: [ + "libbase", + "libutils", + "libvold_binder", + ], + export_include_dirs: ["."], } cc_defaults { - name: "libapexservice-deps", - shared_libs: [ - "apex_aidl_interface-cpp", - "libbinder", - "libutils", - ], + name: "libapexservice-deps", + shared_libs: [ + "apex_aidl_interface-cpp", + "libbinder", + "libutils", + ], } cc_library_static { - name: "libapexservice", - defaults: [ - "apex_flags_defaults", - "libapexd-deps", - "libapexservice-deps", - ], - srcs: ["apexservice.cpp"], - static_libs: [ - "libapexd", - ], - cflags: [ - "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", - ], + name: "libapexservice", + defaults: [ + "apex_flags_defaults", + "libapexd-deps", + "libapexservice-deps", + ], + srcs: ["apexservice.cpp"], + static_libs: [ + "libapexd", + ], + cflags: [ + "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", + ], } cc_defaults { - name: "libapex-deps", - shared_libs: [ - "libbase", - "libcrypto", - "libcutils", - "libprotobuf-cpp-full", - "libziparchive", - "libselinux", - ], - static_libs: [ - "lib_apex_session_state_proto", - "lib_apex_manifest_proto", - "libavb", - "libverity_tree", - ], - static: { - whole_static_libs: ["libc++fs"], - }, - cpp_std: "experimental", - shared: { - static_libs: ["libc++fs"], - }, + name: "libapex-deps", + shared_libs: [ + "libbase", + "libcrypto", + "libcutils", + "libprotobuf-cpp-full", + "libziparchive", + "libselinux", + ], + static_libs: [ + "lib_apex_session_state_proto", + "lib_apex_manifest_proto", + "libavb", + "libverity_tree", + ], + static: { + whole_static_libs: ["libc++fs"], + }, + cpp_std: "experimental", + shared: { + static_libs: ["libc++fs"], + }, } cc_library_static { - name: "libapex", - defaults: [ - "apex_flags_defaults", - "libapex-deps" - ], - srcs: [ - "apex_file.cpp", - "apex_manifest.cpp", - "apex_shim.cpp", - "apexd_verity.cpp", - ], - host_supported: true, - target: { - darwin: { - enabled: false, + name: "libapex", + defaults: [ + "apex_flags_defaults", + "libapex-deps", + ], + srcs: [ + "apex_file.cpp", + "apex_manifest.cpp", + "apex_shim.cpp", + "apexd_verity.cpp", + ], + host_supported: true, + target: { + darwin: { + enabled: false, + }, }, - }, - header_libs: [ - "libutils_headers", - ], - export_header_lib_headers: [ - "libutils_headers", - ], - export_include_dirs: ["."], + header_libs: [ + "libutils_headers", + ], + export_header_lib_headers: [ + "libutils_headers", + ], + export_include_dirs: ["."], } genrule { - // Generates an apex which has a different manifest outside the filesystem - // image. - name: "gen_manifest_mismatch_apex", - out: ["apex.apexd_test_manifest_mismatch.apex"], - srcs: [":apex.apexd_test"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_manifest_mismatch.apex" + // Generates an apex which has a different manifest outside the filesystem + // image. + name: "gen_manifest_mismatch_apex", + out: ["apex.apexd_test_manifest_mismatch.apex"], + srcs: [":apex.apexd_test"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_manifest_mismatch.apex", } genrule { - // Generates an apex which has a different manifest outside the filesystem - // image. - name: "gen_manifest_mismatch_apex_no_hashtree", - out: ["apex.apexd_test_no_hashtree_manifest_mismatch.apex"], - srcs: [":apex.apexd_test_no_hashtree"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_no_hashtree_manifest_mismatch.apex" + // Generates an apex which has a different manifest outside the filesystem + // image. + name: "gen_manifest_mismatch_apex_no_hashtree", + out: ["apex.apexd_test_no_hashtree_manifest_mismatch.apex"], + srcs: [":apex.apexd_test_no_hashtree"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_no_hashtree_manifest_mismatch.apex", } genrule { - // Generates an apex with a corrupted filesystem superblock, which should cause - // Apex::Open to fail - name: "gen_corrupt_superblock_apex", - out: ["apex.apexd_test_corrupt_superblock_apex.apex"], - srcs: [":apex.apexd_test"], - tools: ["soong_zip", "zipalign"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=1 count=1 && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_corrupt_superblock_apex.apex" + // Generates an apex with a corrupted filesystem superblock, which should cause + // Apex::Open to fail + name: "gen_corrupt_superblock_apex", + out: ["apex.apexd_test_corrupt_superblock_apex.apex"], + srcs: [":apex.apexd_test"], + tools: [ + "soong_zip", + "zipalign", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=1 count=1 && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_corrupt_superblock_apex.apex", } genrule { - // Generates an apex with a corrupted filesystem image, which should cause - // dm-verity verification to fail - name: "gen_corrupt_apex", - out: ["apex.apexd_test_corrupt_apex.apex"], - srcs: [":apex.apexd_test"], - tools: ["soong_zip", "zipalign"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=16 count=1 && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_corrupt_apex.apex" + // Generates an apex with a corrupted filesystem image, which should cause + // dm-verity verification to fail + name: "gen_corrupt_apex", + out: ["apex.apexd_test_corrupt_apex.apex"], + srcs: [":apex.apexd_test"], + tools: [ + "soong_zip", + "zipalign", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=16 count=1 && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_corrupt_apex.apex", } genrule { - // Extract the root digest with avbtool - name: "apex.apexd_test_digest", - out: ["apex.apexd_test_digest.txt"], - srcs: [":apex.apexd_test"], - tools: ["avbtool"], - cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + - "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + - "| cut -c 3-| tee $(out)" + // Extract the root digest with avbtool + name: "apex.apexd_test_digest", + out: ["apex.apexd_test_digest.txt"], + srcs: [":apex.apexd_test"], + tools: ["avbtool"], + cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + + "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + + "| cut -c 3-| tee $(out)", } genrule { - // Extract the root digest with avbtool - name: "apex.apexd_test_f2fs_digest", - out: ["apex.apexd_test_f2fs_digest.txt"], - srcs: [":apex.apexd_test_f2fs"], - tools: ["avbtool"], - cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + - "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + - "| cut -c 3-| tee $(out)" + // Extract the root digest with avbtool + name: "apex.apexd_test_f2fs_digest", + out: ["apex.apexd_test_f2fs_digest.txt"], + srcs: [":apex.apexd_test_f2fs"], + tools: ["avbtool"], + cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + + "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + + "| cut -c 3-| tee $(out)", } genrule { - // Extract the root digest with avbtool - name: "apex.apexd_test_erofs_digest", - out: ["apex.apexd_test_erofs_digest.txt"], - srcs: [":apex.apexd_test_erofs"], - tools: ["avbtool"], - cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + - "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + - "| cut -c 3-| tee $(out)" + // Extract the root digest with avbtool + name: "apex.apexd_test_erofs_digest", + out: ["apex.apexd_test_erofs_digest.txt"], + srcs: [":apex.apexd_test_erofs"], + tools: ["avbtool"], + cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + + "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + + "| cut -c 3-| tee $(out)", } genrule { - // Generates an apex which has same module name as apex.apexd_test.apex, but - // is actually signed with a different key. - name: "gen_key_mismatch_apex", - out: ["apex.apexd_test_different_key.apex"], - srcs: [":apex.apexd_test_no_inst_key"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop name com.android.apex.test_package $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_different_key.apex" + // Generates an apex which has same module name as apex.apexd_test.apex, but + // is actually signed with a different key. + name: "gen_key_mismatch_apex", + out: ["apex.apexd_test_different_key.apex"], + srcs: [":apex.apexd_test_no_inst_key"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop name com.android.apex.test_package $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_different_key.apex", } genrule { - // Generates an apex which has same module name as apex.apexd_test.apex, but - // is actually signed with a different key. - name: "gen_key_mismatch_apex_v2", - out: ["apex.apexd_test_different_key_v2.apex"], - srcs: [":apex.apexd_test_no_inst_key"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop name com.android.apex.test_package $(genDir)/apex_manifest.pb && " + - "$(location conv_apex_manifest) setprop version 2 $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_different_key_v2.apex" + // Generates an apex which has same module name as apex.apexd_test.apex, but + // is actually signed with a different key. + name: "gen_key_mismatch_apex_v2", + out: ["apex.apexd_test_different_key_v2.apex"], + srcs: [":apex.apexd_test_no_inst_key"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop name com.android.apex.test_package $(genDir)/apex_manifest.pb && " + + "$(location conv_apex_manifest) setprop version 2 $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_different_key_v2.apex", } genrule { - // Generates an apex which has a different manifest outside the filesystem - // image. - name: "gen_manifest_mismatch_rebootless_apex", - out: ["test.rebootless_apex_manifest_mismatch.apex"], - srcs: [":test.rebootless_apex_v1"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/test.rebootless_apex_manifest_mismatch.apex" + // Generates an apex which has a different manifest outside the filesystem + // image. + name: "gen_manifest_mismatch_rebootless_apex", + out: ["test.rebootless_apex_manifest_mismatch.apex"], + srcs: [":test.rebootless_apex_v1"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/test.rebootless_apex_manifest_mismatch.apex", } genrule { - // Generates an apex with a corrupted filesystem image, which should cause - // dm-verity verification to fail - name: "gen_corrupt_rebootless_apex", - out: ["test.rebootless_apex_corrupted.apex"], - srcs: [":test.rebootless_apex_v1"], - tools: ["soong_zip", "zipalign"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=16 count=1 && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/test.rebootless_apex_corrupted.apex" + // Generates an apex with a corrupted filesystem image, which should cause + // dm-verity verification to fail + name: "gen_corrupt_rebootless_apex", + out: ["test.rebootless_apex_corrupted.apex"], + srcs: [":test.rebootless_apex_v1"], + tools: [ + "soong_zip", + "zipalign", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=16 count=1 && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/test.rebootless_apex_corrupted.apex", } cc_test { - name: "ApexTestCases", - defaults: [ - "apex_flags_defaults", - "libapex-deps", - "libapexd-deps" - ], - require_root: true, - cflags: [ - // Otherwise libgmock won't compile. - "-Wno-used-but-marked-unused", - ], - data: [ - ":apex.apexd_test", - ":apex.apexd_test_erofs", - ":apex.apexd_test_f2fs", - ":apex.apexd_test_digest", - ":apex.apexd_test_erofs_digest", - ":apex.apexd_test_f2fs_digest", - ":apex.apexd_test_classpath", - ":apex.apexd_test_different_app", - ":apex.apexd_test_no_hashtree", - ":apex.apexd_test_no_hashtree_2", - ":apex.apexd_test_no_inst_key", - ":apex.apexd_test_f2fs_no_inst_key", - ":apex.apexd_test_nocode", - ":apex.apexd_test_v2", - ":apex.corrupted_b146895998", - ":apex.banned_name", - ":gen_key_mismatch_apex", - ":gen_key_mismatch_apex_v2", - ":gen_key_mismatch_capex", - ":gen_manifest_mismatch_apex", - ":gen_manifest_mismatch_apex_no_hashtree", - ":gen_corrupt_superblock_apex", - ":gen_corrupt_apex", - ":gen_capex_not_decompressible", - ":gen_capex_without_apex", - ":gen_capex_with_v2_apex", - ":gen_key_mismatch_with_original_capex", - ":com.android.apex.cts.shim.v1_prebuilt", - ":com.android.apex.cts.shim.v2_prebuilt", - ":com.android.apex.cts.shim.v2_wrong_sha_prebuilt", - ":com.android.apex.cts.shim.v2_additional_file_prebuilt", - ":com.android.apex.cts.shim.v2_additional_folder_prebuilt", - ":com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", - ":com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", - ":com.android.apex.compressed_sharedlibs", - ":com.android.apex.compressed.v1", - ":com.android.apex.compressed.v1_different_digest", - ":com.android.apex.compressed.v1_different_digest_original", - ":com.android.apex.compressed.v1_original", - ":com.android.apex.compressed.v2", - ":com.android.apex.compressed.v2_original", - ":gen_manifest_mismatch_compressed_apex_v2", - "apexd_testdata/com.android.apex.test_package.avbpubkey", - "apexd_testdata/com.android.apex.compressed.avbpubkey", - ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", - ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", - ":test.rebootless_apex_v1", - ":test.rebootless_apex_v2", - ":test.rebootless_apex_v2_no_hashtree", - ":test.rebootless_apex_service_v1", - ":test.rebootless_apex_service_v2", - ":gen_manifest_mismatch_rebootless_apex", - ":gen_corrupt_rebootless_apex", - ":test.rebootless_apex_provides_sharedlibs", - ":test.rebootless_apex_provides_native_libs", - ":test.rebootless_apex_requires_shared_apex_libs", - ":test.rebootless_apex_jni_libs", - ":test.rebootless_apex_add_native_lib", - ":test.rebootless_apex_remove_native_lib", - ":test.rebootless_apex_app_in_apex", - ":test.rebootless_apex_priv_app_in_apex", - ], - srcs: [ - "apex_classpath_test.cpp", - "apex_database_test.cpp", - "apex_file_test.cpp", - "apex_file_repository_test.cpp", - "apex_manifest_test.cpp", - "apexd_test.cpp", - "apexd_session_test.cpp", - "apexd_verity_test.cpp", - "apexd_utils_test.cpp", - ], - host_supported: false, - compile_multilib: "first", - static_libs: [ - "apex_aidl_interface-cpp", - "libapex", - "libapexd", - "libfstab", - "libgmock", - ], - shared_libs: [ - "libbinder", - "libfs_mgr", - "libutils", - ], - generated_sources: ["apex-info-list-tinyxml"], - test_suites: ["device-tests"], - test_config: "ApexTestCases.xml", + name: "ApexTestCases", + defaults: [ + "apex_flags_defaults", + "libapex-deps", + "libapexd-deps", + ], + require_root: true, + cflags: [ + // Otherwise libgmock won't compile. + "-Wno-used-but-marked-unused", + ], + data: [ + ":apex.apexd_test", + ":apex.apexd_test_erofs", + ":apex.apexd_test_f2fs", + ":apex.apexd_test_digest", + ":apex.apexd_test_erofs_digest", + ":apex.apexd_test_f2fs_digest", + ":apex.apexd_test_classpath", + ":apex.apexd_test_different_app", + ":apex.apexd_test_no_hashtree", + ":apex.apexd_test_no_hashtree_2", + ":apex.apexd_test_no_inst_key", + ":apex.apexd_test_f2fs_no_inst_key", + ":apex.apexd_test_nocode", + ":apex.apexd_test_v2", + ":apex.corrupted_b146895998", + ":apex.banned_name", + ":gen_key_mismatch_apex", + ":gen_key_mismatch_apex_v2", + ":gen_key_mismatch_capex", + ":gen_manifest_mismatch_apex", + ":gen_manifest_mismatch_apex_no_hashtree", + ":gen_corrupt_superblock_apex", + ":gen_corrupt_apex", + ":gen_capex_not_decompressible", + ":gen_capex_without_apex", + ":gen_capex_with_v2_apex", + ":gen_key_mismatch_with_original_capex", + ":com.android.apex.cts.shim.v1_prebuilt", + ":com.android.apex.cts.shim.v2_prebuilt", + ":com.android.apex.cts.shim.v2_wrong_sha_prebuilt", + ":com.android.apex.cts.shim.v2_additional_file_prebuilt", + ":com.android.apex.cts.shim.v2_additional_folder_prebuilt", + ":com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", + ":com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", + ":com.android.apex.compressed_sharedlibs", + ":com.android.apex.compressed.v1", + ":com.android.apex.compressed.v1_different_digest", + ":com.android.apex.compressed.v1_different_digest_original", + ":com.android.apex.compressed.v1_original", + ":com.android.apex.compressed.v2", + ":com.android.apex.compressed.v2_original", + ":gen_manifest_mismatch_compressed_apex_v2", + "apexd_testdata/com.android.apex.test_package.avbpubkey", + "apexd_testdata/com.android.apex.compressed.avbpubkey", + ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", + ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", + ":test.rebootless_apex_v1", + ":test.rebootless_apex_v2", + ":test.rebootless_apex_v2_no_hashtree", + ":test.rebootless_apex_service_v1", + ":test.rebootless_apex_service_v2", + ":gen_manifest_mismatch_rebootless_apex", + ":gen_corrupt_rebootless_apex", + ":test.rebootless_apex_provides_sharedlibs", + ":test.rebootless_apex_provides_native_libs", + ":test.rebootless_apex_requires_shared_apex_libs", + ":test.rebootless_apex_jni_libs", + ":test.rebootless_apex_add_native_lib", + ":test.rebootless_apex_remove_native_lib", + ":test.rebootless_apex_app_in_apex", + ":test.rebootless_apex_priv_app_in_apex", + ], + srcs: [ + "apex_classpath_test.cpp", + "apex_database_test.cpp", + "apex_file_test.cpp", + "apex_file_repository_test.cpp", + "apex_manifest_test.cpp", + "apexd_test.cpp", + "apexd_session_test.cpp", + "apexd_verity_test.cpp", + "apexd_utils_test.cpp", + ], + host_supported: false, + compile_multilib: "first", + static_libs: [ + "apex_aidl_interface-cpp", + "libapex", + "libapexd", + "libfstab", + "libgmock", + ], + shared_libs: [ + "libbinder", + "libfs_mgr", + "libutils", + ], + generated_sources: ["apex-info-list-tinyxml"], + test_suites: ["device-tests"], + test_config: "ApexTestCases.xml", } cc_test { - name: "ApexServiceTestCases", - defaults: [ - "apex_flags_defaults", - "libapex-deps", - "libapexd-deps" - ], - require_root: true, - cflags: [ - // Otherwise libgmock won't compile. - "-Wno-used-but-marked-unused", - ], - data: [ - ":apex.apexd_test", - ":apex.apexd_test_erofs", - ":apex.apexd_test_f2fs", - ":apex.apexd_test_digest", - ":apex.apexd_test_erofs_digest", - ":apex.apexd_test_f2fs_digest", - ":apex.apexd_test_classpath", - ":apex.apexd_test_different_app", - ":apex.apexd_test_no_hashtree", - ":apex.apexd_test_no_hashtree_2", - ":apex.apexd_test_no_inst_key", - ":apex.apexd_test_f2fs_no_inst_key", - ":apex.apexd_test_nocode", - ":apex.apexd_test_v2", - ":apex.corrupted_b146895998", - ":apex.banned_name", - ":gen_key_mismatch_apex", - ":gen_key_mismatch_apex_v2", - ":gen_key_mismatch_capex", - ":gen_manifest_mismatch_apex", - ":gen_manifest_mismatch_apex_no_hashtree", - ":gen_corrupt_superblock_apex", - ":gen_corrupt_apex", - ":gen_capex_not_decompressible", - ":gen_capex_without_apex", - ":gen_capex_with_v2_apex", - ":gen_key_mismatch_with_original_capex", - ":com.android.apex.cts.shim.v1_prebuilt", - ":com.android.apex.cts.shim.v2_prebuilt", - ":com.android.apex.cts.shim.v2_wrong_sha_prebuilt", - ":com.android.apex.cts.shim.v2_additional_file_prebuilt", - ":com.android.apex.cts.shim.v2_additional_folder_prebuilt", - ":com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", - ":com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", - ":com.android.apex.compressed_sharedlibs", - ":com.android.apex.compressed.v1", - ":com.android.apex.compressed.v1_different_digest", - ":com.android.apex.compressed.v1_different_digest_original", - ":com.android.apex.compressed.v1_original", - ":com.android.apex.compressed.v2", - ":com.android.apex.compressed.v2_original", - ":gen_manifest_mismatch_compressed_apex_v2", - "apexd_testdata/com.android.apex.test_package.avbpubkey", - "apexd_testdata/com.android.apex.compressed.avbpubkey", - ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", - ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", - ":test.rebootless_apex_v1", - ":test.rebootless_apex_v2", - ":test.rebootless_apex_v2_no_hashtree", - ":test.rebootless_apex_service_v1", - ":test.rebootless_apex_service_v2", - ":gen_manifest_mismatch_rebootless_apex", - ":gen_corrupt_rebootless_apex", - ":test.rebootless_apex_provides_sharedlibs", - ":test.rebootless_apex_provides_native_libs", - ":test.rebootless_apex_requires_shared_apex_libs", - ":test.rebootless_apex_jni_libs", - ":test.rebootless_apex_add_native_lib", - ":test.rebootless_apex_remove_native_lib", - ":test.rebootless_apex_app_in_apex", - ":test.rebootless_apex_priv_app_in_apex", - ], - srcs: [ - "apexservice_test.cpp", - ], - host_supported: false, - compile_multilib: "first", - static_libs: [ - "apex_aidl_interface-cpp", - "libapex", - "libapexd", - "libfstab", - "libgmock", - ], - shared_libs: [ - "libbinder", - "libfs_mgr", - "libutils", - ], - generated_sources: ["apex-info-list-tinyxml"], - test_suites: ["device-tests"], - test_config: "ApexServiceTestCases.xml", + name: "ApexServiceTestCases", + defaults: [ + "apex_flags_defaults", + "libapex-deps", + "libapexd-deps", + ], + require_root: true, + cflags: [ + // Otherwise libgmock won't compile. + "-Wno-used-but-marked-unused", + ], + data: [ + ":apex.apexd_test", + ":apex.apexd_test_erofs", + ":apex.apexd_test_f2fs", + ":apex.apexd_test_digest", + ":apex.apexd_test_erofs_digest", + ":apex.apexd_test_f2fs_digest", + ":apex.apexd_test_classpath", + ":apex.apexd_test_different_app", + ":apex.apexd_test_no_hashtree", + ":apex.apexd_test_no_hashtree_2", + ":apex.apexd_test_no_inst_key", + ":apex.apexd_test_f2fs_no_inst_key", + ":apex.apexd_test_nocode", + ":apex.apexd_test_v2", + ":apex.corrupted_b146895998", + ":apex.banned_name", + ":gen_key_mismatch_apex", + ":gen_key_mismatch_apex_v2", + ":gen_key_mismatch_capex", + ":gen_manifest_mismatch_apex", + ":gen_manifest_mismatch_apex_no_hashtree", + ":gen_corrupt_superblock_apex", + ":gen_corrupt_apex", + ":gen_capex_not_decompressible", + ":gen_capex_without_apex", + ":gen_capex_with_v2_apex", + ":gen_key_mismatch_with_original_capex", + ":com.android.apex.cts.shim.v1_prebuilt", + ":com.android.apex.cts.shim.v2_prebuilt", + ":com.android.apex.cts.shim.v2_wrong_sha_prebuilt", + ":com.android.apex.cts.shim.v2_additional_file_prebuilt", + ":com.android.apex.cts.shim.v2_additional_folder_prebuilt", + ":com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", + ":com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", + ":com.android.apex.compressed_sharedlibs", + ":com.android.apex.compressed.v1", + ":com.android.apex.compressed.v1_different_digest", + ":com.android.apex.compressed.v1_different_digest_original", + ":com.android.apex.compressed.v1_original", + ":com.android.apex.compressed.v2", + ":com.android.apex.compressed.v2_original", + ":gen_manifest_mismatch_compressed_apex_v2", + "apexd_testdata/com.android.apex.test_package.avbpubkey", + "apexd_testdata/com.android.apex.compressed.avbpubkey", + ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", + ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", + ":test.rebootless_apex_v1", + ":test.rebootless_apex_v2", + ":test.rebootless_apex_v2_no_hashtree", + ":test.rebootless_apex_service_v1", + ":test.rebootless_apex_service_v2", + ":gen_manifest_mismatch_rebootless_apex", + ":gen_corrupt_rebootless_apex", + ":test.rebootless_apex_provides_sharedlibs", + ":test.rebootless_apex_provides_native_libs", + ":test.rebootless_apex_requires_shared_apex_libs", + ":test.rebootless_apex_jni_libs", + ":test.rebootless_apex_add_native_lib", + ":test.rebootless_apex_remove_native_lib", + ":test.rebootless_apex_app_in_apex", + ":test.rebootless_apex_priv_app_in_apex", + ], + srcs: [ + "apexservice_test.cpp", + ], + host_supported: false, + compile_multilib: "first", + static_libs: [ + "apex_aidl_interface-cpp", + "libapex", + "libapexd", + "libfstab", + "libgmock", + ], + shared_libs: [ + "libbinder", + "libfs_mgr", + "libutils", + ], + generated_sources: ["apex-info-list-tinyxml"], + test_suites: ["device-tests"], + test_config: "ApexServiceTestCases.xml", } xsd_config { - name: "apex-info-list", - srcs: ["ApexInfoList.xsd"], - package_name: "com.android.apex", - api_dir: "apex-info-list-api", - gen_writer: true, - root_elements: ["apex-info-list"], + name: "apex-info-list", + srcs: ["ApexInfoList.xsd"], + package_name: "com.android.apex", + api_dir: "apex-info-list-api", + gen_writer: true, + root_elements: ["apex-info-list"], } xsd_config { - name: "apex-info-list-tinyxml", - srcs: ["ApexInfoList.xsd"], - package_name: "com.android.apex", - api_dir: "apex-info-list-api", - gen_writer: true, - tinyxml: true, - root_elements: ["apex-info-list"], + name: "apex-info-list-tinyxml", + srcs: ["ApexInfoList.xsd"], + package_name: "com.android.apex", + api_dir: "apex-info-list-api", + gen_writer: true, + tinyxml: true, + root_elements: ["apex-info-list"], } diff --git a/apexd/apexd_testdata/Android.bp b/apexd/apexd_testdata/Android.bp index e28c567d..4fec5896 100644 --- a/apexd/apexd_testdata/Android.bp +++ b/apexd/apexd_testdata/Android.bp @@ -40,7 +40,7 @@ apex { prebuilts: ["sample_prebuilt_file"], key: "com.android.apex.test_package.key", installable: false, - min_sdk_version: "29", // test requires hashtree to be present. + min_sdk_version: "29", // test requires hashtree to be present. } apex { @@ -66,101 +66,120 @@ apex { } genrule { - // Generates an apex which has a different public key outside the filesystem image - name: "gen_key_mismatch_with_image_apex", - out: ["apex.apexd_test_wrong_public_key.apex"], - srcs: [":apex.apexd_test"], - tools: ["soong_zip", "zipalign"], - cmd: "unzip -q $(in) -d $(genDir) && " + // unzip input - "echo 'different-key' >> $(genDir)/apex_pubkey && " + // modify the public key - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/apex.apexd_test_wrong_public_key.apex", + // Generates an apex which has a different public key outside the filesystem image + name: "gen_key_mismatch_with_image_apex", + out: ["apex.apexd_test_wrong_public_key.apex"], + srcs: [":apex.apexd_test"], + tools: [ + "soong_zip", + "zipalign", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + // unzip input + "echo 'different-key' >> $(genDir)/apex_pubkey && " + // modify the public key + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/apex.apexd_test_wrong_public_key.apex", } genrule { - // Generates a compressed apex which doesn't have an original_apex file in it - name: "gen_capex_without_apex", - out: ["com.android.apex.compressed.v1_without_apex.capex"], - srcs: [":com.android.apex.compressed.v1"], - tools: ["soong_zip"], - cmd: "unzip -q $(in) -d $(genDir) && rm $(genDir)/original_apex && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + - "-o $(genDir)/com.android.apex.compressed.v1_without_apex.capex" + // Generates a compressed apex which doesn't have an original_apex file in it + name: "gen_capex_without_apex", + out: ["com.android.apex.compressed.v1_without_apex.capex"], + srcs: [":com.android.apex.compressed.v1"], + tools: ["soong_zip"], + cmd: "unzip -q $(in) -d $(genDir) && rm $(genDir)/original_apex && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + + "-o $(genDir)/com.android.apex.compressed.v1_without_apex.capex", } genrule { - // Generates a compressed apex which has different version of original_apex in it - name: "gen_capex_with_v2_apex", - out: ["com.android.apex.compressed.v1_with_v2_apex.capex"], - srcs: [":com.android.apex.compressed.v2"], - tools: ["soong_zip", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop version 1 $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + - "-o $(genDir)/com.android.apex.compressed.v1_with_v2_apex.capex" + // Generates a compressed apex which has different version of original_apex in it + name: "gen_capex_with_v2_apex", + out: ["com.android.apex.compressed.v1_with_v2_apex.capex"], + srcs: [":com.android.apex.compressed.v2"], + tools: [ + "soong_zip", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop version 1 $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + + "-o $(genDir)/com.android.apex.compressed.v1_with_v2_apex.capex", } genrule { - // Generates a compressed apex which can be opened but not decompressed - name: "gen_capex_not_decompressible", - out: ["com.android.apex.compressed.v1_not_decompressible.capex"], - srcs: [":com.android.apex.compressed.v1"], - tools: ["soong_zip", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && echo '' > $(genDir)/original_apex && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + - "-o $(genDir)/com.android.apex.compressed.v1_not_decompressible.capex" + // Generates a compressed apex which can be opened but not decompressed + name: "gen_capex_not_decompressible", + out: ["com.android.apex.compressed.v1_not_decompressible.capex"], + srcs: [":com.android.apex.compressed.v1"], + tools: [ + "soong_zip", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && echo '' > $(genDir)/original_apex && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + + "-o $(genDir)/com.android.apex.compressed.v1_not_decompressible.capex", } genrule { - // Generates a capex which has same module name as com.android.apex.compressed, but - // is contains a different public key. - name: "gen_key_mismatch_capex", - out: ["com.android.apex.compressed_different_key.capex"], - srcs: [":apex.apexd_test_no_inst_key"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest", "apex_compression_tool", "avbtool"], - cmd: "mkdir $(genDir)/tempdir && unzip -q $(in) -d $(genDir)/tempdir && " + - "$(location conv_apex_manifest) setprop name com.android.apex.compressed $(genDir)/tempdir/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir)/tempdir -D $(genDir)/tempdir " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/com.android.apex.compressed_different_key.apex && " + - "HOST_OUT_BIN=$$(dirname $(location apex_compression_tool)) && " + - "$(location apex_compression_tool) compress " + - "--apex_compression_tool_path=\"$$HOST_OUT_BIN\" " + - "--input=$(genDir)/com.android.apex.compressed_different_key.apex " + - "--output=$(genDir)/com.android.apex.compressed_different_key.capex" + // Generates a capex which has same module name as com.android.apex.compressed, but + // is contains a different public key. + name: "gen_key_mismatch_capex", + out: ["com.android.apex.compressed_different_key.capex"], + srcs: [":apex.apexd_test_no_inst_key"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + "apex_compression_tool", + "avbtool", + ], + cmd: "mkdir $(genDir)/tempdir && unzip -q $(in) -d $(genDir)/tempdir && " + + "$(location conv_apex_manifest) setprop name com.android.apex.compressed $(genDir)/tempdir/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir)/tempdir -D $(genDir)/tempdir " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/com.android.apex.compressed_different_key.apex && " + + "HOST_OUT_BIN=$$(dirname $(location apex_compression_tool)) && " + + "$(location apex_compression_tool) compress " + + "--apex_compression_tool_path=\"$$HOST_OUT_BIN\" " + + "--input=$(genDir)/com.android.apex.compressed_different_key.apex " + + "--output=$(genDir)/com.android.apex.compressed_different_key.capex", } genrule { - // Generates a capex which has a different public key than original_apex - name: "gen_key_mismatch_with_original_capex", - out: ["com.android.apex.compressed_key_mismatch_with_original.capex"], - srcs: [":com.android.apex.compressed.v1"], - tools: ["soong_zip"], - cmd: "unzip -q $(in) -d $(genDir) && " + // unzip input - "echo 'different-key' >> $(genDir)/apex_pubkey && " + // modify the public key - "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " +// repack the compressed APEX - "-o $(genDir)/com.android.apex.compressed_key_mismatch_with_original.capex", + // Generates a capex which has a different public key than original_apex + name: "gen_key_mismatch_with_original_capex", + out: ["com.android.apex.compressed_key_mismatch_with_original.capex"], + srcs: [":com.android.apex.compressed.v1"], + tools: ["soong_zip"], + cmd: "unzip -q $(in) -d $(genDir) && " + // unzip input + "echo 'different-key' >> $(genDir)/apex_pubkey && " + // modify the public key + "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + // repack the compressed APEX + "-o $(genDir)/com.android.apex.compressed_key_mismatch_with_original.capex", } genrule { - // Generates an apex which has a different manifest outside the filesystem - // image. - name: "gen_manifest_mismatch_compressed_apex_v2", - out: ["com.android.apex.compressed.v2_manifest_mismatch.apex"], - srcs: [":com.android.apex.compressed.v2_original"], - tools: ["soong_zip", "zipalign", "conv_apex_manifest"], - cmd: "unzip -q $(in) -d $(genDir) && " + - "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + - "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + - "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + - "-o $(genDir)/unaligned.apex && " + - "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + - "$(genDir)/com.android.apex.compressed.v2_manifest_mismatch.apex" + // Generates an apex which has a different manifest outside the filesystem + // image. + name: "gen_manifest_mismatch_compressed_apex_v2", + out: ["com.android.apex.compressed.v2_manifest_mismatch.apex"], + srcs: [":com.android.apex.compressed.v2_original"], + tools: [ + "soong_zip", + "zipalign", + "conv_apex_manifest", + ], + cmd: "unzip -q $(in) -d $(genDir) && " + + "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + + "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + + "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + + "-o $(genDir)/unaligned.apex && " + + "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + + "$(genDir)/com.android.apex.compressed.v2_manifest_mismatch.apex", } apex { @@ -250,8 +269,8 @@ apex { manifest: "manifest.json", file_contexts: ":apex.test-file_contexts", prebuilts: [ - "another_prebuilt_file", - "sample_prebuilt_file", + "another_prebuilt_file", + "sample_prebuilt_file", ], key: "com.android.apex.test_package.key", installable: false, @@ -280,11 +299,11 @@ apex { } 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 + 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 { @@ -364,15 +383,15 @@ apex { } prebuilt_etc { - name: "another_prebuilt_file", - src: "another_prebuilt_file", + name: "another_prebuilt_file", + src: "another_prebuilt_file", } prebuilt_apex { - name: "apex.corrupted_b146895998", - src: "corrupted_b146895998.apex", - filename: "corrupted_b146895998.apex", - installable: false, + name: "apex.corrupted_b146895998", + src: "corrupted_b146895998.apex", + filename: "corrupted_b146895998.apex", + installable: false, } // APEX for banned name test cannot be generated at build time. @@ -407,7 +426,7 @@ apex { installable: false, updatable: false, // TODO(ioffe): we should have a separate field to hashtree presence. - min_sdk_version: "29", // test requires hashtree to be present. + min_sdk_version: "29", // test requires hashtree to be present. } apex { @@ -418,7 +437,7 @@ apex { installable: false, updatable: false, // TODO(ioffe): we should have a separate field to hashtree presence. - min_sdk_version: "29", // test requires hashtree to be present. + min_sdk_version: "29", // test requires hashtree to be present. } apex { @@ -514,7 +533,7 @@ apex { updatable: false, apps: ["AppInRebootlessApex"], // TODO(ioffe): we should have a separate field to hashtree presence. - min_sdk_version: "29", // test requires hashtree to be present. + min_sdk_version: "29", // test requires hashtree to be present. } apex { @@ -526,7 +545,7 @@ apex { updatable: false, apps: ["PrivAppInRebootlessApex"], // TODO(ioffe): we should have a separate field to hashtree presence. - min_sdk_version: "29", // test requires hashtree to be present. + min_sdk_version: "29", // test requires hashtree to be present. } android_app { @@ -534,7 +553,7 @@ android_app { sdk_version: "29", manifest: "AppInRebootlessApex_AndroidManifest.xml", apex_available: [ - "test.rebootless_apex_app_in_apex", + "test.rebootless_apex_app_in_apex", ], } @@ -544,7 +563,7 @@ android_app { privileged: true, manifest: "AppInRebootlessApex_AndroidManifest.xml", apex_available: [ - "test.rebootless_apex_priv_app_in_apex", + "test.rebootless_apex_priv_app_in_apex", ], } diff --git a/apexd/sysprop/Android.bp b/apexd/sysprop/Android.bp index 050434b1..1f78fed4 100644 --- a/apexd/sysprop/Android.bp +++ b/apexd/sysprop/Android.bp @@ -3,10 +3,10 @@ package { } sysprop_library { - name: "com.android.sysprop.apex", - srcs: ["ApexProperties.sysprop"], - property_owner: "Platform", - api_packages: ["android.sysprop"], - ramdisk_available: true, - recovery_available: true, + name: "com.android.sysprop.apex", + srcs: ["ApexProperties.sysprop"], + property_owner: "Platform", + api_packages: ["android.sysprop"], + ramdisk_available: true, + recovery_available: true, } diff --git a/apexer/Android.bp b/apexer/Android.bp index be8f1d16..780730b1 100644 --- a/apexer/Android.bp +++ b/apexer/Android.bp @@ -17,26 +17,26 @@ package { } apexer_tools = [ - "aapt2", - "avbtool", - "conv_apex_manifest", - "e2fsdroid", - "mke2fs", - "resize2fs", - "sefcontext_compile", - "zipalign", - "make_f2fs", - "sload_f2fs", - "make_erofs", - // TODO(b/124476339) apex doesn't follow 'required' dependencies so we need to include this - // manually for 'avbtool'. - "fec", + "aapt2", + "avbtool", + "conv_apex_manifest", + "e2fsdroid", + "mke2fs", + "resize2fs", + "sefcontext_compile", + "zipalign", + "make_f2fs", + "sload_f2fs", + "make_erofs", + // TODO(b/124476339) apex doesn't follow 'required' dependencies so we need to include this + // manually for 'avbtool'. + "fec", ] // TODO(b/157110982): cannot specify "required" dependency on go binary apexer_go_tools = [ - "merge_zips", - "soong_zip", + "merge_zips", + "soong_zip", ] python_library_host { @@ -55,7 +55,7 @@ genrule { name: "mke2fs_conf_for_apexer", srcs: [":mke2fs_conf"], out: ["mke2fs.conf"], - cmd: "cp $(in) $(out)" + cmd: "cp $(in) $(out)", } python_binary_host { diff --git a/apexer/testdata/Android.bp b/apexer/testdata/Android.bp index 951f849e..42fed721 100644 --- a/apexer/testdata/Android.bp +++ b/apexer/testdata/Android.bp @@ -37,7 +37,7 @@ apex { key: "com.android.example.apex.key", certificate: ":com.android.example.apex.certificate", installable: false, - updatable:false, + updatable: false, generate_hashtree: false, } diff --git a/libs/libapexutil/Android.bp b/libs/libapexutil/Android.bp index 32aca763..db0ec88c 100644 --- a/libs/libapexutil/Android.bp +++ b/libs/libapexutil/Android.bp @@ -34,7 +34,7 @@ cc_library_static { name: "libapexutil", defaults: ["libapexutil-deps"], export_include_dirs: ["."], - srcs: [ "apexutil.cpp" ], + srcs: ["apexutil.cpp"], host_supported: true, apex_available: [ "//apex_available:platform", diff --git a/shim/Android.bp b/shim/Android.bp index d1cc6331..7ec17b56 100644 --- a/shim/Android.bp +++ b/shim/Android.bp @@ -17,253 +17,255 @@ package { } prebuilt_apex { - name: "com.android.apex.cts.shim.v1_prebuilt", - overrides: ["CtsShimPrebuilt", "CtsShimPrivPrebuilt"], - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v1.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v1.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v1.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v1.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v1.apex", - }, - }, - filename: "com.android.apex.cts.shim.apex", - installable: true, + name: "com.android.apex.cts.shim.v1_prebuilt", + overrides: [ + "CtsShimPrebuilt", + "CtsShimPrivPrebuilt", + ], + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v1.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v1.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v1.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v1.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v1.apex", + }, + }, + filename: "com.android.apex.cts.shim.apex", + installable: true, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_wrong_sha_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_wrong_sha.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_wrong_sha.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_wrong_sha_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_wrong_sha.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_wrong_sha.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_wrong_sha.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_wrong_sha.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_additional_file_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_additional_file.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_additional_file.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_additional_file_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_file.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_additional_file.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_file.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_additional_file.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_additional_folder_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_additional_folder.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_additional_folder.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_additional_folder_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_additional_folder.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_additional_folder.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_additional_folder.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_additional_folder.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_with_pre_install_hook.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_pre_install_hook.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_with_pre_install_hook.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_with_post_install_hook.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_with_post_install_hook.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_with_post_install_hook.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_with_post_install_hook.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_with_post_install_hook.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_with_post_install_hook.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v3_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v3.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v3.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v3.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v3.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v3.apex", - }, - }, - filename: "com.android.apex.cts.shim.v3.apex", - installable: false, + name: "com.android.apex.cts.shim.v3_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v3.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v3.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v3.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v3.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v3.apex", + }, + }, + filename: "com.android.apex.cts.shim.v3.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_different_certificate_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_different_certificate.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_different_certificate.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_different_certificate_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_different_certificate.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_different_certificate.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_different_certificate.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_different_certificate.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_unsigned_apk_container_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - }, - riscv64: { - src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_unsigned_apk_container_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + }, + riscv64: { + src: "prebuilts/riscv64/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.cts.shim.v2_rebootless_prebuilt", - arch: { - arm: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex", - }, - arm64: { - src: "prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex", - }, - x86: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex", - }, - x86_64: { - src: "prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex", - }, - }, - filename: "com.android.apex.cts.shim.v2_rebootless.apex", - installable: false, + name: "com.android.apex.cts.shim.v2_rebootless_prebuilt", + arch: { + arm: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex", + }, + arm64: { + src: "prebuilts/arm/com.android.apex.cts.shim.v2_rebootless.apex", + }, + x86: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex", + }, + x86_64: { + src: "prebuilts/x86/com.android.apex.cts.shim.v2_rebootless.apex", + }, + }, + filename: "com.android.apex.cts.shim.v2_rebootless.apex", + installable: false, } - diff --git a/shim/build/Android.bp b/shim/build/Android.bp index 9b40add4..080f6c35 100644 --- a/shim/build/Android.bp +++ b/shim/build/Android.bp @@ -19,138 +19,150 @@ package { } genrule { - name: "com.android.apex.cts.shim.pem", - out: ["com.android.apex.cts.shim.pem"], - cmd: "openssl genrsa -out $(out) 4096", + name: "com.android.apex.cts.shim.pem", + out: ["com.android.apex.cts.shim.pem"], + cmd: "openssl genrsa -out $(out) 4096", } genrule { - name: "com.android.apex.cts.shim.pubkey", - srcs: [":com.android.apex.cts.shim.pem"], - out: ["com.android.apex.cts.shim.pubkey"], - tools: ["avbtool"], - cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", + name: "com.android.apex.cts.shim.pubkey", + srcs: [":com.android.apex.cts.shim.pem"], + out: ["com.android.apex.cts.shim.pubkey"], + tools: ["avbtool"], + cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", } apex_key { - name: "com.android.apex.cts.shim.key", - private_key: ":com.android.apex.cts.shim.pem", - public_key: ":com.android.apex.cts.shim.pubkey", - installable: false, + name: "com.android.apex.cts.shim.key", + private_key: ":com.android.apex.cts.shim.pem", + public_key: ":com.android.apex.cts.shim.pubkey", + installable: false, } genrule { - name: "com.android.apex.cts.shim.debug.pem", - out: ["com.android.apex.cts.shim.debug.pem"], - cmd: "openssl genrsa -out $(out) 4096", + name: "com.android.apex.cts.shim.debug.pem", + out: ["com.android.apex.cts.shim.debug.pem"], + cmd: "openssl genrsa -out $(out) 4096", } genrule { - name: "com.android.apex.cts.shim.debug.pubkey", - srcs: [":com.android.apex.cts.shim.debug.pem"], - out: ["com.android.apex.cts.shim.debug.pubkey"], - tools: ["avbtool"], - cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", + name: "com.android.apex.cts.shim.debug.pubkey", + srcs: [":com.android.apex.cts.shim.debug.pem"], + out: ["com.android.apex.cts.shim.debug.pubkey"], + tools: ["avbtool"], + cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", } apex_key { - name: "com.android.apex.cts.shim.debug.key", - private_key: ":com.android.apex.cts.shim.debug.pem", - public_key: ":com.android.apex.cts.shim.debug.pubkey", - installable: false, + name: "com.android.apex.cts.shim.debug.key", + private_key: ":com.android.apex.cts.shim.debug.pem", + public_key: ":com.android.apex.cts.shim.debug.pubkey", + installable: false, } genrule { - name: "generate_hash_of_dev_null", - out: ["hash.txt"], - cmd: "sha512sum -b /dev/null | cut -d' ' -f1 | tee $(out)", + name: "generate_hash_of_dev_null", + out: ["hash.txt"], + cmd: "sha512sum -b /dev/null | cut -d' ' -f1 | tee $(out)", } prebuilt_etc { - name: "hash_of_dev_null", - src: ":generate_hash_of_dev_null", - filename: "hash.txt", - installable: false, + name: "hash_of_dev_null", + src: ":generate_hash_of_dev_null", + filename: "hash.txt", + installable: false, } apex { - name: "com.android.apex.cts.shim.v3", - manifest: "manifest_v3.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShim", "CtsShimPriv"], - installable: false, - allowed_files: "default_shim_allowed_list.txt", - updatable: false, + name: "com.android.apex.cts.shim.v3", + manifest: "manifest_v3.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: [ + "CtsShim", + "CtsShimPriv", + ], + installable: false, + allowed_files: "default_shim_allowed_list.txt", + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShim", "CtsShimPriv"], - installable: false, - allowed_files: "default_shim_allowed_list.txt", - updatable: false, + name: "com.android.apex.cts.shim.v2", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: [ + "CtsShim", + "CtsShimPriv", + ], + installable: false, + allowed_files: "default_shim_allowed_list.txt", + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_sign_payload_with_different_key", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.debug.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - allowed_files: "default_shim_allowed_list.txt", - updatable: false, + name: "com.android.apex.cts.shim.v2_sign_payload_with_different_key", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.debug.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + allowed_files: "default_shim_allowed_list.txt", + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_without_apk_in_apex", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - allowed_files: "default_shim_allowed_list.txt", - updatable: false, + name: "com.android.apex.cts.shim.v2_without_apk_in_apex", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + allowed_files: "default_shim_allowed_list.txt", + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_no_hashtree", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShim", "CtsShimPriv"], - installable: false, - allowed_files: "default_shim_allowed_list.txt", - generate_hashtree: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_no_hashtree", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: [ + "CtsShim", + "CtsShimPriv", + ], + installable: false, + allowed_files: "default_shim_allowed_list.txt", + generate_hashtree: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_unsigned_payload", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShim", "CtsShimPriv"], - installable: false, - allowed_files: "default_shim_allowed_list.txt", - test_only_unsigned_payload: true, - updatable: false, + name: "com.android.apex.cts.shim.v2_unsigned_payload", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: [ + "CtsShim", + "CtsShimPriv", + ], + installable: false, + allowed_files: "default_shim_allowed_list.txt", + test_only_unsigned_payload: true, + updatable: false, } override_apex { @@ -161,192 +173,201 @@ override_apex { } genrule { - name: "generate_empty_hash", - out: ["hash.txt"], - cmd: "touch $(out)", + name: "generate_empty_hash", + out: ["hash.txt"], + cmd: "touch $(out)", } prebuilt_etc { - name: "empty_hash", - src: ":generate_empty_hash", - filename: "hash.txt", - installable: false, + name: "empty_hash", + src: ":generate_empty_hash", + filename: "hash.txt", + installable: false, } // Use empty hash.txt to make sure that this apex has wrong SHA512, hence trying // to stage it should fail. apex { - name: "com.android.apex.cts.shim.v2_wrong_sha", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["empty_hash"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_wrong_sha", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["empty_hash"], + installable: false, + updatable: false, } prebuilt_etc { - name: "apex_shim_additional_file", - src: "additional_file", - filename: "additional_file", - installable: false, + name: "apex_shim_additional_file", + src: "additional_file", + filename: "additional_file", + installable: false, } apex { - name: "com.android.apex.cts.shim.v2_additional_file", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null", "apex_shim_additional_file"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_additional_file", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: [ + "hash_of_dev_null", + "apex_shim_additional_file", + ], + installable: false, + updatable: false, } prebuilt_etc { - name: "apex_shim_additional_folder", - src: "additional_file", - filename: "additional_file", - sub_dir: "additional_folder", - installable: false, + name: "apex_shim_additional_folder", + src: "additional_file", + filename: "additional_file", + sub_dir: "additional_folder", + installable: false, } apex { - name: "com.android.apex.cts.shim.v2_additional_folder", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null", "apex_shim_additional_folder"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_additional_folder", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: [ + "hash_of_dev_null", + "apex_shim_additional_folder", + ], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_with_pre_install_hook", - manifest: "manifest_v2_with_pre_install_hook.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_with_pre_install_hook", + manifest: "manifest_v2_with_pre_install_hook.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_with_post_install_hook", - manifest: "manifest_v2_with_post_install_hook.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_with_post_install_hook", + manifest: "manifest_v2_with_post_install_hook.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } genrule { - name: "generate_hash_v1", - srcs: [ - ":com.android.apex.cts.shim.v2", - ":com.android.apex.cts.shim.v2_add_apk_to_apex", - ":com.android.apex.cts.shim.v2_without_apk_in_apex", - ":com.android.apex.cts.shim.v2_additional_file", - ":com.android.apex.cts.shim.v2_additional_folder", - ":com.android.apex.cts.shim.v2_different_certificate", - ":com.android.apex.cts.shim.v2_different_package_name", - ":com.android.apex.cts.shim.v2_no_hashtree", - ":com.android.apex.cts.shim.v2_signed_bob", - ":com.android.apex.cts.shim.v2_signed_bob_rot", - ":com.android.apex.cts.shim.v2_signed_bob_rot_rollback", - ":com.android.apex.cts.shim.v2_with_pre_install_hook", - ":com.android.apex.cts.shim.v2_with_post_install_hook", - ":com.android.apex.cts.shim.v2_sdk_target_p", - ":com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p", - ":com.android.apex.cts.shim.v2_apk_in_apex_upgrades", - ":com.android.apex.cts.shim.v2_rebootless", - ":com.android.apex.cts.shim.v2_install_constraints_empty", - ":com.android.apex.cts.shim.v2_install_constraints_invalid_fingerprint", - ":com.android.apex.cts.shim.v2_install_constraints_no_value", - ":com.android.apex.cts.shim.v3", - ":com.android.apex.cts.shim.v3_rebootless", - ":com.android.apex.cts.shim.v3_signed_bob", - ":com.android.apex.cts.shim.v3_signed_bob_rot", - ], - out: ["hash.txt"], - cmd: "sha512sum -b $(in) | cut -d' ' -f1 | tee $(out)", + name: "generate_hash_v1", + srcs: [ + ":com.android.apex.cts.shim.v2", + ":com.android.apex.cts.shim.v2_add_apk_to_apex", + ":com.android.apex.cts.shim.v2_without_apk_in_apex", + ":com.android.apex.cts.shim.v2_additional_file", + ":com.android.apex.cts.shim.v2_additional_folder", + ":com.android.apex.cts.shim.v2_different_certificate", + ":com.android.apex.cts.shim.v2_different_package_name", + ":com.android.apex.cts.shim.v2_no_hashtree", + ":com.android.apex.cts.shim.v2_signed_bob", + ":com.android.apex.cts.shim.v2_signed_bob_rot", + ":com.android.apex.cts.shim.v2_signed_bob_rot_rollback", + ":com.android.apex.cts.shim.v2_with_pre_install_hook", + ":com.android.apex.cts.shim.v2_with_post_install_hook", + ":com.android.apex.cts.shim.v2_sdk_target_p", + ":com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p", + ":com.android.apex.cts.shim.v2_apk_in_apex_upgrades", + ":com.android.apex.cts.shim.v2_rebootless", + ":com.android.apex.cts.shim.v2_install_constraints_empty", + ":com.android.apex.cts.shim.v2_install_constraints_invalid_fingerprint", + ":com.android.apex.cts.shim.v2_install_constraints_no_value", + ":com.android.apex.cts.shim.v3", + ":com.android.apex.cts.shim.v3_rebootless", + ":com.android.apex.cts.shim.v3_signed_bob", + ":com.android.apex.cts.shim.v3_signed_bob_rot", + ], + out: ["hash.txt"], + cmd: "sha512sum -b $(in) | cut -d' ' -f1 | tee $(out)", } prebuilt_etc { - name: "hash_v1", - src: ":generate_hash_v1", - filename: "hash.txt", - installable: false, + name: "hash_v1", + src: ":generate_hash_v1", + filename: "hash.txt", + installable: false, } apex { - name: "com.android.apex.cts.shim.v1", - manifest: "manifest.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_v1"], - apps: ["CtsShim", "CtsShimPriv"], - allowed_files: "default_shim_allowed_list.txt", - updatable: false, + name: "com.android.apex.cts.shim.v1", + manifest: "manifest.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_v1"], + apps: [ + "CtsShim", + "CtsShimPriv", + ], + allowed_files: "default_shim_allowed_list.txt", + updatable: false, } genrule { - name: "com.android.apex.cts.shim_not_pre_installed.pem", - out: ["com.android.apex.cts.shim_not_pre_installed.pem"], - cmd: "openssl genrsa -out $(out) 4096", + name: "com.android.apex.cts.shim_not_pre_installed.pem", + out: ["com.android.apex.cts.shim_not_pre_installed.pem"], + cmd: "openssl genrsa -out $(out) 4096", } genrule { - name: "com.android.apex.cts.shim_not_pre_installed.pubkey", - srcs: [":com.android.apex.cts.shim_not_pre_installed.pem"], - out: ["com.android.apex.cts.shim_not_pre_installed.pubkey"], - tools: ["avbtool"], - cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", + name: "com.android.apex.cts.shim_not_pre_installed.pubkey", + srcs: [":com.android.apex.cts.shim_not_pre_installed.pem"], + out: ["com.android.apex.cts.shim_not_pre_installed.pubkey"], + tools: ["avbtool"], + cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", } apex_key { - name: "com.android.apex.cts.shim_not_pre_installed.key", - private_key: ":com.android.apex.cts.shim_not_pre_installed.pem", - public_key: ":com.android.apex.cts.shim_not_pre_installed.pubkey", - installable: false, + name: "com.android.apex.cts.shim_not_pre_installed.key", + private_key: ":com.android.apex.cts.shim_not_pre_installed.pem", + public_key: ":com.android.apex.cts.shim_not_pre_installed.pubkey", + installable: false, } apex { - name: "com.android.apex.cts.shim_not_pre_installed", - manifest: "manifest_not_pre_installed.json", - androidManifest: "AndroidManifestNotPreInstalled.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim_not_pre_installed.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim_not_pre_installed", + manifest: "manifest_not_pre_installed.json", + androidManifest: "AndroidManifestNotPreInstalled.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim_not_pre_installed.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_different_certificate", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - certificate: ":com.android.apex.cts.shim.debug.cert", - updatable: false, + name: "com.android.apex.cts.shim.v2_different_certificate", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + certificate: ":com.android.apex.cts.shim.debug.cert", + updatable: false, } android_app_certificate { - name: "com.android.apex.cts.shim.debug.cert", - certificate: "com.android.apex.cts.shim.debug.cert", + name: "com.android.apex.cts.shim.debug.cert", + certificate: "com.android.apex.cts.shim.debug.cert", } // Build rules to build shim apex with rotated keys @@ -357,17 +378,17 @@ android_app_certificate { // Create private key bob in pem format genrule { - name: "com.android.apex.rotation.key.bob.pem", - out: ["bob.pem"], - cmd: "openssl req -x509 -newkey rsa:4096 -nodes -days 999999 -subj '/DN=/EMAILADDRESS=android@android.com/CN=Android/OU=Android/O=Android/L=Mountain View/ST=California/C=US' -keyout $(out)", + name: "com.android.apex.rotation.key.bob.pem", + out: ["bob.pem"], + cmd: "openssl req -x509 -newkey rsa:4096 -nodes -days 999999 -subj '/DN=/EMAILADDRESS=android@android.com/CN=Android/OU=Android/O=Android/L=Mountain View/ST=California/C=US' -keyout $(out)", } // Converts bob's private key to pk8 format genrule { - name: "com.android.apex.rotation.key.bob.pk8", - srcs: [":com.android.apex.rotation.key.bob.pem"], - out: ["bob.pk8"], - cmd: "openssl pkcs8 -topk8 -inform PEM -outform DER -in $(in) -out $(out) -nocrypt", + name: "com.android.apex.rotation.key.bob.pk8", + srcs: [":com.android.apex.rotation.key.bob.pem"], + out: ["bob.pk8"], + cmd: "openssl pkcs8 -topk8 -inform PEM -outform DER -in $(in) -out $(out) -nocrypt", } // Extract bob's public key from its private key @@ -380,258 +401,267 @@ genrule { // Create lineage file for rotating alice to bob genrule { - name: "com.android.apex.rotation.key.bob.rot", - srcs: [ - "alice.pk8", - "alice.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ":com.android.apex.rotation.key.bob.x509.pem", - ], - out: ["bob.rot"], - tools: [":apksigner"], - cmd: "$(location :apksigner) rotate --out $(out) --old-signer --key $(location alice.pk8) --cert $(location alice.x509.pem) --new-signer --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem)", + name: "com.android.apex.rotation.key.bob.rot", + srcs: [ + "alice.pk8", + "alice.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ":com.android.apex.rotation.key.bob.x509.pem", + ], + out: ["bob.rot"], + tools: [":apksigner"], + cmd: "$(location :apksigner) rotate --out $(out) --old-signer --key $(location alice.pk8) --cert $(location alice.x509.pem) --new-signer --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem)", } // Create lineage file for rotating alice to bob with rollback capability genrule { - name: "com.android.apex.rotation.key.bob.rot.rollback", - srcs: [ - "alice.pk8", - "alice.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ":com.android.apex.rotation.key.bob.x509.pem", - ], - out: ["bob.rot"], - tools: [":apksigner"], - cmd: "$(location :apksigner) rotate --out $(out) --old-signer --key $(location alice.pk8) --cert $(location alice.x509.pem) --set-rollback true --new-signer --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem)", + name: "com.android.apex.rotation.key.bob.rot.rollback", + srcs: [ + "alice.pk8", + "alice.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ":com.android.apex.rotation.key.bob.x509.pem", + ], + out: ["bob.rot"], + tools: [":apksigner"], + cmd: "$(location :apksigner) rotate --out $(out) --old-signer --key $(location alice.pk8) --cert $(location alice.x509.pem) --set-rollback true --new-signer --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem)", } // v2 cts shim package signed by bob, without lineage genrule { - name: "com.android.apex.cts.shim.v2_signed_bob", - out: ["com.android.apex.cts.shim.v2_signed_bob"], - tools: [":apksigner"], - srcs: [ - ":com.android.apex.cts.shim.v2", - ":com.android.apex.rotation.key.bob.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ], - dist: { - targets: ["com.android.apex.cts.shim.v2_signed_bob"], - dest: "com.android.apex.cts.shim.v2_signed_bob.apex", - }, - cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --out $(out) $(location :com.android.apex.cts.shim.v2)", + name: "com.android.apex.cts.shim.v2_signed_bob", + out: ["com.android.apex.cts.shim.v2_signed_bob"], + tools: [":apksigner"], + srcs: [ + ":com.android.apex.cts.shim.v2", + ":com.android.apex.rotation.key.bob.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ], + dist: { + targets: ["com.android.apex.cts.shim.v2_signed_bob"], + dest: "com.android.apex.cts.shim.v2_signed_bob.apex", + }, + cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --out $(out) $(location :com.android.apex.cts.shim.v2)", } // v2 cts shim package signed by bob + lineage genrule { - name: "com.android.apex.cts.shim.v2_signed_bob_rot", - out: ["com.android.apex.cts.shim.v2_signed_bob_rot"], - tools: [":apksigner"], - srcs: [ - ":com.android.apex.cts.shim.v2", - ":com.android.apex.rotation.key.bob.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ":com.android.apex.rotation.key.bob.rot", - ], - dist: { - targets: ["com.android.apex.cts.shim.v2_signed_bob_rot"], - dest: "com.android.apex.cts.shim.v2_signed_bob_rot.apex", - }, - cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)", + name: "com.android.apex.cts.shim.v2_signed_bob_rot", + out: ["com.android.apex.cts.shim.v2_signed_bob_rot"], + tools: [":apksigner"], + srcs: [ + ":com.android.apex.cts.shim.v2", + ":com.android.apex.rotation.key.bob.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ":com.android.apex.rotation.key.bob.rot", + ], + dist: { + targets: ["com.android.apex.cts.shim.v2_signed_bob_rot"], + dest: "com.android.apex.cts.shim.v2_signed_bob_rot.apex", + }, + cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)", } // v2 cts shim package signed by bob + lineage + rollback capability genrule { - name: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback", - out: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"], - tools: [":apksigner"], - srcs: [ - ":com.android.apex.cts.shim.v2", - ":com.android.apex.rotation.key.bob.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ":com.android.apex.rotation.key.bob.rot.rollback", - ], - dist: { - targets: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"], - dest: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex", - }, - cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot.rollback) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)", + name: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback", + out: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"], + tools: [":apksigner"], + srcs: [ + ":com.android.apex.cts.shim.v2", + ":com.android.apex.rotation.key.bob.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ":com.android.apex.rotation.key.bob.rot.rollback", + ], + dist: { + targets: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"], + dest: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex", + }, + cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot.rollback) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)", } // v3 cts shim package signed by bob genrule { - name: "com.android.apex.cts.shim.v3_signed_bob", - out: ["com.android.apex.cts.shim.v3_signed_bob"], - tools: [":apksigner"], - srcs: [ - ":com.android.apex.cts.shim.v3", - ":com.android.apex.rotation.key.bob.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ], - dist: { - targets: ["com.android.apex.cts.shim.v3_signed_bob"], - dest: "com.android.apex.cts.shim.v3_signed_bob.apex", - }, - cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --out $(out) $(location :com.android.apex.cts.shim.v3)", + name: "com.android.apex.cts.shim.v3_signed_bob", + out: ["com.android.apex.cts.shim.v3_signed_bob"], + tools: [":apksigner"], + srcs: [ + ":com.android.apex.cts.shim.v3", + ":com.android.apex.rotation.key.bob.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ], + dist: { + targets: ["com.android.apex.cts.shim.v3_signed_bob"], + dest: "com.android.apex.cts.shim.v3_signed_bob.apex", + }, + cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --out $(out) $(location :com.android.apex.cts.shim.v3)", } // v3 cts shim package signed by bob + lineage genrule { - name: "com.android.apex.cts.shim.v3_signed_bob_rot", - out: ["com.android.apex.cts.shim.v3_signed_bob_rot"], - tools: [":apksigner"], - srcs: [ - ":com.android.apex.cts.shim.v3", - ":com.android.apex.rotation.key.bob.x509.pem", - ":com.android.apex.rotation.key.bob.pk8", - ":com.android.apex.rotation.key.bob.rot", - ], - dist: { - targets: ["com.android.apex.cts.shim.v3_signed_bob_rot"], - dest: "com.android.apex.cts.shim.v3_signed_bob_rot.apex", - }, - cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v3)", + name: "com.android.apex.cts.shim.v3_signed_bob_rot", + out: ["com.android.apex.cts.shim.v3_signed_bob_rot"], + tools: [":apksigner"], + srcs: [ + ":com.android.apex.cts.shim.v3", + ":com.android.apex.rotation.key.bob.x509.pem", + ":com.android.apex.rotation.key.bob.pk8", + ":com.android.apex.rotation.key.bob.rot", + ], + dist: { + targets: ["com.android.apex.cts.shim.v3_signed_bob_rot"], + dest: "com.android.apex.cts.shim.v3_signed_bob_rot.apex", + }, + cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v3)", } // This one is only used in ApexdHostTest and not meant to be installed // and hence shouldn't be allowed in hash.txt of v1 shim APEX. apex { - name: "com.android.apex.cts.shim.v2_legacy", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShim", "CtsShimPriv"], - installable: false, - min_sdk_version: "29", - updatable: false, + name: "com.android.apex.cts.shim.v2_legacy", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: [ + "CtsShim", + "CtsShimPriv", + ], + installable: false, + min_sdk_version: "29", + updatable: false, } genrule { - name: "com.android.apex.cts.shim.v2_no_pb", - srcs: [":com.android.apex.cts.shim.v2_legacy"], - out: ["com.android.apex.cts.shim.v2_no_pb.apex"], - tools: ["zip2zip"], - cmd: "$(location zip2zip) -i $(in) -x apex_manifest.pb -o $(out)", + name: "com.android.apex.cts.shim.v2_no_pb", + srcs: [":com.android.apex.cts.shim.v2_legacy"], + out: ["com.android.apex.cts.shim.v2_no_pb.apex"], + tools: ["zip2zip"], + cmd: "$(location zip2zip) -i $(in) -x apex_manifest.pb -o $(out)", } // Apex shim that targets an old sdk (P) apex { - name: "com.android.apex.cts.shim.v2_sdk_target_p", - // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. - manifest: "manifest_v2_rebootless.json", - androidManifest: "AndroidManifestSdkTargetP.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - apps: ["CtsShim", "CtsShimPriv"], - updatable: false, + name: "com.android.apex.cts.shim.v2_sdk_target_p", + // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. + manifest: "manifest_v2_rebootless.json", + androidManifest: "AndroidManifestSdkTargetP.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + apps: [ + "CtsShim", + "CtsShimPriv", + ], + updatable: false, } // Apex shim with apk-in-apex that targets sdk P apex { - name: "com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShimTargetPSdk"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: ["CtsShimTargetPSdk"], + installable: false, + updatable: false, } // Apex shim with unsigned apk genrule { - name: "com.android.apex.cts.shim.v2_unsigned_apk_container", - // Use shim.v2_rebootless to re-use same APEX in the rebootless update test case. - srcs: [":com.android.apex.cts.shim.v2_rebootless"], - out: ["com.android.apex.cts.shim.v2_unsigned_apk_container.apex"], - cmd: "cp -v $(in) $(out) && zip -d $(out) META-INF*", - dist: { - targets: ["com.android.apex.cts.shim.v2_unsigned_apk_container"], - dest: "com.android.apex.cts.shim.v2_unsigned_apk_container.apex", - }, + name: "com.android.apex.cts.shim.v2_unsigned_apk_container", + // Use shim.v2_rebootless to re-use same APEX in the rebootless update test case. + srcs: [":com.android.apex.cts.shim.v2_rebootless"], + out: ["com.android.apex.cts.shim.v2_unsigned_apk_container.apex"], + cmd: "cp -v $(in) $(out) && zip -d $(out) META-INF*", + dist: { + targets: ["com.android.apex.cts.shim.v2_unsigned_apk_container"], + dest: "com.android.apex.cts.shim.v2_unsigned_apk_container.apex", + }, } // Apex shim for testing rebootless updates apex { - name: "com.android.apex.cts.shim.v2_rebootless", - manifest: "manifest_v2_rebootless.json", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_rebootless", + manifest: "manifest_v2_rebootless.json", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v3_rebootless", - manifest: "manifest_v3_rebootless.json", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v3_rebootless", + manifest: "manifest_v3_rebootless.json", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } // Apex shim with upgraded apk-in-apexes apex { - name: "com.android.apex.cts.shim.v2_apk_in_apex_upgrades", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifest.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShim", "CtsShimPrivUpgrade"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_apk_in_apex_upgrades", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifest.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: [ + "CtsShim", + "CtsShimPrivUpgrade", + ], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_install_constraints_empty", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifestInstallConstraints_empty.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_install_constraints_empty", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifestInstallConstraints_empty.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_install_constraints_invalid_fingerprint", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifestInstallConstraints_invalid_fingerprint.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_install_constraints_invalid_fingerprint", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifestInstallConstraints_invalid_fingerprint.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } apex { - name: "com.android.apex.cts.shim.v2_install_constraints_no_value", - manifest: "manifest_v2.json", - androidManifest: "AndroidManifestInstallConstraints_no_value.xml", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - installable: false, - updatable: false, + name: "com.android.apex.cts.shim.v2_install_constraints_no_value", + manifest: "manifest_v2.json", + androidManifest: "AndroidManifestInstallConstraints_no_value.xml", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + installable: false, + updatable: false, } // Apex shim for running a new app in an apex apex { - name: "com.android.apex.cts.shim.v2_add_apk_to_apex", - manifest: "manifest_v2.json", - file_contexts: ":apex.test-file_contexts", - key: "com.android.apex.cts.shim.key", - prebuilts: ["hash_of_dev_null"], - apps: ["CtsShimAddApkToApex"], - installable: false, - updatable: false, -}
\ No newline at end of file + name: "com.android.apex.cts.shim.v2_add_apk_to_apex", + manifest: "manifest_v2.json", + file_contexts: ":apex.test-file_contexts", + key: "com.android.apex.cts.shim.key", + prebuilts: ["hash_of_dev_null"], + apps: ["CtsShimAddApkToApex"], + installable: false, + updatable: false, +} diff --git a/tests/testdata/apkinapex/com.android.apex.product.test/Android.bp b/tests/testdata/apkinapex/com.android.apex.product.test/Android.bp index df7fc121..8765777f 100644 --- a/tests/testdata/apkinapex/com.android.apex.product.test/Android.bp +++ b/tests/testdata/apkinapex/com.android.apex.product.test/Android.bp @@ -30,7 +30,7 @@ android_app_certificate { apex { name: "com.android.apex.product.test", manifest: "manifest.json", - file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto + file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto key: "com.android.apex.product.test.key", updatable: false, apps: ["com.android.apex.product.app.test"], @@ -43,7 +43,7 @@ android_app { privileged: true, apex_available: [ "com.android.apex.product.test", - ] + ], } filegroup { diff --git a/tests/testdata/apkinapex/com.android.apex.system.test/Android.bp b/tests/testdata/apkinapex/com.android.apex.system.test/Android.bp index 72822702..7b88a5cf 100644 --- a/tests/testdata/apkinapex/com.android.apex.system.test/Android.bp +++ b/tests/testdata/apkinapex/com.android.apex.system.test/Android.bp @@ -30,7 +30,7 @@ android_app_certificate { apex { name: "com.android.apex.system.test", manifest: "manifest.json", - file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto + file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto key: "com.android.apex.system.test.key", updatable: false, apps: ["com.android.apex.system.app.test"], @@ -43,7 +43,7 @@ android_app { privileged: true, apex_available: [ "com.android.apex.system.test", - ] + ], } filegroup { diff --git a/tests/testdata/apkinapex/com.android.apex.system_ext.test/Android.bp b/tests/testdata/apkinapex/com.android.apex.system_ext.test/Android.bp index ebab4558..b328ba0a 100644 --- a/tests/testdata/apkinapex/com.android.apex.system_ext.test/Android.bp +++ b/tests/testdata/apkinapex/com.android.apex.system_ext.test/Android.bp @@ -30,7 +30,7 @@ android_app_certificate { apex { name: "com.android.apex.system_ext.test", manifest: "manifest.json", - file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto + file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto key: "com.android.apex.system_ext.test.key", updatable: false, apps: ["com.android.apex.system_ext.app.test"], @@ -43,7 +43,7 @@ android_app { privileged: true, apex_available: [ "com.android.apex.system_ext.test", - ] + ], } filegroup { diff --git a/tests/testdata/apkinapex/com.android.apex.vendor.test/Android.bp b/tests/testdata/apkinapex/com.android.apex.vendor.test/Android.bp index 8300d6f9..85eb7470 100644 --- a/tests/testdata/apkinapex/com.android.apex.vendor.test/Android.bp +++ b/tests/testdata/apkinapex/com.android.apex.vendor.test/Android.bp @@ -30,7 +30,7 @@ android_app_certificate { apex { name: "com.android.apex.vendor.test", manifest: "manifest.json", - file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto + file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto key: "com.android.apex.vendor.test.key", updatable: false, apps: ["com.android.apex.vendor.app.test"], @@ -43,7 +43,7 @@ android_app { privileged: true, apex_available: [ "com.android.apex.vendor.test", - ] + ], } filegroup { diff --git a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp index a54da039..29d15f00 100644 --- a/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp +++ b/tests/testdata/maxsdk/com.android.apex.maxsdk.test/Android.bp @@ -30,7 +30,7 @@ android_app_certificate { apex_test { name: "com.android.apex.maxsdk.test", manifest: "manifest.json", - file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto + file_contexts: ":apex.test-file_contexts", // Default, please edit, see go/android-apex-howto key: "com.android.apex.maxsdk.test.key", certificate: ":com.android.apex.maxsdk.test.certificate", updatable: false, @@ -48,7 +48,7 @@ android_app { sdk_version: "31", apex_available: [ "com.android.apex.maxsdk.test", - ] + ], } android_app { @@ -57,7 +57,7 @@ android_app { sdk_version: "31", apex_available: [ "com.android.apex.maxsdk.test", - ] + ], } android_app { @@ -66,5 +66,5 @@ android_app { sdk_version: "31", apex_available: [ "com.android.apex.maxsdk.test", - ] + ], } diff --git a/tests/testdata/sharedlibs/build/Android.bp b/tests/testdata/sharedlibs/build/Android.bp index 999024cd..f8fa184a 100644 --- a/tests/testdata/sharedlibs/build/Android.bp +++ b/tests/testdata/sharedlibs/build/Android.bp @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. - package { default_applicable_licenses: ["Android-Apache-2.0"], } @@ -21,7 +20,7 @@ cc_binary { name: "noop", srcs: ["noop.cc"], shared_libs: [ - "libsharedlibtest", + "libsharedlibtest", ], multilib: { lib32: { @@ -35,8 +34,8 @@ cc_binary { compile_multilib: "both", apex_available: [ - "com.android.apex.test.sharedlibs_stub", - "com.android.apex.test.sharedlibs_secondary_stub", + "com.android.apex.test.sharedlibs_stub", + "com.android.apex.test.sharedlibs_secondary_stub", ], } @@ -62,7 +61,7 @@ python_binary_host { cc_library_shared { name: "libsharedlibtest", - srcs: [ "sharedlibstest.cpp", ], + srcs: ["sharedlibstest.cpp"], local_include_dirs: [ "include", diff --git a/tests/testdata/sharedlibs/build/com.android.apex.test.bar/Android.bp b/tests/testdata/sharedlibs/build/com.android.apex.test.bar/Android.bp index 0c62e645..3fec14ba 100644 --- a/tests/testdata/sharedlibs/build/com.android.apex.test.bar/Android.bp +++ b/tests/testdata/sharedlibs/build/com.android.apex.test.bar/Android.bp @@ -32,7 +32,7 @@ apex { file_contexts: ":apex.test-file_contexts", key: "com.android.apex.test.bar.key", installable: false, - binaries: [ "bar_test" ], + binaries: ["bar_test"], dist: { targets: ["sharedlibs_test"], }, @@ -51,7 +51,7 @@ cc_binary { name: "bar_test", srcs: ["bar_test.cc"], shared_libs: [ - "libsharedlibtest", + "libsharedlibtest", ], multilib: { lib32: { @@ -64,7 +64,7 @@ cc_binary { compile_multilib: "both", - apex_available: [ "com.android.apex.test.bar" ], + apex_available: ["com.android.apex.test.bar"], } genrule { @@ -85,12 +85,12 @@ genrule { "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + - " --mode strip" + - " --key $(location com.android.apex.test.bar.pem)" + - " --input $(location :com.android.apex.test.bar)" + - " --output $(genDir)/com.android.apex.test.bar_stripped.apex" + - " --pk8key $(location com.android.apex.test.bar.pk8)" + - " --pubkey $(location com.android.apex.test.bar.avbpubkey)" + - " --x509key $(location com.android.apex.test.bar.x509.pem)" + - " --tmpdir $(genDir)", + " --mode strip" + + " --key $(location com.android.apex.test.bar.pem)" + + " --input $(location :com.android.apex.test.bar)" + + " --output $(genDir)/com.android.apex.test.bar_stripped.apex" + + " --pk8key $(location com.android.apex.test.bar.pk8)" + + " --pubkey $(location com.android.apex.test.bar.avbpubkey)" + + " --x509key $(location com.android.apex.test.bar.x509.pem)" + + " --tmpdir $(genDir)", } diff --git a/tests/testdata/sharedlibs/build/com.android.apex.test.baz/Android.bp b/tests/testdata/sharedlibs/build/com.android.apex.test.baz/Android.bp index 6076d71d..b32a6b97 100644 --- a/tests/testdata/sharedlibs/build/com.android.apex.test.baz/Android.bp +++ b/tests/testdata/sharedlibs/build/com.android.apex.test.baz/Android.bp @@ -32,7 +32,7 @@ apex { file_contexts: ":apex.test-file_contexts", key: "com.android.apex.test.baz.key", installable: false, - binaries: [ "baz_test" ], + binaries: ["baz_test"], dist: { targets: ["sharedlibs_test"], }, @@ -43,9 +43,9 @@ cc_binary { name: "baz_test", srcs: ["baz_test.cc"], shared_libs: [ - "libsharedlibtest", + "libsharedlibtest", ], - apex_available: [ "com.android.apex.test.baz" ], + apex_available: ["com.android.apex.test.baz"], } genrule { @@ -66,12 +66,12 @@ genrule { "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + - " --mode strip" + - " --key $(location com.android.apex.test.baz.pem)" + - " --input $(location :com.android.apex.test.baz)" + - " --output $(genDir)/com.android.apex.test.baz_stripped.apex" + - " --pk8key $(location com.android.apex.test.baz.pk8)" + - " --pubkey $(location com.android.apex.test.baz.avbpubkey)" + - " --x509key $(location com.android.apex.test.baz.x509.pem)" + - " --tmpdir $(genDir)", + " --mode strip" + + " --key $(location com.android.apex.test.baz.pem)" + + " --input $(location :com.android.apex.test.baz)" + + " --output $(genDir)/com.android.apex.test.baz_stripped.apex" + + " --pk8key $(location com.android.apex.test.baz.pk8)" + + " --pubkey $(location com.android.apex.test.baz.avbpubkey)" + + " --x509key $(location com.android.apex.test.baz.x509.pem)" + + " --tmpdir $(genDir)", } diff --git a/tests/testdata/sharedlibs/build/com.android.apex.test.foo/Android.bp b/tests/testdata/sharedlibs/build/com.android.apex.test.foo/Android.bp index 451f8a01..0c4e9522 100644 --- a/tests/testdata/sharedlibs/build/com.android.apex.test.foo/Android.bp +++ b/tests/testdata/sharedlibs/build/com.android.apex.test.foo/Android.bp @@ -32,7 +32,7 @@ apex { file_contexts: ":apex.test-file_contexts", key: "com.android.apex.test.foo.key", installable: false, - binaries: [ "foo_test" ], + binaries: ["foo_test"], dist: { targets: ["sharedlibs_test"], }, @@ -43,9 +43,9 @@ cc_binary { name: "foo_test", srcs: ["foo_test.cc"], shared_libs: [ - "libsharedlibtest", + "libsharedlibtest", ], - apex_available: [ "com.android.apex.test.foo" ], + apex_available: ["com.android.apex.test.foo"], } genrule { @@ -66,12 +66,12 @@ genrule { "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + - " --mode strip" + - " --key $(location com.android.apex.test.foo.pem)" + - " --input $(location :com.android.apex.test.foo)" + - " --output $(genDir)/com.android.apex.test.foo_stripped.apex" + - " --pk8key $(location com.android.apex.test.foo.pk8)" + - " --pubkey $(location com.android.apex.test.foo.avbpubkey)" + - " --x509key $(location com.android.apex.test.foo.x509.pem)" + - " --tmpdir $(genDir)", + " --mode strip" + + " --key $(location com.android.apex.test.foo.pem)" + + " --input $(location :com.android.apex.test.foo)" + + " --output $(genDir)/com.android.apex.test.foo_stripped.apex" + + " --pk8key $(location com.android.apex.test.foo.pk8)" + + " --pubkey $(location com.android.apex.test.foo.avbpubkey)" + + " --x509key $(location com.android.apex.test.foo.x509.pem)" + + " --tmpdir $(genDir)", } diff --git a/tests/testdata/sharedlibs/build/com.android.apex.test.pony/Android.bp b/tests/testdata/sharedlibs/build/com.android.apex.test.pony/Android.bp index 3dd0349e..14b15ead 100644 --- a/tests/testdata/sharedlibs/build/com.android.apex.test.pony/Android.bp +++ b/tests/testdata/sharedlibs/build/com.android.apex.test.pony/Android.bp @@ -32,7 +32,7 @@ apex { file_contexts: ":apex.test-file_contexts", key: "com.android.apex.test.pony.key", installable: false, - binaries: [ "pony_test" ], + binaries: ["pony_test"], dist: { targets: ["sharedlibs_test"], }, @@ -43,9 +43,9 @@ cc_binary { name: "pony_test", srcs: ["pony_test.cc"], shared_libs: [ - "libsharedlibtest", + "libsharedlibtest", ], - apex_available: [ "com.android.apex.test.pony" ], + apex_available: ["com.android.apex.test.pony"], } genrule { @@ -66,12 +66,12 @@ genrule { "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + - " --mode strip" + - " --key $(location com.android.apex.test.pony.pem)" + - " --input $(location :com.android.apex.test.pony)" + - " --output $(genDir)/com.android.apex.test.pony_stripped.apex" + - " --pk8key $(location com.android.apex.test.pony.pk8)" + - " --pubkey $(location com.android.apex.test.pony.avbpubkey)" + - " --x509key $(location com.android.apex.test.pony.x509.pem)" + - " --tmpdir $(genDir)", + " --mode strip" + + " --key $(location com.android.apex.test.pony.pem)" + + " --input $(location :com.android.apex.test.pony)" + + " --output $(genDir)/com.android.apex.test.pony_stripped.apex" + + " --pk8key $(location com.android.apex.test.pony.pk8)" + + " --pubkey $(location com.android.apex.test.pony.avbpubkey)" + + " --x509key $(location com.android.apex.test.pony.x509.pem)" + + " --tmpdir $(genDir)", } diff --git a/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs/Android.bp b/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs/Android.bp index 78816364..efea81f6 100644 --- a/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs/Android.bp +++ b/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs/Android.bp @@ -33,7 +33,7 @@ apex { key: "com.android.apex.test.sharedlibs.key", installable: false, // We want to force libc++.so to be available in this stub APEX, so put an empty binary. - binaries: [ "noop" ], + binaries: ["noop"], updatable: false, compile_multilib: "both", multilib: { @@ -63,12 +63,12 @@ genrule { "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + - " --mode sharedlibs" + - " --key $(location com.android.apex.test.sharedlibs.pem)" + - " --input $(location :com.android.apex.test.sharedlibs_stub)" + - " --output $(genDir)/com.android.apex.test.sharedlibs_generated.apex" + - " --pk8key $(location com.android.apex.test.sharedlibs.pk8)" + - " --pubkey $(location com.android.apex.test.sharedlibs.avbpubkey)" + - " --x509key $(location com.android.apex.test.sharedlibs.x509.pem)" + - " --tmpdir $(genDir)", + " --mode sharedlibs" + + " --key $(location com.android.apex.test.sharedlibs.pem)" + + " --input $(location :com.android.apex.test.sharedlibs_stub)" + + " --output $(genDir)/com.android.apex.test.sharedlibs_generated.apex" + + " --pk8key $(location com.android.apex.test.sharedlibs.pk8)" + + " --pubkey $(location com.android.apex.test.sharedlibs.avbpubkey)" + + " --x509key $(location com.android.apex.test.sharedlibs.x509.pem)" + + " --tmpdir $(genDir)", } diff --git a/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs_secondary/Android.bp b/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs_secondary/Android.bp index 9e803e32..0098a334 100644 --- a/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs_secondary/Android.bp +++ b/tests/testdata/sharedlibs/build/com.android.apex.test.sharedlibs_secondary/Android.bp @@ -33,7 +33,7 @@ apex { key: "com.android.apex.test.sharedlibs_secondary.key", installable: false, // We want to force libc++.so to be available in this stub APEX, so put an empty binary. - binaries: [ "noop" ], + binaries: ["noop"], updatable: false, } @@ -55,12 +55,12 @@ genrule { "shared_libs_repack", ], cmd: "$(location shared_libs_repack) " + - " --mode sharedlibs" + - " --key $(location com.android.apex.test.sharedlibs_secondary.pem)" + - " --input $(location :com.android.apex.test.sharedlibs_secondary_stub)" + - " --output $(genDir)/com.android.apex.test.sharedlibs_secondary_generated.apex" + - " --pk8key $(location com.android.apex.test.sharedlibs_secondary.pk8)" + - " --pubkey $(location com.android.apex.test.sharedlibs_secondary.avbpubkey)" + - " --x509key $(location com.android.apex.test.sharedlibs_secondary.x509.pem)" + - " --tmpdir $(genDir)", + " --mode sharedlibs" + + " --key $(location com.android.apex.test.sharedlibs_secondary.pem)" + + " --input $(location :com.android.apex.test.sharedlibs_secondary_stub)" + + " --output $(genDir)/com.android.apex.test.sharedlibs_secondary_generated.apex" + + " --pk8key $(location com.android.apex.test.sharedlibs_secondary.pk8)" + + " --pubkey $(location com.android.apex.test.sharedlibs_secondary.avbpubkey)" + + " --x509key $(location com.android.apex.test.sharedlibs_secondary.x509.pem)" + + " --tmpdir $(genDir)", } diff --git a/tests/testdata/sharedlibs/prebuilts/Android.bp b/tests/testdata/sharedlibs/prebuilts/Android.bp index 1ef2977e..55fc9523 100644 --- a/tests/testdata/sharedlibs/prebuilts/Android.bp +++ b/tests/testdata/sharedlibs/prebuilts/Android.bp @@ -21,281 +21,281 @@ package { } prebuilt_apex { - name: "com.android.apex.test.bar_stripped.v1.libvX_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.bar_stripped.v1.libvX.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.bar_stripped.v1.libvX.apex", - }, - x86: { - src: "x86/com.android.apex.test.bar_stripped.v1.libvX.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.bar_stripped.v1.libvX.apex", - }, - }, - filename: "com.android.apex.test.bar_stripped.v1.libvX.apex", - installable: false, + name: "com.android.apex.test.bar_stripped.v1.libvX_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.bar_stripped.v1.libvX.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.bar_stripped.v1.libvX.apex", + }, + x86: { + src: "x86/com.android.apex.test.bar_stripped.v1.libvX.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.bar_stripped.v1.libvX.apex", + }, + }, + filename: "com.android.apex.test.bar_stripped.v1.libvX.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.bar_stripped.v2.libvY_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.bar_stripped.v2.libvY.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.bar_stripped.v2.libvY.apex", - }, - x86: { - src: "x86/com.android.apex.test.bar_stripped.v2.libvY.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.bar_stripped.v2.libvY.apex", - }, - }, - filename: "com.android.apex.test.bar_stripped.v2.libvY.apex", - installable: false, + name: "com.android.apex.test.bar_stripped.v2.libvY_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.bar_stripped.v2.libvY.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.bar_stripped.v2.libvY.apex", + }, + x86: { + src: "x86/com.android.apex.test.bar_stripped.v2.libvY.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.bar_stripped.v2.libvY.apex", + }, + }, + filename: "com.android.apex.test.bar_stripped.v2.libvY.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.bar.v1.libvX_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.bar.v1.libvX.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.bar.v1.libvX.apex", - }, - x86: { - src: "x86/com.android.apex.test.bar.v1.libvX.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.bar.v1.libvX.apex", - }, - }, - filename: "com.android.apex.test.bar.v1.libvX.apex", - installable: false, + name: "com.android.apex.test.bar.v1.libvX_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.bar.v1.libvX.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.bar.v1.libvX.apex", + }, + x86: { + src: "x86/com.android.apex.test.bar.v1.libvX.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.bar.v1.libvX.apex", + }, + }, + filename: "com.android.apex.test.bar.v1.libvX.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.bar.v2.libvY_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.bar.v2.libvY.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.bar.v2.libvY.apex", - }, - x86: { - src: "x86/com.android.apex.test.bar.v2.libvY.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.bar.v2.libvY.apex", - }, - }, - filename: "com.android.apex.test.bar.v2.libvY.apex", - installable: false, + name: "com.android.apex.test.bar.v2.libvY_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.bar.v2.libvY.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.bar.v2.libvY.apex", + }, + x86: { + src: "x86/com.android.apex.test.bar.v2.libvY.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.bar.v2.libvY.apex", + }, + }, + filename: "com.android.apex.test.bar.v2.libvY.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.baz_stripped.v1.libvX_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.baz_stripped.v1.libvX.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.baz_stripped.v1.libvX.apex", - }, - x86: { - src: "x86/com.android.apex.test.baz_stripped.v1.libvX.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.baz_stripped.v1.libvX.apex", - }, - }, - filename: "com.android.apex.test.baz_stripped.v1.libvX.apex", - installable: false, + name: "com.android.apex.test.baz_stripped.v1.libvX_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.baz_stripped.v1.libvX.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.baz_stripped.v1.libvX.apex", + }, + x86: { + src: "x86/com.android.apex.test.baz_stripped.v1.libvX.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.baz_stripped.v1.libvX.apex", + }, + }, + filename: "com.android.apex.test.baz_stripped.v1.libvX.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.foo_stripped.v1.libvX_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.foo_stripped.v1.libvX.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.foo_stripped.v1.libvX.apex", - }, - x86: { - src: "x86/com.android.apex.test.foo_stripped.v1.libvX.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.foo_stripped.v1.libvX.apex", - }, - }, - filename: "com.android.apex.test.foo_stripped.v1.libvX.apex", - installable: false, + name: "com.android.apex.test.foo_stripped.v1.libvX_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.foo_stripped.v1.libvX.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.foo_stripped.v1.libvX.apex", + }, + x86: { + src: "x86/com.android.apex.test.foo_stripped.v1.libvX.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.foo_stripped.v1.libvX.apex", + }, + }, + filename: "com.android.apex.test.foo_stripped.v1.libvX.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.foo_stripped.v2.libvY_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.foo_stripped.v2.libvY.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.foo_stripped.v2.libvY.apex", - }, - x86: { - src: "x86/com.android.apex.test.foo_stripped.v2.libvY.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.foo_stripped.v2.libvY.apex", - }, - }, - filename: "com.android.apex.test.foo_stripped.v2.libvY.apex", - installable: false, + name: "com.android.apex.test.foo_stripped.v2.libvY_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.foo_stripped.v2.libvY.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.foo_stripped.v2.libvY.apex", + }, + x86: { + src: "x86/com.android.apex.test.foo_stripped.v2.libvY.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.foo_stripped.v2.libvY.apex", + }, + }, + filename: "com.android.apex.test.foo_stripped.v2.libvY.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.foo.v1.libvX_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.foo.v1.libvX.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.foo.v1.libvX.apex", - }, - x86: { - src: "x86/com.android.apex.test.foo.v1.libvX.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.foo.v1.libvX.apex", - }, - }, - filename: "com.android.apex.test.foo.v1.libvX.apex", - installable: false, + name: "com.android.apex.test.foo.v1.libvX_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.foo.v1.libvX.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.foo.v1.libvX.apex", + }, + x86: { + src: "x86/com.android.apex.test.foo.v1.libvX.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.foo.v1.libvX.apex", + }, + }, + filename: "com.android.apex.test.foo.v1.libvX.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.foo.v2.libvY_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.foo.v2.libvY.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.foo.v2.libvY.apex", - }, - x86: { - src: "x86/com.android.apex.test.foo.v2.libvY.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.foo.v2.libvY.apex", - }, - }, - filename: "com.android.apex.test.foo.v2.libvY.apex", - installable: false, + name: "com.android.apex.test.foo.v2.libvY_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.foo.v2.libvY.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.foo.v2.libvY.apex", + }, + x86: { + src: "x86/com.android.apex.test.foo.v2.libvY.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.foo.v2.libvY.apex", + }, + }, + filename: "com.android.apex.test.foo.v2.libvY.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.pony_stripped.v1.libvZ_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.pony_stripped.v1.libvZ.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.pony_stripped.v1.libvZ.apex", - }, - x86: { - src: "x86/com.android.apex.test.pony_stripped.v1.libvZ.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.pony_stripped.v1.libvZ.apex", - }, - }, - filename: "com.android.apex.test.pony_stripped.v1.libvZ.apex", - installable: false, + name: "com.android.apex.test.pony_stripped.v1.libvZ_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.pony_stripped.v1.libvZ.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.pony_stripped.v1.libvZ.apex", + }, + x86: { + src: "x86/com.android.apex.test.pony_stripped.v1.libvZ.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.pony_stripped.v1.libvZ.apex", + }, + }, + filename: "com.android.apex.test.pony_stripped.v1.libvZ.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.pony.v1.libvZ_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.pony.v1.libvZ.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.pony.v1.libvZ.apex", - }, - x86: { - src: "x86/com.android.apex.test.pony.v1.libvZ.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.pony.v1.libvZ.apex", - }, - }, - filename: "com.android.apex.test.pony.v1.libvZ.apex", - installable: false, + name: "com.android.apex.test.pony.v1.libvZ_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.pony.v1.libvZ.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.pony.v1.libvZ.apex", + }, + x86: { + src: "x86/com.android.apex.test.pony.v1.libvZ.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.pony.v1.libvZ.apex", + }, + }, + filename: "com.android.apex.test.pony.v1.libvZ.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", - }, - x86: { - src: "x86/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", - }, - }, - filename: "com.android.apex.test.sharedlibs_generated.v1.libvX.apex", - installable: false, + name: "com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", + }, + x86: { + src: "x86/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.sharedlibs_generated.v1.libvX.apex", + }, + }, + filename: "com.android.apex.test.sharedlibs_generated.v1.libvX.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", - }, - x86: { - src: "x86/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", - }, - }, - filename: "com.android.apex.test.sharedlibs_generated.v2.libvY.apex", - installable: false, + name: "com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", + }, + x86: { + src: "x86/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.sharedlibs_generated.v2.libvY.apex", + }, + }, + filename: "com.android.apex.test.sharedlibs_generated.v2.libvY.apex", + installable: false, } prebuilt_apex { - name: "com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ_prebuilt", - arch: { - arm: { - src: "arm/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", - }, - arm64: { - src: "arm64/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", - }, - x86: { - src: "x86/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", - }, - x86_64: { - src: "x86_64/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", - }, - }, - filename: "com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", - installable: false, + name: "com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ_prebuilt", + arch: { + arm: { + src: "arm/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", + }, + arm64: { + src: "arm64/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", + }, + x86: { + src: "x86/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", + }, + x86_64: { + src: "x86_64/com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", + }, + }, + filename: "com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ.apex", + installable: false, } |