"A Cyberdeck isn't just a computer; it's an extension of the operator."
S.A.B.L.E. is a custom-built Python/Flask Micro-OS designed to turn an Android device (via Termux) into a fully functional, air-gapped or remote-controlled Cyberdeck. It serves as a centralized "Brain" that manages media, AI interactions, and hardware control through a retro-futurist web interface.
The system is built on a Microservice Architecture hosted entirely on the phone, accessible via localhost or a secure Cloudflare Tunnel.
The main Flask server acts as the Central Nervous System.
- Reverse Proxy: It seamlessly proxies requests to other services (like the Tube downloader) so they appear as a single unified interface.
- Adaptive UI: The interface runs on
100dvh(Dynamic Viewport Height) with a responsive mobile-first grid layout, styled with a "High-Tech/Low-Life" Cyberpunk aesthetic. - Hardware Bridge: Uses
subprocessto execute raw Linux/Termux commands, allowing the web UI to control physical hardware (Flashlight, Vibration logic, TTS).
A dedicated microservice for content acquisition and playback.
- Engine: Wraps
yt-dlpfor high-speed video downloading. - Custom Player: Features a hand-coded HTML5 video player with custom SVG controls, touch-friendly seek bars, and auto-scaling Flexbox layout.
- Vault Access: Serves files directly from the Android filesystem, bypassing standard gallery limitations.
- Integrates with a local LLM (running via
llama.cppon the phone). - Voice Interception Layer: "Hears" user input before sending it to the LLM. It can trap specific keywords (e.g., "Light On", "Ping Device") to execute system commands instantly instead of generating text.
- State-Awareness: Visual feedback loops (Red=Listening, Blue=Speaking) creates a feeling of a "living" system.
An advanced bash script that orchestrates the boot sequence:
- Process Management: Kills stale sessions (
pkill) to prevent port conflicts. - Wake Lock: Prevents the Android CPU from sleeping.
- Tunneling: Establishes a Cloudflare Tunnel (
cloudflared) and logs the dynamic URL, allowing the User to control the physical device from anywhere in the world.
- Backend: Python 3.x, Flask, Subprocess
- Frontend: Vanilla JS, CSS3 (Glassmorphism, Neon Glows), HTML5
- Android Layer: Termux, Termux-API (Torch, TTS, Vibrate, Battery Status)
- AI/Media: Llama.cpp (GGUF Models), yt-dlp, FFmpeg
S.A.B.L.E. doesn't just run on the phone; it controls it:
- Torch Relay: Toggles the physical camera flash via web button or voice command.
- Haptic Ping: Triggers maximum volume and vibration patterns to locate the device physically.
- Battery/RAM HUD: Real-time polling of system resources displayed in the UI header.
Built by [Jalpan04]. Designed for functionality. Styled for the future.
This project is licensed under the MIT License - see the LICENSE file for details.