1/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package {
18    // See: http://go/android-license-faq
19    // A large-scale-change added 'default_applicable_licenses' to import
20    // all of the 'license_kinds' from "system_bt_license"
21    // to get the below license kinds:
22    //   SPDX-license-identifier-Apache-2.0
23    default_applicable_licenses: ["system_bt_license"],
24}
25
26cc_defaults {
27    name: "btcore_fuzz_defaults",
28    shared_libs: [
29        "libcrypto",
30        "libstatslog_bt",
31    ],
32    static_libs: [
33        "libbase",
34        "libbluetooth-protos",
35        "libbluetooth-types",
36        "libbluetooth_crypto_toolbox",
37        "libbluetooth_log",
38        "libbluetooth_rust_interop",
39        "libbt-common",
40        "libbt_shim_bridge",
41        "libbt_shim_ffi",
42        "libbtcore",
43        "libchrome",
44        "libevent",
45        "liblog",
46        "libmodpb64",
47        "libosi",
48        "libprotobuf-cpp-lite",
49    ],
50    include_dirs: [
51        "packages/modules/Bluetooth/system",
52    ],
53    header_libs: [
54        "libbluetooth_headers",
55    ],
56    fuzz_config: {
57        cc: ["android-bluetooth-security@google.com"],
58        componentid: 27441,
59        hotlists: [
60            "4593311",
61        ],
62        description: "The fuzzer targets the APIs of libbtcore",
63        vector: "local_no_privileges_required",
64        service_privilege: "privileged",
65        users: "multi_user",
66        fuzzed_code_usage: "shipped",
67    },
68}
69
70cc_fuzz {
71    name: "btcore_device_class_fuzzer",
72    defaults: [
73        "btcore_fuzz_defaults",
74    ],
75    srcs: [
76        "btcore_device_class_fuzzer.cpp",
77    ],
78}
79
80cc_fuzz {
81    name: "btcore_property_fuzzer",
82    defaults: [
83        "btcore_fuzz_defaults",
84    ],
85    srcs: [
86        "btcore_property_fuzzer.cpp",
87    ],
88
89}
90
91cc_fuzz {
92    name: "btcore_module_fuzzer",
93    enabled: false,
94    defaults: [
95        "btcore_fuzz_defaults",
96    ],
97    srcs: [
98        "btcore_module_fuzzer.cpp",
99    ],
100}
101