1*33f37583SAndroid Build Coastguard Worker// Copyright (C) 2018 The Android Open Source Project 2*33f37583SAndroid Build Coastguard Worker// 3*33f37583SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*33f37583SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*33f37583SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*33f37583SAndroid Build Coastguard Worker// 7*33f37583SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*33f37583SAndroid Build Coastguard Worker// 9*33f37583SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*33f37583SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*33f37583SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*33f37583SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*33f37583SAndroid Build Coastguard Worker// limitations under the License. 14*33f37583SAndroid Build Coastguard Worker 15*33f37583SAndroid Build Coastguard Worker// These apex definitions will generate the prebuilt test data. The modules 16*33f37583SAndroid Build Coastguard Worker// are disabled so as not to pollute the build. 17*33f37583SAndroid Build Coastguard Worker 18*33f37583SAndroid Build Coastguard Workerpackage { 19*33f37583SAndroid Build Coastguard Worker default_applicable_licenses: ["Android-Apache-2.0"], 20*33f37583SAndroid Build Coastguard Worker} 21*33f37583SAndroid Build Coastguard Worker 22*33f37583SAndroid Build Coastguard Workerapex_key { 23*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.test_package.key", 24*33f37583SAndroid Build Coastguard Worker public_key: "com.android.apex.test_package.avbpubkey", 25*33f37583SAndroid Build Coastguard Worker private_key: "com.android.apex.test_package.pem", 26*33f37583SAndroid Build Coastguard Worker installable: false, 27*33f37583SAndroid Build Coastguard Worker} 28*33f37583SAndroid Build Coastguard Worker 29*33f37583SAndroid Build Coastguard Workerapex_key { 30*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.brand.new.key", 31*33f37583SAndroid Build Coastguard Worker public_key: "com.android.apex.brand.new.avbpubkey", 32*33f37583SAndroid Build Coastguard Worker private_key: "com.android.apex.brand.new.pem", 33*33f37583SAndroid Build Coastguard Worker installable: false, 34*33f37583SAndroid Build Coastguard Worker} 35*33f37583SAndroid Build Coastguard Worker 36*33f37583SAndroid Build Coastguard Workerapex_key { 37*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.brand.new.another.key", 38*33f37583SAndroid Build Coastguard Worker public_key: "com.android.apex.brand.new.another.avbpubkey", 39*33f37583SAndroid Build Coastguard Worker private_key: "com.android.apex.brand.new.another.pem", 40*33f37583SAndroid Build Coastguard Worker installable: false, 41*33f37583SAndroid Build Coastguard Worker} 42*33f37583SAndroid Build Coastguard Worker 43*33f37583SAndroid Build Coastguard Workerapex_key { 44*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed.key", 45*33f37583SAndroid Build Coastguard Worker public_key: "com.android.apex.compressed.avbpubkey", 46*33f37583SAndroid Build Coastguard Worker private_key: "com.android.apex.compressed.pem", 47*33f37583SAndroid Build Coastguard Worker installable: false, 48*33f37583SAndroid Build Coastguard Worker} 49*33f37583SAndroid Build Coastguard Worker 50*33f37583SAndroid Build Coastguard Workerapex { 51*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test", 52*33f37583SAndroid Build Coastguard Worker manifest: "manifest.json", 53*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 54*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 55*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 56*33f37583SAndroid Build Coastguard Worker installable: false, 57*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // test requires hashtree to be present. 58*33f37583SAndroid Build Coastguard Worker} 59*33f37583SAndroid Build Coastguard Worker 60*33f37583SAndroid Build Coastguard Workerapex { 61*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_bootstrap_test", 62*33f37583SAndroid Build Coastguard Worker manifest: "manifest_bootstrap.json", 63*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 64*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 65*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 66*33f37583SAndroid Build Coastguard Worker installable: false, 67*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // test requires hashtree to be present. 68*33f37583SAndroid Build Coastguard Worker} 69*33f37583SAndroid Build Coastguard Worker 70*33f37583SAndroid Build Coastguard Workerapex { 71*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed.v1", 72*33f37583SAndroid Build Coastguard Worker manifest: "manifest_compressed.json", 73*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 74*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 75*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.compressed.key", 76*33f37583SAndroid Build Coastguard Worker installable: false, 77*33f37583SAndroid Build Coastguard Worker test_only_force_compression: true, 78*33f37583SAndroid Build Coastguard Worker updatable: false, 79*33f37583SAndroid Build Coastguard Worker} 80*33f37583SAndroid Build Coastguard Worker 81*33f37583SAndroid Build Coastguard Workerapex { 82*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed.v1_different_digest", 83*33f37583SAndroid Build Coastguard Worker manifest: "manifest_compressed.json", 84*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 85*33f37583SAndroid Build Coastguard Worker prebuilts: ["hash_of_dev_null"], 86*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.compressed.key", 87*33f37583SAndroid Build Coastguard Worker installable: false, 88*33f37583SAndroid Build Coastguard Worker test_only_force_compression: true, 89*33f37583SAndroid Build Coastguard Worker updatable: false, 90*33f37583SAndroid Build Coastguard Worker} 91*33f37583SAndroid Build Coastguard Worker 92*33f37583SAndroid Build Coastguard Workerapex { 93*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.brand.new", 94*33f37583SAndroid Build Coastguard Worker manifest: "manifest_brand_new.json", 95*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 96*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 97*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.brand.new.key", 98*33f37583SAndroid Build Coastguard Worker installable: false, 99*33f37583SAndroid Build Coastguard Worker min_sdk_version: "34", 100*33f37583SAndroid Build Coastguard Worker} 101*33f37583SAndroid Build Coastguard Worker 102*33f37583SAndroid Build Coastguard Workerapex { 103*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.brand.new.v2", 104*33f37583SAndroid Build Coastguard Worker manifest: "manifest_brand_new_v2.json", 105*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 106*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 107*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.brand.new.key", 108*33f37583SAndroid Build Coastguard Worker installable: false, 109*33f37583SAndroid Build Coastguard Worker min_sdk_version: "34", 110*33f37583SAndroid Build Coastguard Worker} 111*33f37583SAndroid Build Coastguard Worker 112*33f37583SAndroid Build Coastguard Workerapex { 113*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.brand.new.v2.diffkey", 114*33f37583SAndroid Build Coastguard Worker manifest: "manifest_brand_new_v2.json", 115*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 116*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 117*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.brand.new.another.key", 118*33f37583SAndroid Build Coastguard Worker installable: false, 119*33f37583SAndroid Build Coastguard Worker min_sdk_version: "34", 120*33f37583SAndroid Build Coastguard Worker} 121*33f37583SAndroid Build Coastguard Worker 122*33f37583SAndroid Build Coastguard Workerjava_genrule { 123*33f37583SAndroid Build Coastguard Worker // Generates an apex which has a different public key outside the filesystem image 124*33f37583SAndroid Build Coastguard Worker name: "gen_key_mismatch_with_image_apex", 125*33f37583SAndroid Build Coastguard Worker out: ["apex.apexd_test_wrong_public_key.apex"], 126*33f37583SAndroid Build Coastguard Worker srcs: [":apex.apexd_test"], 127*33f37583SAndroid Build Coastguard Worker tools: [ 128*33f37583SAndroid Build Coastguard Worker "soong_zip", 129*33f37583SAndroid Build Coastguard Worker "zipalign", 130*33f37583SAndroid Build Coastguard Worker ], 131*33f37583SAndroid Build Coastguard Worker cmd: "unzip -q $(in) -d $(genDir) && " + // unzip input 132*33f37583SAndroid Build Coastguard Worker "echo 'different-key' >> $(genDir)/apex_pubkey && " + // modify the public key 133*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 134*33f37583SAndroid Build Coastguard Worker "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 135*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/unaligned.apex && " + 136*33f37583SAndroid Build Coastguard Worker "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 137*33f37583SAndroid Build Coastguard Worker "$(genDir)/apex.apexd_test_wrong_public_key.apex", 138*33f37583SAndroid Build Coastguard Worker} 139*33f37583SAndroid Build Coastguard Worker 140*33f37583SAndroid Build Coastguard Workerjava_genrule { 141*33f37583SAndroid Build Coastguard Worker // Generates a compressed apex which doesn't have an original_apex file in it 142*33f37583SAndroid Build Coastguard Worker name: "gen_capex_without_apex", 143*33f37583SAndroid Build Coastguard Worker out: ["com.android.apex.compressed.v1_without_apex.capex"], 144*33f37583SAndroid Build Coastguard Worker srcs: [":com.android.apex.compressed.v1"], 145*33f37583SAndroid Build Coastguard Worker tools: ["soong_zip"], 146*33f37583SAndroid Build Coastguard Worker cmd: "unzip -q $(in) -d $(genDir) && rm $(genDir)/original_apex && " + 147*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + 148*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/com.android.apex.compressed.v1_without_apex.capex", 149*33f37583SAndroid Build Coastguard Worker} 150*33f37583SAndroid Build Coastguard Worker 151*33f37583SAndroid Build Coastguard Workerjava_genrule { 152*33f37583SAndroid Build Coastguard Worker // Generates a compressed apex which has different version of original_apex in it 153*33f37583SAndroid Build Coastguard Worker name: "gen_capex_with_v2_apex", 154*33f37583SAndroid Build Coastguard Worker out: ["com.android.apex.compressed.v1_with_v2_apex.capex"], 155*33f37583SAndroid Build Coastguard Worker srcs: [":com.android.apex.compressed.v2"], 156*33f37583SAndroid Build Coastguard Worker tools: [ 157*33f37583SAndroid Build Coastguard Worker "soong_zip", 158*33f37583SAndroid Build Coastguard Worker "conv_apex_manifest", 159*33f37583SAndroid Build Coastguard Worker ], 160*33f37583SAndroid Build Coastguard Worker cmd: "unzip -q $(in) -d $(genDir) && " + 161*33f37583SAndroid Build Coastguard Worker "$(location conv_apex_manifest) setprop version 1 $(genDir)/apex_manifest.pb && " + 162*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + 163*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/com.android.apex.compressed.v1_with_v2_apex.capex", 164*33f37583SAndroid Build Coastguard Worker} 165*33f37583SAndroid Build Coastguard Worker 166*33f37583SAndroid Build Coastguard Workerjava_genrule { 167*33f37583SAndroid Build Coastguard Worker // Generates a compressed apex which can be opened but not decompressed 168*33f37583SAndroid Build Coastguard Worker name: "gen_capex_not_decompressible", 169*33f37583SAndroid Build Coastguard Worker out: ["com.android.apex.compressed.v1_not_decompressible.capex"], 170*33f37583SAndroid Build Coastguard Worker srcs: [":com.android.apex.compressed.v1"], 171*33f37583SAndroid Build Coastguard Worker tools: [ 172*33f37583SAndroid Build Coastguard Worker "soong_zip", 173*33f37583SAndroid Build Coastguard Worker "conv_apex_manifest", 174*33f37583SAndroid Build Coastguard Worker ], 175*33f37583SAndroid Build Coastguard Worker cmd: "unzip -q $(in) -d $(genDir) && echo '' > $(genDir)/original_apex && " + 176*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + 177*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/com.android.apex.compressed.v1_not_decompressible.capex", 178*33f37583SAndroid Build Coastguard Worker} 179*33f37583SAndroid Build Coastguard Worker 180*33f37583SAndroid Build Coastguard Workerjava_genrule { 181*33f37583SAndroid Build Coastguard Worker // Generates a capex which has same module name as com.android.apex.compressed, but 182*33f37583SAndroid Build Coastguard Worker // is contains a different public key. 183*33f37583SAndroid Build Coastguard Worker name: "gen_key_mismatch_capex", 184*33f37583SAndroid Build Coastguard Worker out: ["com.android.apex.compressed_different_key.capex"], 185*33f37583SAndroid Build Coastguard Worker srcs: [":apex.apexd_test_no_inst_key"], 186*33f37583SAndroid Build Coastguard Worker tools: [ 187*33f37583SAndroid Build Coastguard Worker "soong_zip", 188*33f37583SAndroid Build Coastguard Worker "zipalign", 189*33f37583SAndroid Build Coastguard Worker "conv_apex_manifest", 190*33f37583SAndroid Build Coastguard Worker "apex_compression_tool", 191*33f37583SAndroid Build Coastguard Worker "avbtool", 192*33f37583SAndroid Build Coastguard Worker ], 193*33f37583SAndroid Build Coastguard Worker cmd: "mkdir $(genDir)/tempdir && unzip -q $(in) -d $(genDir)/tempdir && " + 194*33f37583SAndroid Build Coastguard Worker "$(location conv_apex_manifest) setprop name com.android.apex.compressed $(genDir)/tempdir/apex_manifest.pb && " + 195*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir)/tempdir -D $(genDir)/tempdir " + 196*33f37583SAndroid Build Coastguard Worker "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 197*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/unaligned.apex && " + 198*33f37583SAndroid Build Coastguard Worker "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 199*33f37583SAndroid Build Coastguard Worker "$(genDir)/com.android.apex.compressed_different_key.apex && " + 200*33f37583SAndroid Build Coastguard Worker "HOST_OUT_BIN=$$(dirname $(location apex_compression_tool)) && " + 201*33f37583SAndroid Build Coastguard Worker "$(location apex_compression_tool) compress " + 202*33f37583SAndroid Build Coastguard Worker "--apex_compression_tool_path=\"$$HOST_OUT_BIN\" " + 203*33f37583SAndroid Build Coastguard Worker "--input=$(genDir)/com.android.apex.compressed_different_key.apex " + 204*33f37583SAndroid Build Coastguard Worker "--output=$(genDir)/com.android.apex.compressed_different_key.capex", 205*33f37583SAndroid Build Coastguard Worker} 206*33f37583SAndroid Build Coastguard Worker 207*33f37583SAndroid Build Coastguard Workerjava_genrule { 208*33f37583SAndroid Build Coastguard Worker // Generates a capex which has a different public key than original_apex 209*33f37583SAndroid Build Coastguard Worker name: "gen_key_mismatch_with_original_capex", 210*33f37583SAndroid Build Coastguard Worker out: ["com.android.apex.compressed_key_mismatch_with_original.capex"], 211*33f37583SAndroid Build Coastguard Worker srcs: [":com.android.apex.compressed.v1"], 212*33f37583SAndroid Build Coastguard Worker tools: ["soong_zip"], 213*33f37583SAndroid Build Coastguard Worker cmd: "unzip -q $(in) -d $(genDir) && " + // unzip input 214*33f37583SAndroid Build Coastguard Worker "echo 'different-key' >> $(genDir)/apex_pubkey && " + // modify the public key 215*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir) -D $(genDir) -L 9 " + // repack the compressed APEX 216*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/com.android.apex.compressed_key_mismatch_with_original.capex", 217*33f37583SAndroid Build Coastguard Worker} 218*33f37583SAndroid Build Coastguard Worker 219*33f37583SAndroid Build Coastguard Workerjava_genrule { 220*33f37583SAndroid Build Coastguard Worker // Generates an apex which has a different manifest outside the filesystem 221*33f37583SAndroid Build Coastguard Worker // image. 222*33f37583SAndroid Build Coastguard Worker name: "gen_manifest_mismatch_compressed_apex_v2", 223*33f37583SAndroid Build Coastguard Worker out: ["com.android.apex.compressed.v2_manifest_mismatch.apex"], 224*33f37583SAndroid Build Coastguard Worker srcs: [":com.android.apex.compressed.v2_original"], 225*33f37583SAndroid Build Coastguard Worker tools: [ 226*33f37583SAndroid Build Coastguard Worker "soong_zip", 227*33f37583SAndroid Build Coastguard Worker "zipalign", 228*33f37583SAndroid Build Coastguard Worker "conv_apex_manifest", 229*33f37583SAndroid Build Coastguard Worker ], 230*33f37583SAndroid Build Coastguard Worker cmd: "unzip -q $(in) -d $(genDir) && " + 231*33f37583SAndroid Build Coastguard Worker "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + 232*33f37583SAndroid Build Coastguard Worker "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 233*33f37583SAndroid Build Coastguard Worker "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 234*33f37583SAndroid Build Coastguard Worker "-o $(genDir)/unaligned.apex && " + 235*33f37583SAndroid Build Coastguard Worker "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 236*33f37583SAndroid Build Coastguard Worker "$(genDir)/com.android.apex.compressed.v2_manifest_mismatch.apex", 237*33f37583SAndroid Build Coastguard Worker} 238*33f37583SAndroid Build Coastguard Worker 239*33f37583SAndroid Build Coastguard Workerapex { 240*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed.v1_different_digest_original", 241*33f37583SAndroid Build Coastguard Worker manifest: "manifest_compressed.json", 242*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 243*33f37583SAndroid Build Coastguard Worker prebuilts: ["hash_of_dev_null"], 244*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.compressed.key", 245*33f37583SAndroid Build Coastguard Worker installable: false, 246*33f37583SAndroid Build Coastguard Worker compressible: false, 247*33f37583SAndroid Build Coastguard Worker updatable: false, 248*33f37583SAndroid Build Coastguard Worker} 249*33f37583SAndroid Build Coastguard Worker 250*33f37583SAndroid Build Coastguard Workerapex { 251*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed.v2", 252*33f37583SAndroid Build Coastguard Worker manifest: "manifest_compressed_v2.json", 253*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 254*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 255*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.compressed.key", 256*33f37583SAndroid Build Coastguard Worker installable: false, 257*33f37583SAndroid Build Coastguard Worker test_only_force_compression: true, 258*33f37583SAndroid Build Coastguard Worker updatable: false, 259*33f37583SAndroid Build Coastguard Worker} 260*33f37583SAndroid Build Coastguard Worker 261*33f37583SAndroid Build Coastguard Workerapex { 262*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed.v2_original", 263*33f37583SAndroid Build Coastguard Worker manifest: "manifest_compressed_v2.json", 264*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 265*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 266*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.compressed.key", 267*33f37583SAndroid Build Coastguard Worker installable: false, 268*33f37583SAndroid Build Coastguard Worker compressible: false, 269*33f37583SAndroid Build Coastguard Worker updatable: false, 270*33f37583SAndroid Build Coastguard Worker} 271*33f37583SAndroid Build Coastguard Worker 272*33f37583SAndroid Build Coastguard Workerapex { 273*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_f2fs", 274*33f37583SAndroid Build Coastguard Worker manifest: "manifest.json", 275*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 276*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 277*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 278*33f37583SAndroid Build Coastguard Worker installable: false, 279*33f37583SAndroid Build Coastguard Worker min_sdk_version: "current", 280*33f37583SAndroid Build Coastguard Worker payload_fs_type: "f2fs", 281*33f37583SAndroid Build Coastguard Worker updatable: false, 282*33f37583SAndroid Build Coastguard Worker} 283*33f37583SAndroid Build Coastguard Worker 284*33f37583SAndroid Build Coastguard Workerapex { 285*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_erofs", 286*33f37583SAndroid Build Coastguard Worker manifest: "manifest.json", 287*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 288*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 289*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 290*33f37583SAndroid Build Coastguard Worker installable: false, 291*33f37583SAndroid Build Coastguard Worker min_sdk_version: "current", 292*33f37583SAndroid Build Coastguard Worker payload_fs_type: "erofs", 293*33f37583SAndroid Build Coastguard Worker updatable: false, 294*33f37583SAndroid Build Coastguard Worker} 295*33f37583SAndroid Build Coastguard Worker 296*33f37583SAndroid Build Coastguard Workerapex { 297*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_v2", 298*33f37583SAndroid Build Coastguard Worker manifest: "manifest_v2.json", 299*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 300*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 301*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 302*33f37583SAndroid Build Coastguard Worker installable: false, 303*33f37583SAndroid Build Coastguard Worker updatable: false, 304*33f37583SAndroid Build Coastguard Worker} 305*33f37583SAndroid Build Coastguard Worker 306*33f37583SAndroid Build Coastguard Workerapex { 307*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_v2_legacy", 308*33f37583SAndroid Build Coastguard Worker manifest: "manifest_v2.json", 309*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 310*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 311*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 312*33f37583SAndroid Build Coastguard Worker installable: false, 313*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // add apex_manifest.json as well 314*33f37583SAndroid Build Coastguard Worker} 315*33f37583SAndroid Build Coastguard Worker 316*33f37583SAndroid Build Coastguard Workerjava_genrule { 317*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_v2_no_pb", 318*33f37583SAndroid Build Coastguard Worker srcs: [":apex.apexd_test_v2_legacy"], 319*33f37583SAndroid Build Coastguard Worker out: ["apex.apexd_test_v2_no_pb.apex"], 320*33f37583SAndroid Build Coastguard Worker tools: ["zip2zip"], 321*33f37583SAndroid Build Coastguard Worker cmd: "$(location zip2zip) -i $(in) -x apex_manifest.pb -o $(out)", // remove apex_manifest.pb 322*33f37583SAndroid Build Coastguard Worker} 323*33f37583SAndroid Build Coastguard Worker 324*33f37583SAndroid Build Coastguard Workerapex { 325*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_v3", 326*33f37583SAndroid Build Coastguard Worker manifest: "manifest_v3.json", 327*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 328*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 329*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 330*33f37583SAndroid Build Coastguard Worker installable: false, 331*33f37583SAndroid Build Coastguard Worker updatable: false, 332*33f37583SAndroid Build Coastguard Worker} 333*33f37583SAndroid Build Coastguard Worker 334*33f37583SAndroid Build Coastguard Workerapex_key { 335*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.test_package.no_inst_key.key", 336*33f37583SAndroid Build Coastguard Worker public_key: "com.android.apex.test_package.no_inst_key.avbpubkey", 337*33f37583SAndroid Build Coastguard Worker private_key: "com.android.apex.test_package.no_inst_key.pem", 338*33f37583SAndroid Build Coastguard Worker installable: true, // set to true to prevent bundling into the APEX 339*33f37583SAndroid Build Coastguard Worker} 340*33f37583SAndroid Build Coastguard Worker 341*33f37583SAndroid Build Coastguard Workerapex { 342*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_no_inst_key", 343*33f37583SAndroid Build Coastguard Worker manifest: "manifest_no_inst_key.json", 344*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 345*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 346*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.no_inst_key.key", 347*33f37583SAndroid Build Coastguard Worker installable: false, 348*33f37583SAndroid Build Coastguard Worker updatable: false, 349*33f37583SAndroid Build Coastguard Worker} 350*33f37583SAndroid Build Coastguard Worker 351*33f37583SAndroid Build Coastguard Workerapex { 352*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_f2fs_no_inst_key", 353*33f37583SAndroid Build Coastguard Worker manifest: "manifest_no_inst_key.json", 354*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 355*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 356*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.no_inst_key.key", 357*33f37583SAndroid Build Coastguard Worker installable: false, 358*33f37583SAndroid Build Coastguard Worker payload_fs_type: "f2fs", 359*33f37583SAndroid Build Coastguard Worker updatable: false, 360*33f37583SAndroid Build Coastguard Worker} 361*33f37583SAndroid Build Coastguard Worker 362*33f37583SAndroid Build Coastguard Workerapex { 363*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_erofs_no_inst_key", 364*33f37583SAndroid Build Coastguard Worker manifest: "manifest_no_inst_key.json", 365*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 366*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 367*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.no_inst_key.key", 368*33f37583SAndroid Build Coastguard Worker installable: false, 369*33f37583SAndroid Build Coastguard Worker payload_fs_type: "erofs", 370*33f37583SAndroid Build Coastguard Worker updatable: false, 371*33f37583SAndroid Build Coastguard Worker} 372*33f37583SAndroid Build Coastguard Worker 373*33f37583SAndroid Build Coastguard Workerapex_key { 374*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.test_package_2.key", 375*33f37583SAndroid Build Coastguard Worker public_key: "com.android.apex.test_package_2.avbpubkey", 376*33f37583SAndroid Build Coastguard Worker private_key: "com.android.apex.test_package_2.pem", 377*33f37583SAndroid Build Coastguard Worker installable: false, 378*33f37583SAndroid Build Coastguard Worker} 379*33f37583SAndroid Build Coastguard Worker 380*33f37583SAndroid Build Coastguard Workerapex { 381*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_different_app", 382*33f37583SAndroid Build Coastguard Worker manifest: "manifest_different_app.json", 383*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 384*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 385*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package_2.key", 386*33f37583SAndroid Build Coastguard Worker installable: false, 387*33f37583SAndroid Build Coastguard Worker updatable: false, 388*33f37583SAndroid Build Coastguard Worker} 389*33f37583SAndroid Build Coastguard Worker 390*33f37583SAndroid Build Coastguard Workerapex { 391*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_nocode", 392*33f37583SAndroid Build Coastguard Worker manifest: "manifest_nocode.json", 393*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 394*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 395*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 396*33f37583SAndroid Build Coastguard Worker installable: false, 397*33f37583SAndroid Build Coastguard Worker updatable: false, 398*33f37583SAndroid Build Coastguard Worker} 399*33f37583SAndroid Build Coastguard Worker 400*33f37583SAndroid Build Coastguard Workerprebuilt_etc { 401*33f37583SAndroid Build Coastguard Worker name: "another_prebuilt_file", 402*33f37583SAndroid Build Coastguard Worker src: "another_prebuilt_file", 403*33f37583SAndroid Build Coastguard Worker} 404*33f37583SAndroid Build Coastguard Worker 405*33f37583SAndroid Build Coastguard Workerprebuilt_apex { 406*33f37583SAndroid Build Coastguard Worker name: "apex.corrupted_b146895998", 407*33f37583SAndroid Build Coastguard Worker src: "corrupted_b146895998.apex", 408*33f37583SAndroid Build Coastguard Worker filename: "corrupted_b146895998.apex", 409*33f37583SAndroid Build Coastguard Worker installable: false, 410*33f37583SAndroid Build Coastguard Worker} 411*33f37583SAndroid Build Coastguard Worker 412*33f37583SAndroid Build Coastguard Worker// APEX for banned name test cannot be generated at build time. 413*33f37583SAndroid Build Coastguard Worker// This file can be generated manually by creating new apex target 414*33f37583SAndroid Build Coastguard Worker// with manifest name 'sharedlibs', and modify aapt2 to skip validating 415*33f37583SAndroid Build Coastguard Worker// package name from aapt::util::IsAndroidPackageName(). 416*33f37583SAndroid Build Coastguard Workerprebuilt_apex { 417*33f37583SAndroid Build Coastguard Worker name: "apex.banned_name", 418*33f37583SAndroid Build Coastguard Worker src: "sharedlibs.apex", 419*33f37583SAndroid Build Coastguard Worker filename: "sharedlibs.apex", 420*33f37583SAndroid Build Coastguard Worker installable: false, 421*33f37583SAndroid Build Coastguard Worker} 422*33f37583SAndroid Build Coastguard Worker 423*33f37583SAndroid Build Coastguard Worker// A compressed apex that also provides shared libs. 424*33f37583SAndroid Build Coastguard Worker// Should be declined by ApexFile::Open. 425*33f37583SAndroid Build Coastguard Workerapex { 426*33f37583SAndroid Build Coastguard Worker name: "com.android.apex.compressed_sharedlibs", 427*33f37583SAndroid Build Coastguard Worker manifest: "manifest_compressed_sharedlibs.json", 428*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 429*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 430*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.compressed.key", 431*33f37583SAndroid Build Coastguard Worker installable: false, 432*33f37583SAndroid Build Coastguard Worker test_only_force_compression: true, 433*33f37583SAndroid Build Coastguard Worker updatable: false, 434*33f37583SAndroid Build Coastguard Worker} 435*33f37583SAndroid Build Coastguard Worker 436*33f37583SAndroid Build Coastguard Workerapex { 437*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_v1", 438*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless.json", 439*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 440*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 441*33f37583SAndroid Build Coastguard Worker installable: false, 442*33f37583SAndroid Build Coastguard Worker updatable: false, 443*33f37583SAndroid Build Coastguard Worker // TODO(ioffe): we should have a separate field to hashtree presence. 444*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // test requires hashtree to be present. 445*33f37583SAndroid Build Coastguard Worker} 446*33f37583SAndroid Build Coastguard Worker 447*33f37583SAndroid Build Coastguard Workerapex { 448*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_v2", 449*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_v2.json", 450*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 451*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 452*33f37583SAndroid Build Coastguard Worker installable: false, 453*33f37583SAndroid Build Coastguard Worker updatable: false, 454*33f37583SAndroid Build Coastguard Worker // TODO(ioffe): we should have a separate field to hashtree presence. 455*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // test requires hashtree to be present. 456*33f37583SAndroid Build Coastguard Worker} 457*33f37583SAndroid Build Coastguard Worker 458*33f37583SAndroid Build Coastguard Workerapex { 459*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_service_v1", 460*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless.json", 461*33f37583SAndroid Build Coastguard Worker init_rc: ["test_apex_service.rc"], 462*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 463*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 464*33f37583SAndroid Build Coastguard Worker installable: false, 465*33f37583SAndroid Build Coastguard Worker updatable: false, 466*33f37583SAndroid Build Coastguard Worker} 467*33f37583SAndroid Build Coastguard Worker 468*33f37583SAndroid Build Coastguard Workerapex { 469*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_service_v2", 470*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_v2.json", 471*33f37583SAndroid Build Coastguard Worker init_rc: ["test_apex_service.rc"], 472*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 473*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 474*33f37583SAndroid Build Coastguard Worker installable: false, 475*33f37583SAndroid Build Coastguard Worker updatable: false, 476*33f37583SAndroid Build Coastguard Worker} 477*33f37583SAndroid Build Coastguard Worker 478*33f37583SAndroid Build Coastguard Workerapex { 479*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_provides_sharedlibs", 480*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_provides_sharedlibs.json", 481*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 482*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 483*33f37583SAndroid Build Coastguard Worker installable: false, 484*33f37583SAndroid Build Coastguard Worker updatable: false, 485*33f37583SAndroid Build Coastguard Worker} 486*33f37583SAndroid Build Coastguard Worker 487*33f37583SAndroid Build Coastguard Workerapex { 488*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_provides_native_libs", 489*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_provides_native_libs.json", 490*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 491*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 492*33f37583SAndroid Build Coastguard Worker installable: false, 493*33f37583SAndroid Build Coastguard Worker updatable: false, 494*33f37583SAndroid Build Coastguard Worker} 495*33f37583SAndroid Build Coastguard Worker 496*33f37583SAndroid Build Coastguard Workerapex { 497*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_requires_shared_apex_libs", 498*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_requires_shared_apex_libs.json", 499*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 500*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 501*33f37583SAndroid Build Coastguard Worker installable: false, 502*33f37583SAndroid Build Coastguard Worker updatable: false, 503*33f37583SAndroid Build Coastguard Worker} 504*33f37583SAndroid Build Coastguard Worker 505*33f37583SAndroid Build Coastguard Workerapex { 506*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_jni_libs", 507*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_jni_libs.json", 508*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 509*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 510*33f37583SAndroid Build Coastguard Worker installable: false, 511*33f37583SAndroid Build Coastguard Worker updatable: false, 512*33f37583SAndroid Build Coastguard Worker} 513*33f37583SAndroid Build Coastguard Worker 514*33f37583SAndroid Build Coastguard Workerapex { 515*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_add_native_lib", 516*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_add_native_lib.json", 517*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 518*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 519*33f37583SAndroid Build Coastguard Worker installable: false, 520*33f37583SAndroid Build Coastguard Worker updatable: false, 521*33f37583SAndroid Build Coastguard Worker} 522*33f37583SAndroid Build Coastguard Worker 523*33f37583SAndroid Build Coastguard Workerapex { 524*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_remove_native_lib", 525*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_remove_native_lib.json", 526*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 527*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 528*33f37583SAndroid Build Coastguard Worker installable: false, 529*33f37583SAndroid Build Coastguard Worker updatable: false, 530*33f37583SAndroid Build Coastguard Worker} 531*33f37583SAndroid Build Coastguard Worker 532*33f37583SAndroid Build Coastguard Workerapex { 533*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_app_in_apex", 534*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_v2.json", 535*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 536*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 537*33f37583SAndroid Build Coastguard Worker installable: false, 538*33f37583SAndroid Build Coastguard Worker updatable: false, 539*33f37583SAndroid Build Coastguard Worker apps: ["AppInRebootlessApex"], 540*33f37583SAndroid Build Coastguard Worker // TODO(ioffe): we should have a separate field to hashtree presence. 541*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // test requires hashtree to be present. 542*33f37583SAndroid Build Coastguard Worker} 543*33f37583SAndroid Build Coastguard Worker 544*33f37583SAndroid Build Coastguard Workerapex { 545*33f37583SAndroid Build Coastguard Worker name: "test.rebootless_apex_priv_app_in_apex", 546*33f37583SAndroid Build Coastguard Worker manifest: "manifest_rebootless_v2.json", 547*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 548*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 549*33f37583SAndroid Build Coastguard Worker installable: false, 550*33f37583SAndroid Build Coastguard Worker updatable: false, 551*33f37583SAndroid Build Coastguard Worker apps: ["PrivAppInRebootlessApex"], 552*33f37583SAndroid Build Coastguard Worker // TODO(ioffe): we should have a separate field to hashtree presence. 553*33f37583SAndroid Build Coastguard Worker min_sdk_version: "29", // test requires hashtree to be present. 554*33f37583SAndroid Build Coastguard Worker} 555*33f37583SAndroid Build Coastguard Worker 556*33f37583SAndroid Build Coastguard Workerandroid_app { 557*33f37583SAndroid Build Coastguard Worker name: "AppInRebootlessApex", 558*33f37583SAndroid Build Coastguard Worker sdk_version: "29", 559*33f37583SAndroid Build Coastguard Worker manifest: "AppInRebootlessApex_AndroidManifest.xml", 560*33f37583SAndroid Build Coastguard Worker apex_available: [ 561*33f37583SAndroid Build Coastguard Worker "test.rebootless_apex_app_in_apex", 562*33f37583SAndroid Build Coastguard Worker ], 563*33f37583SAndroid Build Coastguard Worker} 564*33f37583SAndroid Build Coastguard Worker 565*33f37583SAndroid Build Coastguard Workerandroid_app { 566*33f37583SAndroid Build Coastguard Worker name: "PrivAppInRebootlessApex", 567*33f37583SAndroid Build Coastguard Worker sdk_version: "29", 568*33f37583SAndroid Build Coastguard Worker privileged: true, 569*33f37583SAndroid Build Coastguard Worker manifest: "AppInRebootlessApex_AndroidManifest.xml", 570*33f37583SAndroid Build Coastguard Worker apex_available: [ 571*33f37583SAndroid Build Coastguard Worker "test.rebootless_apex_priv_app_in_apex", 572*33f37583SAndroid Build Coastguard Worker ], 573*33f37583SAndroid Build Coastguard Worker} 574*33f37583SAndroid Build Coastguard Worker 575*33f37583SAndroid Build Coastguard Workerapex_test { 576*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_classpath", 577*33f37583SAndroid Build Coastguard Worker bootclasspath_fragments: ["apex.apexd_test_bootclasspath-fragment"], 578*33f37583SAndroid Build Coastguard Worker systemserverclasspath_fragments: ["apex.apexd_test_systemserverclasspath-fragment"], 579*33f37583SAndroid Build Coastguard Worker manifest: "manifest.json", 580*33f37583SAndroid Build Coastguard Worker prebuilts: ["sample_prebuilt_file"], 581*33f37583SAndroid Build Coastguard Worker key: "com.android.apex.test_package.key", 582*33f37583SAndroid Build Coastguard Worker file_contexts: ":apex.test-file_contexts", 583*33f37583SAndroid Build Coastguard Worker installable: false, // Should never be installed on the systemimage 584*33f37583SAndroid Build Coastguard Worker updatable: false, 585*33f37583SAndroid Build Coastguard Worker} 586*33f37583SAndroid Build Coastguard Worker 587*33f37583SAndroid Build Coastguard Workerbootclasspath_fragment_test { 588*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_bootclasspath-fragment", 589*33f37583SAndroid Build Coastguard Worker contents: ["test_framework-apexd"], 590*33f37583SAndroid Build Coastguard Worker} 591*33f37583SAndroid Build Coastguard Worker 592*33f37583SAndroid Build Coastguard Workersystemserverclasspath_fragment { 593*33f37583SAndroid Build Coastguard Worker name: "apex.apexd_test_systemserverclasspath-fragment", 594*33f37583SAndroid Build Coastguard Worker contents: ["test_service-apexd"], 595*33f37583SAndroid Build Coastguard Worker} 596*33f37583SAndroid Build Coastguard Worker 597*33f37583SAndroid Build Coastguard Workerjava_sdk_library { 598*33f37583SAndroid Build Coastguard Worker name: "test_framework-apexd", 599*33f37583SAndroid Build Coastguard Worker defaults: ["framework-module-defaults"], 600*33f37583SAndroid Build Coastguard Worker srcs: ["src/com/android/apex/test/Test.java"], 601*33f37583SAndroid Build Coastguard Worker permitted_packages: ["com.android.apex.test"], 602*33f37583SAndroid Build Coastguard Worker min_sdk_version: "30", 603*33f37583SAndroid Build Coastguard Worker 604*33f37583SAndroid Build Coastguard Worker // Test only SDK, don't check against released APIs. 605*33f37583SAndroid Build Coastguard Worker unsafe_ignore_missing_latest_api: true, 606*33f37583SAndroid Build Coastguard Worker // Output the api files to a special directory that won't trigger an API 607*33f37583SAndroid Build Coastguard Worker // review as it is a test only API. 608*33f37583SAndroid Build Coastguard Worker api_dir: "apis_for_tests", 609*33f37583SAndroid Build Coastguard Worker // Testing only. 610*33f37583SAndroid Build Coastguard Worker no_dist: true, 611*33f37583SAndroid Build Coastguard Worker} 612*33f37583SAndroid Build Coastguard Worker 613*33f37583SAndroid Build Coastguard Workerjava_sdk_library { 614*33f37583SAndroid Build Coastguard Worker name: "test_service-apexd", 615*33f37583SAndroid Build Coastguard Worker defaults: ["framework-system-server-module-defaults"], 616*33f37583SAndroid Build Coastguard Worker srcs: ["src/com/android/apex/test/Test.java"], 617*33f37583SAndroid Build Coastguard Worker permitted_packages: ["com.android.apex.test"], 618*33f37583SAndroid Build Coastguard Worker min_sdk_version: "30", 619*33f37583SAndroid Build Coastguard Worker 620*33f37583SAndroid Build Coastguard Worker // Test only SDK, don't check against released APIs. 621*33f37583SAndroid Build Coastguard Worker unsafe_ignore_missing_latest_api: true, 622*33f37583SAndroid Build Coastguard Worker // Output the api files to a special directory that won't trigger an API 623*33f37583SAndroid Build Coastguard Worker // review as it is a test only API. 624*33f37583SAndroid Build Coastguard Worker api_dir: "apis_for_tests", 625*33f37583SAndroid Build Coastguard Worker // Testing only. 626*33f37583SAndroid Build Coastguard Worker no_dist: true, 627*33f37583SAndroid Build Coastguard Worker} 628