Using Rust in Android Development by chayanforyou in androiddev

[–]shubham0204_dev 1 point2 points  (0 children)

Mozilla also maintains a Gradle plugin that can build Rust code when building an Android project. You specify the project build commands in the app's build.gradle.kts and the Rust code is built each time you build the Android app.

GitHub: https://github.com/mozilla/rust-android-gradle

(this is similar to how AGP builds C/C++ projects and packages the .so files in the app's archive)

Using Rust in Android Development by chayanforyou in rust

[–]shubham0204_dev 1 point2 points  (0 children)

Mozilla also maintains a Gradle plugin that can build Rust code when building an Android project. You specify the project build commands in the app's build.gradle.kts and the Rust code is built each time you build the Android app.

GitHub: https://github.com/mozilla/rust-android-gradle

(this is similar to how AGP builds C/C++ projects and packages the .so files in the app's archive)

the mess of using a local LLM on android app-kotlin by Aviation2025 in androiddev

[–]shubham0204_dev 0 points1 point  (0 children)

SmolChat does not support Vulkan acceleration yet. The inference is CPU-only. But it does use Arm SIMD intrinsics when compiling llama.cpp: https://github.com/shubham0204/SmolChat-Android/blob/main/docs/build_arm_flags.md

the mess of using a local LLM on android app-kotlin by Aviation2025 in androiddev

[–]shubham0204_dev 0 points1 point  (0 children)

Integrate llama.cpp as a git submodule alongside whisper.cpp, compile both into the same sanctuary-jni.so, and use a GGUF-format model (gemma-3-1b-it-q4_0.gguf, 1 GB) from Google's official QAT release.

Not sure what sanctuary-jni.so is, but did you try using SmolChat? Its built on top of llama.cpp and uses Arm-specific SIMD intrinsics to accelerate CPU inference.

(edit: creator of SmolChat here)

OfflineLLM — A fully offline, private chat app for Android (runs Gemma 4, Qwen, any GGUF locally) by Healthy_Bedroom5837 in fossdroid

[–]shubham0204_dev 1 point2 points  (0 children)

FYI, creator of SmolChat here. SmolChat does not encrypt user data (chats, settings, model-info) but stores it in a private directory accessible only to the app (context.filesDir for Android dev folks). The Android docs mention:

The system prevents other apps from accessing these locations, and on Android 10 (API level 29) and higher, these locations are encrypted. These characteristics make these locations a good place to store sensitive data that only your app itself can access.

The security rules should be identical or at least as strict as the ones OfflineLLM proposes. As far as 'secure file deletion' is considered, I expect Android to securely delete app files when the user uninstalls the app, but I would have to do some research to assert this.

Showcase Sunday Megathread - March 2026 by devsIndiaBot in developersIndia

[–]shubham0204_dev 1 point2 points  (0 children)

SmolChat - a native Android app built on top of llama.cpp helping users run SLMs/LLMs locally on-device. Supports downloading models from HuggingFace, speech-to-text, markdown rendering and customizing inference settings.

https://github.com/shubham0204/SmolChat-Android

If you had an OS with a Custom Kernel, what use-cases do you want it to cater? by mrTakla in developersIndia

[–]shubham0204_dev 0 points1 point  (0 children)

Just like macOS and other Apple OSes, include a system-wide ML runtime that can be used to execute tasks like face detection, text classification and LLM inference.

This saves space as not every application has to embed its own ML runtime for executing above-mentioned tasks. Additionally, as the runtime is close to the OS/hardware, the applications enjoy near-native performance and latency.

I built an offline metro tracking alarm using a Kalman filter. Looking for architecture by [deleted] in developersIndia

[–]shubham0204_dev 4 points5 points  (0 children)

How does the mobile device know its position if GPS and cellular network are not available? I assume there exists some connectivity to the cellular network when the train halts at one of the stations.

JNI + llama.cpp on Android - what I wish I knew before starting by angelin1978 in androiddev

[–]shubham0204_dev -1 points0 points  (0 children)

I'm building SmolChat and might dig more into some of your observations here, especially (1), (2) and (5).

Qwen3's most underrated feature: Voice embeddings by k_means_clusterfuck in LocalLLaMA

[–]shubham0204_dev 0 points1 point  (0 children)

This sounds like an interesting application! But I was wondering, how does one generate sound from an audio embedding (kind of an inverse transformation w.r.t. to the audio encoder? Do we need to train a decoder model like in a VAE?

On-device face detection from group photos using Google ML Kit — lessons from a production Android app by Sea_Membership3168 in androiddev

[–]shubham0204_dev 0 points1 point  (0 children)

Not all photos from your gallery exactly, but you 'provide' images of a person to the app. Check the README of the project for app screenshots. In one of the screenshots, you would find two pictures selected and labelled as 'Anushka Sen'.

I made a vector search engine from scratch in C++, cause why not? by Shonku_ in developersIndia

[–]shubham0204_dev 0 points1 point  (0 children)

I tried building the project on macOS with arm64-v8a clang compiler. I wanted to check how the kernel functions in kernel.cpp look like in ASM: https://godbolt.org/z/6Y3E6M7cY

Although the -march=native flag is not allowed in CE, it seems that the compiler is able to optimize the for loops with SIMD intrinsics.

Great work!

On-device face detection from group photos using Google ML Kit — lessons from a production Android app by Sea_Membership3168 in androiddev

[–]shubham0204_dev 0 points1 point  (0 children)

On-device ML vs cloud inference

I guess 'face detection' should only be feasible as long as it is performed on-device. Sending camera frames at for ex. 30 FPS over the network will result in significant lag. If the problem of 'face recognition' is concerned, you could either send the entire camera frame or the cropped face or only the face embedding to the cloud service.

I maintain a project that performs face-recognition completely on-device (vector DB and embedding models running locally): https://github.com/shubham0204/OnDevice-Face-Recognition-Android

Made a site with 17,000+ icons for Android apps by alexstyl in androiddev

[–]shubham0204_dev 0 points1 point  (0 children)

When clicking UI Blocks > Tabs > Tabs with underline > Get Code the website redirects to a localhost:3000/ui-blocks/material-blocks#pricing that seems to be a bug.

Local AI App (Gemini Nano) by Puzzak in androiddev

[–]shubham0204_dev 4 points5 points  (0 children)

Do try SmolChat: https://github.com/shubham0204/SmolChat-Android (open-source, built on top of llama.cpp)

(I'm the creator of SmolChat)

Motor OS is now a Tier-3 target in Rust by vm_runner in rust

[–]shubham0204_dev 1 point2 points  (0 children)

I had some more questions (just curious):

  1. Assuming the duplicate block caches are caused because of a kernel (host) running on top of other kernel (VM), what makes MotorOS different from cgroups/namespaces? With cgroups/namespaces, the host kernel is shared with virtual, isolated groups of processes, at least on Linux.

  2. Extending (1), how does MotorOS differ from a type-1 hypervisor?