Implement cpp version of HIDL to AIDL adapter
diff --git a/adapter/Android.bp b/adapter/Android.bp
new file mode 100644
index 0000000..fb88e32
--- /dev/null
+++ b/adapter/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * 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"],
+    vintf_fragments: ["manifest_face_lmodroid.xml"],
+    relative_install_path: "hw",
+    srcs: [
+        "BiometricsFace.cpp",
+        "FaceHalServiceCallback.cpp",
+        "service.cpp",
+        "binder-interfaces/IFaceHalService.cpp",
+        "binder-interfaces/IFaceHalServiceCallback.cpp"
+    ],
+    local_include_dirs: [
+        "binder-interfaces/include"
+    ],
+    shared_libs: [
+        "libbinder",
+        "libhidlbase",
+        "libutils",
+        "liblog",
+        "android.hardware.biometrics.face@1.0",
+    ],
+}
diff --git a/adapter/BiometricsFace.cpp b/adapter/BiometricsFace.cpp
new file mode 100644
index 0000000..0f97eb6
--- /dev/null
+++ b/adapter/BiometricsFace.cpp
@@ -0,0 +1,141 @@
+/*
+ * 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(sp<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, android::String16(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
new file mode 100644
index 0000000..f8fdaf0
--- /dev/null
+++ b/adapter/BiometricsFace.h
@@ -0,0 +1,86 @@
+/*
+ * 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 <com/android/internal/libremobileos/faceunlock/IFaceHalService.h>
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h>
+#include <com/android/internal/libremobileos/faceunlock/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 ::com::android::internal::libremobileos::faceunlock::BnFaceHalServiceCallback;
+using ::com::android::internal::libremobileos::faceunlock::IFaceHalService;
+using ::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback;
+
+class BiometricsFace : public V1_0::IBiometricsFace {
+  public:
+    BiometricsFace(sp<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
new file mode 100644
index 0000000..980251c
--- /dev/null
+++ b/adapter/FaceHalServiceCallback.cpp
@@ -0,0 +1,64 @@
+/*
+ * 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::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback follow.
+::android::binder::Status FaceHalServiceCallback::onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) {
+    mBiometricsFaceClientCallback->onEnrollResult(deviceId, faceId, userId, remaining);
+    return ::android::binder::Status::ok();
+}
+
+::android::binder::Status FaceHalServiceCallback::onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t> &token) {
+    mBiometricsFaceClientCallback->onAuthenticated(deviceId, faceId, userId, token);
+    return ::android::binder::Status::ok();
+}
+
+::android::binder::Status FaceHalServiceCallback::onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) {
+    mBiometricsFaceClientCallback->onAcquired(deviceId, userId, static_cast<FaceAcquiredInfo>(acquiredInfo), vendorCode);
+    return ::android::binder::Status::ok();
+}
+
+::android::binder::Status FaceHalServiceCallback::onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) {
+    mBiometricsFaceClientCallback->onError(deviceId, userId, static_cast<FaceError>(error), vendorCode);
+    return ::android::binder::Status::ok();
+}
+
+::android::binder::Status 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 ::android::binder::Status::ok();
+}
+
+::android::binder::Status 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 ::android::binder::Status::ok();
+}
+
+::android::binder::Status FaceHalServiceCallback::onLockoutChanged(int64_t duration) {
+    mBiometricsFaceClientCallback->onLockoutChanged(duration);
+    return ::android::binder::Status::ok();
+}
+
+}  // namespace android::hardware::biometrics::face::implementation
diff --git a/adapter/FaceHalServiceCallback.h b/adapter/FaceHalServiceCallback.h
new file mode 100644
index 0000000..809bd4d
--- /dev/null
+++ b/adapter/FaceHalServiceCallback.h
@@ -0,0 +1,46 @@
+/*
+ * 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 ::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback follow.
+    ::android::binder::Status onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) override;
+
+    ::android::binder::Status onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t> &token) override;
+
+    ::android::binder::Status onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) override;
+
+    ::android::binder::Status onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) override;
+
+    ::android::binder::Status onRemoved(int64_t deviceId, const ::std::vector<int32_t> &faceIds, int32_t userId) override;
+
+    ::android::binder::Status onEnumerate(int64_t deviceId, const ::std::vector<int32_t> &faceIds, int32_t userId) override;
+
+    ::android::binder::Status 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
new file mode 100644
index 0000000..db6646e
--- /dev/null
+++ b/adapter/android.hardware.biometrics.face@1.0-service.lmodroid.rc
@@ -0,0 +1,10 @@
+service face-hal-1-0-lmodroid /system/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
diff --git a/adapter/binder-interfaces/IFaceHalService.cpp b/adapter/binder-interfaces/IFaceHalService.cpp
new file mode 100644
index 0000000..0b266d5
--- /dev/null
+++ b/adapter/binder-interfaces/IFaceHalService.cpp
@@ -0,0 +1,1026 @@
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalService.h>
+#include <com/android/internal/libremobileos/faceunlock/BpFaceHalService.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+DO_NOT_DIRECTLY_USE_ME_IMPLEMENT_META_INTERFACE(FaceHalService, "com.android.internal.libremobileos.faceunlock.IFaceHalService")
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
+#include <com/android/internal/libremobileos/faceunlock/BpFaceHalService.h>
+#include <com/android/internal/libremobileos/faceunlock/BnFaceHalService.h>
+#include <binder/Parcel.h>
+#include <android-base/macros.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+BpFaceHalService::BpFaceHalService(const ::android::sp<::android::IBinder>& _aidl_impl)
+    : BpInterface<IFaceHalService>(_aidl_impl){
+}
+
+::android::binder::Status BpFaceHalService::getDeviceId(int64_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_getDeviceId, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->getDeviceId(_aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt64(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::setCallback(const ::android::sp<::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback>& callback) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeStrongBinder(::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback::asBinder(callback));
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_setCallback, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->setCallback(callback);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::setActiveUser(int32_t userId, const ::android::String16& storePath, int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeString16(storePath);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_setActiveUser, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->setActiveUser(userId, storePath, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::generateChallenge(int32_t timeout, int64_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(timeout);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_generateChallenge, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->generateChallenge(timeout, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt64(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::enroll(const ::std::vector<uint8_t>& token, int32_t timeout, const ::std::vector<int32_t>& disabledFeatures, int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeByteVector(token);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(timeout);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32Vector(disabledFeatures);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_enroll, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->enroll(token, timeout, disabledFeatures, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::revokeChallenge(int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_revokeChallenge, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->revokeChallenge(_aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::setFeature(int32_t feature, bool enable, const ::std::vector<uint8_t>& token, int32_t faceId, int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(feature);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeBool(enable);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeByteVector(token);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(faceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_setFeature, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->setFeature(feature, enable, token, faceId, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::getFeature(int32_t feature, int32_t faceId, bool* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(feature);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(faceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_getFeature, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->getFeature(feature, faceId, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readBool(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::getAuthenticatorId(int64_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_getAuthenticatorId, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->getAuthenticatorId(_aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt64(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::cancel(int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_cancel, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->cancel(_aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::enumerate(int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_enumerate, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->enumerate(_aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::remove(int32_t faceId, int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(faceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_remove, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->remove(faceId, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::authenticate(int64_t operationId, int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(operationId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_authenticate, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->authenticate(operationId, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::userActivity(int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_userActivity, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->userActivity(_aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalService::resetLockout(const ::std::vector<uint8_t>& token, int32_t* _aidl_return) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeByteVector(token);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalService::TRANSACTION_resetLockout, _aidl_data, &_aidl_reply, 0);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalService::getDefaultImpl())) {
+     return IFaceHalService::getDefaultImpl()->resetLockout(token, _aidl_return);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  if (!_aidl_status.isOk()) {
+    return _aidl_status;
+  }
+  _aidl_ret_status = _aidl_reply.readInt32(_aidl_return);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
+#include <com/android/internal/libremobileos/faceunlock/BnFaceHalService.h>
+#include <binder/Parcel.h>
+#include <binder/Stability.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+BnFaceHalService::BnFaceHalService()
+{
+  ::android::internal::Stability::markCompilationUnit(this);
+}
+
+::android::status_t BnFaceHalService::onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) {
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  switch (_aidl_code) {
+  case BnFaceHalService::TRANSACTION_getDeviceId:
+  {
+    int64_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    ::android::binder::Status _aidl_status(getDeviceId(&_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt64(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_setCallback:
+  {
+    ::android::sp<::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback> in_callback;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readStrongBinder(&in_callback);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(setCallback(in_callback));
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_setActiveUser:
+  {
+    int32_t in_userId;
+    ::android::String16 in_storePath;
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readString16(&in_storePath);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(setActiveUser(in_userId, in_storePath, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_generateChallenge:
+  {
+    int32_t in_timeout;
+    int64_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_timeout);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(generateChallenge(in_timeout, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt64(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_enroll:
+  {
+    ::std::vector<uint8_t> in_token;
+    int32_t in_timeout;
+    ::std::vector<int32_t> in_disabledFeatures;
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readByteVector(&in_token);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_timeout);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32Vector(&in_disabledFeatures);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(enroll(in_token, in_timeout, in_disabledFeatures, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_revokeChallenge:
+  {
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    ::android::binder::Status _aidl_status(revokeChallenge(&_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_setFeature:
+  {
+    int32_t in_feature;
+    bool in_enable;
+    ::std::vector<uint8_t> in_token;
+    int32_t in_faceId;
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_feature);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readBool(&in_enable);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readByteVector(&in_token);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_faceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(setFeature(in_feature, in_enable, in_token, in_faceId, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_getFeature:
+  {
+    int32_t in_feature;
+    int32_t in_faceId;
+    bool _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_feature);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_faceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(getFeature(in_feature, in_faceId, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeBool(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_getAuthenticatorId:
+  {
+    int64_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    ::android::binder::Status _aidl_status(getAuthenticatorId(&_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt64(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_cancel:
+  {
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    ::android::binder::Status _aidl_status(cancel(&_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_enumerate:
+  {
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    ::android::binder::Status _aidl_status(enumerate(&_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_remove:
+  {
+    int32_t in_faceId;
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_faceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(remove(in_faceId, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_authenticate:
+  {
+    int64_t in_operationId;
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_operationId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(authenticate(in_operationId, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_userActivity:
+  {
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    ::android::binder::Status _aidl_status(userActivity(&_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  case BnFaceHalService::TRANSACTION_resetLockout:
+  {
+    ::std::vector<uint8_t> in_token;
+    int32_t _aidl_return;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readByteVector(&in_token);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(resetLockout(in_token, &_aidl_return));
+    _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    if (!_aidl_status.isOk()) {
+      break;
+    }
+    _aidl_ret_status = _aidl_reply->writeInt32(_aidl_return);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+  }
+  break;
+  default:
+  {
+    _aidl_ret_status = ::android::BBinder::onTransact(_aidl_code, _aidl_data, _aidl_reply, _aidl_flags);
+  }
+  break;
+  }
+  if (_aidl_ret_status == ::android::UNEXPECTED_NULL) {
+    _aidl_ret_status = ::android::binder::Status::fromExceptionCode(::android::binder::Status::EX_NULL_POINTER).writeToParcel(_aidl_reply);
+  }
+  return _aidl_ret_status;
+}
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/IFaceHalServiceCallback.cpp b/adapter/binder-interfaces/IFaceHalServiceCallback.cpp
new file mode 100644
index 0000000..e915aba
--- /dev/null
+++ b/adapter/binder-interfaces/IFaceHalServiceCallback.cpp
@@ -0,0 +1,519 @@
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h>
+#include <com/android/internal/libremobileos/faceunlock/BpFaceHalServiceCallback.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+DO_NOT_DIRECTLY_USE_ME_IMPLEMENT_META_INTERFACE(FaceHalServiceCallback, "com.android.internal.libremobileos.faceunlock.IFaceHalServiceCallback")
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
+#include <com/android/internal/libremobileos/faceunlock/BpFaceHalServiceCallback.h>
+#include <com/android/internal/libremobileos/faceunlock/BnFaceHalServiceCallback.h>
+#include <binder/Parcel.h>
+#include <android-base/macros.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+BpFaceHalServiceCallback::BpFaceHalServiceCallback(const ::android::sp<::android::IBinder>& _aidl_impl)
+    : BpInterface<IFaceHalServiceCallback>(_aidl_impl){
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(deviceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(faceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(remaining);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onEnrollResult, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onEnrollResult(deviceId, faceId, userId, remaining);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t>& token) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(deviceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(faceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeByteVector(token);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onAuthenticated, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onAuthenticated(deviceId, faceId, userId, token);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(deviceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(acquiredInfo);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(vendorCode);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onAcquired, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onAcquired(deviceId, userId, acquiredInfo, vendorCode);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(deviceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(error);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(vendorCode);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onError, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onError(deviceId, userId, error, vendorCode);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onRemoved(int64_t deviceId, const ::std::vector<int32_t>& faceIds, int32_t userId) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(deviceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32Vector(faceIds);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onRemoved, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onRemoved(deviceId, faceIds, userId);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onEnumerate(int64_t deviceId, const ::std::vector<int32_t>& faceIds, int32_t userId) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(deviceId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32Vector(faceIds);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt32(userId);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onEnumerate, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onEnumerate(deviceId, faceIds, userId);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+::android::binder::Status BpFaceHalServiceCallback::onLockoutChanged(int64_t duration) {
+  ::android::Parcel _aidl_data;
+  _aidl_data.markForBinder(remoteStrong());
+  ::android::Parcel _aidl_reply;
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  ::android::binder::Status _aidl_status;
+  _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = _aidl_data.writeInt64(duration);
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_ret_status = remote()->transact(BnFaceHalServiceCallback::TRANSACTION_onLockoutChanged, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_ONEWAY);
+  if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && IFaceHalServiceCallback::getDefaultImpl())) {
+     return IFaceHalServiceCallback::getDefaultImpl()->onLockoutChanged(duration);
+  }
+  if (((_aidl_ret_status) != (::android::OK))) {
+    goto _aidl_error;
+  }
+  _aidl_error:
+  _aidl_status.setFromStatusT(_aidl_ret_status);
+  return _aidl_status;
+}
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
+#include <com/android/internal/libremobileos/faceunlock/BnFaceHalServiceCallback.h>
+#include <binder/Parcel.h>
+#include <binder/Stability.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+BnFaceHalServiceCallback::BnFaceHalServiceCallback()
+{
+  ::android::internal::Stability::markCompilationUnit(this);
+}
+
+::android::status_t BnFaceHalServiceCallback::onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) {
+  ::android::status_t _aidl_ret_status = ::android::OK;
+  switch (_aidl_code) {
+  case BnFaceHalServiceCallback::TRANSACTION_onEnrollResult:
+  {
+    int64_t in_deviceId;
+    int32_t in_faceId;
+    int32_t in_userId;
+    int32_t in_remaining;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_deviceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_faceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_remaining);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onEnrollResult(in_deviceId, in_faceId, in_userId, in_remaining));
+  }
+  break;
+  case BnFaceHalServiceCallback::TRANSACTION_onAuthenticated:
+  {
+    int64_t in_deviceId;
+    int32_t in_faceId;
+    int32_t in_userId;
+    ::std::vector<uint8_t> in_token;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_deviceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_faceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readByteVector(&in_token);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onAuthenticated(in_deviceId, in_faceId, in_userId, in_token));
+  }
+  break;
+  case BnFaceHalServiceCallback::TRANSACTION_onAcquired:
+  {
+    int64_t in_deviceId;
+    int32_t in_userId;
+    int32_t in_acquiredInfo;
+    int32_t in_vendorCode;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_deviceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_acquiredInfo);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_vendorCode);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onAcquired(in_deviceId, in_userId, in_acquiredInfo, in_vendorCode));
+  }
+  break;
+  case BnFaceHalServiceCallback::TRANSACTION_onError:
+  {
+    int64_t in_deviceId;
+    int32_t in_userId;
+    int32_t in_error;
+    int32_t in_vendorCode;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_deviceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_error);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_vendorCode);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onError(in_deviceId, in_userId, in_error, in_vendorCode));
+  }
+  break;
+  case BnFaceHalServiceCallback::TRANSACTION_onRemoved:
+  {
+    int64_t in_deviceId;
+    ::std::vector<int32_t> in_faceIds;
+    int32_t in_userId;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_deviceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32Vector(&in_faceIds);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onRemoved(in_deviceId, in_faceIds, in_userId));
+  }
+  break;
+  case BnFaceHalServiceCallback::TRANSACTION_onEnumerate:
+  {
+    int64_t in_deviceId;
+    ::std::vector<int32_t> in_faceIds;
+    int32_t in_userId;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_deviceId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32Vector(&in_faceIds);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt32(&in_userId);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onEnumerate(in_deviceId, in_faceIds, in_userId));
+  }
+  break;
+  case BnFaceHalServiceCallback::TRANSACTION_onLockoutChanged:
+  {
+    int64_t in_duration;
+    if (!(_aidl_data.checkInterface(this))) {
+      _aidl_ret_status = ::android::BAD_TYPE;
+      break;
+    }
+    _aidl_ret_status = _aidl_data.readInt64(&in_duration);
+    if (((_aidl_ret_status) != (::android::OK))) {
+      break;
+    }
+    ::android::binder::Status _aidl_status(onLockoutChanged(in_duration));
+  }
+  break;
+  default:
+  {
+    _aidl_ret_status = ::android::BBinder::onTransact(_aidl_code, _aidl_data, _aidl_reply, _aidl_flags);
+  }
+  break;
+  }
+  if (_aidl_ret_status == ::android::UNEXPECTED_NULL) {
+    _aidl_ret_status = ::android::binder::Status::fromExceptionCode(::android::binder::Status::EX_NULL_POINTER).writeToParcel(_aidl_reply);
+  }
+  return _aidl_ret_status;
+}
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BnFaceHalService.h b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BnFaceHalService.h
new file mode 100644
index 0000000..eb3d9c1
--- /dev/null
+++ b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BnFaceHalService.h
@@ -0,0 +1,45 @@
+#pragma once
+
+#include <binder/IInterface.h>
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalService.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+class BnFaceHalService : public ::android::BnInterface<IFaceHalService> {
+public:
+  static constexpr uint32_t TRANSACTION_getDeviceId = ::android::IBinder::FIRST_CALL_TRANSACTION + 0;
+  static constexpr uint32_t TRANSACTION_setCallback = ::android::IBinder::FIRST_CALL_TRANSACTION + 1;
+  static constexpr uint32_t TRANSACTION_setActiveUser = ::android::IBinder::FIRST_CALL_TRANSACTION + 2;
+  static constexpr uint32_t TRANSACTION_generateChallenge = ::android::IBinder::FIRST_CALL_TRANSACTION + 3;
+  static constexpr uint32_t TRANSACTION_enroll = ::android::IBinder::FIRST_CALL_TRANSACTION + 4;
+  static constexpr uint32_t TRANSACTION_revokeChallenge = ::android::IBinder::FIRST_CALL_TRANSACTION + 5;
+  static constexpr uint32_t TRANSACTION_setFeature = ::android::IBinder::FIRST_CALL_TRANSACTION + 6;
+  static constexpr uint32_t TRANSACTION_getFeature = ::android::IBinder::FIRST_CALL_TRANSACTION + 7;
+  static constexpr uint32_t TRANSACTION_getAuthenticatorId = ::android::IBinder::FIRST_CALL_TRANSACTION + 8;
+  static constexpr uint32_t TRANSACTION_cancel = ::android::IBinder::FIRST_CALL_TRANSACTION + 9;
+  static constexpr uint32_t TRANSACTION_enumerate = ::android::IBinder::FIRST_CALL_TRANSACTION + 10;
+  static constexpr uint32_t TRANSACTION_remove = ::android::IBinder::FIRST_CALL_TRANSACTION + 11;
+  static constexpr uint32_t TRANSACTION_authenticate = ::android::IBinder::FIRST_CALL_TRANSACTION + 12;
+  static constexpr uint32_t TRANSACTION_userActivity = ::android::IBinder::FIRST_CALL_TRANSACTION + 13;
+  static constexpr uint32_t TRANSACTION_resetLockout = ::android::IBinder::FIRST_CALL_TRANSACTION + 14;
+  explicit BnFaceHalService();
+  ::android::status_t onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) override;
+};  // class BnFaceHalService
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BnFaceHalServiceCallback.h b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BnFaceHalServiceCallback.h
new file mode 100644
index 0000000..701abc9
--- /dev/null
+++ b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BnFaceHalServiceCallback.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <binder/IInterface.h>
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+class BnFaceHalServiceCallback : public ::android::BnInterface<IFaceHalServiceCallback> {
+public:
+  static constexpr uint32_t TRANSACTION_onEnrollResult = ::android::IBinder::FIRST_CALL_TRANSACTION + 0;
+  static constexpr uint32_t TRANSACTION_onAuthenticated = ::android::IBinder::FIRST_CALL_TRANSACTION + 1;
+  static constexpr uint32_t TRANSACTION_onAcquired = ::android::IBinder::FIRST_CALL_TRANSACTION + 2;
+  static constexpr uint32_t TRANSACTION_onError = ::android::IBinder::FIRST_CALL_TRANSACTION + 3;
+  static constexpr uint32_t TRANSACTION_onRemoved = ::android::IBinder::FIRST_CALL_TRANSACTION + 4;
+  static constexpr uint32_t TRANSACTION_onEnumerate = ::android::IBinder::FIRST_CALL_TRANSACTION + 5;
+  static constexpr uint32_t TRANSACTION_onLockoutChanged = ::android::IBinder::FIRST_CALL_TRANSACTION + 6;
+  explicit BnFaceHalServiceCallback();
+  ::android::status_t onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) override;
+};  // class BnFaceHalServiceCallback
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BpFaceHalService.h b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BpFaceHalService.h
new file mode 100644
index 0000000..5fad204
--- /dev/null
+++ b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BpFaceHalService.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include <binder/IBinder.h>
+#include <binder/IInterface.h>
+#include <utils/Errors.h>
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalService.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+class BpFaceHalService : public ::android::BpInterface<IFaceHalService> {
+public:
+  explicit BpFaceHalService(const ::android::sp<::android::IBinder>& _aidl_impl);
+  virtual ~BpFaceHalService() = default;
+  ::android::binder::Status getDeviceId(int64_t* _aidl_return) override;
+  ::android::binder::Status setCallback(const ::android::sp<::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback>& callback) override;
+  ::android::binder::Status setActiveUser(int32_t userId, const ::android::String16& storePath, int32_t* _aidl_return) override;
+  ::android::binder::Status generateChallenge(int32_t timeout, int64_t* _aidl_return) override;
+  ::android::binder::Status enroll(const ::std::vector<uint8_t>& token, int32_t timeout, const ::std::vector<int32_t>& disabledFeatures, int32_t* _aidl_return) override;
+  ::android::binder::Status revokeChallenge(int32_t* _aidl_return) override;
+  ::android::binder::Status setFeature(int32_t feature, bool enable, const ::std::vector<uint8_t>& token, int32_t faceId, int32_t* _aidl_return) override;
+  ::android::binder::Status getFeature(int32_t feature, int32_t faceId, bool* _aidl_return) override;
+  ::android::binder::Status getAuthenticatorId(int64_t* _aidl_return) override;
+  ::android::binder::Status cancel(int32_t* _aidl_return) override;
+  ::android::binder::Status enumerate(int32_t* _aidl_return) override;
+  ::android::binder::Status remove(int32_t faceId, int32_t* _aidl_return) override;
+  ::android::binder::Status authenticate(int64_t operationId, int32_t* _aidl_return) override;
+  ::android::binder::Status userActivity(int32_t* _aidl_return) override;
+  ::android::binder::Status resetLockout(const ::std::vector<uint8_t>& token, int32_t* _aidl_return) override;
+};  // class BpFaceHalService
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BpFaceHalServiceCallback.h b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BpFaceHalServiceCallback.h
new file mode 100644
index 0000000..8006129
--- /dev/null
+++ b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/BpFaceHalServiceCallback.h
@@ -0,0 +1,39 @@
+#pragma once
+
+#include <binder/IBinder.h>
+#include <binder/IInterface.h>
+#include <utils/Errors.h>
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+class BpFaceHalServiceCallback : public ::android::BpInterface<IFaceHalServiceCallback> {
+public:
+  explicit BpFaceHalServiceCallback(const ::android::sp<::android::IBinder>& _aidl_impl);
+  virtual ~BpFaceHalServiceCallback() = default;
+  ::android::binder::Status onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) override;
+  ::android::binder::Status onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t>& token) override;
+  ::android::binder::Status onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) override;
+  ::android::binder::Status onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) override;
+  ::android::binder::Status onRemoved(int64_t deviceId, const ::std::vector<int32_t>& faceIds, int32_t userId) override;
+  ::android::binder::Status onEnumerate(int64_t deviceId, const ::std::vector<int32_t>& faceIds, int32_t userId) override;
+  ::android::binder::Status onLockoutChanged(int64_t duration) override;
+};  // class BpFaceHalServiceCallback
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/IFaceHalService.h b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/IFaceHalService.h
new file mode 100644
index 0000000..c636cbb
--- /dev/null
+++ b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/IFaceHalService.h
@@ -0,0 +1,102 @@
+#pragma once
+
+#include <binder/IBinder.h>
+#include <binder/IInterface.h>
+#include <binder/Status.h>
+#include <com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h>
+#include <cstdint>
+#include <utils/String16.h>
+#include <utils/StrongPointer.h>
+#include <vector>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+class IFaceHalService : public ::android::IInterface {
+public:
+  DECLARE_META_INTERFACE(FaceHalService)
+  virtual ::android::binder::Status getDeviceId(int64_t* _aidl_return) = 0;
+  virtual ::android::binder::Status setCallback(const ::android::sp<::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback>& callback) = 0;
+  virtual ::android::binder::Status setActiveUser(int32_t userId, const ::android::String16& storePath, int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status generateChallenge(int32_t timeout, int64_t* _aidl_return) = 0;
+  virtual ::android::binder::Status enroll(const ::std::vector<uint8_t>& token, int32_t timeout, const ::std::vector<int32_t>& disabledFeatures, int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status revokeChallenge(int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status setFeature(int32_t feature, bool enable, const ::std::vector<uint8_t>& token, int32_t faceId, int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status getFeature(int32_t feature, int32_t faceId, bool* _aidl_return) = 0;
+  virtual ::android::binder::Status getAuthenticatorId(int64_t* _aidl_return) = 0;
+  virtual ::android::binder::Status cancel(int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status enumerate(int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status remove(int32_t faceId, int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status authenticate(int64_t operationId, int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status userActivity(int32_t* _aidl_return) = 0;
+  virtual ::android::binder::Status resetLockout(const ::std::vector<uint8_t>& token, int32_t* _aidl_return) = 0;
+};  // class IFaceHalService
+
+class IFaceHalServiceDefault : public IFaceHalService {
+public:
+  ::android::IBinder* onAsBinder() override {
+    return nullptr;
+  }
+  ::android::binder::Status getDeviceId(int64_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status setCallback(const ::android::sp<::com::android::internal::libremobileos::faceunlock::IFaceHalServiceCallback>&) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status setActiveUser(int32_t, const ::android::String16&, int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status generateChallenge(int32_t, int64_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status enroll(const ::std::vector<uint8_t>&, int32_t, const ::std::vector<int32_t>&, int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status revokeChallenge(int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status setFeature(int32_t, bool, const ::std::vector<uint8_t>&, int32_t, int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status getFeature(int32_t, int32_t, bool*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status getAuthenticatorId(int64_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status cancel(int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status enumerate(int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status remove(int32_t, int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status authenticate(int64_t, int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status userActivity(int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status resetLockout(const ::std::vector<uint8_t>&, int32_t*) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+};  // class IFaceHalServiceDefault
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h
new file mode 100644
index 0000000..ab34e59
--- /dev/null
+++ b/adapter/binder-interfaces/include/com/android/internal/libremobileos/faceunlock/IFaceHalServiceCallback.h
@@ -0,0 +1,68 @@
+#pragma once
+
+#include <binder/IBinder.h>
+#include <binder/IInterface.h>
+#include <binder/Status.h>
+#include <cstdint>
+#include <utils/StrongPointer.h>
+#include <vector>
+
+namespace com {
+
+namespace android {
+
+namespace internal {
+
+namespace libremobileos {
+
+namespace faceunlock {
+
+class IFaceHalServiceCallback : public ::android::IInterface {
+public:
+  DECLARE_META_INTERFACE(FaceHalServiceCallback)
+  virtual ::android::binder::Status onEnrollResult(int64_t deviceId, int32_t faceId, int32_t userId, int32_t remaining) = 0;
+  virtual ::android::binder::Status onAuthenticated(int64_t deviceId, int32_t faceId, int32_t userId, const ::std::vector<uint8_t>& token) = 0;
+  virtual ::android::binder::Status onAcquired(int64_t deviceId, int32_t userId, int32_t acquiredInfo, int32_t vendorCode) = 0;
+  virtual ::android::binder::Status onError(int64_t deviceId, int32_t userId, int32_t error, int32_t vendorCode) = 0;
+  virtual ::android::binder::Status onRemoved(int64_t deviceId, const ::std::vector<int32_t>& faceIds, int32_t userId) = 0;
+  virtual ::android::binder::Status onEnumerate(int64_t deviceId, const ::std::vector<int32_t>& faceIds, int32_t userId) = 0;
+  virtual ::android::binder::Status onLockoutChanged(int64_t duration) = 0;
+};  // class IFaceHalServiceCallback
+
+class IFaceHalServiceCallbackDefault : public IFaceHalServiceCallback {
+public:
+  ::android::IBinder* onAsBinder() override {
+    return nullptr;
+  }
+  ::android::binder::Status onEnrollResult(int64_t, int32_t, int32_t, int32_t) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status onAuthenticated(int64_t, int32_t, int32_t, const ::std::vector<uint8_t>&) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status onAcquired(int64_t, int32_t, int32_t, int32_t) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status onError(int64_t, int32_t, int32_t, int32_t) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status onRemoved(int64_t, const ::std::vector<int32_t>&, int32_t) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status onEnumerate(int64_t, const ::std::vector<int32_t>&, int32_t) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+  ::android::binder::Status onLockoutChanged(int64_t) override {
+    return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+  }
+};  // class IFaceHalServiceCallbackDefault
+
+}  // namespace faceunlock
+
+}  // namespace libremobileos
+
+}  // namespace internal
+
+}  // namespace android
+
+}  // namespace com
diff --git a/adapter/manifest_face_lmodroid.xml b/adapter/manifest_face_lmodroid.xml
new file mode 100644
index 0000000..514a02d
--- /dev/null
+++ b/adapter/manifest_face_lmodroid.xml
@@ -0,0 +1,11 @@
+<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/adapter/service.cpp b/adapter/service.cpp
new file mode 100644
index 0000000..aff1920
--- /dev/null
+++ b/adapter/service.cpp
@@ -0,0 +1,69 @@
+/*
+ * 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 <binder/IBinder.h>
+#include <binder/IServiceManager.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
+#include <android/hardware/biometrics/face/1.0/types.h>
+#include <android/log.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 ::com::android::internal::libremobileos::faceunlock::IFaceHalService;
+
+int main() {
+    sp<IBinder> binderFaceHal;
+    sp<IFaceHalService> faceHalService = nullptr;
+
+    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*/);
+
+    while (faceHalService == nullptr) {
+        // wait for faceunlockhal service to start
+        ALOGI("Waiting for faceunlockhal service to start...");
+        sleep(1);
+        binderFaceHal = android::defaultServiceManager()->getService(android::String16("faceunlockhal"));
+        if (binderFaceHal != nullptr)
+            faceHalService = android::interface_cast<IFaceHalService>(binderFaceHal);
+    }
+
+    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
+}