diff --git a/adapter/Android.bp b/adapter/Android.bp
deleted file mode 100644
index ecfd6aa..0000000
--- a/adapter/Android.bp
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2023 LibreMobileOS Foundation
- *
- * 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.
- */
-
-cc_binary {
-    name: "android.hardware.biometrics.face@1.0-service.lmodroid",
-    defaults: ["hidl_defaults"],
-    init_rc: ["android.hardware.biometrics.face@1.0-service.lmodroid.rc"],
-    relative_install_path: "hw",
-    srcs: [
-        "BiometricsFace.cpp",
-        "FaceHalServiceCallback.cpp",
-        "service.cpp",
-    ],
-    vendor: true,
-    shared_libs: [
-        "libbinder",
-        "libbinder_ndk",
-        "libhidlbase",
-        "libutils",
-        "liblog",
-        "android.hardware.biometrics.face@1.0",
-        "LMOFaceClient_aidl-V1-ndk",
-    ],
-}
diff --git a/adapter/BiometricsFace.cpp b/adapter/BiometricsFace.cpp
deleted file mode 100644
index 92d279f..0000000
--- a/adapter/BiometricsFace.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2020 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.
- */
-
-#include "BiometricsFace.h"
-#include "FaceHalServiceCallback.h"
-
-namespace android::hardware::biometrics::face::implementation {
-
-BiometricsFace::BiometricsFace(IFaceHalService faceHalService) : mFaceHalService(faceHalService) {}
-
-Return<Status> intToStatus(int32_t error) {
-    switch (error) {
-        case 0:
-            return Status::OK;
-        case 1:
-            return Status::ILLEGAL_ARGUMENT;
-        case 2:
-            return Status::OPERATION_NOT_SUPPORTED;
-        case 3:
-            return Status::INTERNAL_ERROR;
-        case 4:
-            return Status::NOT_ENROLLED;
-    }
-    return Status::OK;
-}
-
-// Methods from IBiometricsFace follow.
-Return<void> BiometricsFace::setCallback(const sp<IBiometricsFaceClientCallback>& clientCallback,
-                                         setCallback_cb _hidl_cb) {
-    int64_t userId = 0;
-    mFaceHalService->getDeviceId(&userId);
-    sp<FaceHalServiceCallback> faceHalCallback = new FaceHalServiceCallback(clientCallback);
-    mFaceHalService->setCallback(faceHalCallback);
-    _hidl_cb({Status::OK, (uint64_t) userId});
-    return Void();
-}
-
-Return<Status> BiometricsFace::setActiveUser(int32_t userId, const hidl_string& storePath) {
-    int32_t ret = 0;
-    mFaceHalService->setActiveUser(userId, storePath.c_str(), &ret);
-    return intToStatus(ret);
-}
-
-Return<void> BiometricsFace::generateChallenge(uint32_t timeout,
-                                               generateChallenge_cb _hidl_cb) {
-    int64_t challenge = 0;
-    mFaceHalService->generateChallenge(timeout, &challenge);
-    _hidl_cb({Status::OK, (uint64_t)challenge});
-    return Void();
-}
-
-Return<Status> BiometricsFace::enroll(const hidl_vec<uint8_t>& hat, uint32_t timeoutSec,
-                                      const hidl_vec<Feature>& disabledFeatures) {
-    int32_t ret = 0;
-    ::std::vector<int32_t> disabledFeaturesVec;
-    for (int i = 0; i < disabledFeatures.size(); ++i) {
-        disabledFeaturesVec.push_back(static_cast<int32_t>(disabledFeatures[i]));
-    }
-    mFaceHalService->enroll(hat, timeoutSec, disabledFeaturesVec, &ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::revokeChallenge() {
-    int32_t ret = 0;
-    mFaceHalService->revokeChallenge(&ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::setFeature(Feature feature, bool enabled,
-                                          const hidl_vec<uint8_t>& hat,
-                                          uint32_t faceId) {
-    int32_t ret = 0;
-    mFaceHalService->setFeature(static_cast<int32_t>(feature), enabled, hat, faceId, &ret);
-    return intToStatus(ret);
-}
-
-Return<void> BiometricsFace::getFeature(Feature feature, uint32_t faceId,
-                                        getFeature_cb _hidl_cb) {
-    bool ret = false;
-    mFaceHalService->getFeature(static_cast<int32_t>(feature), faceId, &ret);
-    _hidl_cb({Status::OK, ret});
-    return Void();
-}
-
-Return<void> BiometricsFace::getAuthenticatorId(getAuthenticatorId_cb _hidl_cb) {
-    int64_t authenticatorId = 0;
-    mFaceHalService->getAuthenticatorId(&authenticatorId);
-    _hidl_cb({Status::OK, (uint64_t) authenticatorId});
-    return Void();
-}
-
-Return<Status> BiometricsFace::cancel() {
-    int32_t ret = 0;
-    mFaceHalService->cancel(&ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::enumerate() {
-    int32_t ret = 0;
-    mFaceHalService->enumerate(&ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::remove(uint32_t faceId) {
-    int32_t ret = 0;
-    mFaceHalService->remove(faceId, &ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::authenticate(uint64_t operationId) {
-    int32_t ret = 0;
-    mFaceHalService->authenticate(operationId, &ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::userActivity() {
-    int32_t ret = 0;
-    mFaceHalService->userActivity(&ret);
-    return intToStatus(ret);
-}
-
-Return<Status> BiometricsFace::resetLockout(const hidl_vec<uint8_t>& hat) {
-    int32_t ret = 0;
-    mFaceHalService->resetLockout(hat, &ret);
-    return intToStatus(ret);
-}
-
-}  // namespace android::hardware::biometrics::face::implementation
diff --git a/adapter/BiometricsFace.h b/adapter/BiometricsFace.h
deleted file mode 100644
index 7e415a7..0000000
--- a/adapter/BiometricsFace.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2020 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.
- */
-
-#pragma once
-
-#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
-#include <hidl/MQDescriptor.h>
-#include <hidl/Status.h>
-#include <random>
-
-#include <aidl/com/libremobileos/faceunlock/client/IFaceHalService.h>
-#include <aidl/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.h>
-#include <aidl/com/libremobileos/faceunlock/client/BnFaceHalServiceCallback.h>
-
-namespace android::hardware::biometrics::face::implementation {
-
-using ::android::sp;
-using ::android::hardware::hidl_array;
-using ::android::hardware::hidl_memory;
-using ::android::hardware::hidl_string;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::biometrics::face::V1_0::Feature;
-using ::android::hardware::biometrics::face::V1_0::IBiometricsFaceClientCallback;
-using ::android::hardware::biometrics::face::V1_0::Status;
-
-using ::aidl::com::libremobileos::faceunlock::client::BnFaceHalServiceCallback;
-using ::aidl::com::libremobileos::faceunlock::client::IFaceHalService;
-using ::aidl::com::libremobileos::faceunlock::client::IFaceHalServiceCallback;
-
-class BiometricsFace : public V1_0::IBiometricsFace {
-  public:
-    BiometricsFace(IFaceHalService);
-
-    // Methods from ::android::hardware::biometrics::face::V1_0::IBiometricsFace follow.
-    Return<void> setCallback(const sp<IBiometricsFaceClientCallback>& clientCallback,
-                             setCallback_cb _hidl_cb) override;
-
-    Return<Status> setActiveUser(int32_t userId, const hidl_string& storePath) override;
-
-    Return<void> generateChallenge(uint32_t challengeTimeoutSec,
-                                   generateChallenge_cb _hidl_cb) override;
-
-    Return<Status> enroll(const hidl_vec<uint8_t>& hat, uint32_t timeoutSec,
-                          const hidl_vec<Feature>& disabledFeatures) override;
-
-    Return<Status> revokeChallenge() override;
-
-    Return<Status> setFeature(Feature feature, bool enabled, const hidl_vec<uint8_t>& hat,
-                              uint32_t faceId) override;
-
-    Return<void> getFeature(Feature feature, uint32_t faceId, getFeature_cb _hidl_cb) override;
-
-    Return<void> getAuthenticatorId(getAuthenticatorId_cb _hidl_cb) override;
-
-    Return<Status> cancel() override;
-
-    Return<Status> enumerate() override;
-
-    Return<Status> remove(uint32_t faceId) override;
-
-    Return<Status> authenticate(uint64_t operationId) override;
-
-    Return<Status> userActivity() override;
-
-    Return<Status> resetLockout(const hidl_vec<uint8_t>& hat) override;
-
-  private:
-    sp<IFaceHalService> mFaceHalService;
-};
-
-}  // namespace android::hardware::biometrics::face::implementation
diff --git a/adapter/FaceHalServiceCallback.cpp b/adapter/FaceHalServiceCallback.cpp
deleted file mode 100644
index 3415e8e..0000000
--- a/adapter/FaceHalServiceCallback.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2020 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.
- */
-
-#include "FaceHalServiceCallback.h"
-
-namespace android::hardware::biometrics::face::implementation {
-
-using ::android::hardware::biometrics::face::V1_0::FaceAcquiredInfo;
-using ::android::hardware::biometrics::face::V1_0::FaceError;
-
-FaceHalServiceCallback::FaceHalServiceCallback(sp<IBiometricsFaceClientCallback> biometricsFaceClientCallback) : mBiometricsFaceClientCallback(biometricsFaceClientCallback) {}
-
-// Methods from ::com::libremobileos::faceunlock::client::IFaceHalServiceCallback follow.
-::ndk::ScopedAStatus FaceHalServiceCallback::onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) {
-    mBiometricsFaceClientCallback->onEnrollResult(deviceId, faceId, userId, remaining);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FaceHalServiceCallback::onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t> &token) {
-    mBiometricsFaceClientCallback->onAuthenticated(deviceId, faceId, userId, token);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FaceHalServiceCallback::onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) {
-    mBiometricsFaceClientCallback->onAcquired(deviceId, userId, static_cast<FaceAcquiredInfo>(acquiredInfo), vendorCode);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FaceHalServiceCallback::onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) {
-    mBiometricsFaceClientCallback->onError(deviceId, userId, static_cast<FaceError>(error), vendorCode);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FaceHalServiceCallback::onRemoved(int64_t deviceId, const ::std::vector<int32_t> &faceIds, int32_t userId) {
-    std::vector<uint32_t> ufaceIds(begin(faceIds), end(faceIds));
-    mBiometricsFaceClientCallback->onRemoved(deviceId, ufaceIds, userId);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FaceHalServiceCallback::onEnumerate(int64_t deviceId, const ::std::vector<int32_t> &faceIds, int32_t userId) {
-    std::vector<uint32_t> ufaceIds(begin(faceIds), end(faceIds));
-    mBiometricsFaceClientCallback->onEnumerate(deviceId, ufaceIds, userId);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-::ndk::ScopedAStatus FaceHalServiceCallback::onLockoutChanged(int64_t duration) {
-    mBiometricsFaceClientCallback->onLockoutChanged(duration);
-    return ::ndk::ScopedAStatus::ok();
-}
-
-}  // namespace android::hardware::biometrics::face::implementation
diff --git a/adapter/FaceHalServiceCallback.h b/adapter/FaceHalServiceCallback.h
deleted file mode 100644
index abf44df..0000000
--- a/adapter/FaceHalServiceCallback.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2020 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.
- */
-
-#pragma once
-
-#include "BiometricsFace.h"
-
-namespace android::hardware::biometrics::face::implementation {
-
-class FaceHalServiceCallback : public BnFaceHalServiceCallback {
-public:
-    FaceHalServiceCallback(sp<IBiometricsFaceClientCallback>);
-
-    // Methods from ::aidl::com::libremobileos::faceunlock::client::IFaceHalServiceCallback follow.
-    ::ndk::ScopedAStatus onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) override;
-
-    ::ndk::ScopedAStatus onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t> &token) override;
-
-    ::ndk::ScopedAStatus onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) override;
-
-    ::ndk::ScopedAStatus onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) override;
-
-    ::ndk::ScopedAStatus onRemoved(int64_t deviceId, const ::std::vector<int32_t> &faceIds, int32_t userId) override;
-
-    ::ndk::ScopedAStatus onEnumerate(int64_t deviceId, const ::std::vector<int32_t> &faceIds, int32_t userId) override;
-
-    ::ndk::ScopedAStatus onLockoutChanged(int64_t duration) override;
-
-private:
-    sp<IBiometricsFaceClientCallback> mBiometricsFaceClientCallback;
-};
-
-}  // namespace android::hardware::biometrics::face::implementation
diff --git a/adapter/android.hardware.biometrics.face@1.0-service.lmodroid.rc b/adapter/android.hardware.biometrics.face@1.0-service.lmodroid.rc
deleted file mode 100644
index 4495f48..0000000
--- a/adapter/android.hardware.biometrics.face@1.0-service.lmodroid.rc
+++ /dev/null
@@ -1,11 +0,0 @@
-service vendor.face-hal-1-0-lmodroid /vendor/bin/hw/android.hardware.biometrics.face@1.0-service.lmodroid
-    # "class hal" causes a race condition on some devices due to files created
-    # in /data. As a workaround, postpone startup until later in boot once
-    # /data is mounted.
-    class late_start
-    user system
-    group system
-    writepid /dev/cpuset/foreground/tasks
-    capabilities SYS_NICE
-    rlimit rtprio 10 10
-    disabled
diff --git a/adapter/service.cpp b/adapter/service.cpp
deleted file mode 100644
index 1614511..0000000
--- a/adapter/service.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2020 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.
- */
-
-#define LOG_TAG "android.hardware.biometrics.face@1.0-service.lmodroid"
-
-#include "BiometricsFace.h"
-#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
-#include <android/hardware/biometrics/face/1.0/types.h>
-#include <android/log.h>
-#include <android/binder_manager.h>
-#include <binder/ProcessState.h>
-#include <hidl/HidlSupport.h>
-#include <hidl/HidlTransportSupport.h>
-
-using android::IBinder;
-using android::sp;
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-using android::hardware::biometrics::face::implementation::BiometricsFace;
-using android::hardware::biometrics::face::V1_0::IBiometricsFace;
-using ::aidl::com::libremobileos::faceunlock::client::IFaceHalService;
-
-int main() {
-    ALOGI("LMODroid BiometricsFace HAL is being started.");
-    // the conventional HAL might start binder services
-    android::ProcessState::self()->setThreadPoolMaxThreadCount(4);
-    android::ProcessState::self()->startThreadPool();
-    configureRpcThreadpool(4, true /*callerWillJoin*/);
-
-    ALOGI("Waiting for faceunlockhal service to start...");
-    IFaceHalService faceHalService = IFaceHalService::fromBinder(SpAIBinder(AServiceManager_waitForService("faceunlockhal")));
-
-    android::sp<IBiometricsFace> face = new BiometricsFace(faceHalService);
-    const android::status_t status = face->registerAsService("lmodroid");
-
-    if (status != android::OK) {
-        ALOGE("Error starting the BiometricsFace HAL.");
-        return 1;
-    }
-
-    ALOGI("BiometricsFace HAL has started successfully.");
-    joinRpcThreadpool();
-
-    ALOGI("BiometricsFace HAL is terminating.");
-    return 1;  // should never get here
-}
diff --git a/app/src/main/Android.bp b/app/src/main/Android.bp
index abc147e..1010db2 100644
--- a/app/src/main/Android.bp
+++ b/app/src/main/Android.bp
@@ -18,6 +18,4 @@
     ],
     required: ["LMOFaceUnlockSettingsOverlay"],
     jni_libs: ["libtensorflowlite_jni"],
-    init_rc: ["LMOFaceUnlock.rc"],
-    vintf_fragments: ["manifest_face_lmodroid.xml"],
 }
diff --git a/app/src/main/LMOFaceUnlock.rc b/app/src/main/LMOFaceUnlock.rc
deleted file mode 100644
index ce9a9de..0000000
--- a/app/src/main/LMOFaceUnlock.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-on post-fs-data
-    start vendor.face-hal-1-0-lmodroid
diff --git a/app/src/main/manifest_face_lmodroid.xml b/app/src/main/manifest_face_lmodroid.xml
deleted file mode 100644
index 514a02d..0000000
--- a/app/src/main/manifest_face_lmodroid.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<manifest version="2.0" type="framework">
-    <hal format="hidl">
-        <name>android.hardware.biometrics.face</name>
-        <transport>hwbinder</transport>
-        <version>1.0</version>
-        <interface>
-            <name>IBiometricsFace</name>
-            <instance>lmodroid</instance>
-        </interface>
-    </hal>
-</manifest>
diff --git a/framework/Android.bp b/framework/Android.bp
index 546ec1b..cd51880 100644
--- a/framework/Android.bp
+++ b/framework/Android.bp
@@ -1,24 +1,21 @@
 aidl_interface {
     name: "LMOFaceClient_aidl",
-    vendor_available: true,
     srcs: [
         "client/**/*.aidl",
     ],
     local_include_dir: "client",
-    stability: "vintf",
-    // cheat around setting a version
+    unstable: true,
     owner: "libremobileos",
     backend: {
         java: {
             enabled: true,
-            // markVintfStability() is a platform API
             platform_apis: true,
         },
         cpp: {
             enabled: true,
         },
         ndk: {
-            enabled: true,
+            enabled: false,
         },
     },
 }
@@ -28,7 +25,7 @@
     platform_apis: true,
     srcs: ["client/**/*.java"],
     static_libs: [
-        "LMOFaceClient_aidl-V1-java",
+        "LMOFaceClient_aidl-java",
     ],
 }
 
diff --git a/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceHalService.aidl b/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceHalService.aidl
deleted file mode 100644
index c68ed3a..0000000
--- a/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceHalService.aidl
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2023 LibreMobileOS Foundation
- *
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-//     the interface (from the latest frozen version), the build system will
-//     prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package com.libremobileos.faceunlock.client;
-@VintfStability
-interface IFaceHalService {
-  long getDeviceId();
-  oneway void setCallback(in com.libremobileos.faceunlock.client.IFaceHalServiceCallback callback);
-  int setActiveUser(int userId, String storePath);
-  long generateChallenge(int timeout);
-  int enroll(in byte[] token, int timeout, in int[] disabledFeatures);
-  int revokeChallenge();
-  int setFeature(int feature, boolean enable, in byte[] token, int faceId);
-  boolean getFeature(int feature, int faceId);
-  long getAuthenticatorId();
-  int cancel();
-  int enumerate();
-  int remove(int faceId);
-  int authenticate(long operationId);
-  int userActivity();
-  int resetLockout(in byte[] token);
-}
diff --git a/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl b/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl
deleted file mode 100644
index f6fbae6..0000000
--- a/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2023 LibreMobileOS Foundation
- *
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-//     the interface (from the latest frozen version), the build system will
-//     prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package com.libremobileos.faceunlock.client;
-@VintfStability
-interface IFaceHalServiceCallback {
-  oneway void onEnrollResult(long deviceId, int faceId, int userId, int remaining);
-  oneway void onAuthenticated(long deviceId, int faceId, int userId, in byte[] token);
-  oneway void onAcquired(long deviceId, int userId, int acquiredInfo, int vendorCode);
-  oneway void onError(long deviceId, int userId, int error, int vendorCode);
-  oneway void onRemoved(long deviceId, in int[] faceIds, int userId);
-  oneway void onEnumerate(long deviceId, in int[] faceIds, int userId);
-  oneway void onLockoutChanged(long duration);
-}
diff --git a/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl b/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl
deleted file mode 100644
index 615eb2d..0000000
--- a/framework/aidl_api/LMOFaceClient_aidl/current/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2023 LibreMobileOS Foundation
- *
- * 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-//     the interface (from the latest frozen version), the build system will
-//     prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package com.libremobileos.faceunlock.client;
-@VintfStability
-interface IFaceUnlockManager {
-  void enrollResult(int remaining);
-  void error(int error);
-  void finishEnroll(String encodedFaces, in byte[] token);
-}
diff --git a/framework/client/com/libremobileos/faceunlock/client/IFaceHalService.aidl b/framework/client/com/libremobileos/faceunlock/client/IFaceHalService.aidl
index 55a79dd..f4ee366 100644
--- a/framework/client/com/libremobileos/faceunlock/client/IFaceHalService.aidl
+++ b/framework/client/com/libremobileos/faceunlock/client/IFaceHalService.aidl
@@ -18,7 +18,6 @@
 
 import com.libremobileos.faceunlock.client.IFaceHalServiceCallback;
 
-@VintfStability
 interface IFaceHalService {
     long getDeviceId();
 
diff --git a/framework/client/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl b/framework/client/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl
index 379ab42..f92bfe9 100644
--- a/framework/client/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl
+++ b/framework/client/com/libremobileos/faceunlock/client/IFaceHalServiceCallback.aidl
@@ -16,7 +16,6 @@
 
 package com.libremobileos.faceunlock.client;
 
-@VintfStability
 oneway interface IFaceHalServiceCallback {
     void onEnrollResult(long deviceId, int faceId, int userId, int remaining);
 
diff --git a/framework/client/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl b/framework/client/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl
index 389c82d..39909b1 100644
--- a/framework/client/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl
+++ b/framework/client/com/libremobileos/faceunlock/client/IFaceUnlockManager.aidl
@@ -16,7 +16,6 @@
 
 package com.libremobileos.faceunlock.client;
 
-@VintfStability
 interface IFaceUnlockManager {
     void enrollResult(int remaining);
     void error(int error);
diff --git a/framework/server/com/libremobileos/faceunlock/client/FaceCallbackAdapter.java b/framework/server/com/libremobileos/faceunlock/client/FaceCallbackAdapter.java
new file mode 100644
index 0000000..b6e2f02
--- /dev/null
+++ b/framework/server/com/libremobileos/faceunlock/client/FaceCallbackAdapter.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2023 LibreMobileOS Foundation
+ *
+ * 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 com.libremobileos.faceunlock.client;
+
+import android.hardware.biometrics.face.V1_0.IBiometricsFaceClientCallback;
+import android.os.RemoteException;
+
+import java.util.ArrayList;
+
+public class FaceCallbackAdapter extends IFaceHalServiceCallback.Stub {
+    private final IBiometricsFaceClientCallback mCallback;
+
+    /* package-private */ FaceCallbackAdapter(IBiometricsFaceClientCallback callback) {
+        this.mCallback = callback;
+    }
+
+    @Override
+    public void onEnrollResult(long deviceId, int faceId, int userId, int remaining) throws RemoteException {
+        mCallback.onEnrollResult(deviceId, faceId, userId, remaining);
+    }
+
+    @Override
+    public void onAuthenticated(long deviceId, int faceId, int userId, byte[] token) throws RemoteException {
+        mCallback.onAuthenticated(deviceId, faceId, userId, convertArr(token));
+    }
+
+    @Override
+    public void onAcquired(long deviceId, int userId, int acquiredInfo, int vendorCode) throws RemoteException {
+        mCallback.onAcquired(deviceId, userId, acquiredInfo, vendorCode);
+    }
+
+    @Override
+    public void onError(long deviceId, int userId, int error, int vendorCode) throws RemoteException {
+        mCallback.onError(deviceId, userId, error, vendorCode);
+    }
+
+    @Override
+    public void onRemoved(long deviceId, int[] faceIds, int userId) throws RemoteException {
+        mCallback.onRemoved(deviceId, convertArr(faceIds), userId);
+    }
+
+    @Override
+    public void onEnumerate(long deviceId, int[] faceIds, int userId) throws RemoteException {
+        mCallback.onEnumerate(deviceId, convertArr(faceIds), userId);
+    }
+
+    @Override
+    public void onLockoutChanged(long duration) throws RemoteException {
+        mCallback.onLockoutChanged(duration);
+    }
+
+    private static ArrayList<Integer> convertArr(int[] ar) {
+        ArrayList<Integer> ret = new ArrayList<>();;
+        for (int b : ar) {
+            ret.add(b);
+        }
+        return ret;
+    }
+
+    private static ArrayList<Byte> convertArr(byte[] ar) {
+        ArrayList<Byte> ret = new ArrayList<>();;
+        for (byte b : ar) {
+            ret.add(b);
+        }
+        return ret;
+    }
+}
diff --git a/framework/server/com/libremobileos/faceunlock/client/FaceUnlockHalManager.java b/framework/server/com/libremobileos/faceunlock/client/FaceUnlockHalManager.java
new file mode 100644
index 0000000..63f3211
--- /dev/null
+++ b/framework/server/com/libremobileos/faceunlock/client/FaceUnlockHalManager.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2023 LibreMobileOS Foundation
+ *
+ * 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 com.libremobileos.faceunlock.client;
+
+import android.hardware.biometrics.face.V1_0.IBiometricsFace;
+import android.os.ServiceManager;
+import android.util.Log;
+
+public final class FaceUnlockHalManager {
+
+	public static final String SERVICE_NAME = "faceunlockhal";
+	private static final String TAG = "FaceUnlockHalManager";
+
+	public static IBiometricsFace getIBiometricsFace() {
+		IFaceHalService faceHalService = IFaceHalService.Stub.asInterface(
+                        ServiceManager.getService(SERVICE_NAME));
+		if (faceHalService == null) {
+			Log.e(TAG, "Unable to get IFaceHalService.");
+		    return null;
+        }
+		return new FakeBiometricsFace(faceHalService);
+	}
+}
diff --git a/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java b/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java
new file mode 100644
index 0000000..9a1ac02
--- /dev/null
+++ b/framework/server/com/libremobileos/faceunlock/client/FakeBiometricsFace.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright (C) 2023 LibreMobileOS Foundation
+ *
+ * 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 com.libremobileos.faceunlock.client;
+
+import android.hardware.biometrics.face.V1_0.IBiometricsFace;
+import android.hardware.biometrics.face.V1_0.IBiometricsFaceClientCallback;
+import android.hardware.biometrics.face.V1_0.OptionalBool;
+import android.hardware.biometrics.face.V1_0.OptionalUint64;
+import android.hardware.biometrics.face.V1_0.Status;
+import android.hidl.base.V1_0.DebugInfo;
+import android.os.IHwBinder;
+import android.os.NativeHandle;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.util.ArrayList;
+
+public class FakeBiometricsFace implements IBiometricsFace {
+
+    private static final String TAG = "FakeBiometricsFace";
+
+    private final IFaceHalService mFaceHalService;
+    /* package-private */ FakeBiometricsFace(IFaceHalService faceHalService) {
+        this.mFaceHalService = faceHalService;
+    }
+
+    @Override
+    public IHwBinder asBinder() {
+        // Stub
+        Log.e(TAG, "unsupported call to asBinder()");
+        return null;
+    }
+
+    @Override
+    public OptionalUint64 setCallback(IBiometricsFaceClientCallback iBiometricsFaceClientCallback) throws RemoteException {
+        mFaceHalService.setCallback(new FaceCallbackAdapter(iBiometricsFaceClientCallback));
+        return makeOkUint(0);
+    }
+
+    @Override
+    public int setActiveUser(int i, String s) throws RemoteException {
+        return mFaceHalService.setActiveUser(i, s);
+    }
+
+    @Override
+    public OptionalUint64 generateChallenge(int i) throws RemoteException {
+        return makeOkUint(mFaceHalService.generateChallenge(i));
+    }
+
+    @Override
+    public int enroll(ArrayList<Byte> arrayList, int i, ArrayList<Integer> arrayList1) throws RemoteException {
+        return mFaceHalService.enroll(convertArr(arrayList), i, convertIntArr(arrayList1));
+    }
+
+    @Override
+    public int revokeChallenge() throws RemoteException {
+        return mFaceHalService.revokeChallenge();
+    }
+
+    @Override
+    public int setFeature(int i, boolean b, ArrayList<Byte> arrayList, int i1) throws RemoteException {
+        return mFaceHalService.setFeature(i, b, convertArr(arrayList), i1);
+    }
+
+    @Override
+    public OptionalBool getFeature(int i, int i1) throws RemoteException {
+        OptionalBool ret = new OptionalBool();
+        ret.status = Status.OK;
+        ret.value = mFaceHalService.getFeature(i, i1);
+        return ret;
+    }
+
+    @Override
+    public OptionalUint64 getAuthenticatorId() throws RemoteException {
+        return makeOkUint(mFaceHalService.getAuthenticatorId());
+    }
+
+    @Override
+    public int cancel() throws RemoteException {
+        return mFaceHalService.cancel();
+    }
+
+    @Override
+    public int enumerate() throws RemoteException {
+        return mFaceHalService.enumerate();
+    }
+
+    @Override
+    public int remove(int i) throws RemoteException {
+        return mFaceHalService.remove(i);
+    }
+
+    @Override
+    public int authenticate(long l) throws RemoteException {
+        return mFaceHalService.authenticate(l);
+    }
+
+    @Override
+    public int userActivity() throws RemoteException {
+        return mFaceHalService.userActivity();
+    }
+
+    @Override
+    public int resetLockout(ArrayList<Byte> arrayList) throws RemoteException {
+        return mFaceHalService.resetLockout(convertArr(arrayList));
+    }
+
+    @Override
+    public ArrayList<String> interfaceChain() throws RemoteException {
+        // Stub
+        return null;
+    }
+
+    @Override
+    public void debug(NativeHandle nativeHandle, ArrayList<String> arrayList) throws RemoteException {
+        // Stub
+    }
+
+    @Override
+    public String interfaceDescriptor() throws RemoteException {
+        // Stub
+        return null;
+    }
+
+    @Override
+    public ArrayList<byte[]> getHashChain() throws RemoteException {
+        // Stub
+        return null;
+    }
+
+    @Override
+    public void setHALInstrumentation() throws RemoteException {
+        // Stub
+    }
+
+    @Override
+    public boolean linkToDeath(IHwBinder.DeathRecipient deathRecipient, long l) throws RemoteException {
+        // Stub
+        return false;
+    }
+
+    @Override
+    public void ping() throws RemoteException {
+        // Stub
+    }
+
+    @Override
+    public DebugInfo getDebugInfo() throws RemoteException {
+        // Stub
+        return null;
+    }
+
+    @Override
+    public void notifySyspropsChanged() throws RemoteException {
+        // Stub
+    }
+
+    @Override
+    public boolean unlinkToDeath(IHwBinder.DeathRecipient deathRecipient) throws RemoteException {
+        // Stub
+        return false;
+    }
+
+    private static OptionalUint64 makeOkUint(long value) {
+        OptionalUint64 ret = new OptionalUint64();
+        ret.status = Status.OK;
+        ret.value = value;
+        return ret;
+    }
+
+    private static int[] convertIntArr(ArrayList<Integer> al) {
+        int[] ret = new int[al.size()];
+        for (int i = 0; i < ret.length; i++) {
+            ret[i] = al.get(i);
+        }
+        return ret;
+    }
+
+    private static byte[] convertArr(ArrayList<Byte> al) {
+        byte[] ret = new byte[al.size()];
+        for (int i = 0; i < ret.length; i++) {
+            ret[i] = al.get(i);
+        }
+        return ret;
+    }
+}
diff --git a/framework/server/com/libremobileos/faceunlock/server/FaceUnlockServer.java b/framework/server/com/libremobileos/faceunlock/server/FaceUnlockServer.java
index 3968d39..221a813 100644
--- a/framework/server/com/libremobileos/faceunlock/server/FaceUnlockServer.java
+++ b/framework/server/com/libremobileos/faceunlock/server/FaceUnlockServer.java
@@ -79,12 +79,6 @@
 
 	private final IBinder mFaceUnlockHalBinder = new IFaceHalService.Stub() {
 
-        @Override
-        public final int getInterfaceVersion() { return super.VERSION; }
-
-        @Override
-		public final String getInterfaceHash() { return super.HASH; }
-
 		@Override
 		public long getDeviceId() {
 			return kDeviceId;
@@ -431,12 +425,6 @@
 
 	private final IBinder mFaceUnlockManagerBinder = new IFaceUnlockManager.Stub() {
 
-        @Override
-        public final int getInterfaceVersion() { return super.VERSION; }
-
-        @Override
-		public final String getInterfaceHash() { return super.HASH; }
-
 		@Override
 		public void enrollResult(int remaining) throws RemoteException {
 			if (mCallback != null) {
