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 Installation Modes
- KernelSU vs Magisk
- Requirements
- Installation Methods
- First Time Setup
- KernelSU Manager
- App Profiles
- Module System
- Troubleshooting
- Uninstallation
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 โ
Feature | KernelSU | KernelSU Next | Magisk |
---|---|---|---|
Root Method | Kernel-based | Kernel-based | Userspace |
Android Support | 12+ (GKI 5.10+) | 4.4+ (Kernel 4.4-6.6) | 6.0+ |
Architecture | arm64-v8a, x86_64 | arm64-v8a, armeabi-v7a, x86_64 | arm64-v8a, x86_64, arm32 |
Installation | Boot image/LKM | Boot image/LKM | Boot image |
Module System | OverlayFS | Magic Mount + OverlayFS | Magic Mount |
Root Hiding | Kernel-level | Kernel-level | Userspace DenyList |
App Control | App Profiles | App Profiles | Basic permissions |
SafetyNet | Better passing rate | Better passing rate | Good with modules |
Performance | Lower overhead | Lower overhead | Standard |
Learning Curve | Moderate | Moderate | Easy |
Development | Official | Community | Official |
๐ฏ 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 โ
# 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 Version | Support Level | Notes |
---|---|---|
5.10+ (GKI 2.0) | Full support | Pre-built images and LKM/KMI |
4.19 โ 5.4 (GKI 1.0) | Build required | Requires KernelSU driver built-in |
< 4.14 (EOL) | Experimental | Requires driver (3.18+ may need backports) |
Supported Devices โ
- Download KernelSU/KernelSU Next manager from respective GitHub releases:
- KernelSU: GitHub Releases
- KernelSU Next: 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
- If the app shows
Check Official documentation
๐พ 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) โ
- KernelSU Next Manager APK (Latest: v1.0.8)
- Nightly Build (Development version)
- Stock firmware with matching boot.img
- Custom kernel with KernelSU Next support (if available)
Installation Methods โ
Method 1: Pre-built Kernel Installation (Recommended) โ
Best for: Users with officially supported devices
KernelSU (Original) โ
- Visit KernelSU Device List
- Find your device in supported list
- Download pre-built kernel for your device model
Installation Steps:
# 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) โ
- Visit KernelSU Next Device List
- Download pre-built kernel for your device (if available)
- Or use community builds from XDA/Telegram
Installation Steps:
# 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 โ
# 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 โ
- Download and install KernelSU/KernelSU Next Manager APK
- Open app - May show "Not Installed" status
Step 3: Patch Boot Image โ
For KernelSU:
- KernelSU Manager โ Install
- Select boot.img you extracted
- Patch image - Creates kernelsu_patched_[random].img
For KernelSU Next:
- KernelSU Next Manager โ Install
- Select boot.img you extracted
- Choose patching method (LKM or GKI)
- Patch image - Creates kernelsu_next_patched_[random].img
Step 4: Flash Patched Boot โ
# 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 โ
- Proton Kernel - Pixel devices
- Sultan Kernel - OnePlus devices
- ArrowOS Kernel - Various devices
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 โ
# 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 โ
# 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 โ
# 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) โ
- KernelSU Next Manager โ Install
- Choose "Direct Install"
- Manager automatically patches and installs
Install to Inactive Slot (A/B devices) โ
- After OTA update
- KernelSU Next Manager โ Install to inactive slot
- Reboot to new slot
First Time Setup โ
๐ฏ Initial Configuration โ
1. Verify Installation โ
After successful boot:
# 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 โ
- Open KernelSU Manager
- Grant permissions when prompted
- 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 โ
- App requests root - Similar to other root solutions
- KernelSU prompt appears with app information
- 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 โ
# 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 โ
- KernelSU Manager โ App Profiles
- Select target app from list
- Create new profile or modify existing
- Configure permissions:
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:
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:
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:
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 โ
# 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 Type | KernelSU | KernelSU 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 โ
# 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) โ
# 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) โ
# 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"
# 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
# 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
# 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
# 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 โ
# Most reliable method
fastboot flash boot stock_boot.img
fastboot reboot
# Verify removal
# KernelSU Manager should show "Not Installed"
Method 2: Kernel Removal โ
# 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 โ
# Complete firmware flash (nuclear option)
# Flash complete stock firmware
# This will remove everything including data
๐งน Clean App Data โ
# 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:
- KernelSU Official Guide - Official documentation
- KernelSU Next Guide - Community fork documentation
- App Profile Templates - Pre-configured security profiles
- Compatible Modules - KernelSU-compatible modifications
- Security Hardening - Advanced security configurations
- Performance Tuning - System optimization techniques
Need help?
- KernelSU Official: Join the KernelSU Telegram community
- KernelSU Next: Visit the GitHub repository
- General Support: Check our FAQ section for common questions and solutions