Intelligent CPU governor management for Android gaming and daily use
Features โข Installation โข Usage โข Dashboard โข CLI Reference
Adaptive Performance is a module that automatically switches CPU governors based on the foreground application. It intelligently balances performance and battery life by applying optimal governors for gaming, specific apps, or idle states.
- Gaming: Automatically apply performance governor when launching games
- Customization: Set different governors for different apps (e.g., conservative for browser, performance for benchmarks)
- Efficiency: Return to power-saving mode when idle
- Transparency: Monitor everything via web dashboard with real-time updates
|
Core Functionality
|
Management Tools
|
|
Compatibility
|
Safety
|
- Magisk 20.4+ or KernelSU
- Android 8.0 (Oreo) or higher
- Root access (obviously)
- Custom kernel with multiple governors (optional but recommended)
Note: Module works with stock kernels but benefits greatly from custom kernels that offer more governor options (e.g., Kirisakura, Stratosphere, Genom).
- Download the latest
AdaptivePerformance-v1.1.zipfrom Releases - Open Magisk Manager/KernelSU โ Modules โ Install from storage
- Select the downloaded ZIP file
- Wait for installation to complete
- Reboot your device
- Verify installation: adaptperf-status
adb push AdaptivePerformance-v1.1.zip /sdcard/ adb shell su -c magisk --install-module /sdcard/AdaptivePerformance-v1.1.zip adb reboot
- โ Detects and saves stock CPU governor
- โ Backs up kernel configuration
- โ Creates default game list (Delta Force, Mobile Legends)
- โ
Sets up CLI commands in
/system/bin/ - โ Prepares web dashboard files
After installation and reboot, the module automatically starts. Here's how to get going:
adaptperf-status
Open browser and navigate to: http://127.0.0.1:9876
adaptperf-add com.tencent.ig # PUBG Mobile adaptperf-add com.dts.freefireth # Free Fire
Set gaming governor adaptperf-setgov schedutil
Set per-app governor adaptperf-setappgov com.android.chrome conservative
The web interface provides comprehensive monitoring and management capabilities.
Access Locally: http://127.0.0.1:9876
Access from PC: Forward port via ADB adb forward tcp:9876 tcp:9876
Open in browser http://localhost:9876
| Tab | Features |
|---|---|
| Main | โข Real-time mode indicator (IDLE/GAMING/CUSTOM) โข Current CPU governor โข Foreground application โข Device temperature monitoring โข Device & kernel information |
| Tuning | โข Governor configuration (idle/gaming) โข Game package manager โข Per-app governor settings โข Auto-detect installed games โข Instant apply changes |
| Log | โข Real-time log viewer โข Auto-refresh capability โข Clear display option โข Event tracking |
All commands are available globally after installation.
Add game to list adaptperf-add <package_name>
Remove game from list adaptperf-remove <package_name>
List all registered games adaptperf-list
Examples: adaptperf-add com.garena.game.df adaptperf-remove com.proxima.dfm
Set gaming governor (applied when game is running) adaptperf-setgov <governor_name>
View available governors cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Examples: adaptperf-setgov schedutil adaptperf-setgov performance
Set custom governors for specific applications (non-games):
Set custom governor for an app adaptperf-setappgov <package_name> <governor_name>
Remove custom governor adaptperf-delappgov <package_name>
List all per-app configurations adaptperf-listappgov
Examples: Use conservative governor for Chrome adaptperf-setappgov com.android.chrome conservative
Use ondemand for YouTube adaptperf-setappgov com.google.android.youtube ondemand
Remove Chrome's custom governor adaptperf-delappgov com.android.chrome
โ ๏ธ Important: A package cannot exist in both game list AND per-app governor config. Remove from one before adding to another.
View module status and recent log adaptperf-status
View full log cat /data/local/tmp/adaptive_perf.log
Monitor log in real-time tail -f /data/local/tmp/adaptive_perf.log
All configuration files are located in /data/adb/modules/adaptive_performance/:
| File | Purpose | Format |
|---|---|---|
game_packages.txt |
Registered game packages | One package per line |
app_governors.txt |
Per-app governor mappings | package=governor |
governor_pref.txt |
Gaming governor preference | Single governor name |
default_governor.txt |
Idle/stock governor | Single governor name |
stock_configs/ |
Kernel config backups | Directory with backup files |
You can manually edit configuration files:
Edit game list vi /data/adb/modules/adaptive_performance/game_packages.txt
Edit per-app governors vi /data/adb/modules/adaptive_performance/app_governors.txt
Format for app_governors.txt: com.android.chrome=conservative com.google.android.youtube=ondemand
After manual edits, changes apply immediately (no reboot needed).
The module exposes a REST API on port 9877 for automation and scripting.
| Endpoint | Method | Parameters | Description |
|---|---|---|---|
/?action=add |
GET | pkg |
Add game package |
/?action=remove |
GET | pkg |
Remove game package |
/?action=set_governor |
GET | governor |
Set gaming governor |
/?action=set_app_governor |
GET | pkg, governor |
Set per-app governor |
/?action=remove_app_governor |
GET | pkg |
Remove per-app governor |
/?action=detect_games |
GET | - | Auto-detect installed games |
Using netcat (nc): Add game echo "" | nc 127.0.0.1 9877 << EOF GET /?action=add&pkg=com.tencent.ig HTTP/1.1 Host: 127.0.0.1 Connection: close
EOF
Using curl (if available): curl "http://127.0.0.1:9877/?action=set_governor&governor=schedutil"
Package name encoding:
- Replace
.with%2Ein package names - Example:
com.android.chromeโcom%2Eandroid%2Echrome
The module runs a background service that:
- Detects foreground app every 1 second
- Checks if app matches:
- Game list โ Apply gaming governor
- Per-app config โ Apply custom governor
- Neither โ Apply idle governor
- Applies governor to all CPU cores
- Logs all state changes
For Idle Mode (Default):
- User-saved governor (if exists)
- Stock governor (detected at install)
- Auto-detect based on chipset:
- Mediatek:
sugov_extโschedutilโwaltโinteractiveโondemand - Snapdragon:
waltโschedutilโinteractiveโondemand
- Mediatek:
For Gaming Mode:
- User preference (from
governor_pref.txt) - Auto-detect optimal governor:
- Mediatek:
schedhorizonโschedutilโperformance - Snapdragon:
schedutilโperformance
- Mediatek:
Module automatically backs up:
- โ Original governor name
- โ CPU frequency limits (min/max)
- โ Governor tunables (all parameters)
Backups are stored in stock_configs/ and restored when switching to idle mode.
Check log: cat /data/local/tmp/adaptive_perf.log
Verify service: ps | grep service.sh
Manual start (debug): su sh /data/adb/modules/adaptive_performance/service.sh
Check available governors: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
Possible causes:
- Selected governor not supported by kernel
- Kernel doesn't allow governor changes
- Thermal throttling override
Solution: List what your kernel supports adaptperf-status
Try a different governor adaptperf-setgov schedutil
Check HTTP server: ps | grep httpd netstat -tuln | grep 9876
Restart services: Kill existing processes killall httpd nc
Reboot to restart module reboot
Port forwarding (for PC access): adb forward tcp:9876 tcp:9876 adb forward tcp:9877 tcp:9877
Check for conflicts: List games adaptperf-list
List per-app governors adaptperf-listappgov
Ensure package is not in both lists: Remove from game list if needed adaptperf-remove com.example.app
Then set per-app governor adaptperf-setappgov com.example.app conservative
Monitor real-time: tail -f /data/local/tmp/adaptive_perf.log
Some devices don't expose temperature via standard thermal zones. This is normal and doesn't affect governor switching functionality.
- Open Magisk Manager / KernelSU
- Go to Modules
- Find Adaptive Performance
- Click Remove
- Reboot
rm -rf /data/adb/modules/adaptive_performance reboot
The uninstall script automatically:
- โ
Stops all service processes (
httpd,nc) - โ Removes runtime files and logs
- โ Restores original CPU governor
- โ Cleans up all configuration files
- โ Removes module directory (Magisk handles this)
Note: User data in
/data/local/tmp/is preserved unless manually deleted.
The module includes these games by default:
com.garena.game.df # Delta Force com.proxima.dfm # Delta Force Mobile com.mobile.legends # Mobile Legends
- HTTP Dashboard:
9876 - REST API:
9877
- Module directory:
/data/adb/modules/adaptive_performance/ - Log file:
/data/local/tmp/adaptive_perf.log - CLI commands:
/system/bin/adaptperf-*
Clone repository git clone https://github.com/Steambot12/Adaptive-Performance.git cd Adaptive-Performance
Create flashable ZIP zip -r9 AdaptivePerformance-v1.1.zip * -x ".git" ".md" ".zip"
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
New Features:
- โจ Per-app governor support
- ๐ Enhanced web dashboard
- ๐ Conflict detection and validation
- ๐ Improved logging system
- ๐ง Expanded REST API endpoints
Improvements:
- โก Better governor detection logic
- ๐ Faster app switching response
- ๐พ More reliable config persistence
- ๐ Comprehensive CLI help messages
Bug Fixes:
- ๐ Fixed race condition in app detection
- ๐ Resolved thermal reading on some devices
- ๐ Corrected governor tunable restoration
- ๐ฎ Basic game detection
- โ๏ธ Automatic governor switching
- ๐ฅ๏ธ CLI tools
- ๐ Web dashboard (basic)
This project was inspired by:
- Various kernel tweaker modules
- Performance optimization discussions on Group POCO F5
- Mobile gaming communities' need for adaptive performance
Open an issue on GitHub with:
- Device model
- Android version
- Kernel name
- Log file (
/data/local/tmp/adaptive_perf.log) - Steps to reproduce
Open an issue with the enhancement label and describe:
- What you want
- Why it's useful
- How it should work
- GitHub Issues: Report bugs & request features
- Telegram: (Coming soon)
Made with โค๏ธ by Steambot12