APatch Root Installation Guide
Modern kernel-based root solution for Android 10+. Install APatch for systemless root with minimal system modifications and evolving module ecosystem.
Quick Navigation β
- What is APatch
- Prerequisites
- Installation Guide
- Post-Installation
- Module Management
- OTA Updates
- Troubleshooting
Related Guides:
- Main Rooting Guide - Complete rooting overview
- Bootloader Unlocking - Required first step
- Root Comparison - Compare with Magisk and KernelSU
- TroubleShooting Guide
- FAQ - Common questions
Understanding APatch β
APatch is a kernel-based rooting solution for Android 10+ that patches your boot or init_boot image to add an in-kernel superuser (su) implementation and systemless features.
Core Features β
- Kernel-Level Integration - root originates in the kernel, not via init hijack
- Systemless Design - no need to remount or modify /system
- OTA Friendly - with correct slot handling and image matching
- Growing Module System - designed for modern Android releases
APatch vs Alternatives β
| Feature | APatch | Magisk | KernelSU |
|---|---|---|---|
| Architecture | Kernel-based | Userspace overlay | Kernel-based |
| Android Support | 10+ | 6.0+ | 11+ (GKI 2.0) |
| Setup Complexity | Moderate | Easy | Moderate-Advanced |
| Module Ecosystem | Growing (50+) | Mature (1000+) | Growing (300+) |
| Zygisk Support | No (alternatives exist) | Yes | No (ZygiskNext) |
| Root Hiding | Good | Good | Excellent |
| OTA Method | Manual slot flash | Built-in installer | Manual slot flash |
Choose APatch if:
- You want kernel-based security
- You have Android 10+ device
- You prefer modern architecture
- Magisk/KernelSU unsupported on your device
- You want AVB compatibility
COMPATIBILITY NOTE
Do not install APatch alongside Magisk or KernelSU. Choose one root solution only.
TIP
Detailed comaprison with other root solutions: Root Comparison
Prerequisites β
Critical Requirements β
ESSENTIAL PREREQUISITES
Unlocked Bootloader - APatch requires unlocked bootloader. Complete bootloader unlocking first.
Stock Firmware - Download exact firmware matching your current build for image extraction.
Complete Backup - Backup all data. Unlocking bootloader wipes device completely.
Battery 50%+ - Ensure sufficient battery to prevent interruption.
Hardware Requirements β
- Android device with unlocked bootloader
- Android 10 or newer
- 50% or higher battery charge
- Quality USB cable (data-capable)
- Computer (Windows, macOS, or Linux)
Software Requirements β
On Computer:
- Android Platform Tools (ADB/Fastboot)
- Device-specific USB drivers (Windows only)
- Payload dumper tool (for OTA extraction)
- Stock firmware for your device
On Device:
- Latest APatch APK from GitHub
- File manager app
- At least 500MB free storage
Compatibility Check β
Android Version Support:
| Android Version | APatch Support | Notes |
|---|---|---|
| Android 15 | Yes | Full support |
| Android 14 | Yes | Full support |
| Android 13 | Yes | Often uses init_boot |
| Android 12 | Yes | Full support |
| Android 11 | Yes | May use init_boot |
| Android 10 | Yes | Minimum supported |
| Android 9 and older | No | Not supported |
Device Compatibility:
- Check APatch GitHub Issues for your device
- Verify boot or init_boot partition usage
- Confirm stock firmware availability
Understanding Boot vs Init Boot β
Critical to know which image to patch for your device.
What's the Difference? β
boot.img (Traditional):
- Contains kernel and ramdisk
- Used by most older devices
- Android 12 and older (typically)
init_boot.img (Modern):
- Separate ramdisk partition
- Used by many Android 13+ devices
- Google Pixel 7/8/9 use init_boot
- Part of Generic Kernel Image (GKI) design
How to Determine? β
Method 1: Check APatch App
- Install APatch APK
- Open app
- App will indicate which partition to use
Method 2: Check Partitions
adb shell ls -l /dev/block/by-name/ | grep -E "boot|init_boot"If you see init_boot, your device likely uses it.
Method 3: Device-Specific Rules
| Device | Image to Patch | Notes |
|---|---|---|
| Google Pixel 7/8/9 | init_boot | Android 13+ |
| Google Pixel 6 and older | boot | Traditional |
| OnePlus (Android 13+) | Usually init_boot | Check partitions |
| Xiaomi (Android 13+) | Usually init_boot | Varies by model |
| Samsung | boot | Complex, see Samsung notes |
| Most Android 12 and older | boot | Traditional method |
CRITICAL DECISION
Patching wrong image will cause bootloop. Always verify before proceeding!
Installation Steps β
Step 1: Extract Stock Boot Image β
You need stock boot.img or init_boot.img matching your current build.
For Pixel Devices:
- Download factory image from Google Developers
- Extract ZIP file
- Extract inner
image-*.zip - Find
boot.imgorinit_boot.img
For OnePlus/OPPO/Realme (Payload.bin OTA):
- Download full OTA for your device
- Extract payload.bin from OTA ZIP
- Use payload-dumper-go to extract:
# Download payload-dumper-go
# Extract images
./payload-dumper-go -o extracted payload.bin
# boot.img and init_boot.img will be in extracted/For Xiaomi/Redmi/POCO:
- Download fastboot ROM (tgz) from Xiaomi
- Extract archive
- Navigate to images/ directory
- Find boot.img or init_boot.img
For Samsung (Advanced):
- Download firmware via Frija or SamFirm
- Extract AP.tar file
- Find boot.img.lz4 or init_boot.img.lz4
- Decompress with lz4:
lz4 -d boot.img.lz4 boot.imgNote: Samsung requires Odin (not fastboot) and has limited APatch support.
From Device (If Already Rooted):
# Extract boot partition
adb shell su -c "dd if=/dev/block/by-name/boot of=/sdcard/boot.img"
adb pull /sdcard/boot.img
# Or for init_boot
adb shell su -c "dd if=/dev/block/by-name/init_boot of=/sdcard/init_boot.img"
adb pull /sdcard/init_boot.imgStep 2: Patch Image with APatch β
Transfer Image to Device:
# Transfer extracted boot or init_boot image
adb push boot.img /sdcard/Download/
# Or
adb push init_boot.img /sdcard/Download/Patch with APatch App:
- Install APatch APK on device
- Enable "Install Unknown Apps" for file manager
- Install APatch
- Open APatch app
- Tap "Patch Image" or "Install"
- Select boot.img or init_boot.img
- Wait for patching (30-60 seconds)
Output file: apatch_patched_[random].img in Download folder
Step 3: Test Boot (Recommended) β
Before permanent installation, test boot patched image.
Transfer Patched Image to Computer:
adb pull /sdcard/Download/apatch_patched_*.img ./Test Boot (Temporary):
# Reboot to fastboot
adb reboot bootloader
# Verify fastboot connection
fastboot devices
# Boot patched image (NOT flashing)
fastboot boot apatch_patched_xxxxx.imgDevice will boot temporarily with APatch.
If device boots successfully:
- Open APatch app
- Verify root working
- Proceed to permanent installation
If device bootloops:
- Force power off
- Boot normally (returns to stock)
- Verify you patched correct image
- Try different APatch version
Step 4: Flash Permanently β
Once test boot succeeds, flash permanently.
Reboot to Fastboot:
adb reboot bootloaderFlash Appropriate Partition:
For boot.img:
fastboot flash boot apatch_patched_xxxxx.imgFor init_boot.img:
fastboot flash init_boot apatch_patched_xxxxx.imgCheck Active Slot (A/B Devices):
# Check current slot
fastboot getvar current-slot
# Returns: a or b
# Flash to active slot specifically
fastboot flash boot_a apatch_patched_xxxxx.img
# Or
fastboot flash init_boot_b apatch_patched_xxxxx.imgReboot System:
fastboot rebootIMPORTANT
Do NOT disable AVB or flash vbmeta with verification disabled. APatch works with verified boot enabled.
Step 5: Verify Installation β
After Reboot:
- First boot may take 2-5 minutes
- Open APatch app
- Should show:
- APatch: Installed (version)
- Root access available
Test Root Access:
adb shell
su
id
# Should return: uid=0(root) gid=0(root)Or install root checker app from Play Store.
Post-Installation Setup β
Initial Configuration β
1. Configure Superuser Access
Open APatch > Settings:
Access Control:
- Default response: Prompt (recommended)
- Timeout: 10 seconds
- Require authentication: Enable biometric
- Root logging: Enable
Notifications:
- Superuser requests: Enable
- Module updates: Enable
- Error alerts: Enable
2. Hide APatch Manager
For banking apps:
- APatch > Settings
- "Hide Manager"
- Enter custom name
- App repackages with new icon
3. Security Settings
- Enable biometric authentication
- Set automatic timeout
- Review superuser logs regularly
- Keep APatch updated
Root Permission Management β
Grant Root Access:
- Apps request root like normal
- Prompt appears with app info
- Grant or deny access
- All access logged
Manage Permissions:
- APatch > Superuser tab
- View all granted apps
- Revoke access anytime
- Review access history
Managing Modules β
Module System Overview β
APatch Modules:
- APatch-specific format
- Some KernelSU compatibility
- Systemless modifications
- Growing ecosystem (50+)
Compatibility:
- APatch native modules: Full support
- KernelSU modules: Many compatible
- Magisk modules: Limited (especially Zygisk)
- Check module documentation
Installing Modules β
Method 1: Manager Installation
- Download module ZIP from trusted source
- Open APatch > Modules
- Tap "Install from storage"
- Select module ZIP
- Wait for installation
- Reboot when prompted
Method 2: Command Line
# Install module via ADB
adb push module.zip /sdcard/Download/
adb shell
su
apatch module install /sdcard/Download/module.zip
# List installed modules
apatch module list
# Enable/disable module
apatch module enable module_id
apatch module disable module_id
# Remove module
apatch module remove module_idModule Troubleshooting β
Module Causes Bootloop:
# Boot to fastboot
# Flash stock boot image
fastboot flash boot stock_boot.img
fastboot reboot
# Or remove modules via ADB
adb wait-for-device shell
rm -rf /data/adb/modules/[module_name]Module Not Working:
- Verify module is APatch-compatible
- Check APatch version requirements
- Review module logs
- Reinstall module
- Contact module developer
OTA Handling β
OTA Updates for A/B Devices β
Most modern devices use A/B partitions. Preserve root across OTAs:
Step 1: Download OTA
Settings > System > Update
Download OTA but DO NOT reboot yet.
Step 2: Extract New Boot Image
- OTA file located in:
/data/ota_package/or similar - Extract payload.bin from OTA
- Use payload-dumper-go to extract new boot/init_boot
- New image matches updated system
Step 3: Patch New Image
- Transfer new boot/init_boot to device
- Open APatch
- Patch the new image
- Pull patched image to computer
Step 4: Flash to Inactive Slot
# Check current slot
fastboot getvar current-slot
# Returns: a
# OTA installed to slot b (inactive)
# Flash patched image to slot b
fastboot flash boot_b apatch_patched_new.img
# Or
fastboot flash init_boot_b apatch_patched_new.img
# Reboot
fastboot rebootStep 5: Verify After Update
- System boots to updated slot (b)
- APatch still installed and working
- Verify root access
OTA Updates for Non-A/B Devices β
Method:
- Extract new boot/init_boot from OTA
- Patch with APatch
- Flash to boot/init_boot partition
- Modules may need reinstallation
Root Hiding and Play Integrity β
Configure Root Hiding β
Step 1: Hide Manager
- APatch > Settings
- Hide Manager with custom name
- App repackaged
Step 2: Per-App Deny
- APatch > Superuser
- Configure per-app root access
- Deny for banking/payment apps
Step 3: Install Integrity Modules
- Play Integrity Fix (APatch-compatible version)
- Download from trusted source
- Install via APatch
- Configure device fingerprint
- Reboot device
Step 4: Clear App Data
After setup:
- Settings > Apps
- Clear data for:
- Google Play Services
- Google Play Store
- Banking apps
- Reboot
- Reopen apps
Testing Play Integrity β
Testing Apps:
- YASNAC - SafetyNet checker
- Play Integrity API Checker - Official
- TB Checker - Comprehensive
Expected Results:
- Basic Integrity: PASS (possible)
- Device Integrity: FAIL (unlocked bootloader)
- Strong Integrity: FAIL (hardware attestation)
REALITY CHECK
Play Integrity is increasingly strict. Even with APatch, some banking apps may detect root. Results vary.
Uninstallation β
Complete APatch Removal β
Method 1: Flash Stock Image
# Most reliable method
adb reboot bootloader
# Flash stock boot or init_boot
fastboot flash boot stock_boot.img
# Or
fastboot flash init_boot stock_init_boot.img
# Reboot
fastboot rebootMethod 2: Via Recovery
- Boot to custom recovery (if installed)
- Flash stock boot/init_boot image
- Wipe cache
- Reboot system
Method 3: Full Firmware Flash
For complete clean install:
- Download full stock firmware
- Flash via fastboot or manufacturer tool
- All modifications removed
Clean App Data β
# Uninstall APatch app
adb shell pm uninstall apatch.package.name
# Clear remaining data
adb shell rm -rf /data/adb/apatchDevice-Specific Notes β
Google Pixel β
Pixel 7/8/9 (Android 13+):
- Patch init_boot.img
- Full AVB support
- Factory images easily available
Pixel 6 and Older:
- Patch boot.img
- Traditional method
OnePlus/OPPO/Realme β
ColorOS/OxygenOS 12+:
- Often use init_boot
- OTA as payload.bin
- Check partitions first
Xiaomi/Redmi/POCO β
HyperOS/MIUI:
- Android 13+ often use init_boot
- Fastboot ROM available
- Anti-rollback protection (ARB)
- Never downgrade across ARB versions
Samsung β
Special Considerations:
- Uses Odin (no fastboot)
- AP.tar contains images
- Images compressed with lz4
- Limited APatch support
- Follow Samsung-specific guides
SAMSUNG WARNING
Samsung root support is experimental with APatch. Proceed with extreme caution. Knox will be tripped permanently.
Troubleshooting β
π Click to expand details
Installation Issues β
Device Bootloops After Flashing
Causes:
- Wrong image patched (boot vs init_boot)
- Image doesn't match current build
- Flashed to wrong partition
Solutions:
- Boot to fastboot immediately
- Flash stock image:
fastboot flash boot stock_boot.img
fastboot reboot- Verify correct partition and image
- Re-extract and patch correct image
APatch App Fails to Patch
Solutions:
- Update to latest APatch APK
- Clear app data and retry
- Verify image is correct format
- Check kernel compatibility
- Try different image extraction method
Fastboot Not Detecting Device
Solutions:
- Update Platform Tools
- Try different USB port (USB 2.0)
- Reinstall device drivers (Windows)
- Check USB cable quality
- Try different computer
Root Access Issues β
Apps Not Getting Root
Solutions:
- Verify APatch shows "Installed"
- Grant root to shell:
adb shell su - Check superuser access logs
- Reinstall APatch via direct install
- Clear app requesting root
Root Lost After Reboot
Solutions:
- Verify boot/init_boot still patched
- Check for system updates that overwrote image
- Re-flash patched image
- Check for module conflicts
OTA Issues β
Lost Root After OTA
Solution:
- Extract boot/init_boot from new build
- Patch with APatch
- Flash to current active slot
- Root restored
OTA Won't Install
Causes:
- Modified system partition
- Disabled AVB (shouldn't be)
- Corrupted OTA file
Solutions:
- APatch should NOT modify system
- Don't disable AVB with APatch
- Re-download OTA
- Flash full stock firmware if needed
Next Steps β
After Installing APatch:
Install essential modules:
- Systemless hosts for ad blocking
- Play Integrity Fix for banking
- Busybox for enhanced commands
Explore root apps:
- Root Apps Collection - Curated apps
Learn advanced techniques:
- Ad Blocking Guide - System-wide blocking
- Debloating Guide - Remove bloat
- Custom ROMs - Next level
Join community:
- Share experiences
- Help others
- Stay updated on development
Community Resources β
Official Resources:
- APatch Website - Official documentation
- APatch GitHub - Source code and releases
- APatch Telegram - Official community
Support Communities:
- Reddit r/ApatchRoot - Community discussions
- XDA APatch Forum - Device-specific help
Getting Help β
Awesome Android Root help resources
When asking for help, provide:
- Device model and Android version
- Build number (Settings > About)
- APatch version installed
- Which partition patched (boot/init_boot)
- Which slot (A/B devices)
- Exact error messages
- APatch logs from Manager
- Steps already attempted