xref: /aosp_15_r20/frameworks/av/services/camera/libcameraservice/libcameraservice_fuzzer/Android.bp (revision ec779b8e0859a360c3d303172224686826e6e0e1)
1/******************************************************************************
2 *
3 * Copyright (C) 2021 The Android Open Source Project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *****************************************************************************
18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20
21package {
22    // See: http://go/android-license-faq
23    // A large-scale-change added 'default_applicable_licenses' to import
24    // all of the 'license_kinds' from "frameworks_av_services_camera_libcameraservice_license"
25    // to get the below license kinds:
26    //   SPDX-license-identifier-Apache-2.0
27    default_applicable_licenses: [
28        "frameworks_av_services_camera_libcameraservice_license",
29    ],
30}
31
32cc_defaults {
33    name: "camera_service_fuzzer_defaults",
34    header_libs: [
35        "libaudioflinger_headers",
36        "libaudiohal_headers",
37        "libaudioutils_headers",
38        "libbinder_headers",
39        "libmedia_headers",
40        "libmediautils_headers",
41        "mediautils_headers",
42    ],
43    shared_libs: [
44        "framework-permission-aidl-cpp",
45        "libbinder",
46        "libbase",
47        "libutils",
48        "libcutils",
49        "libcameraservice",
50        "libcamera_client",
51        "liblog",
52        "libui",
53        "libgui",
54        "[email protected]",
55        "[email protected]",
56        "[email protected]",
57        "[email protected]",
58        "[email protected]",
59        "android.hardware.camera.provider-V3-ndk",
60        "[email protected]",
61        "[email protected]",
62        "[email protected]",
63        "[email protected]",
64        "[email protected]",
65        "[email protected]",
66        "[email protected]",
67        "camera_platform_flags_c_lib",
68        "libactivitymanager_aidl",
69        "libaudioclient",
70        "libaudioflinger",
71        "libaudiohal",
72        "libaudioprocessing",
73        "libmediaplayerservice",
74        "libmediautils",
75        "libnbaio",
76        "libnblog",
77        "libpermission",
78        "libpowermanager",
79        "libsensorprivacy",
80        "libvibrator",
81        "packagemanager_aidl-cpp",
82    ],
83    static_libs: ["libbinder_random_parcel"],
84    fuzz_config: {
85        cc: [
86            "[email protected]",
87        ],
88        componentid: 41727,
89        libfuzzer_options: [
90            //based on b/187360866
91            "timeout=770",
92        ],
93        hotlists: [
94            "4593311",
95        ],
96        description: "The fuzzer targets the APIs of libcameraservice",
97        vector: "local_no_privileges_required",
98        service_privilege: "privileged",
99        users: "multi_user",
100        fuzzed_code_usage: "shipped",
101    },
102}
103
104cc_fuzz {
105    name: "camera_service_fuzzer",
106    srcs: [
107        "camera_service_fuzzer.cpp",
108    ],
109    static_libs: [
110        "libfakeservicemanager",
111    ],
112    defaults: [
113        "camera_service_fuzzer_defaults",
114    ],
115}
116
117cc_fuzz {
118    name: "camera_service_aidl_fuzzer",
119    srcs: [
120        "camera_service_aidl_fuzzer.cpp",
121    ],
122    defaults: [
123        "camera_service_fuzzer_defaults",
124        "service_fuzzer_defaults",
125        "fuzzer_disable_leaks",
126    ],
127    fuzz_config: {
128        triage_assignee: "[email protected]",
129    },
130}
131