1// Copyright (C) 2020 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14package { 15 default_applicable_licenses: ["Android-Apache-2.0"], 16} 17 18apex_key { 19 name: "com.android.apex.test.sharedlibs_secondary.key", 20 public_key: "com.android.apex.test.sharedlibs_secondary.avbpubkey", 21 private_key: "com.android.apex.test.sharedlibs_secondary.pem", 22} 23 24android_app_certificate { 25 name: "com.android.apex.test.sharedlibs_secondary.certificate", 26 certificate: "com.android.apex.test.sharedlibs_secondary", 27} 28 29apex { 30 name: "com.android.apex.test.sharedlibs_secondary_stub", 31 manifest: "manifest.json", 32 file_contexts: ":apex.test-file_contexts", 33 key: "com.android.apex.test.sharedlibs_secondary.key", 34 installable: false, 35 // We want to force libc++.so to be available in this stub APEX, so put an empty binary. 36 binaries: ["noop"], 37 updatable: false, 38 // This test apex is used by shared_libs_repack, which works with only ext4. 39 payload_fs_type: "ext4", 40} 41 42java_genrule { 43 name: "com.android.apex.test.sharedlibs_secondary_generated", 44 out: ["com.android.apex.test.sharedlibs_secondary_generated.apex"], 45 defaults: ["apexer_test_host_tools_list"], 46 dist: { 47 targets: ["sharedlibs_test"], 48 }, 49 srcs: [ 50 ":com.android.apex.test.sharedlibs_secondary_stub", 51 "com.android.apex.test.sharedlibs_secondary.avbpubkey", 52 "com.android.apex.test.sharedlibs_secondary.pem", 53 "com.android.apex.test.sharedlibs_secondary.pk8", 54 "com.android.apex.test.sharedlibs_secondary.x509.pem", 55 ], 56 tools: [ 57 "shared_libs_repack", 58 ], 59 cmd: "$(location shared_libs_repack) " + 60 " --mode sharedlibs" + 61 " --key $(location com.android.apex.test.sharedlibs_secondary.pem)" + 62 " --input $(location :com.android.apex.test.sharedlibs_secondary_stub)" + 63 " --output $(genDir)/com.android.apex.test.sharedlibs_secondary_generated.apex" + 64 " --pk8key $(location com.android.apex.test.sharedlibs_secondary.pk8)" + 65 " --pubkey $(location com.android.apex.test.sharedlibs_secondary.avbpubkey)" + 66 " --x509key $(location com.android.apex.test.sharedlibs_secondary.x509.pem)" + 67 " --tmpdir $(genDir)", 68} 69