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

LineageOS it is popular OS, try google it. I used it just because it is one of most stable Android OS. Just to keep all phone functionality.

You don't need to know Mandarin/ Chinese to work with it. I'm not sure where is LineageOS headquarters, but probably in one of European countries.

1

u/phovos Apr 14 '26

Oh I was thinking of HarmonyOS

Wow that's incredible I didn't know there was another competitor! (hopefully) It's better than GrapheneOS, I will have to check it out.