π 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.
Warning
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.
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.
- π± 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.INTERNETis 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).
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]
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
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.apkPrerequisites: JDK 17 & Android SDK Platform 34.
# Build the Debug APK
./gradlew assembleDebug
# Install to connected device
./gradlew installDebug| 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. |
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
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