Skip to content

KernelSU Guide 2025 โ€‹

Complete KernelSU installation and management guide - The modern kernel-based root solution offering enhanced security, better hiding capabilities, and advanced app profile management.

Table of Contents โ€‹

What is KernelSU? โ€‹

KernelSU is a kernel-based root solution for Android that operates at the kernel level, providing more granular control over root access and better security than traditional userspace root solutions.

Key Innovation: By running in kernel space, KernelSU can provide more reliable root hiding, better security controls, and finer app permission management through its App Profile system.

๐Ÿš€ Quick Start

Have a GKI-compatible device? Jump to Installation Methods to get started with KernelSU immediately.

Core Architecture โ€‹

  • Kernel-level operation - Runs in Linux kernel space
  • GKI compatibility - Works with Generic Kernel Image
  • OverlayFS modules - Systemless modifications
  • App Profiles - Fine-grained permission control

Why KernelSU? โ€‹

  • Better hiding - Kernel-level root is harder to detect
  • Enhanced security - App Profile system provides granular control
  • Performance - Lower overhead than userspace solutions
  • Modern design - Built for Android 12+ and GKI kernels

KernelSU Installation Modes โ€‹

Since version 0.9.0, KernelSU supports two installation modes on GKI devices:

๐Ÿ”ง GKI Mode โ€‹

How it works: Replaces device's original kernel with KernelSU's Generic Kernel Image

Advantages:

  • Universal compatibility - Works on most GKI devices
  • Samsung Knox support - Works on Knox-enabled devices
  • Independent of firmware - No need to wait for OTA updates
  • Better compatibility - Ideal for modified devices

Disadvantages:

  • Kernel replacement - Loses original kernel optimizations
  • Manual flashing - Requires fastboot for upgrades

๐Ÿ”ง LKM Mode (Loadable Kernel Module) โ€‹

How it works: Loads KernelSU as a kernel module without replacing the original kernel

Advantages:

  • Preserves original kernel - Keeps device-specific optimizations
  • Easy upgrades - Update directly through manager
  • OTA friendly - Install to inactive slot after OTA
  • No AVB issues - Doesn't trigger Android Verified Boot
  • Temporary disable - Can unload module without reboot

Disadvantages:

  • Firmware dependent - Requires official firmware
  • Limited compatibility - May not work on all devices

๐Ÿค” Which Mode to Choose? โ€‹

  • Mobile phones - LKM mode recommended
  • Emulators/WSA - GKI mode recommended
  • Samsung Knox devices - GKI mode only
  • Custom ROMs - Either mode works

KernelSU vs KernelSU Next vs Magisk โ€‹

๐Ÿ“Š Detailed Comparison โ€‹

FeatureKernelSUKernelSU NextMagisk
Root MethodKernel-basedKernel-basedUserspace
Android Support12+ (GKI 5.10+)4.4+ (Kernel 4.4-6.6)6.0+
Architecturearm64-v8a, x86_64arm64-v8a, armeabi-v7a, x86_64arm64-v8a, x86_64, arm32
InstallationBoot image/LKMBoot image/LKMBoot image
Module SystemOverlayFSMagic Mount + OverlayFSMagic Mount
Root HidingKernel-levelKernel-levelUserspace DenyList
App ControlApp ProfilesApp ProfilesBasic permissions
SafetyNetBetter passing rateBetter passing rateGood with modules
PerformanceLower overheadLower overheadStandard
Learning CurveModerateModerateEasy
DevelopmentOfficialCommunityOfficial

๐ŸŽฏ Choose KernelSU If: โ€‹

  • You have a GKI 2.0 compatible device (Android 12+)
  • You want better root hiding capabilities
  • You need fine-grained app permission control
  • You prefer kernel-level security
  • You use banking/finance apps frequently

๐ŸŽฏ Choose KernelSU Next If: โ€‹

  • You have an older device (Android 4.4+)
  • You want Magic Mount compatibility with Magisk modules
  • You need broader architecture support
  • You want cutting-edge features
  • You're comfortable with community support

๐ŸŽฏ Choose Magisk If: โ€‹

  • You have an older Android device (< Android 12)
  • You want the largest module ecosystem
  • You prefer simpler setup and management
  • You need broader device compatibility
  • You want official support

Requirements โ€‹

๐Ÿ“‹ Essential Prerequisites โ€‹

