Skip to content

androidexpert35/AppBooster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OptiDroid App Icon

OptiDroid

Supercharge your Android device performance β€” one tap at a time.

Features β€’ Screenshots β€’ How It Works β€’ Getting Started β€’ Architecture β€’ Tech Stack β€’ Building β€’ Contributing β€’ License

Kotlin Compose Min SDK Target SDK Architecture License

Get it on Google Play


✨ What is OptiDroid?

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.


πŸš€ Features

πŸ” Smart Analysis

  • 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

⚑ One-Tap Optimization

  • 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

πŸŽ›οΈ Configurable Optimization Modes

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

πŸ” Privileged Access via Shizuku

  • 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

🎨 Beautiful Material 3 UI

  • 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)

πŸ“± Screenshots

Coming soon β€” PRs welcome!


🧠 How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  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:

  1. Connects to a privileged shell via Shizuku (or wireless ADB)
  2. Analyzes every installed package's compilation status using dumpsys package and OAT file metadata
  3. Filters out apps that are already optimized, system apps, or recently compiled
  4. Executes cmd package compile -m <mode> -f <package> for each app that needs optimization
  5. Streams real-time progress and logs back to the UI via StateFlow

🏁 Getting Started

Prerequisites

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

Quick Start

  1. Install Shizuku and start the Shizuku service
  2. Install OptiDroid (build from source or grab a release)
  3. Grant permission β€” OptiDroid will guide you through the Shizuku setup
  4. Tap Analyze to scan your apps
  5. Tap Optimize and watch the magic happen ✨

πŸ—οΈ Architecture

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    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

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

πŸ› οΈ Tech Stack

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

πŸ”¨ Building

Prerequisites

  • Android Studio Ladybug (2024.3+) or newer
  • JDK 17+
  • Android SDK 36

Build & Run

# 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

Build Variants

Variant Description
debug Development build with debugging enabled
release Optimized build (ProGuard rules included)

GitHub Actions CI

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.


πŸ§ͺ Testing

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 runAllTests

Reports are generated at:

  • Unit tests β†’ app/build/reports/tests/testDebugUnitTest/index.html
  • Instrumented β†’ app/build/reports/androidTests/connected/debug/index.html

🀝 Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ€– AI Coding Guidelines β€” Use Our Copilot Instructions

This project ships a .github/copilot-instructions.md file 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.

Guidelines

  • 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

πŸ“„ License

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.

πŸ™ Acknowledgments


Made with ❀️ and Kotlin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages