Jailbreak Mode
About 1034 wordsAbout 3 min
2026-08-06
Jailbreak Mode allows loading the KernelPatch kernel module directly on an unpatched stock kernel — no modified boot.img flashing required — to obtain Root capability.
⚠️ Unstable Feature
Jailbreak Mode is NOT a stable feature and carries the following risks:
- Limited compatibility: Some kernel versions or device models are incompatible, which may cause the module to fail to load, or even make jailbreaking completely impossible
- Extra prerequisites required: It depends on adb-root escalation and SELinux Permissive mode; it cannot be used when the environment does not meet these requirements
- Non-persistent: The module takes effect through runtime loading and is lost after reboot, requiring re-triggering
- May affect system stability: Loading failures or module/kernel incompatibility may cause anomalies
Treat Jailbreak Mode as an experimental / emergency option rather than a daily-driver Root method. For stable use, prefer the standard patched boot.img installation.
Why Jailbreak Mode?
The standard installation requires patching boot.img and flashing it to the device. Jailbreak Mode provides an alternative path without flashing:
- Try temporary Root when the device cannot unlock the Bootloader or flashing is inconvenient
- Quickly experience KernelPatch without affecting the current system
- As a temporary solution before patching
Limited Applicability
Whether Jailbreak Mode works highly depends on the device kernel and model; not all devices can use it. If loading fails, do not repeatedly force-trigger it, to avoid affecting system stability.
How It Works
The core of Jailbreak Mode is loading a kernel module while bypassing kernel version and symbol checks:
- Extract the built-in module: The manager extracts the prebuilt
kernelpatch.kokernel module - Privilege escalation:
MagicaServiceenables adb-root escalation to obtain the permission needed to load the kernel module - Manual relocation loading:
apd insmodmanually relocates the module's undefined symbols against/proc/kallsyms, bypassing the kernel's modversions (CRC) and vermagic checks, then loads it into the kernel via theinit_modulesyscall - Soft reboot to take effect: After the module loads, a soft reboot (restarting only the Android framework, not the kernel) activates Root
This loading mechanism is ported from KernelSU's
ksuinit::load_module.
Prerequisites
- SELinux is in Permissive mode: This is the core requirement for jailbreaking;
getenforcemust outputPermissive, otherwise the jailbreak entry will not appear on the homepage - The device already has Root access (for privilege escalation, e.g. with Magisk installed)
- No real KernelPatch installed (devices with a patched boot do not offer the jailbreak entry)
- The device kernel is compatible with the prebuilt module (loading fails otherwise)
Usage Steps
Entry Point
The jailbreak entry is located on the homepage working card. When the conditions are met (kernel not installed + SELinux Permissive), a "Jailbreak" indicator appears on the working card — tap it to trigger jailbreaking.
- Confirm the device meets the prerequisites, with SELinux in Permissive mode
- Open FolkPatch and find the "Jailbreak" indicator on the homepage working card
- Tap the working card (or the jailbreak button on the card) to trigger jailbreaking
- Wait for the kernel module to load; a soft reboot confirmation dialog appears after success
- Tap Restart Framework (soft reboot — only restarts the Android framework, not the kernel)
- After reboot you are in jailbreak mode; the working card shows a "Jailbreak Mode" indicator (lock icon)
About Soft Reboot
A soft reboot only restarts the Android framework (e.g. zygote), not the kernel, so the loaded kernel module is not lost. A soft reboot after loading is required for Root to take effect.
Restrictions in Jailbreak Mode
The following features are restricted while in jailbreak mode:
- Patching disabled: The install page shows "Patching is not allowed in jailbreak mode"; you cannot patch
boot.imgor perform restore operations - KPM is load-only: The kernel module page is available, but only the Load operation is supported; Auto-Load Config and Embed are hidden (embedding requires boot patching)
- Update card suppressed: The KernelPatch update prompt card is suppressed
Exiting Jailbreak Mode
- Tap the "Jailbreak Mode" indicator on the homepage working card and confirm the soft reboot (or simply reboot the device)
- You can also go to Settings → Function and turn off the Jailbreak Mode toggle (removes the marker file)
- Reboot the device — the jailbreak module is lost and the device returns to the non-jailbroken state
Lost After Reboot
Jailbreak Mode is non-persistent: after a normal reboot, the runtime-loaded kernel module is lost and jailbreaking must be re-triggered. If you later flash a genuinely patched boot.img via Fastboot, the manager automatically detects and clears the stale jailbreak marker.
FAQ
Jailbreak Mode Q&A
User
What should I do if jailbreak loading fails?
Loading failure usually means the kernel or device model is incompatible. Do not repeatedly force-trigger it; switch to the standard patched boot.img installation instead. First confirm: the device is rooted, SELinux is Permissive, and no real KernelPatch is installed.
User
Will jailbreak mode be lost after reboot?
Yes. The jailbreak module is loaded at runtime and is lost after a normal reboot, requiring re-triggering. This is an inherent property of jailbreak mode (non-persistent).
User
Can I load KPM in jailbreak mode?
Yes. The kernel module page is available in jailbreak mode, but only the Load operation is supported (load-only) — Auto-Load Config and Embed are hidden (embedding requires boot patching). Moreover, jailbreak mode demands higher kernel compatibility — always rely on actual behavior.
User
Is jailbreak mode stable?
No, it is not. Jailbreak mode highly depends on device kernel and model compatibility; some kernels or models will fail to load or even cannot jailbreak at all. Treat it only as an experimental or emergency option; choose the standard installation for daily use.
Copyright
Copyright Ownership:FolkPatch Team
License under:Attribution 4.0 International (CC-BY-4.0)
