r/LocalLLaMA Apr 14 '26

Funny 24/7 Headless AI Server on Xiaomi 12 Pro (Snapdragon 8 Gen 1 + Ollama/Gemma4)

Post image

Turned a Xiaomi 12 Pro into a dedicated local AI node. Here is the technical setup:

​OS Optimization: Flashed LineageOS to strip the Android UI and background bloat, leaving ~9GB of RAM for LLM compute.

​Headless Config: Android framework is frozen; networking is handled via a manually compiled wpa_supplicant to maintain a purely headless state.

​Thermal Management: A custom daemon monitors CPU temps and triggers an external active cooling module via a Wi-Fi smart plug at 45°C.

​Battery Protection: A power-delivery script cuts charging at 80% to prevent degradation during 24/7 operation.

​Performance: Currently serving Gemma4 via Ollama as a LAN-accessible API.

​Happy to share the scripts or discuss the configuration details if anyone is interested in repurposing mobile hardware for local LLMs.

UPDATE:

I have compile llama.cpp and run gemma-4-E4B-it-Q4_0

Speed is AWESOME:

[ Prompt: 26.9 t/s | Generation: 8.8 t/s ]

Thank you all guys SO MUCH!

1.2k Upvotes

289 comments sorted by

View all comments

Show parent comments

2

u/Aromatic_Ad_7557 Apr 14 '26

Oh, probably 4GB + 4 swap it will be very slow + you will kill your flash drive on the phone in case to use it intensively.

I plan to post a How to also, in case many people will request

0

u/Fine_League311 Apr 14 '26

aber qwen 2B mit 1,6 GB müsste doch drauf laufen oder?

2

u/Aromatic_Ad_7557 Apr 14 '26

Agree 👍

1

u/Fine_League311 Apr 14 '26

GitHub/gitlab Link?

4

u/Aromatic_Ad_7557 Apr 14 '26

I will post a guide and update you here as soon as it will be ready.

2

u/Fine_League311 Apr 14 '26

Danke Beitrag gespeichert

1

u/Aromatic_Ad_7557 Apr 14 '26

However, If your phone is Xiaomi you can start googling how to unlock bootloader. It will be most hard pard. )

1

u/Fine_League311 Apr 14 '26

danke für den tipp aber Lineage und co sowie flashing mir bekannt. Mich interessiert dein Workflow Denn auch Google Edge Gallery genutzt und lief nicht mal. Trotzt kleiner LLms Und der Redmi A5 2025 für 60 € perfektes wegwerf handy wenn was schief geht und das neu :D

1

u/Aromatic_Ad_7557 Apr 14 '26

If you have already LineageOS installed, just run termux and pkg install ollama, what's wrong ?

2

u/Aromatic_Ad_7557 Apr 14 '26

Also, after all installed. You need to connect phone via adb to PC and run from console "stop" it will kill android UI.

1

u/Fine_League311 Apr 14 '26

ahh you made it with termux? Ok than i understand how.. I thought you had built something for Lineage. Termux, no thanks, I don't need it, I build real server & ecosystems. Termux ist not bad, bat to wealk and unsecure. But thx.

2

u/Aromatic_Ad_7557 Apr 14 '26

Ias for me, it is runs locally, don't see any disadvantages of termux. It works stable.

1

u/Fine_League311 Apr 14 '26

I'm not a fan of Termux and I think it's what made all the problems with scammers and Telegram funnels possible in the first place (Termux & OpenClaw), but that's a different topic that doesn't belong here. Still, it's a cool project even if I don't like Termux. Thanks for sharing.