1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "packages_modules_adb_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["packages_modules_adb_license"],
8}
9
10apex_defaults {
11    name: "com.android.adbd-defaults",
12    updatable: true,
13
14    binaries: ["adbd"],
15    compile_multilib: "both",
16    multilib: {
17        both: {
18            native_shared_libs: [
19                "libadb_pairing_auth",
20                "libadb_pairing_connection",
21                "libadb_pairing_server",
22                "libadbconnection_client",
23            ],
24        },
25    },
26    prebuilts: ["com.android.adbd.init.rc"],
27
28    manifest: "apex_manifest.json",
29    key: "com.android.adbd.key",
30    certificate: ":com.android.adbd.certificate",
31    compressible: true,
32}
33
34soong_config_module_type_import {
35    from: "system/apex/Android.bp",
36    module_types: ["library_linking_strategy_apex_defaults"],
37}
38
39// TODO(b/178585590): delete after testing linking strategy
40library_linking_strategy_apex_defaults {
41    name: "adbd_manifest_defaults",
42    soong_config_variables: {
43        library_linking_strategy: {
44            prefer_static: {
45                min_sdk_version: "30",
46            },
47            conditions_default: {
48                min_sdk_version: "current",
49            },
50        },
51    },
52}
53
54apex {
55    name: "com.android.adbd",
56    defaults: [
57        "com.android.adbd-defaults",
58        "adbd_manifest_defaults",
59    ],
60}
61
62// adbd apex with INT_MAX version code, to allow for upgrade/rollback testing.
63apex_test {
64    name: "test_com.android.adbd",
65    defaults: ["com.android.adbd-defaults"],
66    manifest: "test_apex_manifest.json",
67    min_sdk_version: "30",
68    file_contexts: ":com.android.adbd-file_contexts",
69    installable: false,
70}
71
72prebuilt_etc {
73    name: "com.android.adbd.init.rc",
74    src: "adbd.rc",
75    filename: "init.rc",
76    installable: false,
77}
78
79apex_key {
80    name: "com.android.adbd.key",
81    public_key: "com.android.adbd.avbpubkey",
82    private_key: "com.android.adbd.pem",
83}
84
85android_app_certificate {
86    name: "com.android.adbd.certificate",
87    certificate: "com.android.adbd",
88}
89