xref: /aosp_15_r20/external/ot-br-posix/Android.bp (revision 4a64e381480ef79f0532b2421e44e6ee336b8e0d)
1*4a64e381SAndroid Build Coastguard Worker//
2*4a64e381SAndroid Build Coastguard Worker//  Copyright (c) 2021, The OpenThread Authors.
3*4a64e381SAndroid Build Coastguard Worker//  All rights reserved.
4*4a64e381SAndroid Build Coastguard Worker//
5*4a64e381SAndroid Build Coastguard Worker//  Redistribution and use in source and binary forms, with or without
6*4a64e381SAndroid Build Coastguard Worker//  modification, are permitted provided that the following conditions are met:
7*4a64e381SAndroid Build Coastguard Worker//  1. Redistributions of source code must retain the above copyright
8*4a64e381SAndroid Build Coastguard Worker//     notice, this list of conditions and the following disclaimer.
9*4a64e381SAndroid Build Coastguard Worker//  2. Redistributions in binary form must reproduce the above copyright
10*4a64e381SAndroid Build Coastguard Worker//     notice, this list of conditions and the following disclaimer in the
11*4a64e381SAndroid Build Coastguard Worker//     documentation and/or other materials provided with the distribution.
12*4a64e381SAndroid Build Coastguard Worker//  3. Neither the name of the copyright holder nor the
13*4a64e381SAndroid Build Coastguard Worker//     names of its contributors may be used to endorse or promote products
14*4a64e381SAndroid Build Coastguard Worker//     derived from this software without specific prior written permission.
15*4a64e381SAndroid Build Coastguard Worker//
16*4a64e381SAndroid Build Coastguard Worker//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17*4a64e381SAndroid Build Coastguard Worker//  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*4a64e381SAndroid Build Coastguard Worker//  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*4a64e381SAndroid Build Coastguard Worker//  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20*4a64e381SAndroid Build Coastguard Worker//  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21*4a64e381SAndroid Build Coastguard Worker//  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22*4a64e381SAndroid Build Coastguard Worker//  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23*4a64e381SAndroid Build Coastguard Worker//  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24*4a64e381SAndroid Build Coastguard Worker//  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25*4a64e381SAndroid Build Coastguard Worker//  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26*4a64e381SAndroid Build Coastguard Worker//  POSSIBILITY OF SUCH DAMAGE.
27*4a64e381SAndroid Build Coastguard Worker//
28*4a64e381SAndroid Build Coastguard Worker
29*4a64e381SAndroid Build Coastguard Workerpackage {
30*4a64e381SAndroid Build Coastguard Worker    default_team: "trendy_team_fwk_thread_network",
31*4a64e381SAndroid Build Coastguard Worker    default_applicable_licenses: ["external_ot-br-posix_license"],
32*4a64e381SAndroid Build Coastguard Worker}
33*4a64e381SAndroid Build Coastguard Worker
34*4a64e381SAndroid Build Coastguard Worker// Added automatically by a large-scale-change that took the approach of
35*4a64e381SAndroid Build Coastguard Worker// 'apply every license found to every target'. While this makes sure we respect
36*4a64e381SAndroid Build Coastguard Worker// every license restriction, it may not be entirely correct.
37*4a64e381SAndroid Build Coastguard Worker//
38*4a64e381SAndroid Build Coastguard Worker// e.g. GPL in an MIT project might only apply to the contrib/ directory.
39*4a64e381SAndroid Build Coastguard Worker//
40*4a64e381SAndroid Build Coastguard Worker// Please consider splitting the single license below into multiple licenses,
41*4a64e381SAndroid Build Coastguard Worker// taking care not to lose any license_kind information, and overriding the
42*4a64e381SAndroid Build Coastguard Worker// default license using the 'licenses: [...]' property on targets as needed.
43*4a64e381SAndroid Build Coastguard Worker//
44*4a64e381SAndroid Build Coastguard Worker// For unused files, consider creating a 'fileGroup' with "//visibility:private"
45*4a64e381SAndroid Build Coastguard Worker// to attach the license to, and including a comment whether the files may be
46*4a64e381SAndroid Build Coastguard Worker// used in the current project.
47*4a64e381SAndroid Build Coastguard Worker//
48*4a64e381SAndroid Build Coastguard Worker// large-scale-change included anything that looked like it might be a license
49*4a64e381SAndroid Build Coastguard Worker// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
50*4a64e381SAndroid Build Coastguard Worker//
51*4a64e381SAndroid Build Coastguard Worker// Please consider removing redundant or irrelevant files from 'license_text:'.
52*4a64e381SAndroid Build Coastguard Worker// See: http://go/android-license-faq
53*4a64e381SAndroid Build Coastguard Workerlicense {
54*4a64e381SAndroid Build Coastguard Worker    name: "external_ot-br-posix_license",
55*4a64e381SAndroid Build Coastguard Worker    visibility: [":__subpackages__"],
56*4a64e381SAndroid Build Coastguard Worker    license_kinds: [
57*4a64e381SAndroid Build Coastguard Worker        "SPDX-license-identifier-Apache-2.0",
58*4a64e381SAndroid Build Coastguard Worker        "SPDX-license-identifier-BSD",
59*4a64e381SAndroid Build Coastguard Worker        "SPDX-license-identifier-MIT",
60*4a64e381SAndroid Build Coastguard Worker    ],
61*4a64e381SAndroid Build Coastguard Worker    license_text: [
62*4a64e381SAndroid Build Coastguard Worker        "LICENSE",
63*4a64e381SAndroid Build Coastguard Worker        "NOTICE",
64*4a64e381SAndroid Build Coastguard Worker    ],
65*4a64e381SAndroid Build Coastguard Worker}
66*4a64e381SAndroid Build Coastguard Worker
67*4a64e381SAndroid Build Coastguard Workergenrule {
68*4a64e381SAndroid Build Coastguard Worker    name: "otbr_version_header",
69*4a64e381SAndroid Build Coastguard Worker    cmd: "$(location src/android/config-android-version-gen.sh) < $(in) > $(out)",
70*4a64e381SAndroid Build Coastguard Worker    srcs: ["src/android/otbr-config-android-version.h.in"],
71*4a64e381SAndroid Build Coastguard Worker    out: ["otbr-config-android-version.h"],
72*4a64e381SAndroid Build Coastguard Worker    tool_files: [
73*4a64e381SAndroid Build Coastguard Worker        "src/android/config-android-version-gen.sh",
74*4a64e381SAndroid Build Coastguard Worker    ],
75*4a64e381SAndroid Build Coastguard Worker}
76*4a64e381SAndroid Build Coastguard Worker
77*4a64e381SAndroid Build Coastguard Worker// The config shared by all ot-daemon dependency libraries
78*4a64e381SAndroid Build Coastguard Workercc_defaults {
79*4a64e381SAndroid Build Coastguard Worker    name: "ot-daemon-debuggable-cc-defaults",
80*4a64e381SAndroid Build Coastguard Worker    cflags: [
81*4a64e381SAndroid Build Coastguard Worker        // Optimize for size
82*4a64e381SAndroid Build Coastguard Worker        "-Os",
83*4a64e381SAndroid Build Coastguard Worker
84*4a64e381SAndroid Build Coastguard Worker        // Disable exception since OT never uses exceptions
85*4a64e381SAndroid Build Coastguard Worker        "-fno-exceptions",
86*4a64e381SAndroid Build Coastguard Worker        "-fno-asynchronous-unwind-tables",
87*4a64e381SAndroid Build Coastguard Worker        "-fno-unwind-tables",
88*4a64e381SAndroid Build Coastguard Worker    ],
89*4a64e381SAndroid Build Coastguard Worker    product_variables: {
90*4a64e381SAndroid Build Coastguard Worker        debuggable: {
91*4a64e381SAndroid Build Coastguard Worker            cflags: [
92*4a64e381SAndroid Build Coastguard Worker                // Optimize for debugging
93*4a64e381SAndroid Build Coastguard Worker                "-Og",
94*4a64e381SAndroid Build Coastguard Worker            ],
95*4a64e381SAndroid Build Coastguard Worker        },
96*4a64e381SAndroid Build Coastguard Worker    },
97*4a64e381SAndroid Build Coastguard Worker
98*4a64e381SAndroid Build Coastguard Worker    // Enable security checks
99*4a64e381SAndroid Build Coastguard Worker    sanitize: {
100*4a64e381SAndroid Build Coastguard Worker        misc_undefined: ["bounds"],
101*4a64e381SAndroid Build Coastguard Worker        cfi: true,
102*4a64e381SAndroid Build Coastguard Worker        scs: true,
103*4a64e381SAndroid Build Coastguard Worker    },
104*4a64e381SAndroid Build Coastguard Worker}
105*4a64e381SAndroid Build Coastguard Worker
106*4a64e381SAndroid Build Coastguard Workercc_defaults {
107*4a64e381SAndroid Build Coastguard Worker    name: "ot-daemon-defaults",
108*4a64e381SAndroid Build Coastguard Worker    generated_headers: ["otbr_version_header"],
109*4a64e381SAndroid Build Coastguard Worker
110*4a64e381SAndroid Build Coastguard Worker    include_dirs: [
111*4a64e381SAndroid Build Coastguard Worker        "external/mdnsresponder/mDNSShared",
112*4a64e381SAndroid Build Coastguard Worker        "external/openthread/include",
113*4a64e381SAndroid Build Coastguard Worker        "external/openthread/src",
114*4a64e381SAndroid Build Coastguard Worker        "external/openthread/src/posix/platform/include",
115*4a64e381SAndroid Build Coastguard Worker        "external/openthread/third_party/mbedtls/repo/include",
116*4a64e381SAndroid Build Coastguard Worker    ],
117*4a64e381SAndroid Build Coastguard Worker
118*4a64e381SAndroid Build Coastguard Worker    local_include_dirs: [
119*4a64e381SAndroid Build Coastguard Worker        "include",
120*4a64e381SAndroid Build Coastguard Worker        "src",
121*4a64e381SAndroid Build Coastguard Worker    ],
122*4a64e381SAndroid Build Coastguard Worker
123*4a64e381SAndroid Build Coastguard Worker    cflags: [
124*4a64e381SAndroid Build Coastguard Worker        "-Wall",
125*4a64e381SAndroid Build Coastguard Worker        "-Wextra",
126*4a64e381SAndroid Build Coastguard Worker        "-Wno-unused-function",
127*4a64e381SAndroid Build Coastguard Worker
128*4a64e381SAndroid Build Coastguard Worker        // The HAL client implementation requires features which are
129*4a64e381SAndroid Build Coastguard Worker        // available on only 31+, but it's guaranteed that ot-daemon
130*4a64e381SAndroid Build Coastguard Worker        // will never run on Android U- devices.
131*4a64e381SAndroid Build Coastguard Worker        "-Wno-unguarded-availability",
132*4a64e381SAndroid Build Coastguard Worker
133*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_PLATFORM_ANDROID=1",
134*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_CONFIG_ANDROID_PROPERTY_ENABLE=1",
135*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_CONFIG_ANDROID_VERSION_HEADER_ENABLE=1",
136*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_CONFIG_FILE=\"src/android/otbr-config-android.h\"",
137*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_VENDOR_SERVER=1", // for OtDaemonServer
138*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_BACKBONE_ROUTER=1",
139*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_BACKBONE_ROUTER_ON_INIT=0",
140*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_BORDER_ROUTING=1",
141*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_BORDER_ROUTING_COUNTERS=1",
142*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_BORDER_AGENT=1",
143*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_PUBLISH_MESHCOP_BA_ID=1",
144*4a64e381SAndroid Build Coastguard Worker        // Used for bypassing the macro check. In fact mdnssd is not used because we don't compile
145*4a64e381SAndroid Build Coastguard Worker        // the related source files.
146*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_MDNS_MDNSSD=1",
147*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_SRP_ADVERTISING_PROXY=1",
148*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_DNSSD_DISCOVERY_PROXY=1",
149*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_SRP_SERVER_AUTO_ENABLE_MODE=1",
150*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_PACKAGE_NAME=\"OTBR_AGENT\"",
151*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_STOP_BORDER_AGENT_ON_INIT=1",
152*4a64e381SAndroid Build Coastguard Worker        // The platform specific rules for selecting infrastructure link do not apply to Android
153*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_VENDOR_INFRA_LINK_SELECT=0",
154*4a64e381SAndroid Build Coastguard Worker
155*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_TREL=1",
156*4a64e381SAndroid Build Coastguard Worker
157*4a64e381SAndroid Build Coastguard Worker        // For the following 1.4 features, the `OTBR_ENABLE_*` macros are set to 0 because they
158*4a64e381SAndroid Build Coastguard Worker        // only guard code which deals with feature flagging or telemetry. Such code is targeting
159*4a64e381SAndroid Build Coastguard Worker        // other Linux platforms but not Android.
160*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_NAT64=0",
161*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_DNS_UPSTREAM_QUERY=0",
162*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_DHCP6_PD=0",
163*4a64e381SAndroid Build Coastguard Worker        "-DOTBR_ENABLE_EPSKC=0",
164*4a64e381SAndroid Build Coastguard Worker    ],
165*4a64e381SAndroid Build Coastguard Worker
166*4a64e381SAndroid Build Coastguard Worker    srcs: [
167*4a64e381SAndroid Build Coastguard Worker        "src/agent/application.cpp",
168*4a64e381SAndroid Build Coastguard Worker        "src/android/android_rcp_host.cpp",
169*4a64e381SAndroid Build Coastguard Worker        "src/android/common_utils.cpp",
170*4a64e381SAndroid Build Coastguard Worker        "src/android/mdns_publisher.cpp",
171*4a64e381SAndroid Build Coastguard Worker        "src/android/otdaemon_server.cpp",
172*4a64e381SAndroid Build Coastguard Worker        "src/android/otdaemon_telemetry.cpp",
173*4a64e381SAndroid Build Coastguard Worker        "src/backbone_router/backbone_agent.cpp",
174*4a64e381SAndroid Build Coastguard Worker        "src/border_agent/border_agent.cpp",
175*4a64e381SAndroid Build Coastguard Worker        "src/common/code_utils.cpp",
176*4a64e381SAndroid Build Coastguard Worker        "src/common/dns_utils.cpp",
177*4a64e381SAndroid Build Coastguard Worker        "src/common/logging.cpp",
178*4a64e381SAndroid Build Coastguard Worker        "src/common/mainloop_manager.cpp",
179*4a64e381SAndroid Build Coastguard Worker        "src/common/mainloop.cpp",
180*4a64e381SAndroid Build Coastguard Worker        "src/common/task_runner.cpp",
181*4a64e381SAndroid Build Coastguard Worker        "src/common/types.cpp",
182*4a64e381SAndroid Build Coastguard Worker        "src/mdns/mdns.cpp",
183*4a64e381SAndroid Build Coastguard Worker        "src/ncp/async_task.cpp",
184*4a64e381SAndroid Build Coastguard Worker        "src/ncp/ncp_host.cpp",
185*4a64e381SAndroid Build Coastguard Worker        "src/ncp/ncp_spinel.cpp",
186*4a64e381SAndroid Build Coastguard Worker        "src/ncp/posix/netif_linux.cpp",
187*4a64e381SAndroid Build Coastguard Worker        "src/ncp/posix/netif.cpp",
188*4a64e381SAndroid Build Coastguard Worker        "src/ncp/rcp_host.cpp",
189*4a64e381SAndroid Build Coastguard Worker        "src/ncp/thread_host.cpp",
190*4a64e381SAndroid Build Coastguard Worker        "src/sdp_proxy/advertising_proxy.cpp",
191*4a64e381SAndroid Build Coastguard Worker        "src/sdp_proxy/discovery_proxy.cpp",
192*4a64e381SAndroid Build Coastguard Worker        "src/trel_dnssd/trel_dnssd.cpp",
193*4a64e381SAndroid Build Coastguard Worker        "src/utils/crc16.cpp",
194*4a64e381SAndroid Build Coastguard Worker        "src/utils/dns_utils.cpp",
195*4a64e381SAndroid Build Coastguard Worker        "src/utils/hex.cpp",
196*4a64e381SAndroid Build Coastguard Worker        "src/utils/infra_link_selector.cpp",
197*4a64e381SAndroid Build Coastguard Worker        "src/utils/pskc.cpp",
198*4a64e381SAndroid Build Coastguard Worker        "src/utils/socket_utils.cpp",
199*4a64e381SAndroid Build Coastguard Worker        "src/utils/steering_data.cpp",
200*4a64e381SAndroid Build Coastguard Worker        "src/utils/string_utils.cpp",
201*4a64e381SAndroid Build Coastguard Worker        "src/utils/system_utils.cpp",
202*4a64e381SAndroid Build Coastguard Worker        "src/utils/thread_helper.cpp",
203*4a64e381SAndroid Build Coastguard Worker    ],
204*4a64e381SAndroid Build Coastguard Worker
205*4a64e381SAndroid Build Coastguard Worker    shared_libs: [
206*4a64e381SAndroid Build Coastguard Worker        "libbase",
207*4a64e381SAndroid Build Coastguard Worker        "libutils",
208*4a64e381SAndroid Build Coastguard Worker        "libcutils",
209*4a64e381SAndroid Build Coastguard Worker        "libbinder_ndk",
210*4a64e381SAndroid Build Coastguard Worker        "android.hardware.threadnetwork-V1-ndk",
211*4a64e381SAndroid Build Coastguard Worker        "liblog",
212*4a64e381SAndroid Build Coastguard Worker        "libstatssocket",
213*4a64e381SAndroid Build Coastguard Worker    ],
214*4a64e381SAndroid Build Coastguard Worker
215*4a64e381SAndroid Build Coastguard Worker    static_libs: [
216*4a64e381SAndroid Build Coastguard Worker        "libopenthread-cli",
217*4a64e381SAndroid Build Coastguard Worker        "ot-core",
218*4a64e381SAndroid Build Coastguard Worker        "ot-daemon-aidl-ndk",
219*4a64e381SAndroid Build Coastguard Worker        "libstatslog_threadnetwork",
220*4a64e381SAndroid Build Coastguard Worker        "threadnetwork-atom-cc-proto-lite",
221*4a64e381SAndroid Build Coastguard Worker        "libprotobuf-cpp-lite",
222*4a64e381SAndroid Build Coastguard Worker    ],
223*4a64e381SAndroid Build Coastguard Worker
224*4a64e381SAndroid Build Coastguard Worker    host_ldlibs: ["-lutil"],
225*4a64e381SAndroid Build Coastguard Worker    min_sdk_version: "30",
226*4a64e381SAndroid Build Coastguard Worker    apex_available: ["com.android.tethering"],
227*4a64e381SAndroid Build Coastguard Worker}
228*4a64e381SAndroid Build Coastguard Worker
229*4a64e381SAndroid Build Coastguard Workercc_binary {
230*4a64e381SAndroid Build Coastguard Worker    name: "ot-daemon",
231*4a64e381SAndroid Build Coastguard Worker    defaults: [
232*4a64e381SAndroid Build Coastguard Worker        "ot-daemon-defaults",
233*4a64e381SAndroid Build Coastguard Worker        "ot-daemon-debuggable-cc-defaults",
234*4a64e381SAndroid Build Coastguard Worker    ],
235*4a64e381SAndroid Build Coastguard Worker    srcs: [
236*4a64e381SAndroid Build Coastguard Worker        "src/agent/main.cpp",
237*4a64e381SAndroid Build Coastguard Worker    ],
238*4a64e381SAndroid Build Coastguard Worker}
239*4a64e381SAndroid Build Coastguard Worker
240*4a64e381SAndroid Build Coastguard Workercc_fuzz {
241*4a64e381SAndroid Build Coastguard Worker    name: "ot_daemon_service_fuzzer",
242*4a64e381SAndroid Build Coastguard Worker    defaults: [
243*4a64e381SAndroid Build Coastguard Worker        "ot-daemon-defaults",
244*4a64e381SAndroid Build Coastguard Worker        "service_fuzzer_defaults",
245*4a64e381SAndroid Build Coastguard Worker    ],
246*4a64e381SAndroid Build Coastguard Worker    srcs: [
247*4a64e381SAndroid Build Coastguard Worker        "src/android/otdaemon_fuzzer.cpp",
248*4a64e381SAndroid Build Coastguard Worker    ],
249*4a64e381SAndroid Build Coastguard Worker    shared_libs: [
250*4a64e381SAndroid Build Coastguard Worker        "liblog",
251*4a64e381SAndroid Build Coastguard Worker    ],
252*4a64e381SAndroid Build Coastguard Worker    fuzz_config: {
253*4a64e381SAndroid Build Coastguard Worker        cc: [
254*4a64e381SAndroid Build Coastguard Worker            "[email protected]",
255*4a64e381SAndroid Build Coastguard Worker        ],
256*4a64e381SAndroid Build Coastguard Worker    },
257*4a64e381SAndroid Build Coastguard Worker}
258*4a64e381SAndroid Build Coastguard Worker
259*4a64e381SAndroid Build Coastguard Workercc_library_static {
260*4a64e381SAndroid Build Coastguard Worker    name: "libstatslog_threadnetwork",
261*4a64e381SAndroid Build Coastguard Worker    generated_sources: ["statslog_threadnetwork.cpp"],
262*4a64e381SAndroid Build Coastguard Worker    generated_headers: ["statslog_threadnetwork.h"],
263*4a64e381SAndroid Build Coastguard Worker    cflags: [
264*4a64e381SAndroid Build Coastguard Worker        "-Wall",
265*4a64e381SAndroid Build Coastguard Worker        "-Werror",
266*4a64e381SAndroid Build Coastguard Worker    ],
267*4a64e381SAndroid Build Coastguard Worker    export_generated_headers: ["statslog_threadnetwork.h"],
268*4a64e381SAndroid Build Coastguard Worker    shared_libs: [
269*4a64e381SAndroid Build Coastguard Worker        "libcutils",
270*4a64e381SAndroid Build Coastguard Worker        "liblog",
271*4a64e381SAndroid Build Coastguard Worker        "libstatssocket",
272*4a64e381SAndroid Build Coastguard Worker        "libutils",
273*4a64e381SAndroid Build Coastguard Worker    ],
274*4a64e381SAndroid Build Coastguard Worker    min_sdk_version: "30",
275*4a64e381SAndroid Build Coastguard Worker    apex_available: ["com.android.tethering"],
276*4a64e381SAndroid Build Coastguard Worker}
277*4a64e381SAndroid Build Coastguard Worker
278*4a64e381SAndroid Build Coastguard Workergenrule {
279*4a64e381SAndroid Build Coastguard Worker    name: "statslog_threadnetwork.h",
280*4a64e381SAndroid Build Coastguard Worker    tools: ["stats-log-api-gen"],
281*4a64e381SAndroid Build Coastguard Worker    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_threadnetwork.h --module threadnetwork --namespace threadnetwork",
282*4a64e381SAndroid Build Coastguard Worker    out: [
283*4a64e381SAndroid Build Coastguard Worker        "statslog_threadnetwork.h",
284*4a64e381SAndroid Build Coastguard Worker    ],
285*4a64e381SAndroid Build Coastguard Worker}
286*4a64e381SAndroid Build Coastguard Worker
287*4a64e381SAndroid Build Coastguard Workergenrule {
288*4a64e381SAndroid Build Coastguard Worker    name: "statslog_threadnetwork.cpp",
289*4a64e381SAndroid Build Coastguard Worker    tools: ["stats-log-api-gen"],
290*4a64e381SAndroid Build Coastguard Worker    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_threadnetwork.cpp --module threadnetwork --namespace threadnetwork --importHeader statslog_threadnetwork.h",
291*4a64e381SAndroid Build Coastguard Worker    out: [
292*4a64e381SAndroid Build Coastguard Worker        "statslog_threadnetwork.cpp",
293*4a64e381SAndroid Build Coastguard Worker    ],
294*4a64e381SAndroid Build Coastguard Worker}
295