1/* 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 */ 16 17package { 18 default_team: "trendy_team_virtualization", 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22rust_library { 23 name: "libsecretkeeper_nonsecure", 24 crate_name: "secretkeeper_nonsecure", 25 srcs: [ 26 "src/lib.rs", 27 ], 28 vendor_available: true, 29 defaults: [ 30 "authgraph_use_latest_hal_aidl_rust", 31 ], 32 rustlibs: [ 33 "android.hardware.security.secretkeeper-V1-rust", 34 "libauthgraph_boringssl", 35 "libauthgraph_core", 36 "libauthgraph_hal", 37 "libbinder_rs", 38 "libcoset", 39 "liblog_rust", 40 "libsecretkeeper_core_nostd", 41 "libsecretkeeper_comm_nostd", 42 ], 43} 44 45rust_binary { 46 name: "android.hardware.security.secretkeeper-service.nonsecure", 47 relative_install_path: "hw", 48 vendor: true, 49 installable: false, // install APEX 50 prefer_rlib: true, 51 defaults: [ 52 "authgraph_use_latest_hal_aidl_rust", 53 ], 54 rustlibs: [ 55 "android.hardware.security.secretkeeper-V1-rust", 56 "libandroid_logger", 57 "libbinder_rs", 58 "liblog_rust", 59 "libsecretkeeper_hal", 60 "libsecretkeeper_nonsecure", 61 ], 62 srcs: [ 63 "src/main.rs", 64 ], 65} 66 67rust_fuzz { 68 name: "android.hardware.security.secretkeeper-service.nonsecure_fuzzer", 69 rustlibs: [ 70 "libsecretkeeper_hal", 71 "libsecretkeeper_nonsecure", 72 "libbinder_random_parcel_rs", 73 "libbinder_rs", 74 ], 75 srcs: ["src/fuzzer.rs"], 76 fuzz_config: { 77 cc: [ 78 "alanstokes@google.com", 79 "drysdale@google.com", 80 "shikhapanwar@google.com", 81 ], 82 }, 83} 84 85prebuilt_etc { 86 name: "secretkeeper.rc", 87 src: "secretkeeper.rc", 88 installable: false, 89} 90 91prebuilt_etc { 92 name: "secretkeeper.xml", 93 src: "secretkeeper.xml", 94 sub_dir: "vintf", 95 installable: false, 96} 97 98apex { 99 name: "com.android.hardware.security.secretkeeper", 100 manifest: "apex_manifest.json", 101 file_contexts: "apex_file_contexts", 102 key: "com.android.hardware.key", 103 certificate: ":com.android.hardware.certificate", 104 vendor: true, 105 updatable: false, 106 107 binaries: [ 108 "android.hardware.security.secretkeeper-service.nonsecure", 109 ], 110 prebuilts: [ 111 "secretkeeper.rc", 112 "secretkeeper.xml", 113 ], 114} 115