1// Copyright (C) 2019 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 19python_binary_host { 20 name: "deapexer", 21 srcs: [ 22 "deapexer.py", 23 ], 24 version: { 25 py3: { 26 embedded_launcher: true, 27 }, 28 }, 29 libs: [ 30 "apex_manifest", 31 ], 32 required: [ 33 "blkid_static", 34 "debugfs_static", 35 "fsck.erofs", 36 ], 37} 38 39python_binary_host { 40 name: "apex_elf_checker", 41 srcs: [ 42 "apex_elf_checker.py", 43 ], 44 version: { 45 py3: { 46 embedded_launcher: true, 47 }, 48 }, 49 required: [ 50 "blkid_static", 51 "debugfs_static", 52 "fsck.erofs", 53 ], 54} 55 56python_binary_host { 57 name: "apex_compression_tool", 58 srcs: [ 59 "apex_compression_tool.py", 60 ], 61 version: { 62 py3: { 63 embedded_launcher: true, 64 }, 65 }, 66 libs: [ 67 "apex_manifest_proto", 68 ], 69 required: [ 70 "avbtool", 71 "conv_apex_manifest", 72 ], 73} 74 75python_test_host { 76 name: "apex_compression_test", 77 pkg_path: "apex_compression_test", 78 main: "apex_compression_test.py", 79 srcs: [ 80 "apex_compression_test.py", 81 ], 82 data: [ 83 ":avbtool", 84 ":conv_apex_manifest", 85 ":apex_compression_tool", 86 ":deapexer", 87 ":soong_zip", 88 ], 89 device_common_data: [ 90 ":com.android.example.apex", 91 ], 92 libs: [ 93 "apex_manifest_proto", 94 ], 95 test_suites: ["general-tests"], 96 test_options: { 97 unit_test: true, 98 }, 99 version: { 100 py3: { 101 embedded_launcher: true, 102 }, 103 }, 104} 105 106cc_binary_host { 107 name: "host_apex_verifier", 108 srcs: ["host_apex_verifier.cc"], 109 defaults: [ 110 "init_host_defaults", 111 "libapex-deps", 112 ], 113 shared_libs: [ 114 "libprocessgroup", 115 ], 116 static_libs: [ 117 "libapex", 118 "libinit_host", 119 ], 120} 121 122sh_test_host { 123 name: "host-apex-verifier", 124 src: "host-apex-verifier.sh", 125 test_suites: ["device-tests"], 126 test_config: "host-apex-verifier.xml", 127 test_options: { 128 unit_test: false, 129 }, 130 data_bins: [ 131 "deapexer", 132 "debugfs_static", 133 "fsck.erofs", 134 "host_apex_verifier", 135 ], 136 data_libs: [ 137 "libbase", 138 "libc++", 139 "libcrypto", 140 "libcutils", 141 "liblog", 142 "libpcre2", // used by libselinux 143 "libprocessgroup", 144 "libprotobuf-cpp-full", // used by libapex 145 "libprotobuf-cpp-lite", // used by libinit_host 146 "libselinux", // used by libapex 147 "libz", 148 "libziparchive", 149 ], 150} 151 152python_library_host { 153 name: "apexer_wrapper_utils", 154 srcs: ["apexer_wrapper_utils.py"], 155} 156 157python_binary_host { 158 name: "apexer_with_DCLA_preprocessing", 159 srcs: [ 160 "apexer_with_DCLA_preprocessing.py", 161 ], 162 version: { 163 py3: { 164 embedded_launcher: true, 165 }, 166 }, 167 libs: [ 168 "apexer_wrapper_utils", 169 ], 170} 171 172python_test_host { 173 name: "apexer_with_DCLA_preprocessing_test", 174 main: "apexer_with_DCLA_preprocessing_test.py", 175 srcs: [ 176 "apexer_with_DCLA_preprocessing_test.py", 177 ], 178 // Need to add a pkg_path because importlib.resources 179 // cannot load resources from the root package. 180 pkg_path: "apexer_with_DCLA_preprocessing_test", 181 data: [ 182 ":apexer_test_host_tools", 183 ":apexer_with_DCLA_preprocessing", 184 "testdata/com.android.example.apex.pem", 185 ], 186 device_common_data: [ 187 ":com.android.example.apex", 188 ], 189 test_suites: ["general-tests"], 190 test_options: { 191 unit_test: true, 192 }, 193 version: { 194 py3: { 195 embedded_launcher: true, 196 }, 197 }, 198} 199 200python_binary_host { 201 name: "apexer_with_trim_preprocessing", 202 srcs: [ 203 "apexer_with_trim_preprocessing.py", 204 ], 205 version: { 206 py3: { 207 embedded_launcher: true, 208 }, 209 }, 210 libs: [ 211 "apex_manifest_proto", 212 "apexer_wrapper_utils", 213 ], 214} 215 216python_binary_host { 217 name: "apexd_host", 218 srcs: ["apexd_host.py"], 219 version: { 220 py3: { 221 embedded_launcher: true, 222 }, 223 }, 224 libs: [ 225 "apex_manifest", 226 ], 227 required: [ 228 "deapexer", 229 "debugfs_static", 230 "fsck.erofs", 231 ], 232} 233