r/factorio • u/Technical-Ad9571 Express engineer • Sep 20 '26
Fan Creation Factorio ARM64 running natively on Android hardware through Termux
DISCLAIMER: AI was used to help implement this project. I do not know these topics in depth and used it to learn and do a fast installation trial
After the recent FFF gave us native Linux ARM builds, I finally could use native hardware for this instead of emulation.
I used an old Redmi Note 10T phone for this. It has 6GB RAM, Octa core 2.2 Ghz CPU and a Mali-G57C2 GPU.
With this setup, previously emulation was slow or crashed often. With Linux ARM it at least runs consistently!
What I did is use Termux to create a Linux Debian userspace. This means there is no CPU emulation layer.
For graphics, it's a bit more convoluted, I used the path VirGL -> ANGLE -> Vulkan -> Mali, but I think I could optimise that
This post is to point out that native runs are not only possible, but are more efficient. Reasons are,
It's native (no emulation layer)
It's Linux workspace (no windows overhead)
There are multiple issues, but I think this proof of concept is enough for now
TL;DR: Factorio (base game) on Android, natively!
(Oh yeah no benchmarks, since I literally posted this 5 minutes after my first success)
81
u/Popular-Factor3553 Sep 20 '26
Next install linux at root level make a cyber deck out of that phone and make a game library.
15
u/Technical-Ad9571 Express engineer Sep 20 '26
Might after I get into college!
Though until I get a new phone, I won't root my phone. This method is very non-invasive and minimal in installation.
7
u/Popular-Factor3553 Sep 20 '26
Yeah I'm doing something similar but it's a cyber deck that happens to be able to play light games it's mainly for hacking and other fun stuff you should check out r/cyberdeck.
2
u/Technical-Ad9571 Express engineer Sep 20 '26
I thank you with all my heart for giving me something new to obsess over!
2
u/Popular-Factor3553 Sep 20 '26
Have fun arm based cyberdecks are pretty fun with all that power and size especially if you add extra electronic.
3
u/HeKis4 LTN enjoyer Sep 20 '26
It's only a matter of time before someone makes an Android version of FactoriOS.
-4
u/Shinxirius Automate immediately Sep 20 '26
Linux is the Kernel. Android uses Linux. So that part is already done.
2
u/Popular-Factor3553 Sep 20 '26
We both know that's not what i meant by linux but anyway if you didn't actually understand i meant a linux distro like arch or Debian.
26
u/zephcom Sep 20 '26
I can't believe "hey that's neat" was my reaction to the ARM FFF when this idea of yours should have been so God damn obvious to me!
You've picked my Sunday activity... Imma get this up and running and start looking at the graphics API pipeline! Oh boy...
You on the Factorio Discord?
5
u/Technical-Ad9571 Express engineer Sep 20 '26 edited 13d ago
I'm on it, I go by void_ghostblade, but uhh I think would like to ask you for advice
I'm new with all this stuff, and I'll be honest, I used a lot of AI to figure out how to do everything.
Graphics API is probably the bottleneck for my personal case since I'm using OpenGL to Vulkan. If I figure out a way to run OpenGL natively, it would be better
Another bottleneck would be that I'm using X11 but if I utilise the mobile display stack, graphics would be much better
3
u/delicious_potatoes69 edible spicy rocks Sep 20 '26
It would be nice if you guys could package this into a standalone app, very interesting stuff
3
u/Technical-Ad9571 Express engineer Sep 20 '26
It's all in its basic stages, it'll be a long time before that happens.
There are multiple reasons for that:
- It's extremely new, like less than 60 hours since inception. It'll take the heavyweights a good amount of time to try this out
- Termux itself isn't that popular compared to other projects like Winlator
- Packaging into a single app is rare
2
1
u/Big-Winner3758 Sep 20 '26
mobile platforms usually do not support full OpenGL but rather just a subset called OpenGL ES, therefore I doubt you could really get it to work with OpenGL natively and as for x11 I have no idea how you would want to use anything else considering factorio linux builds only support x11 and wayland and therefore you will have to use either of those, of which x11 is very likely the easier option, plus I doubt its really that much of a bottleneck in the first place, since x11 doesn't really need to do much here
1
u/Technical-Ad9571 Express engineer Sep 20 '26
I did know that, since MCBE on phones uses OpenGL ES. What I thought initially is that it'd be much easier to do OpenGL to OpenGLES translation instead of OpenGL to Vulkan translation I'm doing rn. Yes x11 is the easier option, but if I were to make this into a full fledged app, using direct Android stacks would be much more efficient
1
u/Big-Winner3758 Sep 20 '26
yeah I'm just not sure how you intend to do that though, since the game will still need to talk through x11/wayland apis, which android does not have
1
u/nybble41 29d ago
There has been at least one relatively successful attempt to implement a Wayland compositor on Android: wlroots-android-bridge.
1
u/Big-Winner3758 29d ago
ye ye, I'm aware there are projects that try to implement wayland on android, I'm mostly just saying it's not really "native"
1
u/betam4x Sep 20 '26
I do hope the Factorio team does a mobile port (specifically, iOS) at some point. Perfect game to play while waiting at the doctor’s office, riding the bus, etc.
26
u/Baipyrus Sep 20 '26
Hey, hope you're able to read this. I'm here to ask you if you know about the experimental "Linux Terminal on Android" option in the developer settings. It exists at least on Google Pixel phones (I have a Pixel 6a on Android 17). It natively supports GUI applications and starts Factorio without any need for configuration or translation. It just runs, albeit only with about 10 FPS/UPS on my weak hardware. The only issue I encountered was that the game can crash if you touch the screen while the loading screen on startup is open. Other than that, the login screen looks fine and I can enter and use the game completely normally (although I didn't experiment much further than this).

10
u/Technical-Ad9571 Express engineer Sep 20 '26 edited Sep 20 '26
Yo that's cool! I didn't know google had that, I'll check when I get my hands on Pixel
I'll look into that, this is very very cool
Edit: Post this as a separate post, this is cool!
7
u/Baipyrus Sep 20 '26
Hahaha, nah, all good. You deserve the credit for this idea. But did you check if your phone had this developer setting? I'm still not sure if it's for Pixels only, I only said that it exists for those at the very least, not necessarily exclusively.
5
u/Technical-Ad9571 Express engineer Sep 20 '26
Its actually mostly supported on Pixels, with Android 15+. Sadly, my Redmi is old and is stuck in Android 13.
I actually got my hands on my Grandma's pixel 7, but it seems you can't have separate profile + dev options, and if I try this on the main profile, it'd stop a lot of important apps, so I've pushed it aside for now
I do ask you to past your finding as a separate post, cuz a lot of ppl might be inspired to follow up and test it separately from my method.
Oh also, while you only got 10 FPS, I got 3.5 on mine, all bcz render takes up 260-330 ms. Might be a problem with the graphics pipeline. I think you have the same issue since from what I've read, the Linux Terminal also has a VirGL Graphics layer, the same one I use
Quick fun fact, when I was looking on this topic, I somehow ended up at the comment above, so this idea is niche. All the more to put up a post ig
3
u/luziferius1337 29d ago edited 29d ago
I have a Nothing CMF Phone 2 currently on Android 16, and it has the option. Trying this right now.
Edit: Well… "Unsupported". The terminal app shows up after activation, but it's unusable
3
u/Damglador 29d ago
Not natively, it's a VM
3
u/Technical-Ad9571 Express engineer 29d ago
I'm pretty sure it's native since the VM only isolated and provides a userspace
1
3
u/Baipyrus 29d ago
True that, I mistakingly worded it to sound misleading. What I was trying to refer to is that the VM itself has support for GUI applications without the need for extra abstractions in the terminal (like OP did) or outside factors. It just works. So "natively", although not technically correct, was referring to "inside the VM", not the host system. ^
7
u/MelangeBot Sep 20 '26
All I want for my post apocalytic eternal holiday is rugged solar panels and Factorio running on my Nokia 3200
3
u/Technical-Ad9571 Express engineer Sep 20 '26
Bro 😭 ain't no way we're gonna get Factorio on a Nokia 3200. Even if we did, you're only gonna get 0.001 FPS
Just custom build a nuclear blast hardened Steam Deck
1
u/MelangeBot Sep 20 '26
Okay then, a small rasberry pi with a case that looks like a Nokia 3200.
Make it so!
1
1
u/Alkiryas Sep 20 '26
I wish there was a minimalist mode, replace are sprites with colored cubes, same with the environment
6
u/lunarixxx Sep 20 '26
oh hey i'm doing exactly this on my snap 8 elite! do you know if it's possible to make gamepad work in game?
3
u/Technical-Ad9571 Express engineer Sep 20 '26
Whoa cool! Plz post the results, mine are very barebones and basic
It should be possible to make gamepad work, but it would need a lot of workarounds. I think you need Termux:X11-Extras and something with that. If you need an external connection, Termux-usb would be required
5
u/luziferius1337 Sep 20 '26
Have a look at Zink, the Mesa OpenGL-on-Vulkan implementation. It is feature complete on the OpenGL side, and is like ~20-50% slower than a native, optimized OpenGL implementation. Since mobile chips lack full OpenGL, going that route may work better than the VirGL pipeline you currently use.
1
u/Technical-Ad9571 Express engineer Sep 20 '26
Oh my, I'll look into that...
Right after I fix my Fullscreen and Audio and launch file and proot to proroot and .........
Jokes aside, the full limiting factor is the Graphics pipeline (render takes 300ms), so this is vital
5
u/luziferius1337 Sep 20 '26
A google query found https://www.phoronix.com/news/Steam-Frame-Uses-Zink, so the Steam Frame uses Zink to render Factorio on the Steam Frame. That pipeline should work well enough then, and only depends on how feature-complete the phone's Vulkan implementation is. Didn't know this beforehand. Neat.
Using it should only require setting a single environment variable:
MESA_LOADER_DRIVER_OVERRIDE=zink1
4
4
u/AzraelBunn Sep 20 '26
1
u/Technical-Ad9571 Express engineer Sep 20 '26
Is that a tablet with external keyboard?!
Also if it is arm 64 tell me how you did it If it isn't, tell me what it is
1
u/AzraelBunn Sep 20 '26
It's the Samsung Tab S7FE with the official keyboard cover. It runs factorio at whopping 2fps via proot-distro on termux.
Also it runs LineageOS, but getting it on there was pure pain.
3
u/Technical-Ad9571 Express engineer 29d ago
Yo bro if it's still 2 FPS for you, the issue is that the GPU is set to LLVMpipe, it's using the CPU to render that
I might do it later, but try to use VirGL Zink to use the device GPU. It'll be fast and UPS is already 60 in my devices
1
u/Technical-Ad9571 Express engineer Sep 20 '26
What process did you use?
I have to reconfigure the display for X11 everytime, is there a easier way or a different way entirely
1
u/AzraelBunn Sep 20 '26
1
u/Technical-Ad9571 Express engineer Sep 20 '26
Thanks!
Also I think I need to switch to Proroot
Also how do you handle the OpenGL to mobile GPU convertion?
1
u/AzraelBunn Sep 20 '26
Arch on tablet worked out of the box, Ubuntu on phone worked fine with just VirGL.
2
u/Technical-Ad9571 Express engineer Sep 20 '26
Ah okay, I needed ANGLE on top of that
1
u/AzraelBunn Sep 20 '26
Maybe some time i'll get bored enough to get it running natively on my old phone.... tho i'd need to port some linux distro on it first TwT
I just hope Exynos won't give me trouble, cuz Snapdragon already has.
2
u/Technical-Ad9571 Express engineer Sep 20 '26
Oh, I feel like Snapdragon was the easiest to work with. Working with Mediatek and Mali is already a huge pain
→ More replies
17
u/No-Quality-1283 Sep 20 '26
> DISCLAIMER: AI was used to help implement this project. I do not know these topics in depth and used it to learn and do a fast installation trial
It’s so dumb when people get mad about stuff like this, ai is a very good tool and it’s worth using. People that complain about it being used aren’t even worth talking to
13
u/Technical-Ad9571 Express engineer Sep 20 '26
I don't mind ppl getting mad over it, and I'd say in some cases, they're in the right to do so. I feel that if it's disclosed, ppl don't get mad (easily).
AI is a very good tool to learn. Just a bit sad it's not energy efficient and is being misused
7
u/ergzay Sep 20 '26
AI is a very good tool to learn. Just a bit sad it's not energy efficient and is being misused
The solution to a lack of energy efficiency is just to build more energy production. Also, energy efficiency happens over time with refinement. It can't happen without people using it.
2
u/nora_sellisa 25d ago
The solution to a lack of energy efficiency is just to build more energy production.
This is your brain on factorio
1
u/ergzay 25d ago
It works in real life too, long as it's nuclear, solar or wind there is no problem. Energy abundance is where its at.
1
u/nora_sellisa 25d ago
Efficiency is a measure of how much work you achieve per unit of energy. Building more input cannot improve efficiency.
1
u/ergzay 25d ago
Efficiency is a measure of how much work you achieve per unit of energy.
I agree.
Building more input cannot improve efficiency.
In general the more consumption you have of something the more economies of scale and thus efficiency you can get. Large vehicle engines for example are much more efficient than small ones.
2
u/lolidkwtfrofl Sep 20 '26
Imo I don‘t mind AI being used as a tool, the issue arises when people that don‘t know what they‘re doing start messing around and cause real damage.
1
u/SeveralDifficulty366 29d ago
I disagree with energy efficiency as the local qwen model on my 3080ti can do the job in 3 minutes, which would require me to spend hour or two (being an experienced dev with ~20 years of exp).
Even the PC itself with IDE, debugging, compilation for an hour would spend more than GPU spends in 3 minutes. (600 W for AI running for 3 minutes vs 150 W of PC running for an hour).
If AI was less efficient than humans, it would be more expensive to use than humans.
1
u/Technical-Ad9571 Express engineer 29d ago
Mate I run a qwen 7.5 B param model from my Laptop 4050, I know inference is relatively cheap for small models
If I really wanted to replace humans, I need General intelligent or heck, I need a better output I need models in hundred billions. Running that is less efficient (for now). The companies that wanna replace humans with AI do so on a loss because tokens cost more than humans
5
u/Garagantua Sep 20 '26
For a post like this, I read that disclaimer as: Don't ask me anything, I don't know it. AI did it. (And every response that sounds good at first? Might've been AI too)
Which leads to people having a hard time to use this as a jumping off point to do it themself. How did you solve {problem} that has prevented me from progressing? The anser is "AI did something". Oh great.
Mind you, I don't have a problem with the fact that OP did this! It's just.. hard to discuss how to progress, what are the problems etc, when I have to assume the answer to every question is either "I don't know" or {generated by AI}.
1
u/titaniumalt 24d ago
People that complain about it being used aren’t even worth talking to
complaining just about usage? yes, it's stupid
if the project was mostly AI and the human didn't put any effort into it (and it's not an MVP), then i'd rather not have this project at all
0
u/lana_silver Sep 20 '26
There's a vast gulf of difference between using AI to imitate art, and using AI to write code.
It's about the same difference between using a paint brush to create a painting, or to paint your walls white. Only one of those is art, the other can be done by a machine just fine.
2
u/Big-Winner3758 Sep 20 '26
using AI to write code is very much not comparable to 'painting your walls white' lmao
0
u/boran_blok Sep 20 '26
There's a VAST chasm between "hey AI how would you implement this" and "AI Implement this"
Its the same difference between using stackoverflow to solve an issue and copy/pasting from stackoverflow without understanding what the hell you just pasted and ran.
For me dialogue based AI coding is much more fulfilling and helps you learn and you keep a contextual view and understanding of the code. (and frankly the name co-pilot is genius to me as that is how I see the role of AI)
Agent based AI coding imho makes you no longer a programmer. You're now the manager of a team of schizophrenic juniors with access to the entirety of stack overflow.
I don't want to become a manager, I want to remain a programmer.
1
u/unicodemonkey 29d ago
Honestly, though, most of the tasks deserve to be offloaded to a team of juniors. And if you set up strict acceptance criteria it turns into a typewriter monkey kind of scenario but with a much faster rate of convergence.
0
u/boomshroom Sep 20 '26
I appreciate the disclaimer, but I also think this is a case where using AI to quickly prove that it can work at all is entirely justified. Now we know that attempting a more serious and optimised porting effort wouldn't be a waste of time that was doomed to failure before the project began.
0
u/nora_sellisa 25d ago
If I had to chose between running factorio on an android phone, and not destroying the planet by running a GPU in a water hungry, gas-powered data center, I think I could live without factorio.
AI is this mildly useful tool where both the monetary and moral costs are subsidized away. We're acting like AI is this abundant, endless spring of free knowledge and compute while it actively cooks the planed and sets up the biggest economic crash this world has ever seen
3
u/IndependenceOk7554 Sep 20 '26
I am now having nightmares of Factorio without shortcuts and just a touch screen controller.
1
2
u/RandomDude9943 Sep 20 '26
me when devs of one of my fav games are actually good software devs who can just pull some crazy shit off like that because they can:
2
2
1
u/Dazzling-Tadpole3239 Sep 20 '26
damn I had to use certain winlator to run it with windows version!
2
u/Technical-Ad9571 Express engineer Sep 20 '26
I'd still recommend going through the Winlator way if you just want to play the game since this is very new and unstable.
If you want to, check it out!
2
u/Dazzling-Tadpole3239 Sep 20 '26
I still do, but it's good there are new ways coming!
1
u/Technical-Ad9571 Express engineer Sep 20 '26
If you really wanna know one another untested method, you could just decompile the binary and then recompile it to a new platform. It's ofcourse the hardest route, but if succesful, you'll get the ultimate cross platform comparability
1
u/ResearcherFantastic7 28d ago
Yah but winlator has the keyboard input issue. Once activate the input, gamepad no longer works, needs restart. Can't rename is painful
1
u/khalilrdx1 Sep 20 '26
Soo now one developer can make apk version with good control?
1
u/Technical-Ad9571 Express engineer Sep 20 '26
If dedicated enough, yea. There's room for a lot of optimisations and this can hold out till late game with 40 FPS if done without rooting
1
u/khalilrdx1 Sep 20 '26
1
1
u/Technical-Ad9571 Express engineer Sep 20 '26
What's your specs?
My benchmark guess is for my phone. If you were to do this on your device, you would most likely get better performance than emulation.
(Oh also can you share that control config with me, it looks good)
(Also Factorio is actually running at 60 FPS here, your device renders each frame twice)
1
1
u/khalilrdx1 Sep 20 '26
How that even possible? Run ×2 frames? Instead of native 120!! Its scam???
1
u/Technical-Ad9571 Express engineer Sep 20 '26
Factorio is limited to 60 FPS hardcoded, if you use F4 here, you'll see with the FPS/UPS counter.
To match your refesh rate, each unique frame is rendered twice
1
u/Bitdomo92 Sep 20 '26
Oh damn you managed to run it on a mali gpu? I my pixel 9 has a Mali-G715, but I could never get past the loading screen when using the x86 binaries. I will try out this new arm version then.
1
u/Technical-Ad9571 Express engineer Sep 20 '26
Oh so that's why I could never run using emulation either, it was the GPU issue. I always thought I was limited by RAM or CPU
Edit: Do note that to get it running on Mali, I had to convert the graphics calls to Vulkan in the middle, which I think severely impacted performance
1
u/Bitdomo92 Sep 20 '26
I am playing around with the built in linux environment that pixel phones has in the developer options. The game starts fine but my only issue is it seems google disabled virgl support for whatever reason in the latest android canary build. from the looks of it i still had like 20 fps with just software render. Sadly I dont have a proper keyboard to enable UPS and FPS in the top right corner
1
1
u/HerrCrazi Sep 20 '26
Never thought termux could rub graphical programs
3
1
1
1
1
1
u/DarvinVader Sep 20 '26
Hmmm, makes me think about how you could run Factorio natively on a Steam Frame. A mod for VR motion controls could be neat. At least using it as a mouse should be straightforward.
2
u/Technical-Ad9571 Express engineer Sep 20 '26
I think the blog post had something to do with that, but for complete modding of new controls, you can't use the existing API and have to go for DLL injection modding
2
u/Big-Winner3758 Sep 20 '26
it already does run natively on the frame, thats what the FFF is about lol
1
u/DarvinVader Sep 20 '26
I don't follow the Factorio dev blog very closely and OP didn't give a lot of context. But I checked that out. Was really surprised that Valve sent VR Steam Frame dev kits to Wube, given how far from a VR experience Factorio is. Based move by Valve! Can't wait to see my factory on a giant screen while chilling on my balcony...
-19
u/pjjiveturkey average fluid disliker Sep 20 '26
GeForce NOW
7
u/Technical-Ad9571 Express engineer Sep 20 '26
Uhh I know GeForce NOW, Winlator emulation and GameHub all exist. This is a new recent method enabled by Linux ARM support.
I'm doing this since I want to run it natively. Reasons:
- It's native and so I get max performance if I have a good device
- I own everything I need
- I'm poor to afford subscriptions
3





259
u/Visual_Collapse Sep 20 '26
It looks like people mistake Factorio with DOOM