Run Debian on your phone with Debroid

Published at 2015-12-05T16:12:57+00:00; Updated at 2021-05-16

You can use the following tutorial to install a full-blown Debian GNU/Linux Chroot on an LG G3 D855 CyanogenMod 13 (Android 6). First of all, you need to have root permissions on your phone, and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23).

./run-debian-on-your-phone-with-debroid/Deboroid.png

A couple of years have passed since I last worked on Debroid. Currently, I am using the Termux app on Android, which is less sophisticated than a fully blown Debian installation but sufficient for my current requirements. The content of this site may be still relevant, and it would also work with more recent versions of Debian and Android. I would expect that some minor modifications need to be made, though.

Table of Contents

Step by step guide

All scripts mentioned here can be found on GitHub at:

https://codeberg.org/snonux/debroid

First debootstrap stage

This is to be performed on a Fedora Linux machine (could work on a Debian too, but Fedora is just what I use on my Laptop). The following steps prepare an initial Debian base image, which can then be transferred to the phone.

Copy Debian image to the phone

Now setup the Debian image on an external SD card on the Phone via Android Debugger as follows:

Second debootstrap stage

This is to be performed on the Android phone itself (inside a Debian chroot):

Setup of various scripts

jessie.sh deals with all the loopback mount magic and so on. It will be run later every time you start Debroid on your phone.

Entering Debroid and enable a service

This enters Debroid on your phone and starts the example service uptimed:

Include to Android startup:

If you want to start Debroid automatically whenever your phone starts, then do the following:

Reboot & test! Enjoy!

E-Mail your comments to `paul@nospam.buetow.org` :-)

Back to the main site