Skip to content

Repository files navigation

πŸ‘» GhostRec β€” Android Stealth Capture & Personal Safety Engine

Download APK

Android Kotlin Gradle Privacy License: Non-Commercial

πŸ”’ GhostRec is an ultra-discreet, 1-tap background audio & video recording engine for Android.
Records continuously and silently with the SCREEN COMPLETELY TURNED OFF and LOCKED.
Designed as an emergency personal safety tool with low-power DSP sampling, headless toggle, silent camouflaged service lifecycle, and isolated local storage.



βš–οΈ Legal Disclaimer & Ethical Notice / Avertissement LΓ©gal

Warning

πŸ›‘οΈ Usage strictly dedicated to Self-Protection & Personal Safety

GhostRec is engineered exclusively for legitimate personal safety, emergency situations, self-defense, proof gathering in cases of harassment/threats, and authorized educational/research purposes.

❌ MISUSE STRICTLY FORBIDDEN: This software MUST NEVER be used for malicious surveillance, spying, voyeurism, unlawful harassment, invasion of privacy, or any harmful acts.

⚠️ TOTAL DISCLAIMER OF LIABILITY:
The developer formally declines and disclaims all responsibility and legal liability for any diverted, abusive, unauthorized, or illegal use of this software by third parties. Every user is solely responsible for ensuring that their use complies with all applicable local, national, and international laws regarding audio/video recording and privacy consent.


⚑ Highlights & Key Features

  • πŸ“± True Screen-Off / Locked Capture: Seamlessly records Audio and Video with the screen completely off and locked. No camera preview, no screen illumination, zero visual indicators.
  • πŸ‘† 1-Tap Instant Headless Toggle: An invisible launcher activity that starts or stops recording in less than 50 milliseconds with discreet tactile haptic vibration (1 pulse = start, 2 pulses = stop).
  • πŸŽ™οΈ Low-Power DSP Audio Engine: Uses optimized AAC encoding at 22.05 kHz / 64 kbps mono, reducing CPU load by up to 85% and preventing thermal throttling.
  • 🎬 Stealth CameraX Video Pipeline: Background video recording using Android CameraX with zero on-screen preview windows, maintaining smooth framerates even while the device is in pocket or locked.
  • πŸ”‹ Zero Battery Drain When Idle: Unlike background listeners, GhostRec spawns no persistent background services or notifications when not actively recording.
  • πŸ”’ 100% Private & Offline: Zero network permissions declared (android.permission.INTERNET is omitted). Captured media is stored strictly in sandboxed app-specific internal storage.
  • πŸ“ Built-in Capture Manager: Dark AMOLED management interface to review, play back, and delete saved captures.
  • πŸ“± MIUI & Android 11+ Ready: Native wake-lock management and battery exemption support for aggressive OEM background killers (Xiaomi, Huawei, Oppo, Vivo, Samsung).

πŸ—οΈ Architecture Overview

graph TD
    A[Launch Icon: 'Capture Rapide'] -->|1-Tap Toggle| B(QuickCaptureActivity)
    B -->|Intent Action| C{QuickCaptureService Running?}
    
    C -->|No| D[Vibrate: 1 Pulse]
    D --> E[Start Foreground Service]
    E --> F[Acquire Low-Power Partial WakeLock]
    E --> G[Initialize Audio/Video Capture Engine]
    
    C -->|Yes| H[Vibrate: 2 Pulses]
    H --> I[Flush & Finalize Media File]
    I --> J[Release WakeLock & Stop Foreground Service]
    
    K[Launch Icon: 'RΓ©glages & Captures'] --> L[MainActivity]
    L --> M[Audio/Video Mode Selection]
    L --> N[Battery & AutoStart Exemption]
    L --> O[Private File Explorer / Player]
Loading

πŸ“¦ Project Structure

