blob: 7894477ea54e39089816e547a2cbc7ba6148303b [file] [log] [blame]
David Drysdale7fd838c2023-10-05 13:07:28 +01001//
2// Copyright (C) 2023 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//
16package {
17 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "hardware_interfaces_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["hardware_interfaces_license"],
23}
24
David Drysdale6c09af22023-11-06 09:57:10 +000025rust_library {
26 name: "libauthgraph_nonsecure",
27 crate_name: "authgraph_nonsecure",
28 defaults: [
29 "authgraph_use_latest_hal_aidl_rust",
30 ],
31 vendor_available: true,
32 rustlibs: [
33 "libandroid_logger",
34 "libauthgraph_boringssl",
35 "libauthgraph_core",
36 "libauthgraph_hal",
37 "libbinder_rs",
38 "liblibc",
39 "liblog_rust",
40 ],
41 srcs: ["src/lib.rs"],
42
43}
44
David Drysdale7fd838c2023-10-05 13:07:28 +010045rust_binary {
46 name: "android.hardware.security.authgraph-service.nonsecure",
47 relative_install_path: "hw",
48 vendor: true,
Jooyung Han9f3f37f2023-11-21 17:00:18 +090049 installable: false, // install com.android.hardware.security.authgraph
David Drysdale7fd838c2023-10-05 13:07:28 +010050 defaults: [
51 "authgraph_use_latest_hal_aidl_rust",
52 ],
Jooyung Han9f3f37f2023-11-21 17:00:18 +090053 prefer_rlib: true,
David Drysdale7fd838c2023-10-05 13:07:28 +010054 rustlibs: [
55 "libandroid_logger",
David Drysdale7fd838c2023-10-05 13:07:28 +010056 "libauthgraph_hal",
David Drysdale6c09af22023-11-06 09:57:10 +000057 "libauthgraph_nonsecure",
David Drysdale7fd838c2023-10-05 13:07:28 +010058 "libbinder_rs",
59 "liblibc",
60 "liblog_rust",
61 ],
62 srcs: [
63 "src/main.rs",
64 ],
65}
David Drysdale6fb22dc2023-11-06 13:23:11 +000066
67rust_fuzz {
68 name: "android.hardware.authgraph-service.nonsecure_fuzzer",
69 rustlibs: [
70 "libauthgraph_hal",
71 "libauthgraph_nonsecure",
72 "libbinder_random_parcel_rs",
73 "libbinder_rs",
74 ],
75 srcs: ["src/fuzzer.rs"],
76 fuzz_config: {
77 cc: [
78 "drysdale@google.com",
79 "hasinitg@google.com",
80 ],
81 },
82}
Jooyung Han9f3f37f2023-11-21 17:00:18 +090083
84prebuilt_etc {
85 name: "authgraph.xml",
86 src: "authgraph.xml",
87 sub_dir: "vintf",
88 installable: false,
89}
90
91prebuilt_etc {
92 name: "authgraph.rc",
93 src: "authgraph.rc",
94 installable: false,
95}
96
97apex {
98 name: "com.android.hardware.security.authgraph",
99 manifest: "apex_manifest.json",
100 file_contexts: "apex_file_contexts",
101 key: "com.android.hardware.key",
102 certificate: ":com.android.hardware.certificate",
103 vendor: true,
104 updatable: false,
105
106 binaries: [
107 "android.hardware.security.authgraph-service.nonsecure",
108 ],
109 prebuilts: [
110 "authgraph.rc",
111 "authgraph.xml",
112 ],
113}