Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80baad2c authored by Jooyung Han's avatar Jooyung Han
Browse files

Make Fingerprint Virtual HAL APEX as default

- moved apex definition beside the HAL binary definition
- updated README.md about installation

Bug: 306314086
Test: follow README.md to test the virtual FP HAL
Change-Id: I4bb2572ca79c93cb32a273625f4e965c2505e48a
parent 446fe9a5
Loading
Loading
Loading
Loading
+28 −6
Original line number Diff line number Diff line
@@ -11,8 +11,6 @@ cc_binary {
    name: "android.hardware.biometrics.fingerprint-service.example",
    vendor: true,
    relative_install_path: "hw",
    init_rc: [":fingerprint-example.rc"],
    vintf_fragments: [":fingerprint-example.xml"],
    local_include_dirs: ["include"],
    srcs: [
        "FakeLockoutTracker.cpp",
@@ -33,6 +31,7 @@ cc_binary {
        "android.hardware.biometrics.common.util",
    ],
    static_libs: ["libandroid.hardware.biometrics.fingerprint.VirtualProps"],
    installable: false, // install APEX instead
}

cc_test {
@@ -143,12 +142,35 @@ sysprop_library {
    vendor: true,
}

filegroup {
prebuilt_etc {
    name: "fingerprint-example.rc",
    srcs: ["fingerprint-example.rc"],
    src: "fingerprint-example.rc",
    installable: false,
}

filegroup {
prebuilt_etc {
    name: "fingerprint-example.xml",
    srcs: ["fingerprint-example.xml"],
    src: "fingerprint-example.xml",
    sub_dir: "vintf",
    installable: false,
}

apex {
    name: "com.android.hardware.biometrics.fingerprint.virtual",
    manifest: "apex_manifest.json",
    file_contexts: "apex_file_contexts",
    key: "com.android.hardware.key",
    certificate: ":com.android.hardware.certificate",
    updatable: false,
    vendor: true,

    binaries: [
        "android.hardware.biometrics.fingerprint-service.example",
    ],
    prebuilts: [
        // init_rc
        "fingerprint-example.rc",
        // vintf_fragment
        "fingerprint-example.xml",
    ],
}
+0 −6
Original line number Diff line number Diff line
@@ -10,12 +10,6 @@ emulators.
This HAL can be used on emulators, like cuttlefish, or on real devices. Add the
following to your device's `.mk` file to include it:

```
PRODUCT_PACKAGES_DEBUG += android.hardware.biometrics.fingerprint-service.example
```

or add the following to include it as an apex:

```
PRODUCT_PACKAGES_DEBUG += com.android.hardware.biometrics.fingerprint.virtual
```
+0 −61
Original line number Diff line number Diff line
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

apex {
    name: "com.android.hardware.biometrics.fingerprint.virtual",
    manifest: "manifest.json",
    file_contexts: "file_contexts",
    key: "com.android.hardware.key",
    certificate: ":com.android.hardware.certificate",
    updatable: false,
    vendor: true,

    binaries: [
        "android.hardware.biometrics.fingerprint-service.example",
    ],
    prebuilts: [
        // init_rc
        "fingerprint-example-apex.rc",
        // vintf_fragment
        "fingerprint-example-apex.xml",
    ],

    overrides: [
        "android.hardware.biometrics.fingerprint-service.example",
    ],
}

genrule {
    name: "gen-fingerprint-example-apex.rc",
    srcs: [":fingerprint-example.rc"],
    out: ["fingerprint-example-apex.rc"],
    cmd: "sed -e 's@/vendor/bin/@/apex/com.android.hardware.biometrics.fingerprint.virtual/bin/@' $(in) > $(out)",
}

prebuilt_etc {
    name: "fingerprint-example-apex.rc",
    src: ":gen-fingerprint-example-apex.rc",
    installable: false,
}

prebuilt_etc {
    name: "fingerprint-example-apex.xml",
    src: ":fingerprint-example.xml",
    sub_dir: "vintf",
    installable: false,
}
Loading