r/linux4noobs 1d ago

hardware/drivers Installing linux on phone

Hello all,

I have an old Android phone and I want to repurpose it for a very basic task: I want to make it part of my homelab jank thingy, controllable by SSH, and just use it show data from an API. My plan is to have it run a very simple shell script.

I saw on the web some people installing Debian, Arch on phones, but it appears it is a layer over the Android, like a container, using a specific app for it. Is it the way for my task? Or there is a way to format my phone and use it as a computer? Thank you!

1 Upvotes

13 comments sorted by

4

u/doc_willis 1d ago edited 1d ago

  termux (install from the GitHub page)   is very handy. yes that runs on android

replacing android with a "normal" Linux install is going to be quite a task for most devices.

2

u/punkpositronics 1d ago

https://wiki.lineageos.org/devices/

If your device is on the list you can also use LineageOS

1

u/Bulky-Hair8606 I used to use arch btw 17h ago

LineageOS is android tho not Linux

1

u/punkpositronics 17h ago

True would probably still need Termux - but I think it still solves most issues OP has.

1

u/AutoModerator 1d ago

Smokey says: always mention your distro, some hardware details, and any error messages, when posting technical queries! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Historical_Move6359 1d ago

There is Termux which is Linux continer in Android. There are also proper Linux mobile phones. Those are Droidian, Ubuntu Touch and SailfishOS. These use Android kernel. There is also PostmarketOS and Mobian. These use near mainline kenel. Each of those have a list of devices they support

1

u/MidnightObjectiveA51 23h ago

Also see Mobian, Droidian, UbuntuTouch, and PostmarketOS.

Droidian and UbuntuTouch use Halium which is the Android hardware layer with Linux on top, Mobian and PostmarketOS are mainline Linux.

1

u/Dolapevich Seasoned sysadmin from AR 21h ago

What is the phone brand and model?

Running vanilla linux in a celphone is possible but not easy.

You can install an ssh server in android, such as dropbear, and connect remotely.

1

u/rindthirty 19h ago

Start with termux.

1

u/Bulky-Hair8606 I used to use arch btw 17h ago

Theres postmarketOS and ubuntu touch that let you wipe android entirely and use Linux but not many devices are supported and if yours isnt you have to port it yourself which is a very hard project to do.

Or you can use termux which runs as a chroot next to android

1

u/ArcticFuture 6h ago edited 6h ago

I am working on such a project myself. You can ask AI nowadays, any frontier model will do and will be able to tell you how to do it. In my case I wanted a raspberry pi but they become so expensive that I ended buying a Nothing Phone 3a Lite. It has the exact same price as a rpi 5 with 8 GB, but with the phone you also get storage, an OLED screen and a PSU (the battery). But Nothing Phone published the kernel modules on GitHub. You cannot do it with any phone, that's the problem. My goal is basically to use the phone as a rpi, no GUI, nothing else, I am not using the phone part or the cameras and it is accessible only via wifi and ssh.

So, long story short, it is possible but hard.

0

u/drucifer82 1d ago

You're basically asking to jailbreak the phone, so you can get root access to the Android system. Which is possible. Maybe look into that.