|
1 | 1 | # AppControlX |
2 | 2 |
|
3 | | -Android app untuk **freeze, uninstall, disable, dan kontrol battery optimization** secara programmatic — menggunakan Root atau Shizuku. |
| 3 | +A powerful Android application for controlling app behavior, battery optimization, and system management — using Root or Shizuku. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +AppControlX provides granular control over installed applications without requiring manual user interaction. It executes shell commands directly via Root or Shizuku to freeze, unfreeze, uninstall apps, and manage battery optimization settings. |
4 | 8 |
|
5 | 9 | ## Features |
6 | 10 |
|
7 | | -- Freeze/Unfreeze apps tanpa uninstall |
8 | | -- Uninstall apps untuk current user |
9 | | -- Kontrol battery optimization (restrict/allow background) |
10 | | -- MIUI 12-14 & HyperOS 1-2 support |
11 | | -- Batch operations |
12 | | -- Rollback system |
13 | | -- Fallback ke manual mode jika command gagal |
| 11 | +### App Control |
| 12 | +- **Freeze/Unfreeze** - Disable apps without uninstalling (keeps data intact) |
| 13 | +- **Uninstall** - Remove apps for current user while preserving data |
| 14 | +- **Force Stop** - Immediately terminate running applications |
| 15 | +- **Batch Operations** - Apply actions to multiple apps simultaneously |
| 16 | + |
| 17 | +### Battery Optimization |
| 18 | +- **Restrict Background** - Block apps from running in background |
| 19 | +- **Allow Background** - Permit background execution |
| 20 | +- **Wake Lock Control** - Prevent apps from keeping CPU awake |
| 21 | +- **Doze Whitelist** - Exclude apps from battery optimization |
| 22 | + |
| 23 | +### Platform Support |
| 24 | +| Platform | Version | Support | |
| 25 | +|----------|---------|---------| |
| 26 | +| Android Stock | 10 - 15 | Full | |
| 27 | +| MIUI | 12 - 14 | Full | |
| 28 | +| HyperOS | 1.0 - 2.0 | Full | |
| 29 | +| Custom ROM | Android 10+ | Full | |
| 30 | + |
| 31 | +### Safety Features |
| 32 | +- **Rollback System** - Automatically saves state before actions, allows restoration |
| 33 | +- **Safety Validation** - Blocks actions on critical system apps |
| 34 | +- **Fallback Mode** - Opens system settings if commands fail |
14 | 35 |
|
15 | 36 | ## Requirements |
16 | 37 |
|
17 | 38 | - Android 10+ (API 29) |
18 | | -- Root access (Magisk) atau Shizuku |
| 39 | +- One of the following: |
| 40 | + - **Root access** (Magisk recommended) |
| 41 | + - **Shizuku** installed and activated |
| 42 | + |
| 43 | +## Installation |
19 | 44 |
|
20 | | -## Build |
| 45 | +### From Release |
| 46 | +1. Download the latest APK from [Releases](https://github.com/risunCode/AppControl-X/releases) |
| 47 | +2. Install on your device |
| 48 | +3. Complete the setup wizard |
21 | 49 |
|
| 50 | +### Build from Source |
22 | 51 | ```bash |
| 52 | +git clone https://github.com/risunCode/AppControl-X.git |
| 53 | +cd AppControl-X |
23 | 54 | ./gradlew assembleDebug |
24 | 55 | ``` |
25 | | - |
26 | 56 | Output: `app/build/outputs/apk/debug/app-debug.apk` |
27 | 57 |
|
| 58 | +## Architecture |
| 59 | + |
| 60 | +``` |
| 61 | +com.appcontrolx/ |
| 62 | +├── executor/ # Command execution (Root/Shizuku) |
| 63 | +├── model/ # Data classes |
| 64 | +├── rollback/ # State management & rollback |
| 65 | +├── service/ # Business logic |
| 66 | +├── ui/ # Activities, Fragments, Adapters |
| 67 | +└── utils/ # Helpers & validators |
| 68 | +``` |
| 69 | + |
| 70 | +### Key Components |
| 71 | + |
| 72 | +| Component | Description | |
| 73 | +|-----------|-------------| |
| 74 | +| `PermissionBridge` | Detects available execution mode (Root/Shizuku/None) | |
| 75 | +| `RootExecutor` | Executes commands via libsu | |
| 76 | +| `ShizukuExecutor` | Executes commands via Shizuku UserService | |
| 77 | +| `BatteryPolicyManager` | Manages appops and battery settings | |
| 78 | +| `XiaomiBridge` | Handles MIUI/HyperOS specific features | |
| 79 | +| `RollbackManager` | Saves snapshots and restores previous state | |
| 80 | +| `SafetyValidator` | Prevents actions on critical system apps | |
| 81 | + |
28 | 82 | ## Tech Stack |
29 | 83 |
|
30 | | -- Kotlin |
31 | | -- Material 3 |
32 | | -- libsu (Root) |
33 | | -- Shizuku API |
34 | | -- Navigation Component |
35 | | -- ViewBinding |
| 84 | +- **Language**: Kotlin |
| 85 | +- **UI**: Material 3, ViewBinding |
| 86 | +- **Navigation**: Jetpack Navigation Component |
| 87 | +- **Root**: [libsu](https://github.com/topjohnwu/libsu) by topjohnwu |
| 88 | +- **Shizuku**: [Shizuku-API](https://github.com/RikkaApps/Shizuku-API) by RikkaApps |
| 89 | +- **Build**: Gradle 8.2, AGP 8.2.0 |
| 90 | +- **CI/CD**: GitHub Actions |
| 91 | + |
| 92 | +## Commands Reference |
| 93 | + |
| 94 | +### App Control |
| 95 | +```bash |
| 96 | +pm disable-user --user 0 <package> # Freeze |
| 97 | +pm enable <package> # Unfreeze |
| 98 | +pm uninstall -k --user 0 <package> # Uninstall (keep data) |
| 99 | +am force-stop <package> # Force stop |
| 100 | +``` |
| 101 | + |
| 102 | +### Battery Control |
| 103 | +```bash |
| 104 | +appops set <package> RUN_IN_BACKGROUND ignore # Restrict |
| 105 | +appops set <package> RUN_IN_BACKGROUND allow # Allow |
| 106 | +appops set <package> WAKE_LOCK ignore # Disable wake lock |
| 107 | +cmd deviceidle whitelist +<package> # Doze whitelist |
| 108 | +``` |
| 109 | + |
| 110 | +## Contributing |
| 111 | + |
| 112 | +1. Fork the repository |
| 113 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 114 | +3. Commit your changes (`git commit -m 'Add amazing feature'`) |
| 115 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 116 | +5. Open a Pull Request |
36 | 117 |
|
37 | 118 | ## License |
38 | 119 |
|
39 | | -GPL-3.0 |
| 120 | +This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details. |
| 121 | + |
| 122 | +## Acknowledgments |
| 123 | + |
| 124 | +- [libsu](https://github.com/topjohnwu/libsu) - Root shell library |
| 125 | +- [Shizuku](https://github.com/RikkaApps/Shizuku) - Elevated API access |
| 126 | +- [Don't Kill My App](https://dontkillmyapp.com/) - Vendor battery restriction database |
0 commit comments