1// 2// Copyright (C) 2022 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 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20rust_binary { 21 name: "android.hardware.security.keymint-service.rust", 22 relative_install_path: "hw", 23 vendor: true, 24 srcs: ["src/keymint_hal_main.rs"], 25 rustlibs: [ 26 "libandroid_logger", 27 "libbinder_rs", 28 "libhex", 29 "libkmr_wire", 30 "libkmr_hal", 31 "libkmr_hal_nonsecure", 32 "liblibc", 33 "liblog_rust", 34 ], 35 prefer_rlib: true, 36} 37 38// init_rc 39prebuilt_etc { 40 name: "android.hardware.security.keymint-service.rust.rc", 41 vendor: true, 42 src: "android.hardware.security.keymint-service.rust.rc", 43} 44 45// vintf_fragments 46prebuilt_etc { 47 name: "android.hardware.security.keymint-service.rust.xml", 48 sub_dir: "vintf", 49 vendor: true, 50 src: "android.hardware.security.keymint-service.rust.xml", 51} 52 53prebuilt_etc { 54 name: "android.hardware.security.sharedsecret-service.rust.xml", 55 sub_dir: "vintf", 56 vendor: true, 57 src: "android.hardware.security.sharedsecret-service.rust.xml", 58} 59 60prebuilt_etc { 61 name: "android.hardware.security.secureclock-service.rust.xml", 62 sub_dir: "vintf", 63 vendor: true, 64 src: "android.hardware.security.secureclock-service.rust.xml", 65} 66 67// permissions 68prebuilt_etc { 69 name: "android.hardware.hardware_keystore.rust-keymint.xml", 70 sub_dir: "permissions", 71 vendor: true, 72 src: "android.hardware.hardware_keystore.rust-keymint.xml", 73} 74 75apex { 76 name: "com.android.hardware.keymint.rust_cf_remote", 77 manifest: "manifest.json", 78 file_contexts: "file_contexts", 79 key: "com.google.cf.apex.key", 80 certificate: ":com.google.cf.apex.certificate", 81 soc_specific: true, 82 updatable: false, 83 binaries: [ 84 "android.hardware.security.keymint-service.rust", 85 ], 86 prebuilts: [ 87 // init_rc 88 "android.hardware.security.keymint-service.rust.rc", 89 // vintf_fragments 90 "android.hardware.security.keymint-service.rust.xml", 91 "android.hardware.security.secureclock-service.rust.xml", 92 "android.hardware.security.sharedsecret-service.rust.xml", 93 // permissions 94 "android.hardware.hardware_keystore.rust-keymint.xml", 95 ], 96} 97