For KernelSU (Original) โ€‹

  • โœ… Android 12+ with GKI 2.0 - Kernel 5.10 or newer
  • โœ… Compatible architecture - arm64-v8a or x86_64 only
  • โœ… Unlocked bootloader - Bootloader unlock guide
  • โœ… ADB/Fastboot tools - Platform Tools
  • โœ… Stock boot image - Original boot.img for your firmware

For KernelSU Next (Community Fork) โ€‹

  • โœ… Android 4.4+ with Kernel 4.4-6.6 - Much broader compatibility
  • โœ… Compatible architecture - arm64-v8a, armeabi-v7a, or x86_64
  • โœ… Unlocked bootloader - Bootloader unlock guide
  • โœ… ADB/Fastboot tools - Platform Tools
  • โœ… Stock boot image - Original boot.img for your firmware

๐Ÿ” Compatibility Check โ€‹

Check GKI Compatibility โ€‹

bash
# Check kernel version
adb shell uname -r
# Should show 5.10+ for GKI 2.0, 4.4+ for KernelSU Next

# Check GKI version
adb shell cat /proc/version
# Look for "GKI" in kernel string

# Alternative method
adb shell getprop ro.kernel.version

KernelSU Next Compatibility Table โ€‹

Kernel VersionSupport LevelNotes
5.10+ (GKI 2.0)Full supportPre-built images and LKM/KMI
4.19 โ€“ 5.4 (GKI 1.0)Build requiredRequires KernelSU driver built-in
< 4.14 (EOL)ExperimentalRequires driver (3.18+ may need backports)

Supported Devices โ€‹

  • Download KernelSU/KernelSU Next manager from respective GitHub releases:
  • Install and check compatibility:
    • If the app shows Unsupported, you need to compile the kernel yourself
    • If the app shows Not installed, your device is officially supported

๐Ÿ’พ Required Downloads โ€‹

KernelSU (Original) โ€‹

  • KernelSU Manager APK (Latest: v1.0.5)
  • Stock firmware with matching boot.img
  • Custom kernel with KernelSU support (if available)

KernelSU Next (Community Fork) โ€‹

Installation Methods โ€‹

Best for: Users with officially supported devices

KernelSU (Original) โ€‹

  1. Visit KernelSU Device List
  2. Find your device in supported list
  3. Download pre-built kernel for your device model

Installation Steps:

bash
# Download device-specific kernel with KernelSU
# Example for Pixel 7:
wget https://github.com/tiann/KernelSU/releases/download/v1.0.5/kernel-pixel7-v1.0.5.img

# Boot to fastboot mode
adb reboot bootloader

# Flash KernelSU kernel
fastboot flash boot kernel-pixel7-v1.0.5.img

# Reboot device
fastboot reboot

# Install KernelSU Manager APK
adb install KernelSU_v1.0.5.apk

KernelSU Next (Community Fork) โ€‹

  1. Visit KernelSU Next Device List
  2. Download pre-built kernel for your device (if available)
  3. Or use community builds from XDA/Telegram

Installation Steps:

bash
# Download KernelSU Next kernel
# Example for supported device:
wget https://github.com/KernelSU-Next/KernelSU-Next/releases/download/v1.0.8/kernel-device-v1.0.8.img

# Boot to fastboot mode
adb reboot bootloader

# Flash KernelSU Next kernel
fastboot flash boot kernel-device-v1.0.8.img

# Reboot device
fastboot reboot

# Install KernelSU Next Manager APK
adb install KernelSU-Next_v1.0.8.apk

Method 2: Boot Image Patching โ€‹

Best for: Devices without pre-built kernels

Step 1: Extract Stock Boot Image โ€‹

bash
# Method 1: From stock firmware
unzip stock_firmware.zip boot.img

# Method 2: From device (requires temporary root)
adb shell su -c "dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img"
adb pull /sdcard/boot.img

Step 2: Install Manager โ€‹

  1. Download and install KernelSU/KernelSU Next Manager APK
  2. Open app - May show "Not Installed" status

Step 3: Patch Boot Image โ€‹

For KernelSU:

  1. KernelSU Manager โ†’ Install
  2. Select boot.img you extracted
  3. Patch image - Creates kernelsu_patched_[random].img

For KernelSU Next:

  1. KernelSU Next Manager โ†’ Install
  2. Select boot.img you extracted
  3. Choose patching method (LKM or GKI)
  4. Patch image - Creates kernelsu_next_patched_[random].img

Step 4: Flash Patched Boot โ€‹

bash
# Boot to fastboot
adb reboot bootloader

# Flash patched boot image
fastboot flash boot kernelsu_patched_[random].img
# or
fastboot flash boot kernelsu_next_patched_[random].img

