diff --git a/hidl/fingerprint/Android.mk b/hidl/fingerprint/Android.mk
index 4af8e8b..dfe81d1 100644
--- a/hidl/fingerprint/Android.mk
+++ b/hidl/fingerprint/Android.mk
@@ -51,3 +51,5 @@
 LOCAL_VENDOR_MODULE := true
 
 include $(BUILD_EXECUTABLE)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hidl/fingerprint/inscreen/Android.mk b/hidl/fingerprint/inscreen/Android.mk
new file mode 100644
index 0000000..e024fbc
--- /dev/null
+++ b/hidl/fingerprint/inscreen/Android.mk
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2020 The LineageOS 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+    FingerprintInscreen.cpp \
+    service.cpp
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
+
+LOCAL_SHARED_LIBRARIES := \
+    libbase \
+    libhardware \
+    libhidlbase \
+    libhidltransport \
+    liblog \
+    libhwbinder \
+    libutils \
+    vendor.lineage.biometrics.fingerprint.inscreen@1.0
+
+LOCAL_MODULE := vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.samsung
+LOCAL_INIT_RC := vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.samsung.rc
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_OWNER := samsung
+LOCAL_VENDOR_MODULE := true
+
+include $(BUILD_EXECUTABLE)
diff --git a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
new file mode 100644
index 0000000..47211b1
--- /dev/null
+++ b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2020 The LineageOS 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 "FingerprintInscreenService"
+
+#include "FingerprintInscreen.h"
+
+#include <android-base/logging.h>
+#include <hidl/HidlTransportSupport.h>
+
+#include <fstream>
+
+namespace vendor {
+namespace lineage {
+namespace biometrics {
+namespace fingerprint {
+namespace inscreen {
+namespace V1_0 {
+namespace implementation {
+
+/*
+ * Write value to path and close file.
+ */
+template <typename T>
+static void set(const std::string& path, const T& value) {
+    std::ofstream file(path);
+
+    if (!file) {
+        PLOG(ERROR) << "Failed to open: " << path;
+        return;
+    }
+
+    LOG(DEBUG) << "write: " << path << " value: " << value;
+
+    file << value << std::endl;
+
+    if (!file) {
+        PLOG(ERROR) << "Failed to write: " << path << " value: " << value;
+    }
+}
+
+template <typename T>
+static T get(const std::string& path, const T& def) {
+    std::ifstream file(path);
+
+    if (!file) {
+        PLOG(ERROR) << "Failed to open: " << path;
+        return def;
+    }
+
+    T result;
+
+    file >> result;
+
+    if (file.fail()) {
+        PLOG(ERROR) << "Failed to read: " << path;
+        return def;
+    } else {
+        LOG(DEBUG) << "read: " << path << " value: " << result;
+        return result;
+    }
+}
+
+FingerprintInscreen::FingerprintInscreen() {}
+
+Return<void> FingerprintInscreen::onStartEnroll() { return Void(); }
+
+Return<void> FingerprintInscreen::onFinishEnroll() { return Void(); }
+
+Return<void> FingerprintInscreen::onPress() {
+    set(TSP_CMD_PATH, FOD_ENABLE);
+    return Void();
+}
+
+Return<void> FingerprintInscreen::onRelease() {
+    set(TSP_CMD_PATH, FOD_DISABLE);
+    return Void();
+}
+
+Return<void> FingerprintInscreen::onShowFODView() { return Void(); }
+
+Return<void> FingerprintInscreen::onHideFODView() {
+    set(TSP_CMD_PATH, FOD_DISABLE);
+    return Void();
+}
+
+Return<bool> FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t vendorCode) {
+    std::lock_guard<std::mutex> _lock(mCallbackLock);
+
+    if (mCallback == nullptr) {
+        return false;
+    }
+
+    if (acquiredInfo == FINGERPRINT_ACQUIRED_VENDOR) {
+        if (vendorCode == VENDORCODE_FINGER_DOWN) {
+            Return<void> ret = mCallback->onFingerDown();
+            if (!ret.isOk()) {
+                LOG(ERROR) << "FingerDown() error: " << ret.description();
+            }
+            return true;
+        } else if (vendorCode == VENDORCODE_FINGER_UP) {
+            Return<void> ret = mCallback->onFingerUp();
+            if (!ret.isOk()) {
+                LOG(ERROR) << "FingerUp() error: " << ret.description();
+            }
+            return true;
+        }
+    }
+
+    return false;
+}
+
+Return<bool> FingerprintInscreen::handleError(int32_t, int32_t) { return false; }
+
+Return<void> FingerprintInscreen::setLongPressEnabled(bool) { return Void(); }
+
+Return<int32_t> FingerprintInscreen::getDimAmount(int32_t cur_brightness) {
+    return cur_brightness / 2;
+}
+
+Return<bool> FingerprintInscreen::shouldBoostBrightness() { return false; }
+
+Return<void> FingerprintInscreen::setCallback(const sp<IFingerprintInscreenCallback>& callback) {
+    mCallback = callback;
+
+    return Void();
+}
+
+Return<int32_t> FingerprintInscreen::getPositionX() { return FOD_SENSOR_X; }
+
+Return<int32_t> FingerprintInscreen::getPositionY() { return FOD_SENSOR_Y; }
+
+Return<int32_t> FingerprintInscreen::getSize() { return FOD_SENSOR_SIZE; }
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace inscreen
+}  // namespace fingerprint
+}  // namespace biometrics
+}  // namespace lineage
+}  // namespace vendor
diff --git a/hidl/fingerprint/inscreen/FingerprintInscreen.h b/hidl/fingerprint/inscreen/FingerprintInscreen.h
new file mode 100644
index 0000000..be35703
--- /dev/null
+++ b/hidl/fingerprint/inscreen/FingerprintInscreen.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2020 The LineageOS 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.
+ */
+#ifndef VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
+#define VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
+
+#include <vendor/lineage/biometrics/fingerprint/inscreen/1.0/IFingerprintInscreen.h>
+
+#include "samsung_fingerprint_inscreen.h"
+
+namespace vendor {
+namespace lineage {
+namespace biometrics {
+namespace fingerprint {
+namespace inscreen {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::sp;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+class FingerprintInscreen : public IFingerprintInscreen {
+  public:
+    FingerprintInscreen();
+
+    Return<void> onStartEnroll() override;
+    Return<void> onFinishEnroll() override;
+    Return<void> onPress() override;
+    Return<void> onRelease() override;
+    Return<void> onShowFODView() override;
+    Return<void> onHideFODView() override;
+    Return<bool> handleAcquired(int32_t acquiredInfo, int32_t vendorCode) override;
+    Return<bool> handleError(int32_t error, int32_t vendorCode) override;
+    Return<void> setLongPressEnabled(bool enabled) override;
+    Return<int32_t> getDimAmount(int32_t cur_brightness) override;
+    Return<bool> shouldBoostBrightness() override;
+    Return<void> setCallback(const sp<IFingerprintInscreenCallback>& callback) override;
+    Return<int32_t> getPositionX() override;
+    Return<int32_t> getPositionY() override;
+    Return<int32_t> getSize() override;
+
+  private:
+    std::mutex mCallbackLock;
+    sp<IFingerprintInscreenCallback> mCallback;
+};
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace inscreen
+}  // namespace fingerprint
+}  // namespace biometrics
+}  // namespace lineage
+}  // namespace vendor
+
+#endif  // VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
diff --git a/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h b/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h
new file mode 100644
index 0000000..92ea3b4
--- /dev/null
+++ b/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2020 The LineageOS 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.
+ */
+
+#ifndef SAMSUNG_FINGERPRINT_INSCREEN_H
+#define SAMSUNG_FINGERPRINT_INSCREEN_H
+
+#define FOD_SENSOR_X 435
+#define FOD_SENSOR_Y 2025
+#define FOD_SENSOR_SIZE 210
+
+#define FOD_ENABLE "fod_enable,1,1"
+#define FOD_DISABLE "fod_enable,0"
+
+#define FINGERPRINT_ACQUIRED_VENDOR 6
+#define VENDORCODE_FINGER_DOWN 9002
+#define VENDORCODE_FINGER_UP 9001
+
+#define TSP_CMD_PATH "/sys/class/sec/tsp/cmd"
+
+#endif  // SAMSUNG_FINGERPRINT_INSCREEN_H
diff --git a/hidl/fingerprint/inscreen/service.cpp b/hidl/fingerprint/inscreen/service.cpp
new file mode 100644
index 0000000..1a67895
--- /dev/null
+++ b/hidl/fingerprint/inscreen/service.cpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2020 The LineageOS 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 "lineage.biometrics.fingerprint.inscreen@1.0-service.samsung"
+
+#include <android-base/logging.h>
+#include <hidl/HidlTransportSupport.h>
+
+#include "FingerprintInscreen.h"
+
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+
+using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreen;
+using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::implementation::FingerprintInscreen;
+
+using android::OK;
+using android::status_t;
+
+int main() {
+    android::sp<IFingerprintInscreen> service = new FingerprintInscreen();
+
+    configureRpcThreadpool(1, true);
+
+    status_t status = service->registerAsService();
+    if (status != OK) {
+        LOG(ERROR) << "Cannot register FOD HAL service.";
+        return 1;
+    }
+
+    LOG(INFO) << "FOD HAL service ready.";
+
+    joinRpcThreadpool();
+
+    LOG(ERROR) << "FOD HAL service failed to join thread pool.";
+    return 1;
+}
diff --git a/hidl/fingerprint/inscreen/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.samsung.rc b/hidl/fingerprint/inscreen/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.samsung.rc
new file mode 100644
index 0000000..6b45364
--- /dev/null
+++ b/hidl/fingerprint/inscreen/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.samsung.rc
@@ -0,0 +1,6 @@
+service vendor.fingerprint-inscreen-1-0 /vendor/bin/hw/vendor.lineage.biometrics.fingerprint.inscreen@1.0-service.samsung
+    interface vendor.lineage.biometrics.fingerprint.inscreen@1.0::IFingerprintInscreen default
+    class hal
+    user system
+    group system
+    shutdown critical
