[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1191":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":15,"starSnapshotCount":15,"syncStatus":43,"lastSyncTime":44,"discoverSource":45},1191,"Box","jegly\u002FBox","jegly","Private on-device AI suite for Android. Fork of Google AI Edge Gallery with llama.cpp, whisper.cpp, stable-diffusion.cpp, GGUF import, voice chat, vision AI, on-device image generation, biometric lock, encrypted history, and CPU\u002FNPU\u002FGPU acceleration.","https:\u002F\u002Fjegly.xyz",null,"Kotlin",560,30,3,0,20,41,215,60,98.47,"Other",false,"main",true,[26,27,28,29,30,31,32,33,34,35,36,37,38,39],"ai-assistant","android-ai-app","artificial-intelligence","box","gguf","google","litert","litert-llamacpp","litert-lm","llamacpp","local-ai","ondevice-ai","v2v","visionai","2026-06-12 04:00:08","\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fjegly\u002FBox\u002Fmain\u002Fimages\u002Fbox-header3.png\" alt=\"Box Header\" width=\"800\" \u002F>\n\n[![Kotlin](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FKotlin-90.4%25-6272A4.svg?logo=kotlin&logoColor=white)](https:\u002F\u002Fkotlinlang.org)\n[![Android](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAndroid-15%2B-50FA7B.svg?logo=android&logoColor=white)](https:\u002F\u002Fdeveloper.android.com)\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FUpstreamVersion-1.0.12-BD93F9.svg)](https:\u002F\u002Fgithub.com\u002Fjegly\u002FBox\u002Freleases)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-8BE9FD.svg)](LICENSE)\n[![llama.cpp](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fllama.cpp-GGUF-FFB86C.svg)](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp)\n[![stable-diffusion.cpp](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fstable--diffusion.cpp-GGUF-FFB86C.svg)](https:\u002F\u002Fgithub.com\u002Fleejet\u002Fstable-diffusion.cpp)\n[![whisper.cpp](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fwhisper.cpp-STT-FFB86C.svg)](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp)\n[![Voice Mode](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVoice%20Mode-Speech--to--Speech-50FA7B.svg)]()\n[![LiteRT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLiteRT-NPU-FF79C6.svg)](https:\u002F\u002Fai.google.dev\u002Fedge\u002Flitert)\n[![Document Analysis](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocument_Analysis-PDF_%2B_TXT-50FA7B.svg)]()\n[![Vision](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVision-Multimodal_LLM-50FA7B.svg?logo=camera&logoColor=white)]()\n[![Snapdragon NPU](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSnapdragon-NPU%208Gen2%2F3%2FElite-FF79C6.svg)](https:\u002F\u002Fwww.qualcomm.com\u002Fproducts\u002Fmobile\u002Fsnapdragon)\n[![Google Tensor](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGoogle%20Tensor-TPU%20G3%2FG4%2FG5%20(Pixel%208--10)-FF79C6.svg)](https:\u002F\u002Fstore.google.com\u002Fgb\u002Fcategory\u002Fphones)\n[![MediaTek](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FMediaTek-NPU-FF79C6.svg)](https:\u002F\u002Fwww.mediatek.com\u002F)\n[![SQLCipher](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSQLCipher-AES--256-F1FA8C.svg?logo=sqlite&logoColor=white)](https:\u002F\u002Fwww.zetetic.net\u002Fsqlcipher\u002F)\n[![Biometric](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBiometric-Lock-FF5555.svg?logo=fingerprint&logoColor=white)]()\n[![Offline](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNetwork-Hard%20Offline-FF5555.svg)]()\n[![GGUF Import](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGGUF-Import-50FA7B.svg)]()\n[![Hybrid Engine](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FEngine-LiteRT%20%2B%20llama.cpp-BD93F9.svg)]()\n[![Fork](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFork-Google%20AI%20Edge-6272A4.svg)](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Fgallery)\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FVersion-1.0.4-BD93F9.svg)](https:\u002F\u002Fgithub.com\u002Fjegly\u002FBox\u002Freleases)\n![GitHub all releases](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fdownloads\u002Fjegly\u002FBox\u002Ftotal)\n\n\nIf this project helped you, please ⭐️ star it to help others find it \n## 📱 Download\n\n[![Download Box 1.0.4 APK](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDownload-Latest_APK-brightgreen?style=for-the-badge&logo=android)](https:\u002F\u002Fgithub.com\u002Fjegly\u002FBox\u002Freleases\u002Ftag\u002Fv1.0.4)\n\n\n> **Note:** If you're using a custom ROM (LineageOS, GrapheneOS, CalyxOS), please use the [custom-rom-support-v1.0.4 release](https:\u002F\u002Fgithub.com\u002Fjegly\u002FBox\u002Freleases\u002Ftag\u002Fcustom-rom-support-v1.0.4) instead.\n\n## Installation via Obtainium                                                                                                                                                                                                               \n                                                                                                                                                                                                                                              \n  Obtainium lets you install and auto-update Box directly from GitHub releases.                                                                                                                                                               \n     [![Box Main — Obtainium](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FObtainium-Box%20Main-ff8f00?style=for-the-badge&logo=github&logoColor=ff8f00&labelColor=1a0d00)](https:\u002F\u002Fobtainium.imranr.dev\u002Fredirect?r=obtainium:\u002F\u002Fapp\u002Fhttps:\u002F\u002Fgithub.com\u002Fjegly\u002FBox)\n  [![Box Custom ROM —                                                                                                                                                                                                                         \n  Obtainium](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FObtainium-Box%20Custom%20ROM-ff8f00?style=for-the-badge&logo=github&logoColor=ff8f00&labelColor=1a0d00)](https:\u002F\u002Fobtainium.imranr.dev\u002Fredirect?r=obtainium:\u002F\u002Fapp\u002Fhttps:\u002F\u002Fgithub.com\u002Fjegly\u002FBox)   \n           \n                  \n  ### Which version should I install?                                                                                                                                                                                                         \n                  \n  | Version | For |\n  |---|---|\n  | **Main** | Stock Android (Pixel, Samsung, etc.) |\n  | **Custom ROM** | GrapheneOS, LineageOS, CalyxOS — no Google services |\n                                                                                                                                                                                                                                              \n  ### Setup steps\n                                                                                                                                                                                                                                              \n  1. Tap the badge for your version above — this opens Obtainium with the repo pre-filled\n  2. Under **APK filter regex**, enter one of the following:\n     - Main: `Main`\n     - Custom ROM: `custom-rom-support`\n  3. Tap **Add** — Obtainium will find the latest release and install it                                                                                                                                                                      \n  4. Future updates will be detected automatically\n                                                                                                                                                                                                                                              \n  > **Note:** The version number shown inside the app (1.0.12) reflects the\n  > upstream Google AI Edge Gallery build number and is unrelated to the Box\n  > release version. Box releases are tracked via GitHub tags (v1.0.4 etc).   \n\n**Box is a security-hardened fork of [Google AI Edge Gallery](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Fgallery) — with on-device image generation, voice mode (speech-to-speech AI chat), voice input, document analysis, vision AI, biometric lock, encrypted chat history, llama.cpp support, and GGUF model import.**\n\n\n## Disclaimer\n\nBox is an independent community fork of [Google AI Edge Gallery](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Fgallery) and is not affiliated with or endorsed by Google LLC. Google branding has been replaced throughout. All credit for the underlying platform goes to Google and the original contributors — this fork simply builds on top of their work.\n\n\n## Related\n\nBuilt [OfflineLLM](https:\u002F\u002Fgithub.com\u002Fjegly\u002FOfflineLLM) first — a privacy-first Android chat app with a [llama.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp) backend.\n\nThis project (`Box`) forks Google's AI Edge Gallery to create a **hybrid LiteRT \u002F llama.cpp** feature rich hybrid experience. \n\n→ Try the [OfflineLLM app](https:\u002F\u002Fgithub.com\u002Fjegly\u002FOfflineLLM) for pure llama.cpp on-device chat.\n\n---\n\n## What is Box?\n\nBox is an Android app for running AI entirely on-device — chat, voice mode, image generation, speech-to-text, document analysis, and vision, all without a network connection. It inherits the full feature set of the upstream Google AI Edge Gallery and layers on top: encrypted conversations, biometric lock, hard offline mode, and three additional native inference engines (llama.cpp, stable-diffusion.cpp, whisper.cpp) alongside LiteRT.\n\n# Box: On-Device AI. No Cloud. No Compromise.\n\n**What makes Box unique?** You can sit at your desk, tap two buttons, and have a real flowing voice conversation with an AI — no wake word, no account, no server, no subscription. It listens, thinks, and speaks back sentence by sentence before it's even finished generating. Point the camera at something and ask about it out loud. The AI sees it and answers. All of it runs on the phone in your hand, completely offline, faster than you'd expect. \n\n\n> **Custom ROM users (GrapheneOS, LineageOS, CalyxOS):** Use the **custom-rom-support** APK, not Main. Third-party ROMs lack AICore and system TTS, which impairs voice mode and NPU acceleration on the Main build. The custom-rom-support branch works around these limitations with built-in Piper TTS and alternative voice input. TPU\u002FNPU acceleration is supported on Tensor devices; Snapdragon NPU remains untested on custom ROMs.\n\n---\n\n## Screenshots\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FLandingPage.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Home\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FAI_Chat_Example.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>AI Chat\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FAi_Chat_Input_Select.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Multimodal Input\u003C\u002Fsub>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FAsk_Image.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Vision AI\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FVoiceInput.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Voice Input\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FAudio_Scribe.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Audio Scribe\u003C\u002Fsub>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FWhisper.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Whisper STT\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FLiteRT_backend_Voice.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>LiteRT Voice Backend\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FImgGen_Overview.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Image Generation\u003C\u002Fsub>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FImgGen.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Diffusion Output\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FIMGGen_Photo_example.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Photo Generation of a Orange brain cell\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FMobile_Actions_Automation.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Mobile Actions\u003C\u002Fsub>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FAgent_Skills.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Agent Skills\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FPrompt_Lab.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Prompt Lab\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FModel_Configuration.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Model Config\u003C\u002Fsub>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FModel_Select.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Model Select\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cimg src=\"images\u002FBox_Screenshots\u002FSettings.png\" width=\"210\"\u002F>\u003Cbr\u002F>\u003Csub>Settings\u003C\u002Fsub>\u003C\u002Ftd>\n    \u003Ctd>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## What Box adds on top of upstream\n\nBox is a fork of [Google AI Edge Gallery](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Fgallery). The upstream project is excellent — Box just layers on additional capabilities:\n\n| Area | What Box adds |\n|---|---|\n| Inference engines | llama.cpp (GGUF LLMs), stable-diffusion.cpp (image gen), whisper.cpp (STT) alongside LiteRT |\n| Model import | Import any local GGUF file — not limited to the curated download list |\n| NPU \u002F TPU | All Snapdragon \u002F Tensor \u002F MediaTek variants bundled in one APK (upstream ships per-SoC) |\n| Voice mode \u002F Vision mode| Free talk (continuous hands-free loop) and Vision talk (live camera + voice) |\n| Image generation | On-device Stable Diffusion via GGUF |\n| Speech-to-text | On-device Whisper STT |\n| Document analysis | Attach text files directly in chat |\n| Chat history | Persisted to a SQLCipher-encrypted Room database, resumable across sessions |\n| Security | Biometric app lock, hard offline mode, prompt sanitisation, audit log |\n| Agent skills | 20 built-in skills (upstream has 9) |\n| Math rendering | LaTeX expressions rendered as Unicode in chat |\n\n---\n\n## Core Features\n\n### Local Chat\nMulti-turn conversations with on-device LLMs. Import any GGUF model or download LiteRT models from the built-in list. Supports Thinking Mode on compatible models. Full markdown rendering with LaTeX math support — Greek letters, operators, fractions, and notation are rendered as Unicode symbols. Conversations are persisted and resumable.\n\n> **Recommended models:** We highly recommend **Gemma 4 E2B** or **Gemma 4 E4B** (LiteRT) as your primary models — best-tested, support vision, voice, and documents, and run efficiently with GPU\u002FNPU acceleration. Available to download directly in the app.\n\nWith **Gemma 4 E2B \u002F E4B** selected, the chat input expands to a full multimodal interface:\n- 📎 Attach documents (`.txt`, `.md`, `.csv`, `.json`, `.py`, `.kt`, and more) — content is injected into context automatically\n- 🎙 Record an audio clip or pick a WAV file to speak your question\n- 📷 Take a photo or pick from album for visual Q&A\n\n### Local Diffusion\nOn-device image generation powered by [stable-diffusion.cpp](https:\u002F\u002Fgithub.com\u002Fleejet\u002Fstable-diffusion.cpp). Runs Stable Diffusion 1.5 in GGUF format fully offline — no API key, no cloud. Configurable steps, CFG scale, seed, and image size presets. Save generated images directly to your gallery. Import your own GGUF diffusion models.\n\n### Voice Input\nOn-device speech-to-text using [whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp). Tap to record, tap to transcribe. Copy or clear results. Supports Whisper Tiny through Small models in multiple languages. Audio never leaves the device.\n\n### Free Talk — Real-Time Voice Conversation\n\nTap the mic and the speaker. That's it. Box listens to you, sends your words to the AI, and speaks the reply back — then immediately starts listening again. No tapping between turns. No waiting for a full response before it starts speaking. Just sit there and talk to it like a person.\n\nOn Gemma 4 E2B it keeps up in real time. The first sentence of the reply is already being spoken while the model is still generating the rest.\n\n- *\"Explain quantum entanglement like I'm five\"* → speaks the answer, listens for your follow-up\n- *\"Actually, go deeper on that last point\"* → multi-turn, completely hands-free  \n- *\"Help me think through a problem I'm having at work\"* → back and forth, no typing ever\n- *\"What should I cook for dinner tonight? I've got chicken and not much else\"* → practical daily use\n\nIt feels like having an AI sitting across from you. Entirely offline. Nothing leaves the device.\n\nThree toggles in AI Chat control it:\n- **🎤 Mic** — tap once to enter free talk mode, tap again to stop\n- **🔊 Speaker** — AI replies spoken aloud, sentence by sentence as they generate\n- **📹 Camera** — live vision mode (see below)\n\nEnable **Real-time voice reply** in Settings for sentence-by-sentence speech as the model generates. Works out of the box with Android's built-in speech and TTS — load a Whisper or Piper model for higher quality.\n\n> **De-Googled ROMs (GrapheneOS, CalyxOS, LineageOS without GApps):** Use the **custom-rom-support** APK — it includes Piper TTS (Amy) as a built-in download in the Voice tab, so no third-party TTS app is needed. If you're on the Main build, install a TTS engine from F-Droid (e.g. [RHVoice](https:\u002F\u002Ff-droid.org\u002Fpackages\u002Fcom.github.olga_yakovleva.rhvoice.android\u002F) or [eSpeak NG](https:\u002F\u002Ff-droid.org\u002Fpackages\u002Fcom.reecedunn.espeak\u002F)) and set it as default in **Android Settings → Accessibility → Text-to-speech**.\n\n---\n\n### Vision Talk — Live Camera + Voice AI\n\nTap the camera toggle to stream your back camera directly to the AI. Point it at anything and ask — the AI sees the current frame alongside your question and speaks its answer back. All offline, no cloud.\n\n**Things you can do:**\n\n- Point at a plant → *\"What species is this and how do I care for it?\"*\n- Point at food in your fridge → *\"What can I cook with what's here?\"*\n- Point at a label or sign in another language → *\"What does this say?\"*\n- Point at a circuit board → *\"What component is this and what does it do?\"*\n- Point at your code on a laptop screen → *\"What's wrong with this function?\"*\n- Point at a meal → *\"Roughly how many calories is this?\"*\n- Point at a maths problem → *\"Walk me through how to solve this\"*\n\nCombine with mic + speaker for a fully hands-free vision conversation — speak your question, AI sees the scene, speaks the answer, listens for the next question. Requires a vision-capable model (Gemma 4 E2B or E4B).\n\nWhen mic is off, camera mode sends a frame every 3 seconds automatically with \"What do you see?\" — useful for passive scene description.\n\n### Vision AI\nAsk questions about images using on-device vision models. Powered by LiteRT with Gemma 4 E2B \u002F E4B — GPU-accelerated, up to 32K context.\n\n### Biometric App Lock\nEnable an optional biometric lock from Settings. The app re-locks automatically every time it is backgrounded. Unlock via fingerprint or face authentication before any content is shown.\n\n### Encrypted Chat History\nAll conversations are stored in a SQLCipher-encrypted Room database. History persists across sessions and is resumable from the Chat History screen. Swipe to delete individual conversations, or wipe all at once.\n\n### NPU \u002F TPU Acceleration\nAll Qualcomm Hexagon NPU variants (Snapdragon 8 Gen 2 \u002F 8 Gen 3 \u002F 8 Elite \u002F newer), Google Tensor TPU (Pixel 8–10), and MediaTek NPU are bundled in a single APK — no separate builds per device. Select **NPU\u002FTPU** in the model's accelerator dropdown; Box auto-detects the chip and loads the right runtime.\n\n> **Note:** NPU acceleration currently falls back to GPU\u002FCPU for most models. The NPU path (via AICore on Tensor, QNN on Snapdragon) requires model-side AUX metadata that current litert-community models don't yet include. GPU is the recommended accelerator and performs excellently on all supported chips.\n\nSupported hardware:\n- **Snapdragon 8 Gen 2** (SM8550, Hexagon V69)\n- **Snapdragon 8 Gen 3** (SM8650, Hexagon V73)\n- **Snapdragon 8 Elite** (SM8750, Hexagon V75)\n- **Snapdragon 8 Elite for Galaxy** (SM8850, Hexagon V79)\n- **Snapdragon next-gen** (Hexagon V81)\n- **Google Tensor G3 \u002F G4 \u002F G5** (Pixel 8 \u002F 9 \u002F 10)\n- **MediaTek Dimensity** (MT6989, MT6991)\n\n### GGUF Model Import\nImport any GGUF model file from local storage. At import time set the display name and choose the accelerator (CPU, GPU via OpenCL\u002FVulkan, or NPU via QNN delegate). Stable Diffusion GGUF models can also be imported for image generation.\n\n### Hard Offline Mode\nA toggle in Settings forces the app into a fully airgapped state — all download attempts throw an exception and no network calls are made.\n\n---\n\n## Getting Started\n\n### Requirements\n\n- Android 15+\n- ~4 GB of free storage for a typical quantised LLM\n\n### Build from source\n\n```bash\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002Fjegly\u002Fbox\ncd box\u002FAndroid\n.\u002Fgradlew :app:assembleDebug\n```\n\nThe `--recurse-submodules` flag is required to pull llama.cpp, stable-diffusion.cpp, and whisper.cpp submodules. The first build compiles all three native libraries from source — expect 15–25 minutes. Subsequent builds are fast.\n\nOpen `Android\u002F` in Android Studio (Ladybug or newer) and run on a physical device for best performance.\n\n### Loading a GGUF model ( Use LiteRT for speed & performance ) \n\n1. Copy a `.gguf` file to your device (Downloads, USB, etc.)\n2. Open the app → **Model Manager** in the drawer\n3. Tap **Import** and pick your file\n4. Set a display name and choose CPU \u002F GPU \u002F NPU\n5. The model appears in AI Chat\n\n---\n\n## Security Architecture\n\n| Mechanism | Details |\n|---|---|\n| Database encryption | SQLCipher via `androidx.room` — AES-256 at rest |\n| Biometric gate | `BiometricPrompt` API, re-prompts on each foreground |\n| Offline mode | `OfflineMode` singleton blocks `DownloadWorker` and network calls |\n| Prompt sanitisation | `SecurityUtils.sanitizePrompt()` strips control characters before inference and persistence |\n| Tapjacking protection | `filterTouchesWhenObscured` set on the chat scaffold |\n| Audit log | `SecurityAuditLog` writes security events to a local append-only log |\n\n---\n\n## Technology Stack\n\n- **Kotlin + Jetpack Compose** — UI\n- **Hilt** — dependency injection\n- **Room + SQLCipher** — encrypted persistence\n- **LiteRT-LM** — LiteRT inference runtime for LLMs (GPU + NPU\u002FTPU)\n- **Qualcomm QNN \u002F QAIRT 2.41** — Hexagon NPU runtime (V69–V81, bundled)\n- **LiteRT NPU dispatch** — auto-selects Qualcomm \u002F Google Tensor \u002F MediaTek at runtime\n- **llama.cpp** — GGUF LLM inference (git submodule)\n- **stable-diffusion.cpp** — GGUF image generation (git submodule)\n- **whisper.cpp** — on-device speech-to-text (git submodule)\n- **Sherpa-ONNX (k2-fsa)** — Piper TTS engine for on-device voice synthesis (custom-rom-support branch)\n- **Firebase Analytics** — anonymous usage stats (disabled in Offline Mode)\n\n---\n\n## Acknowledgements\n\nBox would not exist without the work of the teams and individuals behind the projects it builds on.\n\n**[Google AI Edge Gallery](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Fgallery)** — the upstream project this fork is based on. The Google AI Edge team built an exceptionally well-structured, open-source Android app and made it available under the Apache 2.0 licence. Everything in Box starts from their foundation. Upstream changes are periodically merged and any improvements we make that are appropriate to contribute back will be.\n\n**[llama.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp)** — Georgi Gerganov and the llama.cpp contributors for making high-performance on-device LLM inference accessible to everyone.\n\n**[stable-diffusion.cpp](https:\u002F\u002Fgithub.com\u002Fleejet\u002Fstable-diffusion.cpp)** — leejet and contributors for the C++ Stable Diffusion implementation that powers on-device image generation.\n\n**[whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp)** — Georgi Gerganov and contributors for the Whisper speech-to-text port.\n\n**[LiteRT \u002F TensorFlow Lite](https:\u002F\u002Fai.google.dev\u002Fedge\u002Flitert)** — the Google teams behind LiteRT (formerly TFLite) and the NPU\u002FGPU delegate infrastructure.\n\n**[Sherpa-ONNX \u002F k2-fsa](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002Fsherpa-onnx)** — the k2-fsa team for Sherpa-ONNX, which powers the Piper TTS engine (Amy and other voices) in the custom-rom-support branch.\n\n**[off-grid-mobile-ai](https:\u002F\u002Fgithub.com\u002Falichherawalla\u002Foff-grid-mobile-ai)** — Mohammed Ali Chherawalla for the on-device Stable Diffusion Android implementation, which was instrumental in getting efficient on-device image generation working and influenced parts of Box’s pipeline.\n\nThanks to **aryoda** for consistently reporting valid bugs. Appreciate the reports !\n\n\n\nThank you to everyone who has opened issues, tested builds, or contributed to any of these projects. On-device AI is a community effort.\n\n---\n\n## License\n\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fjegly\u002FBox\u002Fblob\u002Fmain\u002Fimages\u002FApache_Software_Foundation.png?raw=true\" alt=\"Apache Software Foundation Logo\" width=\"120\">\nLicensed under the Apache License, Version 2.0\n\n---\n\n## Links\n\n- [Box repository](https:\u002F\u002Fgithub.com\u002Fjegly\u002Fbox)\n- [Upstream: google-ai-edge\u002Fgallery](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002Fgallery)\n- [llama.cpp](https:\u002F\u002Fgithub.com\u002Fggml-org\u002Fllama.cpp)\n- [stable-diffusion.cpp](https:\u002F\u002Fgithub.com\u002Fleejet\u002Fstable-diffusion.cpp)\n- [whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp)\n- [LiteRT-LM](https:\u002F\u002Fgithub.com\u002Fgoogle-ai-edge\u002FLiteRT-LM)\n- [LiteRT NPU docs](https:\u002F\u002Fai.google.dev\u002Fedge\u002Flitert\u002Fnext\u002Flitert_lm_npu)\n- [Qualcomm QAIRT SDK](https:\u002F\u002Fsoftwarecenter.qualcomm.com)\n- [Hugging Face LiteRT Community](https:\u002F\u002Fhuggingface.co\u002Flitert-community)\n","Box 是一个专为Android设备设计的私有AI套件。它集成了多种先进的AI模型，如llama.cpp、whisper.cpp和stable-diffusion.cpp，并支持GGUF导入，能够实现语音聊天、视觉AI、本地图像生成等功能。项目还特别强调了生物识别锁与加密历史记录的安全性，以及对NPU\u002FTPU\u002FGPU硬件加速的支持。适合需要在移动设备上进行离线AI处理的应用场景，尤其是在隐私保护要求较高的环境中使用。",2,"2026-06-11 02:42:12","CREATED_QUERY"]