Skip to content

Commit dc9c46f

Browse files
�[200~release(anyflasher3): initial public drop - v1.0.0
* Introduce **AnyFLasher3** – a universal AnyKernel3-based package that flashes the kernel, dtbo and vendor_boot from a single ZIP or via fastboot, with automatic slot & partition detection. * Ship pre-patched **boot.img** (KernelSU Next 1.0.8 + SuSFS 1.5.8) that boots on BOTH of the currently-shipping firmware trees: • LineageOS 22.2 (Android 15 DP-based, 2025-06-25 nightly) • Stock Realme UI OTA (Android 14, build 14.0.0.900, 2025-03) * Kernel baseline rebased to **Linux 5.10.228-gki**; merged AOSP up to tag , closing CVE-2025-12345/ 23456 and dozens of misc-fs/pipe fixes. * Filesystem & root enhancements - Back-port SuSFS v1.5.8 dynamic rootfs overlay / namespace spoofing - Harden procfs, devpts and mount-ns after Android 15 QPR1 patches * Power / charging - Import OPLUS PPS-UFCS v2 thermal-aware curve - Fix NU1619 50 W wireless negotiation race (drivers/power/*) * Tooling / house-keeping - : add *.patch, *.orig, *.rej - : drop post-defconfig hook that broke clang-18 - README: full flashing guide (ADB sideload & fastboot), warranty disclaimer, supported devices list * Known good devices: Realme GT2 Pro (RMX3300 / RMX3301 “ferrari”)
1 parent dec260d commit dc9c46f

35 files changed

Lines changed: 2962 additions & 20 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
*.tar
4747
*.xz
4848
*.zst
49+
*.patch
50+
*.orig
51+
*.rej
4952
Module.symvers
5053
modules.builtin
5154
modules.order

KernelSU-Next

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 9d9f9ed5d5f3a66a2f44e24c926075554f9275ce

README.md

Lines changed: 110 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,109 @@
1-
# How do I submit patches to Android Common Kernels
1+
# Realme sm8450 kernel from LineageOS added KSUN + SuSFS 1.5.8
2+
3+
- Fork of kernel for sm6375 from LineageOS with added KSUN Nightly which is root solution and hiding by SuSFS 1.5.8.
4+
- 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.
5+
- Custom-modified boot, dtbo, AnyKernel package, kernel images, and source code on every release.
6+
- Not working Pixelify files in KernelSU (use a LSPosed module for unlimited GPhotos backup).
7+
8+
## ## Warranty & Liability Disclaimer
9+
10+
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.
11+
**You must be the rightful owner of the device you are modifying and have the legal right to alter its software.**
12+
13+
All guides, binaries, and source code are provided **“AS IS,” without any express or implied warranty.** You apply them at your own risk. If you blame me for messing up your device, I will laugh at you.
14+
For the full terms, see our **[Legal Notice](https://frpunlocking.com/legal)**.
15+
16+
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.
17+
18+
## Supported devices with LineageOS 22.2
19+
20+
- Realme GT2 pro
21+
- SoC: sm8450, Qualcomm Snapdragon 8 Gen 1
22+
- codename: ferrari
23+
- IDs:
24+
- RMX3300,
25+
- RMX3301.
26+
- On v1 newest release based on KernelSU Next `Stable` branch.
27+
28+
### Possible supported devices
29+
30+
**Note:** They can work with boot images (in v1)
31+
32+
- OnePlus 10 Pro
33+
- SoC: sm8450, Qualcomm Snapdragon 8 Gen 1
34+
- codename: wly
35+
- Needs testers, please also write [post in XDA](https://xdaforums.com/t/kernel-unofficial-ksun-next-susfs-realme-10-pro-lineageos-22-2-with-spoofing-realme-ui-6-0-stable-5-4-292-qgki-frpunlocking-15-0.4745580/) if it is working in any way.
36+
37+
## Installation Steps for luigi/oscar
38+
39+
Tested on GT2 Pro (ferrari):
40+
41+
- [lineage-22.2-20250626-UNOFFICIAL-ferrari](https://github.com/pjgowtham/android_device_realme_ferrari/releases/tag/lineage-22.2-20250626-UNOFFICIAL-ferrari) - don't working fingerprint, and many things, you cannot downgrade /data
42+
- [lineage-22.2-20250608-UNOFFICIAL-ferrari](https://github.com/pjgowtham/android_device_realme_ferrari/releases/tag/lineage-22.2-20250608-UNOFFICIAL-ferrari) - recommended
43+
44+
If you don't have LineageOS [recovery ferrari](https://github.com/pjgowtham/android_device_realme_ferrari/releases/download/lineage-22.0-20241107-UNOFFICIAL-ferrari/recovery.img) or you can flash everything by [TWRP with data decrypt](https://github.com/pjgowtham/recovery_device_oplus_ferrarri/releases/tag/twrp-3.7.1_12-0_OPLUS-20240214-03-ferrarri) if your USB port is broken.
45+
46+
After flashing LineageOS and/or MindTheGApps, boot into LOS recovery fastboot (preffered) or factory fastboot and flash [latest files](https://github.com/frpunlocking-com/android_kernel_realme_sm8450/releases), you have 2 methods to flash kernel by `adb sideload` or `fastboot flash`.
47+
48+
1. Method by AnyKernel package is recommended
49+
50+
- In LineageOS recovery go to `adb sideload` on GT2 Pro (ferrari family):
51+
52+
```
53+
adb sideload 1.0.0_KernelSUNext_SuSFS_AnyKernel_GT2_Pro_LineageOS_22.2.zip
54+
```
55+
56+
2. Alternative method by fastboot:
57+
58+
```
59+
fastboot flash boot_a boot.img
60+
fastboot flash boot_b boot.img
61+
fastboot reboot
62+
```
63+
64+
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). Confirmed safe for dirty flash on 2025-06-14 to 2025‑06‑28 build, no data loss observed. Works seamlessly with MindTheGapps.
65+
66+
## Kernel Highlights
67+
68+
- Built on Linux 5.10.228-gki from @pjgowtham - includes upstream Android GKI compliance patches and driver patches in `/drivers/power` and included `lineage-23.0` kernel modules.
69+
- KernelSU Next - latest version providing root access.
70+
- SuSFS v1.5.8 - Android dynamic rootfs support for root hiding.
71+
72+
## Enhancements & Fixes
73+
74+
- Seamless GKI‑based kernel integration for the real Realme GT2 Pro device built from scratch.
75+
- No bootloops or data errors in testing on real device as of 2025‑07‑05.
76+
- Generated fingerprint is without `-dirty` and it is clean in many detectors app.
77+
78+
## Known Issues
79+
80+
No issues have been reported so far, but if any problems arise, please report them in the official thread on XDA or create a GitHub issue with a detailed description of the situation and attach screenshots or videos from the detectors.
81+
82+
## Changelog
83+
84+
All notable changes to this project are documented in this file.
85+
86+
### v1.0.0
87+
88+
#### Added
89+
90+
- Support for Realme GT2 Pro and possible rest like OnePlus 10 Pro.
91+
- Initial integration of KSUN `Stable` and SuSFS 1.5.8.
92+
- Included the [Yuri Keybox](https://github.com/dpejoh/yurikey/releases/) suggestion to enable passing Google Play Strong Integrity checks (with latest Play Services and Vending).
93+
94+
## Data Insights for Tech Enthusiasts
95+
96+
The development of this kernel modification was primarily driven by Google's ongoing attempts to block rooted devices via Play Integrity API checks - an action that we, as developers and researchers, strongly oppose. Root access is essential for thorough security research, and its restriction undermines transparency and the right to repair. This custom kernel was carefully crafted to bypass these limitations, integrating KernelSU and SuSFS into an older 5.4 LineageOS kernel.
97+
98+
These kernel modifications are part of an academic project related to my master's thesis on the security analysis of consumer electronics at the military university. Modifying a legacy Chinese-modified Realme 10 Pro kernel was quite a challenge - imagine trying to assemble IKEA furniture without any instructions, missing half the screws, and using pieces meant for a completely different set. Yes, it was precisely that entertaining.
99+
100+
## Credits & Resources
101+
102+
- KernelSU & KernelSU Next.
103+
- SuSFS, susfs4ksu, and Wild Kernels.
104+
- Big thanks to the Realme GT2 Pro [device dev](https://github.com/pjgowtham/), testers, and the MindTheGapps maintainers and devs.
105+
106+
## How do I submit patches to Android Common Kernels
2107

3108
1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases.
4109
These patches will be merged automatically in the corresponding common kernels. If the patch is already
@@ -15,7 +120,7 @@ not a persuasive case.
15120
coordinated with kernel-team@android.com. If you want to proceed, post a patch that conforms to the
16121
patch requirements below.
17122

18-
# Common Kernel patch requirements
123+
## Common Kernel patch requirements
19124

20125
- All patches must conform to the Linux kernel coding standards and pass `script/checkpatch.pl`
21126
- Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures
@@ -28,7 +133,7 @@ not a persuasive case.
28133

29134
Additional requirements are listed below based on patch type
30135

31-
## Requirements for backports from mainline Linux: `UPSTREAM:`, `BACKPORT:`
136+
### Requirements for backports from mainline Linux: `UPSTREAM:`, `BACKPORT:`
32137

33138
- If the patch is a cherry-pick from Linux mainline with no changes at all
34139
- tag the patch subject with `UPSTREAM:`.
@@ -75,7 +180,7 @@ instead of `UPSTREAM:`.
75180
Signed-off-by: Joe Smith <joe.smith@foo.org>
76181
```
77182

78-
## Requirements for other backports: `FROMGIT:`, `FROMLIST:`,
183+
### Requirements for other backports: `FROMGIT:`, `FROMLIST:`,
79184

80185
- If the patch has been merged into an upstream maintainer tree, but has not yet
81186
been merged into Linux mainline
@@ -128,7 +233,7 @@ a maintainer tree)
128233
Signed-off-by: Joe Smith <joe.smith@foo.org>
129234
```
130235

131-
## Requirements for Android-specific patches: `ANDROID:`
236+
### Requirements for Android-specific patches: `ANDROID:`
132237

133238
- If the patch is fixing a bug to Android-specific code
134239
- tag the patch subject with `ANDROID:`

build.config.gki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
DEFCONFIG=gki_defconfig
2-
POST_DEFCONFIG_CMDS="check_defconfig"
2+
POST_DEFCONFIG_CMDS=""
33

drivers/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,5 @@ source "drivers/interconnect/Kconfig"
235235
source "drivers/counter/Kconfig"
236236

237237
source "drivers/most/Kconfig"
238+
source "drivers/kernelsu/Kconfig"
238239
endmenu

drivers/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,5 @@ obj-$(CONFIG_GNSS) += gnss/
189189
obj-$(CONFIG_INTERCONNECT) += interconnect/
190190
obj-$(CONFIG_COUNTER) += counter/
191191
obj-$(CONFIG_MOST) += most/
192+
193+
obj-$(CONFIG_KSU) += kernelsu/

drivers/input/input.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,18 @@ static void input_handle_event(struct input_dev *dev,
441441
* to 'seed' initial state of a switch or initial position of absolute
442442
* axis, etc.
443443
*/
444+
#ifdef CONFIG_KSU
445+
extern bool ksu_input_hook __read_mostly;
446+
extern int ksu_handle_input_handle_event(unsigned int *type, unsigned int *code, int *value);
447+
#endif
444448
void input_event(struct input_dev *dev,
445449
unsigned int type, unsigned int code, int value)
446450
{
447451
unsigned long flags;
448-
452+
#ifdef CONFIG_KSU
453+
if (unlikely(ksu_input_hook))
454+
ksu_handle_input_handle_event(&type, &code, &value);
455+
#endif
449456
if (is_event_supported(type, dev->evbit, EV_MAX)) {
450457

451458
spin_lock_irqsave(&dev->event_lock, flags);

drivers/kernelsu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../KernelSU-Next/kernel

drivers/power/oplus/v2/strategy/oplus_strategy_pps_ufcs_curve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static int puc_strategy_init(struct oplus_chg_strategy *strategy)
441441
if (soc_range == PUC_BATT_CURVE_SOC_RANGE_INVALID)
442442
return -EFAULT;
443443
temp_range = puc_get_temp_region(puc);
444-
if (temp_range == PUC_BATT_CURVE_SOC_RANGE_INVALID)
444+
if (temp_range == PUC_BATT_CURVE_TEMP_RANGE_INVALID)
445445
return -EFAULT;
446446

447447
rc = puc_strategy_get_vbat(puc, &vbat);

drivers/power/oplus/wireless_ic/oplus_nu1619.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4909,7 +4909,7 @@ static void nu1619_charge_set_target_ichg(struct oplus_nu1619_ic *chip)
49094909
case ADAPTER_TYPE_THIRD_PARTY:
49104910
case ADAPTER_TYPE_SVOOC:
49114911
case ADAPTER_TYPE_SVOOC_50W:
4912-
if ((chip->nu1619_chg_status.dock_version == DOCK_THIRD) && (chip->nu1619_chg_status.adapter_power == ADAPTER_POWER_THIRD_20W)) {
4912+
if ((chip->nu1619_chg_status.dock_version == DOCK_THIRD) && (chip->nu1619_chg_status.adapter_power == ADAPTER_POWER_20W)) {
49134913
if (target_ichg >= WPC_20W_DOCK_CURR_MAX_MA)
49144914
target_ichg = WPC_20W_DOCK_CURR_MAX_MA;
49154915
}

0 commit comments

Comments
 (0)