SShortSingh.
Back to feed

Developer Builds Offline AI Agent on Android Phone Using Termux and Llama.cpp

0
·1 views

A developer has successfully configured an old Android smartphone to run a fully autonomous AI agent stack without relying on any cloud services. The setup uses Termux, a Linux-like environment for Android, combining an offline Vosk speech-to-text model, a quantized Llama-2 language model via llama.cpp, and a JavaScript-based action executor. Key challenges included Android's low-memory killer terminating processes, which was resolved by switching to a smaller 3-billion-parameter model and tuning CPU and memory settings. A Bash watchdog script monitors and restarts crashed components while guarding against out-of-memory events. The project demonstrates that capable, private AI workflows can run entirely on consumer mobile hardware at zero cloud cost.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Rust Iceberg Client Outpaces Python by Up to 4x in REST Catalog Benchmark

A developer benchmarked two Apache Iceberg REST catalog clients — the Rust client (iceberg-catalog-rest 0.10.1) and the Python client (pyiceberg 0.12.0) — across identical operations on the same tables. Tests were run against a local Apache Polaris instance in Docker, as well as Google BigLake and Microsoft OneLake over the internet. On four lightweight read operations, the Rust client was 1.90x to 4.29x faster than pyiceberg, while the gap narrowed to 1.14x–1.38x on heavier table-level calls where the server does more processing. However, the Rust client supports only 13 of 25 tested catalog endpoints, compared to 21 for pyiceberg, making feature coverage a key consideration alongside speed. The benchmark focused solely on performance and did not validate the correctness of responses from either client.

0
ProgrammingDEV Community ·

Rust vs Python Apache Iceberg Clients: Rust Up to 4x Faster on Small Calls

A developer benchmarked two Apache Iceberg REST catalog clients — the Rust client (iceberg-catalog-rest 0.10.1) and the Python client (pyiceberg 0.12.0) — across six shared read operations on local and cloud catalogs. The Rust client was 1.90x to 4.29x faster on lightweight namespace operations, while the gap narrowed to 1.14x–1.38x on heavier table-level calls where server processing dominates. Testing was conducted against Apache Polaris running locally in Docker, as well as Google BigLake and Microsoft OneLake over the internet. The benchmark measured speed only and did not validate correctness; notably, the Python client supports 21 of 25 tested catalog endpoints versus just 13 for the Rust client. The author cautions that a faster client lacking required operations is still the wrong choice, and that timing results varied significantly between runs.

0
ProgrammingDEV Community ·

Vite+ Chapter 3: How to Build and Run a Real Project Using the vp CLI

Vite+ is a unified JavaScript toolchain that bundles tools like Vite, Vitest, Oxlint, and Rolldown under a single command-line interface called 'vp'. Developers can install it via a one-line script on any operating system and immediately scaffold new projects using built-in templates for monorepos, applications, or libraries. The 'vp dev' command launches Vite's development server with hot module replacement, while 'vp install' handles package management regardless of whether the project uses npm, pnpm, yarn, or bun. Rather than running separate commands for formatting, linting, and type checking, developers can consolidate all three into a single 'vp check' command. The platform is designed to reduce workflow fragmentation across large teams managing multiple repositories and CI pipelines, without forcing teams to abandon their existing underlying tools.

0
ProgrammingDEV Community ·

How proving a bug's root cause beat guessing in a CameraX Android rotation fix

A developer debugging an Android barcode scanner discovered that rotating a tablet 180° left the camera preview intact but caused the image analyzer to receive upside-down frames. Initial investigation by an AI coding agent suggested waiting for a display rotation value to update before rebinding the camera, but the developer paused and demanded evidence of the true cause instead. Structured logging revealed that while the display correctly updated to ROTATION_270, ImageAnalysis.targetRotation remained stuck at ROTATION_90, leaving ImageProxy.rotationDegrees at zero. With the root cause confirmed, the fix was straightforward: use an OrientationEventListener to update both Preview and ImageAnalysis target rotations together, eliminating any need for delays or camera rebinding. The case highlights how demanding measurable proof before applying a fix can lead to simpler, more reliable solutions.

Developer Builds Offline AI Agent on Android Phone Using Termux and Llama.cpp · ShortSingh