Skip to content

Commit 2d88e54

Browse files
fix(build 3.0.0): disable Realme UI bootloader fingerprint spoofing and enable Yuri Keybox support
- Remove the hard-coded RMX3661 (Realme 10 Pro) fingerprint override in the build scripts. The kernel will now use the actual device fingerprint on boot, resolving the Luna FRP “invalid/farm fingerprint” error. - Devices can now pass Play Integrity/SafetyNet checks. - Merge KernelSU-Next v1.0.9 updates to incorporate the latest root management patches. - **Result:** Banking and Google apps pass integrity checks, and Realme 10 Pro & 9-series devices show clean integrity reports after update.
1 parent 923a878 commit 2d88e54

18 files changed

Lines changed: 505 additions & 89 deletions

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ All notable changes to this project are documented in this file. Note: Pre-relea
88
- Merged KernelSU‑Next v1.0.9 root‑management updates.
99

1010
### Changed
11-
- Disabled Realme UI bootloader fingerprint spoofing; devices now report their true build fingerprint.
11+
- Disabled Realme UI bootloader fingerprint spoofing; devices now report their true build fingerprint.
1212
- Now Yuri Keybox support for hardware‑backed Google Play Integrity (Strong) attestation.
1313

1414
### Fixed
15-
- Resolved Luna FRP “farm fingerprint” mismatch error.
15+
- Resolved Luna FRP “farm fingerprint” mismatch error.
1616
- Devices now pass SafetyNet/Play Integrity checks on Luigi & Oscar families.
1717

1818
## v2.0.0

KernelSU-Next

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 9d9f9ed5d5f3a66a2f44e24c926075554f9275ce
1+
Subproject commit 2241696498ce9dd742ce80b52c3ed6cca26e03ea

Makefile

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 254 #spoffing of Realme RMX3661, real is .292
5-
EXTRAVERSION = "qgki-gc916795b189b"
4+
SUBLEVEL = 292
5+
EXTRAVERSION = -gki
6+
NAME = Kleptomaniac Octopus
67

78
# indicate that change "Kbuild: Support nested composite objects" is
89
# present in the kernel so that out-of-tree modules can act upon it
@@ -343,9 +344,8 @@ else # !mixed-build
343344
include scripts/Kbuild.include
344345

345346
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
346-
347-
KERNELRELEASE := 5.4.254-qgki-gc916795b189b
348-
KERNELVERSION := 5.4.254
347+
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
348+
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
349349
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
350350

351351
include scripts/subarch.include
@@ -1179,8 +1179,7 @@ export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
11791179

11801180
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
11811181
export MODLIB
1182-
INS_MOD := $(INSTALL_MOD_PATH)
1183-
export INS_MOD
1182+
11841183
#ifdef OPLUS_FEATURE_CHG_BASIC
11851184
KBUILD_CFLAGS += -DOPLUS_FEATURE_CHG_BASIC
11861185
#endif
@@ -1590,23 +1589,13 @@ _modinst_:
15901589
@sed 's:^:kernel/:' modules.builtin > $(MODLIB)/modules.builtin
15911590
@cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/
15921591
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
1593-
# Ensure directories exist
1594-
@mkdir -p "$(INS_MOD)/../depmod_vendor_intermediates/lib/modules/0.0"
1595-
@mkdir -p "$(INS_MOD)/../depmod_vendor_ramdisk_intermediates/lib/modules/0.0"
1596-
# Copy all files from versioned directory to /0.0/ (force overwrite)
1597-
@cp -a "$(INS_MOD)/lib/modules/$(KERNELRELEASE)/." "$(INS_MOD)/lib/modules/$(KERNELVERSION)/"
1598-
# Copy ALL module metadata files (using find to handle spaces)
1599-
@find "$(INS_MOD)/lib/modules/$(KERNELRELEASE)/" -maxdepth 1 -type f -name 'modules.*' \
1600-
-exec cp -t "$(INS_MOD)/../depmod_vendor_intermediates/lib/modules/0.0/" {} +
1601-
@find "$(INS_MOD)/lib/modules/$(KERNELRELEASE)/" -maxdepth 1 -type f -name 'modules.*' \
1602-
-exec cp -t "$(INS_MOD)/../depmod_vendor_ramdisk_intermediates/lib/modules/0.0/" {} +
16031592

