1// Copyright (C) 2022 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. 14 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19apex_key { 20 name: "com.android.apex.vendor.foo.key", 21 public_key: "com.android.apex.vendor.foo.avbpubkey", 22 private_key: "com.android.apex.vendor.foo.pem", 23} 24 25android_app_certificate { 26 name: "com.android.apex.vendor.foo.certificate", 27 certificate: "com.android.apex.vendor.foo", 28} 29 30apex_defaults { 31 name: "com.android.apex.vendor.foo.defaults", 32 manifest: "manifest_v1.json", 33 file_contexts: "file_contexts", 34 key: "com.android.apex.vendor.foo.key", 35 certificate: ":com.android.apex.vendor.foo.certificate", 36 vendor: true, 37 updatable: false, 38 installable: false, 39} 40 41apex { 42 name: "com.android.apex.vendor.foo", 43 defaults: [ 44 "com.android.apex.vendor.foo.defaults", 45 ], 46} 47 48apex { 49 name: "com.android.apex.vendor.foo.v2", 50 defaults: [ 51 "com.android.apex.vendor.foo.defaults", 52 ], 53 manifest: "manifest_v2.json", 54} 55 56apex { 57 name: "com.android.apex.vendor.foo.v2_with_requireNativeLibs", 58 defaults: [ 59 "com.android.apex.vendor.foo.defaults", 60 ], 61 manifest: "manifest_v2.json", 62 binaries: [ 63 "apex_vendor_foo_test_binary", 64 ], 65} 66 67cc_binary { 68 name: "apex_vendor_foo_test_binary", 69 shared_libs: [ 70 "libbinder_ndk", // will add "requireNativeLibs" 71 ], 72 srcs: [ 73 "apex_vendor_foo_test_binary.cpp", 74 ], 75 vendor: true, 76 installable: false, 77} 78 79apex { 80 name: "com.android.apex.vendor.foo.apex.all.ready", 81 defaults: [ 82 "com.android.apex.vendor.foo.defaults", 83 ], 84 prebuilts: [ 85 "foo.apex.all.ready.rc", 86 ], 87} 88 89prebuilt_etc { 90 name: "foo.apex.all.ready.rc", 91 src: "foo.apex.all.ready.rc", 92} 93 94// Runs forever like /bin/yes 95cc_binary { 96 name: "apex_vendor_foo", 97 srcs: [ 98 "apex_vendor_foo.cpp", 99 ], 100 vendor: true, 101 installable: false, 102} 103 104prebuilt_etc { 105 name: "apex_vendor_foo_v1.rc", 106 src: "apex_vendor_foo_v1.rc", 107} 108 109prebuilt_etc { 110 name: "apex_vendor_foo_v2.rc", 111 src: "apex_vendor_foo_v2.rc", 112} 113 114prebuilt_etc { 115 name: "apex_vendor_foo_v2_vintf", 116 src: "apex_vendor_foo_v2.xml", 117 relative_install_path: "vintf", 118 installable: false, 119} 120 121apex { 122 name: "com.android.apex.vendor.foo.v1_with_service", 123 defaults: [ 124 "com.android.apex.vendor.foo.defaults", 125 ], 126 manifest: "manifest_v1.json", 127 binaries: [ 128 "apex_vendor_foo", 129 ], 130 prebuilts: [ 131 "apex_vendor_foo_v1.rc", 132 ], 133} 134 135apex { 136 name: "com.android.apex.vendor.foo.v2_with_service", 137 defaults: [ 138 "com.android.apex.vendor.foo.defaults", 139 ], 140 manifest: "manifest_v2.json", 141 binaries: [ 142 "apex_vendor_foo", 143 ], 144 prebuilts: [ 145 "apex_vendor_foo_v2.rc", 146 ], 147} 148 149apex { 150 name: "com.android.apex.vendor.foo.v2_with_wrong_vndk_version", 151 defaults: [ 152 "com.android.apex.vendor.foo.defaults", 153 ], 154 manifest: ":manifest_v2_with_wrong_vndk_version.json", 155} 156 157genrule { 158 name: "manifest_v2_with_wrong_vndk_version.json", 159 out: ["manifest_v2_with_wrong_vndk_version.json"], 160 srcs: ["manifest_v2.json"], 161 tools: ["jsonmodify"], 162 cmd: "$(location jsonmodify) -v vndkVersion WrongVndkVersion $(in) -o $(out)", 163} 164 165apex { 166 name: "com.android.apex.vendor.foo.with_vintf", 167 defaults: [ 168 "com.android.apex.vendor.foo.defaults", 169 ], 170 manifest: "manifest_v2.json", 171 binaries: [ 172 "apex_vendor_foo", 173 ], 174 prebuilts: [ 175 "apex_vendor_foo_v2.rc", 176 "apex_vendor_foo_v2_vintf", 177 ], 178} 179