# Reboot device
fastboot reboot

Method 3: Custom Kernel with KernelSU โ€‹

Best for: Advanced users, custom ROM users

KernelSU-Compatible Kernels โ€‹

KernelSU Next-Compatible Kernels โ€‹

  • Custom kernels with KernelSU Next integration
  • Community builds from XDA forums
  • Telegram groups for device-specific builds

Method 4: Building Custom Kernel โ€‹

For developers and unsupported devices

KernelSU Integration โ€‹

bash
# Clone KernelSU source
git clone https://github.com/tiann/KernelSU.git

# Integrate with kernel source
cd your_kernel_source
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -

KernelSU Next Integration โ€‹

bash
# Clone KernelSU Next source
git clone https://github.com/KernelSU-Next/KernelSU-Next.git

# Integrate with kernel source
cd your_kernel_source
curl -LSs "https://raw.githubusercontent.com/KernelSU-Next/KernelSU-Next/next/kernel/setup.sh" | bash -

Kernel Configuration โ€‹

bash
# Add to kernel config
CONFIG_KSU=y
CONFIG_KSU_DEBUG=y

# Build kernel
make -j$(nproc)

Method 5: LKM Installation (KernelSU Next) โ€‹

Best for: Devices that support LKM mode

Direct Install (if already rooted) โ€‹

  1. KernelSU Next Manager โ†’ Install
  2. Choose "Direct Install"
  3. Manager automatically patches and installs

Install to Inactive Slot (A/B devices) โ€‹

  1. After OTA update
  2. KernelSU Next Manager โ†’ Install to inactive slot
  3. Reboot to new slot

First Time Setup โ€‹

๐ŸŽฏ Initial Configuration โ€‹

1. Verify Installation โ€‹

After successful boot:

bash
# Check KernelSU status
adb shell su -c "ksud version"
# Should show KernelSU version

# Alternative check via app
# KernelSU Manager should show "Installed" status

2. Basic Setup โ€‹

  1. Open KernelSU Manager
  2. Grant permissions when prompted
  3. Check status - Should show:
    • โœ… KernelSU Installed
    • โœ… Version information
    • โœ… Root access available

3. Initial Configuration โ€‹

  • Update channel - Stable recommended for daily use
  • Notification settings - Configure manager notifications
  • Security settings - Set up authentication if desired

๐Ÿ” Root Permission Setup โ€‹

Understanding KernelSU Root โ€‹

Unlike traditional root, KernelSU provides:

  • Kernel-level root - More secure and harder to detect
  • App Profiles - Granular permission control per app
  • Better hiding - Root access invisible to most detection methods

First Root Grant โ€‹

  1. App requests root - Similar to other root solutions
  2. KernelSU prompt appears with app information
  3. Choose permission level:
    • Grant - Full root access
    • Deny - Refuse root access
    • App Profile - Custom permission set

KernelSU Manager โ€‹

๐Ÿ  Interface Overview โ€‹

Main Sections โ€‹

  • Status - Installation status and device info
  • Superuser - Root permission management
  • Modules - Module installation and management
  • App Profiles - Advanced app permission control

๐Ÿ“Š Status Tab โ€‹

System Information โ€‹

  • KernelSU version - Installed kernel version
  • Kernel version - Linux kernel information
  • Safe mode - Current boot status
  • Manager version - App version information

Device Details โ€‹

  • Android version - OS version and security patch
  • Architecture - CPU architecture (arm64/x86_64)
  • SELinux status - Security policy enforcement

๐Ÿ‘ฅ Superuser Management โ€‹

Root Access Control โ€‹

bash
# View granted apps
ksud list

# Grant root to specific app
ksud allow <package_name>

# Revoke root access
ksud deny <package_name>

App Management โ€‹

  • Permission history - See which apps used root
  • Access logs - Detailed command history
  • Automatic decisions - Set default responses for trusted apps

โš™๏ธ Settings Configuration โ€‹

Security Settings โ€‹

  • Require authentication - Biometric/PIN for manager access
  • Hide manager icon - Prevent app detection
  • Safe mode trigger - Volume key combinations

Advanced Options โ€‹

  • Kernel logging - Debug information collection
  • Module debugging - Enhanced module error reporting
  • Performance monitoring - Resource usage tracking

App Profiles โ€‹

๐ŸŽฏ Advanced Permission Control โ€‹

App Profiles are KernelSU's unique feature that allows fine-grained control over what each app can access, even with root permissions.