16041593
# This depmod is only for convenience to give the initial
16051594
# boot a modules.dep even before / is mounted read-write. However the
16061595
# boot script depmod is the master version.
16071596
PHONY += _modinst_post
16081597
_modinst_post: _modinst_
1609-
$(call cmd,depmod -b "$(INS_MOD)" -C /dev/null -e -F "$(INS_MOD)/lib/modules/$(KERNELRELEASE)/System.map" -E "$(INS_MOD)/lib/modules/$(KERNELRELEASE)/modules.order" "$(KERNELRELEASE)")
1598+
$(call cmd,depmod)
16101599

16111600
ifeq ($(CONFIG_MODULE_SIG), y)
16121601
PHONY += modules_sign

README.md

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Realme 10 Pro LineageOS KSUN + SuSFS kernel with spoofing
22

3+
<<<<<<< HEAD
4+
- KSUN Nightly is root solution with hiding by SuSFS and spoofing as real device real device RMX3661 model with Realme UI 6.0 (Android 15) matching 1:1.
5+
- All features, except OverlaysFS Auto Kstat Support on SuSFS, proceed into an invisible root experience for all apps, including Revolut, bank, ChatGPT, goverment apps etc.
6+
- Custom-modified boot, dtbo, kernel images, and source code on every release.
7+
- Unmounting Pixelify files (use a LSPosed module for unlimited GPhotos backup).
8+
9+
Device:
10+
11+
- codename: luigi
12+
- IDs:
13+
- RMX3660,
14+
- RMX3661,
15+
- RMX3663.
16+
17+
## Installation Steps
18+
19+
=======
320
- KSUN Nightly is root solution with hiding by SuSFS.
421
- All features, except OverlaysFS Auto Kstat Support on SuSFS, proceed into an invisible root experience for all apps, including Revolut, bank, ChatGPT, goverment apps etc.
522
- Custom-modified boot, dtbo, kernel images, and source code on every release.
@@ -43,21 +60,29 @@ On v3.x.x newest release based on KSUN v1.0.9 branch.
4360

4461
## Installation Steps
4562

63+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
4664
Tested with:
4765