GhostRec/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ src/main/
β”‚   β”‚   β”œβ”€β”€ java/com/example/quickcapture/
β”‚   β”‚   β”‚   β”œβ”€β”€ capture/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AudioRecorderManager.kt   # Low-power AAC/DSP audio pipeline
β”‚   β”‚   β”‚   β”‚   └── VideoRecorderManager.kt   # Background CameraX video engine
β”‚   β”‚   β”‚   β”œβ”€β”€ service/
β”‚   β”‚   β”‚   β”‚   └── QuickCaptureService.kt    # Foreground service lifecycle
β”‚   β”‚   β”‚   β”œβ”€β”€ ui/                           # ViewBinding & Dark AMOLED UI
β”‚   β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HapticHelper.kt           # Discrete tactile vibration patterns
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ PreferencesHelper.kt      # SharedPreferences manager
β”‚   β”‚   β”‚   β”‚   └── StorageHelper.kt          # Isolated app file manager
β”‚   β”‚   β”‚   β”œβ”€β”€ MainActivity.kt               # Settings & Media Management
β”‚   β”‚   β”‚   └── QuickCaptureActivity.kt       # 1-Tap headless toggle launcher
β”‚   β”‚   β”œβ”€β”€ res/                              # Layouts, themes & drawables
β”‚   β”‚   └── AndroidManifest.xml               # Clean offline manifest (Zero Internet)
β”œβ”€β”€ DOCS/
β”‚   └── android_call_recording_deepdive.md    # Reverse-engineering study on MediaTek/MIUI Audio HAL
β”œβ”€β”€ release/
β”‚   └── GhostRec-debug.apk                    # Ready-to-install standalone APK
β”œβ”€β”€ build.gradle.kts                          # Root build script
β”œβ”€β”€ gradle.properties                         # JBR JDK 17 & JVM configuration
β”œβ”€β”€ LICENSE                                   # Non-Commercial License
└── README.md

πŸš€ Quickstart & Installation

Option 1: Direct Install via ADB (Recommended)

Connect your Android phone with USB Debugging enabled:

# Clone the repository
git clone https://github.com/your-username/GhostRec.git
cd GhostRec

# Install pre-built APK directly
adb install -r release/GhostRec-debug.apk

Option 2: Build from Source with Gradle

Prerequisites: JDK 17 & Android SDK Platform 34.

# Build the Debug APK
./gradlew assembleDebug

# Install to connected device
./gradlew installDebug

πŸ›‘οΈ Privacy & Security Design

Aspect Guarantee
Network Access Zero. No android.permission.INTERNET requested. The app physically cannot send data over the network.
Media Storage Files are stored in sandboxed app-specific directories (Android/data/com.example.quickcapture/files/private_captures).
Lifecycle Safety WakeLocks are automatically released upon capture completion to prevent battery drainage.
Telemetry / Ads None. Pure native Kotlin with zero third-party tracking SDKs.

πŸ”¬ Technical Deep-Dive: Android Audio & Call Recording Restrictions

As part of this project's research, an in-depth reverse-engineering study was conducted on Android telephony audio capture paths, MediaTek MT6785 HAL (audio.primary.mt6785.so), AudioFlinger, and SELinux policies on Android 10/11.

Read the full engineering whitepaper:
πŸ‘‰ DOCS/android_call_recording_deepdive.md


πŸ“„ License & Commercial Restrictions

This project is licensed under a Custom Non-Commercial / Source-Available License β€” see the LICENSE file for full details.

  • βœ… Free for personal, academic, educational, and research use.
  • ❌ Commercial use, monetization, or redistribution in commercial products is strictly prohibited without prior written authorization.
  • βœ‰οΈ For commercial inquiries or custom licensing: hamlat.louai@gmail.com

About

πŸ‘» Ultra-discreet 1-tap background audio & video recording engine for Android. Records silently with the SCREEN COMPLETELY TURNED OFF & LOCKED. 100% Offline & Low-Power DSP

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages