Supercharge your Android device performance β one tap at a time.
Features β’ Screenshots β’ How It Works β’ Getting Started β’ Architecture β’ Tech Stack β’ Building β’ Contributing β’ License
OptiDroid is a modern Android app that optimizes the ART (Android Runtime) compilation of every installed app on your device. It leverages dex2oat β Android's ahead-of-time compiler β to re-compile apps with aggressive optimization profiles, resulting in faster app launches, smoother scrolling, and better overall performance.
Think of it as defragmenting your phone's app layer β apps run native-speed code instead of interpreted bytecode.
- Pre-scan all installed apps to determine which need optimization
- Intelligent skip logic β already-optimized and recently compiled apps are skipped
- Detailed per-app compilation status including compiler filter, timestamps, and OAT file presence
- Batch optimization of all apps that need it
- Real-time progress tracking with per-app status
- Live activity feed showing optimization logs as they happen
- Background execution via WorkManager with foreground notification
| Mode | Description | Best For |
|---|---|---|
speed-profile |
Profile-guided compilation β optimizes hot code paths | Daily use, balanced |
speed (Full) |
Aggressively compiles everything ahead-of-time | Maximum performance |
- No root required β uses Shizuku for privileged shell access
- Guided setup wizard walks you through enabling Shizuku step by step
- Automatic permission handling with clear status indicators
- Material Design 3 Expressive with dynamic color theming
- Smooth 60fps animations on all state transitions
- Dark mode support out of the box
- Localization ready (English & Italian)
Coming soon β PRs welcome!
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. Setup β Enable Shizuku for privileged access β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β 2. Analyze β Scan all apps β find what needs work β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β 3. Optimize β Run `cmd package compile` on each app β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β 4. Enjoy β Faster launches & smoother performance β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Under the hood, OptiDroid:
- Connects to a privileged shell via Shizuku (or wireless ADB)
- Analyzes every installed package's compilation status using
dumpsys packageand OAT file metadata - Filters out apps that are already optimized, system apps, or recently compiled
- Executes
cmd package compile -m <mode> -f <package>for each app that needs optimization - Streams real-time progress and logs back to the UI via
StateFlow
| Requirement | Details |
|---|---|
| Android Device | Android 8.0+ (API 26) |
| Shizuku | Install from Google Play or GitHub |
| ADB (for Shizuku) | One-time setup via adb shell sh /sdcard/Android/data/moe.shizuku.privileged.api/start.sh |
- Install Shizuku and start the Shizuku service
- Install OptiDroid (build from source or grab a release)
- Grant permission β OptiDroid will guide you through the Shizuku setup
- Tap Analyze to scan your apps
- Tap Optimize and watch the magic happen β¨
OptiDroid follows Clean Architecture with MVVM + Unidirectional Data Flow (UDF).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β
β ββββββββββββββββ βββββββββββββ βββββββββββββββββββββ β
β β Composables ββββ ViewModelsββββ UiModels/UiState β β
β β (Screens) ββββ (State + β β (Immutable) β β
β β β β Events) β β β β
β ββββββββββββββββ βββββββ¬ββββββ βββββββββββββββββββββ β
β β β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β Domain Layer (Pure Kotlin) β
β ββββββββββββββββ βββββββ΄ββββββ βββββββββββββββββββββ β
β β Use Cases β βRepository β β Domain Models β β
β β (invoke()) β βInterfaces β β (Entities) β β
β ββββββββββββββββ βββββββ¬ββββββ βββββββββββββββββββββ β
β β β
ββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ€
β Data Layer β
β ββββββββββββββββ βββββββ΄ββββββ βββββββββββββββββββββ β
β β Repository β β Data β β Shizuku / ADB β β
β β Impls β β Sources β β Shell Clients β β
β ββββββββββββββββ βββββββββββββ βββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
com.tony.appbooster/
βββ π data/ # Repository implementations, shell clients
β βββ client/ # ADB & Shizuku shell client implementations
β βββ repository/ # Concrete repository classes
β βββ scheduler/ # WorkManager schedulers
βββ π domain/ # Pure Kotlin β zero Android dependencies
β βββ client/ # Shell client interfaces
β βββ model/ # Domain entities (Progress, Analysis, Config)
β βββ repository/ # Repository contracts
β βββ scheduler/ # Work scheduler interfaces
β βββ usecase/ # Business logic (Analyze, Optimize, Connect)
βββ π presentation/ # UI layer (Compose + ViewModels)
β βββ navigation/ # Navigation graph & Screen definitions
β βββ screen/ # Composable screens (Dashboard, Settings, Shizuku)
β βββ ui/ # Theme, components, design system
β βββ viewmodel/ # ViewModels + UiModels
β βββ worker/ # WorkManager workers for background optimization
βββ π di/ # Hilt dependency injection modules
| Category | Technology |
|---|---|
| Language | Kotlin 2.3 |
| UI Framework | Jetpack Compose + Material 3 Expressive |
| Architecture | MVVM + Clean Architecture + UDF |
| DI | Hilt (constructor injection) |
| Async | Coroutines + StateFlow / SharedFlow |
| Navigation | Navigation Compose |
| Background Work | WorkManager with foreground service |
| Storage | DataStore Preferences |
| Shell Access | Shizuku API / Dadb (wireless ADB) |
| Testing | JUnit 4, MockK, Turbine |
| Build System | Gradle with Version Catalog |
- Android Studio Ladybug (2024.3+) or newer
- JDK 17+
- Android SDK 36
# Clone the repository
git clone https://github.com/yourusername/OptiDroid.git
cd OptiDroid
# Build debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
# Run unit tests
./gradlew runUnitTests
# Run all tests (requires connected device)
./gradlew runAllTests| Variant | Description |
|---|---|
debug |
Development build with debugging enabled |
release |
Optimized build (ProGuard rules included) |
The repository includes a GitHub Actions workflow at .github/workflows/android-ci.yml with three jobs:
| Job | Trigger | What it does |
|---|---|---|
| Unit tests | Every push & PR | Runs ./gradlew runUnitTests (the existing Gradle task) |
| Signed release build | Push to master only, after tests pass |
Builds signed APK + AAB |
| Publish GitHub Release | After signed build succeeds | Creates a GitHub Release with the merged PR body as changelog and attaches the APK & AAB |
The release tag is derived automatically from versionName and versionCode in app/build.gradle.kts (e.g. v1.0-1).
Changelog: When you merge a PR into
master, the CI extracts the PR description and uses it as the release notes. If no matching PR is found (e.g. a direct push), it falls back to the last 10 commit messages.
Configure these repository secrets:
| Secret | Purpose |
|---|---|
GH_RELEASE_KEYSTORE_BASE64 |
Base64-encoded contents of the release keystore file |
GH_RELEASE_KEY_ALIAS |
Alias of the release key inside the keystore |
GH_RELEASE_KEY_PASSWORD |
Password for the selected key alias |
GH_RELEASE_STORE_PASSWORD |
Password for the keystore itself |
All four secrets are required for the release & publish jobs. Unit tests still run on every push and PR regardless of secrets.
OptiDroid uses a modern testing stack with clear naming conventions:
@Test
fun `given apps need optimization when optimize invoked then returns success`()# Unit tests only (no device needed)
./gradlew runUnitTests
# Instrumented tests (requires device/emulator)
./gradlew runInstrumentedTests
# Full suite
./gradlew runAllTestsReports are generated at:
- Unit tests β
app/build/reports/tests/testDebugUnitTest/index.html - Instrumented β
app/build/reports/androidTests/connected/debug/index.html
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project ships a
.github/copilot-instructions.mdfile tracked in Git.If you use GitHub Copilot, Cursor, JetBrains AI, or any AI-powered coding assistant, point it to this file. It contains the full architecture rules, documentation standards, Compose patterns, and forbidden practices that keep the codebase clean and consistent.
How to use it:
| Tool | Setup |
|---|---|
| GitHub Copilot | Automatically picked up from .github/copilot-instructions.md |
| JetBrains AI | Add as a custom prompt / instruction file in Settings β AI Assistant |
| Cursor | Add to .cursorrules or reference in project settings |
| Other AI tools | Copy the contents into your assistant's system prompt |
Following these instructions ensures every contribution matches the project's Clean Architecture, MVVM + UDF patterns, KDoc standards, and Material 3 Expressive UI conventions β whether the code is written by a human or generated by AI.
- Follow the AI coding guidelines for architecture, style, and documentation standards
- Write KDoc for all public APIs
- Include unit tests for new use cases and ViewModels
- Use Material 3 Expressive components with proper animations
- Keep the domain layer free of Android dependencies
Copyright 2025 Tony
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Shizuku β Privileged API access without root
- Dadb β Pure Kotlin ADB client
- Jetpack Compose β Modern declarative UI
- Material Design 3 β Design system & components
Made with β€οΈ and Kotlin
