Skip to content

Droidian

Droidian is a GNU/Linux distribution based on Debian for mobile devices. The goal of Droidian is to be able to run Debian on Android phones.

This is accomplished by using well-known technologies such as libhybris and Halium.

A lot of people say this approach is wasting time, but I am pragmatic. If running the original driver blobs from Andoid make my phone go vroom, I will. The alternative is some random Android ROM or the five year old stock OS.

The images I tried do not work. Some do not boot, some sit in the lock screen of phosh waiting...

I bought a OnePlus 6 (enchilada from now on). It was repaired... poorly, nothing broken just a general lack of attention to detail. The screen is not the original and it may be a headache. But, after I fixed the many problems it had, it seems to work fine. So I will use this device and will document how to get droidian built from the ground up with no previous knowledge on Android, custom roms or Linux/Halium/...

I have a PinePhone, and I do not use it because the "mainstream" Linux phone, the promise of a Linux phone for the masses, is a nightmare to use. Images often do not work, you have to try multiple to find one that works. Or worst, they were removed and are now gone. Troubleshooting is hard. Documentation is made for people that already knows how to make it work. And the device is SLOW, so slow that I wonder if it registered the press after 10 seconds of waiting with nothing happening and no feedback. Storage is limited to 16GB, so like 6 apps. Apps are not optimized for a phone, are slow, have tiny UI, or just don't even open. The broken promise. Otherwise a fantastic tinkering device. Just with a battery sucking thingy that tecnically can make phone calls. I know what I spent my money on, and I do not regret it.

Then we go to the main discussion point, Halium (propietary binary blobs) or mainstream (upstream kernel / drivers). In other words, a hacky way to run linux on an Android phone with Android drivers, or a hacky way to run linux on an Android device. By hacky I mean, unsupported, problematic, overly complicated way that may work.

And then there is the distro choice.

  • PostmarketOS based on alpine.
  • NixOS-Mobile great if it works, easy to add packages if they already exist. Very hard if they do not exist.
  • Mobian for upstream Debian.
  • Droidian for Debian with Halium.
  • Lindroid. A fork of Droidian that just strips the name off the code.
  • SailfishOS for Xperia devices, which may be the best attempt at Linux on mobile there is, and is cheat!!
  • UBPorts using Ubuntu with Halium.

After that there is the device choice, or lack thereof

  • Android phones with good support in mainstream Linux or, at least, published binary blobs for using Halium.
    • https://wiki.postmarketos.org/wiki/Devices
    • https://wiki.debian.org/Mobian/Devices
    • https://devices.droidian.org/#/devices
    • https://docs.sailfishos.org/Support/Supported_Devices/
    • https://devices.ubuntu-touch.io/
  • Android phones used by companies to run linux based distros
    • Gigaset GS5. Hard to find.
    • Sony Xperia
  • Librem 5. Expensive.
  • PinePhone. Slow.
  • Jolla
  • Volla. Expensive.
  • Xperia for Sailfish. Again, currently may be the best experience.
  • FuriLabs FuriPhone. Future phone.
  • Mecha Comet. Future phone.
  • Some others that popped out of nothing and got nowhere. Including but not limited to multiple scams.

And finally there is the community.

  • It sucks because there is no apps. There is no apps because nobody uses it.
    • Excuses are plenty. You can have two phones, use the web version, have an android emulator, find alternative apps, alternative services, ...
    • People will happily replace apps and services when migrating from Android to iPhone (and viceversa), because it's worth it!
  • If it runs binary blobs it is not worth my time.
    • Choose one of the following:
      • Free as the wind and somewhat working on a very limited number of ~~phones~~ devices. No spyware, but basic cpu drivers, no gpu drivers, no modem drivers, no camera drivers, etc. Yes, not all devices have this limitations Muppets mimimi GIF.
      • Mostly free with some blobs like the modem. Limited to a few devices, maybe less than 10, some of them previously mentioned.
      • * Binary blobs and Linux. Anything that has published binary blobs should™ work. That means camera, audio, sleep, gpu, battery, modem, calls, gps, etc working as well as in Android but you get to use Linux instead of some random Android build. I'll go with this.
      • Binary blobs and Android from a custom ROM. Which is ok, until the last maintainer changes phones.
      • Binary blobs and Android with a sprinkle of spyware from 20 companies and no security updates since 2018. Good luck!
      • iPhone. Which is a valid choice.
    • If you won't help, don't complain.
  • I will wait for a Linux phone with XYZ.
    • And in waiting, stayed.
  • There is no security in Linux. Android isolates all apps, and files, and the kernel, and the devices, and yada yada yada. And Apple security model is the best because of attestation, and signatures, and complete control over the entire ecosystem, and yada yada yada.
    • HAHAHAHAHAHA. You can make Linux not run a single line of code that has not been approved by 200 security experts. It would be stupidly hard to make anything work, but it can be made.
    • Linux can verify integrity, encryption at rest, isolate apps, forbid syscalls, forbid access to hardware, manipulate syscalls on the fly, enforce security for syscalls, forbid access to files, and so many more things. The most secure devices run an OS based on Linux/Unix/Derivates because you have complete control to ~~secure~~ lock it down as you please.
    • Android is limited by Google, iOS is limited by Apple, Windows is limited by Microsoft, Linux is not limited by anything other than your ability (time, knowledge, resources).
    • Why would you spend time ~~securing~~ locking down a device that can not reliably make phone calls. Make it work first, then we can perfect it.

Talk is cheap, send patches.

And if you still want to give it a shot, the documentation is insufficient, old, unmaintained, wrong, and expects you to be a proficient hacker of Linux, Android, kernel drivers and a programmer. Some support channels are still active, and nobody documents anything said in them. Most user posts / videos / comments about Linux on mobile are just people flashing a random image into the phone that happens to work.

But, Linux on mobile is actually used much more that one would think. There are a bunch of people that have a Linux phone. May not be their main phone, but they use it.

Excuses are plentiful, solutions are hard and documentation is lacking. I will change that.

To me, the ideal Linux phone would be:

  • Halium for Android Binary Blobs / drivers so you can use any cheap android phone that publishes binary blobs.
  • Custom reusable patches per module (camera, modem, audio, etc) to make everything modular and easy for others to use, fork and improve.
  • Wayland, podman, waydroid, flatpak for easy app sharing.
  • And a PhoneD system that handles everything related to what makes a phone a phone (modem, audio, gps, sensors, ...). Like systemd. I know, I know, but systemd works for 99% or systems, especially embedded ones. You go write your init scripts while I watch a movie.

I am documenting the stupidly complicated process in build.


Sources


Bad documentation