sapphire: Initial device configuration

Change-Id: I1bbdd196b02bb8db0f4c7aa527e6462ee4807567
Signed-off-by: ReStranger <restranger@disroot.org>
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..cdaa513
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,8 @@
+//
+// Copyright (C) 2025 The LineageOS Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+
+soong_namespace {
+}
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644
index 0000000..0c3d9ac
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2025 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+PRODUCT_MAKEFILES := \
+    $(LOCAL_DIR)/lineage_sapphire.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..41809ef
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2025 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+DEVICE_PATH := device/xiaomi/sapphire
+
+# Inherit from xiaomi sm6225-common
+include device/xiaomi/sm6225-common/BoardConfigCommon.mk
+
+# Inherit the proprietary files
+include vendor/xiaomi/sapphire/BoardConfigVendor.mk
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..eaf33ca
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+Copyright (C) 2025 The LineageOS Project
+
+Device configuration for Xiaomi Redmi Note 13 4G / NFC
+=============================================================
+
+The Xiaomi Redmi Note 13 4G / NFC (codenamed _"sapphire/sapphiren"_) is an mid-range smartphone from Xiaomi.
+
+It was globally released in January 2024.
+
+## Device specifications
+
+Basic   | Spec Sheet
+-------:|:-------------------------
+Platform | Snapdragon® 685 (SM6225)
+RAM & Storage | 6GB/128GB, 8GB/128GB, 8GB/256GB (LPDDR4X RAM, UFS 2.2 storage)
+Shipped Android Version | 13
+Battery | Non-removable, 5000 mAh
+Display | 6.67″, 120Hz, 2400x1080 (395 ppi)
+Rear camera | 108MP wide angle, 8MP ultra wide-angle, 2MP macro
+Front camera | 16MP in-display
+
+## Device picture
+
+![Xiaomi Redmi Note 13 4G](https://i02.appmifile.com/282_operator_sg/02/01/2024/3ed59552a4950465a43d4f3f9598d8b4.png "Xiaomi Redmi Note 13 4G in black, blue, gold and green")
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..288caaf
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2025 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+# Inherit from xiaomi sm6225-common
+$(call inherit-product, device/xiaomi/sm6225-common/common.mk)
+
+# Inherit the proprietary files
+$(call inherit-product, vendor/xiaomi/sapphire/sapphire-vendor.mk)
+
+# Soong namespaces
+PRODUCT_SOONG_NAMESPACES += \
+    $(LOCAL_PATH)
diff --git a/extract-files.py b/extract-files.py
new file mode 100755
index 0000000..e433ddc
--- /dev/null
+++ b/extract-files.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3
+#
+# SPDX-FileCopyrightText: 2024 The LineageOS Project
+# SPDX-License-Identifier: Apache-2.0
+#
+
+from extract_utils.fixups_blob import (
+    blob_fixup,
+    blob_fixups_user_type,
+)
+from extract_utils.fixups_lib import (
+    lib_fixup_remove,
+    lib_fixups,
+    lib_fixups_user_type,
+)
+from extract_utils.main import (
+    ExtractUtils,
+    ExtractUtilsModule,
+)
+
+namespace_imports = [
+    "device/xiaomi/sm6225-common",
+]
+
+lib_fixups: lib_fixups_user_type = {
+    **lib_fixups,
+}
+
+blob_fixups: blob_fixups_user_type = {
+}  # fmt: skip
+
+module = ExtractUtilsModule(
+    "sapphire",
+    "xiaomi",
+    blob_fixups=blob_fixups,
+    lib_fixups=lib_fixups,
+    namespace_imports=namespace_imports,
+)
+
+if __name__ == "__main__":
+    utils = ExtractUtils.device_with_common(module, "sm6225-common", module.vendor)
+    utils.run()
diff --git a/lineage_sapphire.mk b/lineage_sapphire.mk
new file mode 100644
index 0000000..380d2f5
--- /dev/null
+++ b/lineage_sapphire.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2025 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+# Inherit from sapphire device
+$(call inherit-product, device/xiaomi/sapphire/device.mk)
+
+# Inherit from common lineage configuration
+$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
+
+PRODUCT_NAME := lineage_sapphire
+PRODUCT_DEVICE := sapphire
+PRODUCT_MANUFACTURER := Xiaomi
+PRODUCT_BRAND := Redmi
+PRODUCT_MODEL := 23129RAA4G
+
+PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/proprietary-files.txt
diff --git a/setup-makefiles.py b/setup-makefiles.py
new file mode 100755
index 0000000..32947cf
--- /dev/null
+++ b/setup-makefiles.py
@@ -0,0 +1 @@
+#!./extract-files.py --regenerate_makefiles