Profile Concepts โ€‹

  • Default Profile - Standard root access
  • Custom Profiles - Tailored permission sets
  • Sandbox Mode - Isolated execution environment
  • Permission Inheritance - Parent-child app relationships

๐Ÿ“ฑ Creating App Profiles โ€‹

Step-by-Step Profile Creation โ€‹

  1. KernelSU Manager โ†’ App Profiles
  2. Select target app from list
  3. Create new profile or modify existing
  4. Configure permissions:
yaml
Root Access: ON/OFF           # Basic root permission
File System Access:
  - /system: Read Only         # System partition access
  - /data: Read/Write         # Data partition access
  - /sdcard: Full Access      # Storage access
Network Access: Controlled    # Network permission level
Device Access:
  - Camera: Denied            # Hardware access control
  - Microphone: Allowed       # Audio device access
  - Location: Restricted      # GPS access level

Advanced Profile Options โ€‹

  • UID/GID control - User and group ID management
  • SELinux context - Security context assignment
  • Capabilities - Linux capability restrictions
  • Resource limits - CPU, memory, and I/O limits

๐Ÿ›ก๏ธ Security Profiles โ€‹

Banking App Profile โ€‹

Secure profile for financial applications:

yaml
Profile Name: "Banking Secure"
Root Access: DENIED
Network: Banking domains only
File System: Restricted to app data
Hardware: No camera, no microphone
Logging: Enhanced monitoring

Development App Profile โ€‹

Profile for debugging and development tools:

yaml
Profile Name: "Developer Tools"
Root Access: FULL
File System: Read/Write system
Network: Unrestricted
ADB Access: Allowed
Debugging: Full access

Gaming App Profile โ€‹

Optimized profile for mobile games:

yaml
Profile Name: "Gaming Optimized"
Root Access: DENIED
Performance: High priority
Graphics: Unrestricted GPU
Network: Game servers only
Anti-cheat: Bypass protection

๐Ÿ“‹ Profile Templates โ€‹

Pre-configured Templates โ€‹

KernelSU includes several profile templates:

  • ๐Ÿฆ Banking - Maximum security, minimal access
  • ๐ŸŽฎ Gaming - Performance optimized, restricted access
  • ๐Ÿ› ๏ธ Development - Full access for debugging tools
  • ๐Ÿ”’ Privacy - Enhanced privacy protection
  • โšก Performance - Resource optimization focus

Custom Template Creation โ€‹

bash
# Export existing profile as template
ksud profile export com.example.app > my_template.json

# Apply template to new app
ksud profile import com.target.app < my_template.json

Module System โ€‹

๐Ÿ“ฆ Module Architecture Comparison โ€‹

KernelSU (Original) โ€‹

  • Primary: OverlayFS-based system
  • Advantage: More efficient, kernel-level integration
  • Disadvantage: Limited compatibility with some Magisk modules

KernelSU Next (Community Fork) โ€‹

  • Dual System: Magic Mount + OverlayFS
  • Magic Mount: Full compatibility with Magisk modules
  • OverlayFS: Efficient kernel-level modifications
  • Advantage: Best of both worlds - compatibility and performance

๐Ÿ”ง Module Structure โ€‹

Standard KernelSU Module โ€‹

module_structure/
โ”œโ”€โ”€ META-INF/               # Installation metadata
โ”œโ”€โ”€ module.prop            # Module properties
โ”œโ”€โ”€ post-fs-data.sh        # Early boot script
โ”œโ”€โ”€ service.sh             # Late boot script
โ”œโ”€โ”€ system/                # System overlay files
โ”œโ”€โ”€ vendor/                # Vendor overlay files
โ””โ”€โ”€ webroot/               # Web UI files (optional)

KernelSU Next Enhanced Module โ€‹

module_structure/
โ”œโ”€โ”€ META-INF/               # Installation metadata
โ”œโ”€โ”€ module.prop            # Module properties
โ”œโ”€โ”€ post-fs-data.sh        # Early boot script
โ”œโ”€โ”€ service.sh             # Late boot script
โ”œโ”€โ”€ boot-completed.sh      # Post-boot script (KSU Next)
โ”œโ”€โ”€ post-mount.sh          # Post-mount script (KSU Next)
โ”œโ”€โ”€ system/                # System overlay files
โ”œโ”€โ”€ vendor/                # Vendor overlay files
โ””โ”€โ”€ webroot/               # Web UI files (optional)

๐Ÿ”ฅ Compatible Modules โ€‹