4866
- [lineage-22.2-20250614-nightly-luigi-signed.zip](https://mirrorbits.lineageos.org/full/luigi/20250614/lineage-22.2-20250614-nightly-luigi-signed.zip)
4967
- [lineage-22.2-20250621-nightly-luigi-signed.zip](https://mirrorbits.lineageos.org/full/luigi/20250621/lineage-22.2-20250621-nightly-luigi-signed.zip)
5068
- [lineage-22.2-20250628-nightly-luigi-signed.zip](https://mirrorbits.lineageos.org/full/luigi/20250628/lineage-22.2-20250628-nightly-luigi-signed.zip)
5169
- [lineage-22.2-20250705-nightly-luigi-signed.zip](https://mirrorbits.lineageos.org/full/luigi/20250705/lineage-22.2-20250705-nightly-luigi-signed.zip)
5270

71+
<<<<<<< HEAD
72+
If you don't have [LineageOS recovery](https://mirrorbits.lineageos.org/full/luigi/20250614/vendor_boot.img), flash it by:
73+
=======
5374
If you don't have [LineageOS recovery for luigi](https://mirrorbits.lineageos.org/full/luigi/20250705/vendor_boot.img) or [recovery for oscar](https://mirrorbits.lineageos.org/full/oscar/20250707/vendor_boot.img), flash it by:
75+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
5476
5577
```
5678
fastboot flash vendor_boot vendor_boot.img
5779
5880
fastboot reboot recovery
5981
```
6082

83+
<<<<<<< HEAD
84+
After flashing LineageOS and/or MindTheGApps, boot into LOS recovery fastboot (preffered) or factory fastboot and flash [latest boot and dtbo images](https://github.com/frpunlocking-com/android_kernel_realme_sm6375/releases) by:
85+
=======
6186
After flashing LineageOS and/or MindTheGApps, boot into LOS recovery (preffered) or fastboot and flash latest files attached at bottom of post. You have 3 methods to flash kernel by adb sideload of AnyKernel package or fastboot flash of boot images or flash on rooted Android by Kernel Flasher.
6287

6388
1. Method by AnyKernel package is recommended from 2.0.0
@@ -74,6 +99,7 @@ adb sideload 3.0_oscar_AnyKernel3_LOS_22.2_Realme_9-Pro_9-5G_Q5.zip
7499
```
75100

76101
2. Alternative method by fastboot for your family:
102+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
77103
78104
```
79105
fastboot flash boot_a boot.img
@@ -87,20 +113,36 @@ fastboot flash dtbo_b dtbo.img
87113
fastboot reboot
88114
```
89115

116+
<<<<<<< HEAD
117+
After device boots, install [Kernel SU Next Manager v1.0.8 (Latest Nightly)](https://nightly.link/KernelSU-Next/KernelSU-Next/workflows/build-manager-ci/next/Manager.zip).
118+
119+
Confirmed safe for dirty flash on 2025‑06‑21 build, no data loss observed.
120+
121+
Works seamlessly with MindTheGapps in [recovery](https://mirrorbits.lineageos.org/full/luigi/20250614/vendor_boot.img) (via Fastboot boot partition reflash).
122+
=======
90123
3. Alternative method by Kernel Flasher when you are rooted with AK3 Zip or partition images for your family.
91124

92125
After the device boots, install Kernel SU Next Manager Nightly v1.0.9 (Latest). Confirmed safe for dirty flash from 2025‑06‑14 to 2025-06-28 builds on luigi, no data loss observed with dirty flash LineageOS from 14 to 05 (by adb sideload of zip).
126+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
93127
94128
## Kernel Highlights
95129

96130
- Built on Linux 5.4.292-qgki from LineageOS - includes upstream Android GKI compliance patches.
131+
<<<<<<< HEAD
132+
- KernelSU v12716 - latest version providing root access.
133+
=======
97134
- KernelSU 12797 v1.0.9 - latest version providing root access.
135+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
98136
- SuSFS v1.5.5 - Android dynamic rootfs support.
99137

100138
## Enhancements & Fixes
101139

102140
- Seamless GKI‑based kernel integration for the real Realme 10 Pro device built from scratch.
141+
<<<<<<< HEAD
142+
- No bootloops or data errors in testing on real device as of 2025‑06‑21.
143+
=======
103144
- No bootloops or data errors in testing on real device as of 2025‑07‑16.
145+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
104146
- Spoofing RMX3661 factory Android 15 Realme UI 6.0 fingerprint.
105147

106148
## Known Issues
@@ -129,6 +171,32 @@ These kernel modifications are part of an academic project related to my master'
129171
- SuSFS, susfs4ksu, and Wild Kernels.
130172
- Big thanks to the Realme 10 Pro device maintainers and devs on LineageOS, testers, and the MindTheGapps maintainers and devs.
131173

174+
<<<<<<< HEAD
175+
```
176+
177+
#include <std_disclaimer.h>
178+
/*
179+
* Your warranty is... Still valid??
180+
*
181+
* I am not responsible if you brick your device,
182+
* dead SD card, installed viruses, burned battery
183+
* and thermonuclear war, or you getting fired
184+
* because the alarm app failed. Please do
185+
* some research if you have any concerns
186+
* about features included in this software
187+
* before flashing it! You are choosing to
188+
* make these strong modifications on your
189+
* device, and if you point the finger at me
190+
* for messing up your device,
191+
* I will laugh at you.
192+
* LICENSE.md
193+
* Our modifications are GPLv2 licensed.
194+
*/
195+
196+
```
197+
198+
# How do I submit patches to Android Common Kernels
199+
=======
132200
## Warranty & Liability Disclaimer
133201

134202
I am not responsible if you brick your device, erase data, kill your SD card, install malware, burn the battery, trigger thermonuclear war, or get fired because an alarm app failed.
@@ -140,6 +208,7 @@ For the full terms, see our **[Legal Notice](https://frpunlocking.com/legal)**.
140208
This software is distributed under the **GNU General Public License v2 (GPL-2.0)**, modifications licensed by [Pawel Potacki](potacki.com). See `LICENSE.md` for full terms.
141209

142210
## How do I submit patches to Android Common Kernels
211+
>>>>>>> 923a878e276e7c1375e66f2ab08bb96797ed6112
143212
144213
1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases.
145214
These patches will be merged automatically in the corresponding common kernels. If the patch is already
@@ -150,7 +219,7 @@ This software is distributed under the **GNU General Public License v2 (GPL-2.0)
150219
coordinated with kernel-team@android.com. If you want to proceed, post a patch that conforms to the
151220
patch requirements below.
152221

153-
## Common Kernel patch requirements
222+
# Common Kernel patch requirements
154223

155224
- All patches must conform to the Linux kernel coding standards and pass `script/checkpatch.pl`
156225
- Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures
@@ -163,7 +232,7 @@ This software is distributed under the **GNU General Public License v2 (GPL-2.0)
163232

164233
Additional requirements are listed below based on patch type
165234

166-
### Requirements for backports from mainline Linux: `UPSTREAM:`, `BACKPORT:`
235+
## Requirements for backports from mainline Linux: `UPSTREAM:`, `BACKPORT:`
167236

168237
- If the patch is a cherry-pick from Linux mainline with no changes at all
169238
- tag the patch subject with `UPSTREAM:`.
@@ -210,7 +279,7 @@ instead of `UPSTREAM:`.
210279
Signed-off-by: Joe Smith <joe.smith@foo.org>
211280
```
212281

213-
### Requirements for other backports: `FROMGIT:`, `FROMLIST:`,
282+
## Requirements for other backports: `FROMGIT:`, `FROMLIST:`,
214283

215284
- If the patch has been merged into an upstream maintainer tree, but has not yet
216285
been merged into Linux mainline
@@ -261,7 +330,7 @@ must be a stable maintainer branch (not rebased, so don't use `linux-next` for e
261330
Signed-off-by: Joe Smith <joe.smith@foo.org>
262331
```
263332

264-
### Requirements for Android-specific patches: `ANDROID:`
333+
## Requirements for Android-specific patches: `ANDROID:`
265334

266335
- If the patch is fixing a bug to Android-specific code
267336
- tag the patch subject with `ANDROID:`
@@ -281,8 +350,8 @@ must be a stable maintainer branch (not rebased, so don't use `linux-next` for e
281350
- tag the patch subject with `ANDROID:`
282351
- add a `Bug:` tag with the Android bug (required for android-specific features)
283352

284-
## Vibrator driver for HHG device
285-
### How to merge the driver into kernel source tree
353+
# Vibrator driver for HHG device
354+
## How to merge the driver into kernel source tree
286355

287356
1. Copy \${this_project}/drivers/hid/hid-aksys.c into \${your_kernel_root}/drivers/hid/
288357

arch/arm64/configs/gki_defconfig

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,3 +624,30 @@ CONFIG_NET_SCH_FQ_CODEL=y
624624
CONFIG_IP_NF_TARGET_TTL=y
625625
CONFIG_IP6_NF_TARGET_HL=y
626626
CONFIG_IP6_NF_MATCH_HL=y
627+
CONFIG_KSU=y
628+
CONFIG_KSU_KPROBES_HOOK=n
629+
CONFIG_KSU_SUSFS=y
630+
CONFIG_KSU_SUSFS_HAS_MAGIC_MOUNT=y
631+
CONFIG_KSU_SUSFS_SUS_PATH=y
632+
CONFIG_KSU_SUSFS_SUS_MOUNT=y
633+
CONFIG_KSU_SUSFS_AUTO_ADD_SUS_KSU_DEFAULT_MOUNT=y
634+
CONFIG_KSU_SUSFS_AUTO_ADD_SUS_BIND_MOUNT=y
635+
CONFIG_KSU_SUSFS_SUS_KSTAT=y
636+
CONFIG_KSU_SUSFS_SUS_OVERLAYFS=n
637+
CONFIG_KSU_SUSFS_TRY_UMOUNT=y
638+
CONFIG_KSU_SUSFS_AUTO_ADD_TRY_UMOUNT_FOR_BIND_MOUNT=y
639+
CONFIG_KSU_SUSFS_SPOOF_UNAME=y
640+
CONFIG_KSU_SUSFS_ENABLE_LOG=y
641+
CONFIG_KSU_SUSFS_HIDE_KSU_SUSFS_SYMBOLS=y
642+
CONFIG_KSU_SUSFS_SPOOF_CMDLINE_OR_BOOTCONFIG=y
643+
CONFIG_KSU_SUSFS_OPEN_REDIRECT=y
644+
CONFIG_KSU_SUSFS_SUS_SU=n
645+
CONFIG_TMPFS_XATTR=y
646+
CONFIG_TMPFS_POSIX_ACL=y
647+
CONFIG_TCP_CONG_ADVANCED=y
648+
CONFIG_TCP_CONG_BBR=y
649+
CONFIG_NET_SCH_FQ=y
650+
CONFIG_NET_SCH_FQ_CODEL=y
651+
CONFIG_IP_NF_TARGET_TTL=y
652+
CONFIG_IP6_NF_TARGET_HL=y
653+
CONFIG_IP6_NF_MATCH_HL=y

drivers/input/input.c.rej

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- drivers/input/input.c
2+
+++ drivers/input/input.c
3+
@@ -436,11 +436,21 @@ static void input_handle_event(struct input_dev *dev,
4+
* to 'seed' initial state of a switch or initial position of absolute
5+
* axis, etc.
6+
*/
7+
+#ifdef CONFIG_KSU
8+
+extern bool ksu_input_hook __read_mostly;
9+
+extern int ksu_handle_input_handle_event(unsigned int *type, unsigned int *code, int *value);
10+
+#endif
11+
+
12+
void input_event(struct input_dev *dev,
13+
unsigned int type, unsigned int code, int value)
14+
{
15+
unsigned long flags;
16+
17+
+#ifdef CONFIG_KSU
18+
+ if (unlikely(ksu_input_hook))
19+
+ ksu_handle_input_handle_event(&type, &code, &value);
20+
+#endif
21+
+
22+
if (is_event_supported(type, dev->evbit, EV_MAX)) {
23+
24+
spin_lock_irqsave(&dev->event_lock, flags);

fs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ obj-$(CONFIG_KSU_SUSFS) += susfs.o
2121

2222
obj-$(CONFIG_KSU_SUSFS) += susfs.o
2323

24+
obj-$(CONFIG_KSU_SUSFS) += susfs.o
25+
2426
ifeq ($(CONFIG_BLOCK),y)
2527
obj-y += buffer.o block_dev.o direct-io.o mpage.o
2628
else

fs/Makefile.orig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ obj-y := open.o read_write.o file_table.o super.o \
1919

2020
obj-$(CONFIG_KSU_SUSFS) += susfs.o
2121

22+
obj-$(CONFIG_KSU_SUSFS) += susfs.o
23+
2224
ifeq ($(CONFIG_BLOCK),y)
2325
obj-y += buffer.o block_dev.o direct-io.o mpage.o
2426
else

fs/proc/fd.c.rej

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
--- fs/proc/fd.c
22
+++ fs/proc/fd.c
3-
@@ -27,6 +30,9 @@ static int seq_show(struct seq_file *m, void *v)
3+
@@ -13,6 +13,9 @@
4+
#include <linux/fs.h>
5+
6+
#include <linux/proc_fs.h>
7+
+#ifdef CONFIG_KSU_SUSFS_SUS_MOUNT
8+
+#include <linux/susfs_def.h>
9+
+#endif
10+
11+
#include "../mount.h"
12+
#include "internal.h"
13+
@@ -24,6 +27,9 @@ static int seq_show(struct seq_file *m, void *v)
414
int f_flags = 0, ret = -ENOENT;
515
struct file *file = NULL;
616
struct task_struct *task;
@@ -10,7 +20,7 @@
1020

1121
task = get_proc_task(m->private);
1222
if (!task)
13-
@@ -57,10 +63,48 @@ static int seq_show(struct seq_file *m, void *v)
23+
@@ -54,10 +60,48 @@ static int seq_show(struct seq_file *m, void *v)
1424
if (ret)
1525
return ret;
1626

fs/proc/task_mmu.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
#include <linux/shmem_fs.h>
2121
#include <linux/uaccess.h>
2222
#include <linux/pkeys.h>
23+
#ifdef CONFIG_KSU_SUSFS_SUS_KSTAT
24+
#include <linux/susfs_def.h>
25+
#endif
2326
#include <linux/mm_inline.h>
2427
#include <linux/ctype.h>
2528

@@ -376,6 +379,10 @@ static void show_vma_header_prefix_fake(struct seq_file *m,
376379
extern void susfs_sus_ino_for_show_map_vma(unsigned long ino, dev_t *out_dev, unsigned long *out_ino);
377380
#endif
378381

382+
#ifdef CONFIG_KSU_SUSFS_SUS_KSTAT
383+
extern void susfs_sus_ino_for_show_map_vma(unsigned long ino, dev_t *out_dev, unsigned long *out_ino);
384+
#endif
385+
379386
static void
380387
show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
381388
{
@@ -391,6 +398,12 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
391398

392399
if (file) {
393400
struct inode *inode = file_inode(vma->vm_file);
401+
#ifdef CONFIG_KSU_SUSFS_SUS_KSTAT
402+
if (unlikely(inode->i_state & INODE_STATE_SUS_KSTAT)) {
403+
susfs_sus_ino_for_show_map_vma(inode->i_ino, &dev, &ino);
404+
goto bypass_orig_flow;
405+
}
406+
#endif
394407
#ifdef CONFIG_KSU_SUSFS_SUS_KSTAT
395408
if (unlikely(inode->i_state & INODE_STATE_SUS_KSTAT)) {
396409
susfs_sus_ino_for_show_map_vma(inode->i_ino, &dev, &ino);

0 commit comments

Comments
 (0)