Created by virus_boss π₯
Next-Gen Real-Time Android Screen Share & Stealth Multiple-Choice AI Solver powered by Google Gemini.
OmniSolve OCR MCQ Solver is an advanced, stealth-optimized Android AI exam assistant designed to solve multiple-choice questions (MCQs) directly on-screen in real-time. It operates as a non-intrusive Android System Overlay (TYPE_APPLICATION_OVERLAY) over any application (such as Google Chrome, quiz platforms, or test-taking environments) without causing focus loss, app-switching lifecycle events (onPause/onStop), or blocking user interaction with on-screen answer choices.
- πͺΌ Liquid Glass UI & Dynamic Island: Translucent Apple iOS 26 frosted glass aesthetics with specular borders and pill HUD.
- π Dark Liquid Glass π / White Crystal Glass βοΈ Switch: Instant live switching between dark obsidian glass and frosted white crystal glass.
- π§ͺ Interactive Liquid Jelly Physics: Dynamic drag velocity stretching, movement tilt rotation, and decaying damped elastic wobble rebound (
OvershootInterpolator(3.5f)). - β‘ 0ms Native Accessibility Node Scraping: Inspects the app's native UI tree (
rootInActiveWindow) for 0ms text extraction and direct node clicking with zero screenshots. - π€ AEI Autonomous AFK Hands-Free Bot: Solves, clicks the correct choice, and auto-advances through "Save & Next" / "Next" without touching the device.
- π‘οΈ Anti-Cheat Humanizer Protection: Gaussian coordinate jitter and randomized human cognitive reading delays.
- π³ Silent Haptic Vibration Feedback: Discreet pulses (1 pulse = A, 2 = B, 3 = C, 4 = D) for situations where HUD visibility is risky.
- π Battery Disguise Camouflage: Renders answers disguised as system battery percentages (91%=A, 92%=B, 93%=C, 94%=D).
- π Unlimited Background Gemini Web Engine: Directly interfaces with Google Gemini via in-app Google login, bypassing rate-limiting API keys.
flowchart TD
subgraph UI_Setup [1. In-App Setup & Authentication]
A[Launch OCR MCQ Solver] --> B[Direct In-App Google Login]
B --> C[CookieManager Session Persistence]
C --> D[Select Mode: Stealth HUD vs Floating Window]
D --> E[Start Foreground Service]
end
subgraph Overlay_Pipeline [2. Screen Capture & Local OCR]
E --> F[MediaProjection Screen Frame Grab]
F --> G[On-Device ML Kit Text Recognition]
G --> H[Prompt Formulation: Strict Answer Letter Extraction]
end
subgraph Headless_Solver [3. Headless Web Execution Engine]
H --> I[Inject Prompt into Background Gemini Web Session]
I --> J[Simulate Pointer/Click & execCommand Rich-Text Events]
J --> K[DOM MutationObserver Watches Streaming Response]
K --> L[Extract Target Choice Letter A / B / C / D]
end
subgraph HUD_Display [4. Stealth User Presentation]
L --> M{Active Display Mode}
M -->|Stealth HUD Mode| N[Update Floating Bubble to 'B' in Emerald Green]
M -->|Visible Window Mode| O[Display Full Solution Card on Screen]
N --> P[Double-Tap Gesture: Toggle 95% Ghost / Dead-Pixel Mode]
end
The project is structured under the com.omnisolve.overlay namespace:
app/src/main/java/com/omnisolve/overlay/
βββ MainActivity.kt # Main dashboard, permission coordinator & Google login state
βββ LoginActivity.kt # Dedicated WebView for Google/Gemini web authentication
βββ service/
β βββ OverlayService.kt # Core WindowManager overlay service & headless AI engine
βββ capture/
β βββ ScreenCaptureManager.kt # MediaProjection & VirtualDisplay framebuffer pipeline
β βββ OcrEngine.kt # Google ML Kit on-device text recognition wrapper
βββ api/
β βββ GeminiVisionClient.kt # Direct REST API fallback client (OkHttp + Gson)
βββ model/
βββ AnswerModel.kt # Data model representing the resolved MCQ choice
- WindowManager Orchestration: Manages both the compact floating bubble (
layout_floating_bubble.xml) and the resizable assistant window (layout_floating_gemini_window.xml) usingWindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY. - Headless Background WebView: Maintains an active
gemini.google.comsession in memory. In Stealth Mode, this session executes headlessly without drawing a window on the screen. - JavaScript DOM Observer: Injects JavaScript mutation watchers into the Gemini DOM to detect when Gemini finishes generating and transmits the parsed option letter back to Kotlin through
@JavascriptInterface onAnswerResolved(letter). - Gesture State Machine:
- Single-Tap: Expands the quick HUD or triggers an immediate screen scan.
- Double-Tap: Toggles Ghost Mode (95% Transparency
alpha = 0.05f), turning the floating icon into a virtually invisible dead-pixel dot.
- MediaProjection Pipeline: Utilizes Android's
MediaProjectionAPI withImageReaderandVirtualDisplayto acquire exact pixel data from the device framebuffer asynchronously on an I/O coroutine dispatcher. - Local ML Kit OCR (
com.google.mlkit:text-recognition): Extracts text completely on-device in under ~100ms. No raw images are sent over the network, minimizing bandwidth and latency.
- Google Authentication: Replaces legacy API keys with direct Google web authentication. Cookies are preserved globally across the application via
CookieManager.getInstance().setAcceptCookie(true)andflush(). - Display Mode Selector: Allows toggling between:
- Stealth Option-Only Mode (Default): Gemini is 100% invisible; the overlay shows only
A/B/C/D. - Visible Window Mode: Displays the draggable, resizable mini Gemini browser overlay.
- Stealth Option-Only Mode (Default): Gemini is 100% invisible; the overlay shows only
| Metric | Legacy Gemini REST API | In-App Web Gemini Engine |
|---|---|---|
| Authentication | Google AI Studio API Key | Standard Google Web Login |
| Rate Limits | Strict Free-Tier Quotas (429 LIM) |
High-capacity standard Web Gemini session |
| Speed | Network payload includes headers/tokens | Pre-connected streaming web socket |
| Cost | Subject to credit limits & billing setup | Completely Free with personal Google account |
To prevent the overlay window from intercepting touches meant for underlying quiz options, the service dynamically toggles window flags:
- Passive State: Window uses
FLAG_NOT_TOUCH_MODAL | FLAG_NOT_FOCUSABLE. Touches outside the bubble pass directly to the underlying exam app. - Active Interaction: When the user taps directly into the WebView or typing container,
FLAG_NOT_FOCUSABLEis cleared so the Android soft keyboard can open seamlessly.
On modern web frameworks (such as Angular and Lit used by gemini.google.com), plain .value = ... assignments do not notify the internal state machine. OCR MCQ Solver uses synthetic pointer event chains:
// Dispatches pointerdown, mousedown, pointerup, mouseup, and click
['pointerdown', 'mousedown', 'pointerup', 'mouseup', 'click'].forEach(type => {
target.dispatchEvent(new MouseEvent(type, { bubbles: true, cancelable: true, view: window }));
});
target.focus();
document.execCommand('insertText', false, promptText);- Android 8.0 (API Level 26) or higher.
- Active Google Account.
- Install the Application: Download and install
OCR-MCQ-Solver.apk. - Log into Google Gemini:
- Open OCR MCQ Solver.
- Tap "π Log into Google / Gemini".
- Complete standard Google sign-in and tap "Done β ".
- Grant Android Permissions:
- Draw over other apps (
SYSTEM_ALERT_WINDOW) - Screen recording / MediaProjection (prompts when starting service).
- Draw over other apps (
- Select Display Mode:
- Choose "π₯· Stealth Option-Only Mode" (Recommended for exams).
- Start Service:
- Tap "Start Real-Time Overlay Service".
- Switch to your quiz, exam, or Chrome tab.
- Solving MCQs:
- Single-Tap the floating virus icon -> The app captures the screen, processes OCR, and changes the bubble to green displaying
A/B/C/D. - Double-Tap the virus icon -> Instantly toggles 95% Ghost Mode (invisible dead-pixel dot).
- Single-Tap the floating virus icon -> The app captures the screen, processes OCR, and changes the bubble to green displaying
Ensure you have Android SDK (API 34) and JDK 17 configured.
# Clone the repository
git clone https://github.com/nomaan5541/ocr-mcq-solver.git
cd ocr-mcq-solver
# Build Debug APK using Gradle Wrapper
./gradlew assembleDebug
# Install to connected device via ADB
adb install app/build/outputs/apk/debug/app-debug.apk- AndroidX Core & AppCompat: Foundation components and Material Design 3.
- Google ML Kit (
com.google.mlkit:text-recognition:16.0.0): High-performance on-device OCR. - Kotlin Coroutines (
kotlinx-coroutines-android:1.7.3): Non-blocking asynchronous frame analysis. - OkHttp3 (
com.squareup.okhttp3:okhttp:4.12.0) & Gson: Network connection pooling and JSON serialization.
Pre-built, ready-to-install APK packages are available directly from the repository root and GitHub Releases:
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 nomaan5541 (virus_boss)
If you find OCR MCQ Solver helpful, please give this repository a Star β!
π https://github.com/nomaan5541/ocr-mcq-solver
#android #ocr #gemini #mcq-solver #mlkit #ai-assistant #stealth-overlay #kotlin #screen-ocr #google-gemini #virus-boss #quiz-solver #education #android-overlay #cheatsheet-solver