KernelSU Next Enhanced Modules โ€‹

  • All KernelSU modules - Full backward compatibility
  • Most Magisk modules - Magic Mount support
  • Zygisk modules - Through ZygiskNext
  • Custom KSU Next modules - Enhanced features

Magisk Module Compatibility โ€‹

Module TypeKernelSUKernelSU Next
System overlay modulesโœ… Compatibleโœ… Compatible
Simple modification modulesโœ… Compatibleโœ… Compatible
Magic Mount modulesโŒ Not compatibleโœ… Compatible
Zygisk-dependent modulesโŒ Need ZygiskNextโœ… Better support
Complex injection modulesโŒ May need adaptationโœ… Better compatibility

๐Ÿ“ฅ Module Installation โ€‹

Method 1: Manager Installation โ€‹

bash
# For both KernelSU and KernelSU Next
1. Download module ZIP from trusted source
2. Open KernelSU/KernelSU Next Manager โ†’ Modules
3. Install from storage โ†’ Select ZIP
4. Reboot device to activate

Method 2: Command Line (KernelSU) โ€‹

bash
# Install module via command line
ksud module install /path/to/module.zip

# List installed modules
ksud module list

# Enable/disable module
ksud module enable module_id
ksud module disable module_id

# Remove module
ksud module remove module_id

Method 3: Command Line (KernelSU Next) โ€‹

bash
# Install module via command line
ksud_next module install /path/to/module.zip

# List installed modules with more details
ksud_next module list --verbose

# Enable/disable module
ksud_next module enable module_id
ksud_next module disable module_id

# Remove module
ksud_next module remove module_id

Troubleshooting โ€‹

๐Ÿšจ Common Issues โ€‹

KernelSU Not Working After Installation โ€‹

Symptoms: Manager shows "Not Installed"

bash
# Diagnostic steps:
1. Check kernel compatibility: uname -r
2. Verify GKI support: cat /proc/version | grep GKI
3. Check boot image integrity
4. Try different installation method

Apps Can't Get Root Access โ€‹

Symptoms: Root requests denied or not appearing

bash
# Solutions:
1. Check app profile settings
2. Verify KernelSU daemon status: ksud status
3. Clear app data and retry
4. Check selinux status: getenforce

Modules Not Loading โ€‹

Symptoms: Installed modules have no effect

bash
# Troubleshooting:
1. Check module compatibility with KernelSU
2. Verify module installation: ksud module list
3. Check module logs: ksud module log module_id
4. Try installing via different method

Boot Loop After Installation โ€‹

Symptoms: Device stuck in boot animation

bash
# Recovery methods:
1. Boot to fastboot: fastboot flash boot stock_boot.img
2. Use emergency mode: Volume Up + Power during boot
3. Flash stock firmware if necessary
4. Check kernel compatibility before reinstalling

Uninstallation โ€‹

๐Ÿ—‘๏ธ Complete Removal โ€‹

Method 1: Flash Stock Boot โ€‹

bash
# Most reliable method
fastboot flash boot stock_boot.img
fastboot reboot

# Verify removal
# KernelSU Manager should show "Not Installed"

Method 2: Kernel Removal โ€‹

bash
# If using custom kernel with KernelSU
# Flash stock kernel or kernel without KernelSU
fastboot flash boot stock_kernel.img
fastboot reboot

Method 3: Firmware Restore โ€‹

bash
# Complete firmware flash (nuclear option)
# Flash complete stock firmware
# This will remove everything including data

๐Ÿงน Clean App Data โ€‹

bash
# Remove KernelSU app data
adb shell pm uninstall com.ksu.kernelsu

# Clear any remaining data
adb shell rm -rf /data/data/com.ksu.kernelsu

๐Ÿ“‹ Verification โ€‹

After uninstallation:

  • โœ… No KernelSU in installed apps
  • โœ… No root access available
  • โœ… Banking apps work normally
  • โœ… SafetyNet passes (if was issue)

๐Ÿ’ก Pro Tips

  • Choose the right version - KernelSU for stability, KernelSU Next for compatibility
  • Start conservative - Begin with minimal app profiles
  • Test thoroughly - Verify each profile before deployment
  • Keep backups - Always backup working boot images
  • Stay updated - Follow both projects for updates
  • Join communities - Get support from both official and community channels
  • Document changes - Keep track of profiles and modules

Next Steps โ€‹

๐ŸŽฏ Optimize Your Setup:


Need help?

Made with โค๏ธ for the Android Root community