Making a mobile chroot practical
Released on: 2017-02-12


Chrooting to provide a desktop environment on a mobile device is not a new concept, but it is still with it's challenges. This post is about the various successes and challenges I've had so far on the road to making it practical for me.

I've had to restrict the scope of this video to keep the length reasonable. Therefore I have moved some of the topics to the next episode instead.

This episode is about making it practical for me. It is not about whether any particular tool is good or bad, but rather finding the solutions that makes it practical for me.


Image based chroot.

An image based chroot is very convenient since you don't have to worry about partitioning.

Partition based chroot.

This was an effective work-around for devices that aren't easy to use mount -o loop.

App/proot - "Debian".

This looks like it will be a very good solution for many people. It sorts out many details like the display and desktop environment, with options to mess around with DPI and much more.

I had a lot of trouble with performance, and on many devices, never actually getting to the desktop. I suspect these issues are caused by not having enough RAM. Evey device I tried has 1GB.

App/proot - gnuroot/wheezy (Debian)

This has worked really well for me. It gave me almost everything I needed, without root, and without getting in the way.

I say almost everything, because I need /dev/fd (a symlink to /proc/self/fd), which is not present by default on the version of Android that I have. I needed to make this symlink myself in a terminal, and writing to /dev required root. If someone knows a non-root way of doing this, I'd love to hear of it.

App/proot - gnuroot/wheezyx (Debian)

My understanding is that this is the wheezy image described above, plus automatically starting a VNC X server every time you load the terminal. In my brief testing I found myself regularly creating extra X sessions accidentally, each on their own port with their own lock files. It probably wouldn't take a lot of tuning to get this working in a more sane way.

No root needed. - Needed for my purposes.

A new X session via VNC is launched every time a new terminal is opened.

App/proot - gnuroot/gentoo (Gentoo)

I reeeeeeally want to give this another go. Running Gentoo on a phone feels like all the best kinds of dirty, geeky awesome.
I struck several problems while trying to run Gentoo. Several of them I was able to solve with symlinks in /dev. But eventually I ran out of time and the image is sitting there waiting for me to try again.



This was really cool. I always intended this to be for on-call use in the sun. Very early on I replaced the SIM card so it was my own money paying for the internet connection, but a couple of things got in the way of me using this device seriously

I never gained trust in the privacy of the device.

The keyboard is not good for typing on


Samsung T699

This phone had so much potential, and I probably would have continued using it much longer if I hadn't accidentally bought the Motorola soon after. The only real issues I had were the keyboard feel, and the limitation with mounting images.

Motorola Droid 4

I really like this phone. The only reason I stopped using it was because the 1GB RAM just wasn't enough when running apps like Whatsapp along side other apps.


The thing letting it down is the hardware (it was modest even when it was released). I'm actually looking for a way to get back into Sailfish, but on decent specs. In the mean time I'm using it as my on-call phone.

On topic! This phone is awesome for running a chroot because you have native access to everything you need without the need to hack, or work around stuff. If the hardware limitations are ok for you, I strongly recommend sailfish. There are a few Sailfish phones on the market and several community ports to various devices, so I strongly recommend those if there's anything that meets your requirements.

So why did I leave this phone? Keyboard! The on-screen keyboard didn't gel-well with me (Although a co-worker found it to be fine for him.), and using the keyboard over bluetooth was incredibly unreliable to the degree of failing every minute or so.

It also has 1GB or RAM, so didn't perform well with Whatsapp running the official client. There is a native client that ran well, but that eventually got blocked.


I don't have much of an opinion on this. It's a tablet, so doesn't meet my requirements, but the big screen was great for experimenting on.

Le Max 2 x820

With the exception of the Cell radio, I'd recommend this phone in every way for chrooting. The problem with the Cell radio is reliability. It regularly looses reception for 20 minutes at a time, even when in an area where other phones and it would normally have strong reception. I'm making progress in improving this, so will post back if I have something substantial.

Hardware specs.


Easy to root.

Forking a process is slow.

Disk access is moderate.

Reliable Bluetooth support

Unreliable Cell Radio.

Blackberry Priv

This gets an honourable mention because it was very tempting, mostly because of the slide out keyboard combined with mid-range specs (they were reasonable for a short time on release). I never bought this phone because it was locked down to a high degree, meaning that it was going to be difficult or impossible to do what I wanted to do on it.


It turns out that I have a lot to say about this, so it's become its own section.

Bluetooth - Detached fold out

I'm using an iClever (because if you have to say it, it must be true!) branded fold out keyboard. The only challenges with this this particular one is that it's not full size, which leads to typos, and it's got a non-standard layout to get the size down, which leads to many typos. It works well, and is my most frequent choice.

Bluetooth - Slide out

These are the keyboards that form part of the case of the phone. I modified an iPhone one to fit the phone I had at the time.
I found these did not offer any convenience/performance/efficiency benefit. The challenges were

Keyboard/Bluetooth or USB - Laser

This was never as practical as I so much wanted it to be, but it looks so fricken cool! I've actually spent the last hour using it again. It will not become my main choice, but from time to time, I expect I'll pull it out to have a quick play/show off.

The main challenges with it are that there is no tactile feedback, and you have to be incredibly precise  to hit the right key, and even then it often gets it wrong. Double letters are often not picked up.


USB keyboard works well, although I haven't found a small one worth noting as far as portability and still being able to type on it goes.

On-screen - Hackers keyboard

Works well for an on screen keyboard. Excellent for those moments when a physical keyboard is not viable. Full featured.

On-screen - gboard (standard)

Does what it does well, but not convenient or full featured enough for console work.

gBoard in google play.

Not full featured. Lacks

Keys like ~ are at least 1, if not 2 taps away.

Gestures don't work in the VNC clients that I've tried.


I haven't had any interest in hooking up a physical mouse yet; I'm finding the touch screen plenty good enough.

Getting X

VNC server

I'm literally running tightvncserver, and running the window manager in that.

Window manager

Right now I'm using IceWM. It's fast, and the interface works well for a really large scrolling desktop inside VNC.

VNC clients

Choosing the right VNC client makes a massive difference to your experience using a mobile device as a desktop. This is what handles what constitutes a click, double click, right click, scroll, zooming in on that thing that's hard to read, or panning over the desktop to the next task waiting for your attention. Getting this right makes everything feel natural and manageable. Getting this wrong turns a simple task into one of frustration and will ultimately limit your interest in pursuing a mobile desktop.

Even if you follow recipes for everything else, please take the time to experiment with which client is best for you as this will change everything. Here's what worked for me:


This gelled so, so well with me. All of the gestures felt natural. The timings were right. It ran fast.
Unfortunately, with a recent update, they have moved to being more of a centralised/remote service. So now all connections [at least begin by] going through their centralised service, which is useless if you don't have an internet connection at that moment. This is great for remote assistance, but useless for sysadmining and a lot of the interesting possibles that VNC and RDP make possible.


This is my current favourite VNC client. The gestures are almost as good as RealVNC, but more importantly, it works without requiring an Internet connection.


AndroidVNC hasn't gelled quite as well with me yet, and it doesn't perform as well as the other two. However it is open source and the source code is quite extensible. I'll quite likely be providing some updates to this in the future.


Small screen

A small screen doesn't have to be a problem. For example, for a while I was using a Sony Xperia Mini Pro, which has a 3" screen, which was just fine for hand held work. At that size, ergonomics quickly fall down when a desktop viewing distance.

At the moment I'm using a 5.7" screen. But even with this I still zoom into the desktop, which is fine for looking at one thing at a time. I then pan around the desktop to find the different tasks I'm working on. I find this very good for positional association.

At this point, the trade off becomes
((readability vs how much you can see at once) vs what can fit in your pocket).


I recommend a matte screen protector. It will help your eyes relax, and stop you needing to contort yourself on various angles to see different details on the screen.


If your device doesn't stand by itself, it's worth getting a stand, and it may even be worth getting one even if your device does stand itself. It will help with putting the device in a position where you can

Physical Keyboard

A physical makes a massive difference to your experience. It is the difference between the mobile device being a viable desktop replacement, to not being a viable desktop replacement.

1 big thing vs many small things.

As time has been going on, I've been regularly testing whether I'm still better off than taking a laptop with me. So far the balance is still very much in favour of using the phone.

Things I'm considering are

Power bank

This is one of the big pluses for using a phone in place of a laptop. A standard USB power bank can charge it; For every day usage, there's no need to buy multiple power adapters, or carry one with you; A power bank of equivalent size will keep you going for many trips, and is likely to be lighter, especially once you take the cables into account.

I've had a good run in choosing them so far. I suggest doing a google for "Power bank comparison" if you're looking for inspiration.

Application lifetime

Sometimes your OS will clean up stuff it thinks is not actively being used to give you a better experience. I don't have precise information to hand on how these choices are made, but I'm pretty certain it will come down to scarcity of resources; particularly RAM, which is one of the reasons I was keen to have a lot of it on the device I ended up using for this.

One of the consequences of the OS doing this is that sometimes your desktop may not be there any more when you come back to it. A reboot is another cause of this. This has not happened to me many times. In fact, I'm sufficiently confident in my setup that I have once or twice left work unsaved for a few days. I don't recommend that, because no matter how well you have things running, leaving work unsaved is asking for trouble.

A well written application will gracefully handle a gentle kill signal, and you should not loose any work. In reality this won't be high on the priorities for all applications so YMMV.


Trusting 3rd party applications

In the days where the NSA has it's fingers in so many pies, Russian hackers potentially infliuenced the 2016 US presidential election, spyware and randomware are a thing, you need to gain a level of confidence appropriate to the work you intend to be doing. I've done enough research and my own checking to be comfortable with my decisions, but I certainly haven't read every line of code.

Extra factor of authentication

If you use Google Authenticator or a similar token app to be an extra factor of authentication (Ie the thing you have), and you're logging in to something using that token on the device that gives you that token, you may as well not have the token at all, because someone just needs to get your device at the moment that your password manager is unlocked, and they have every piece of authentication they need to be you.

This also goes for people running a token generator in their browser or command line as well.

So. Local vs Remote desktop?


I often have trouble articulating why I find this so cool. There's the convenience of having almost as much as a full desktop always with me. The nostalgia that I now have more power in my pocket than I had available in several rooms of top-notch computers as a kid.

The argument ender is that I have a patchey internet connection for about 40% of my commute, and none for the rest of it. Being able to seamlessly keep working regardless of what the connection is doing is marvelous!


The big advantage of a remote server is that it can have persistent connections to things regardless of the state of your mobile connection. Meaning you can be have apt-get downloading and installing stuff while you go through a tunnel.

Other than that, assuming you want to pay for it, you can scale a remote server well beyond what is possible in a phone right now.


Lost device != data/privacy loss.

Can be started on the fly if an internet connection is available.

On-going cost of the remote machine.

Fast backend internet connection. Your device just needs enough to display the desktop.

External sessions can be maintained regardless of the state of connection on your device.

Local vs remote verdict

For now, I'm thinking that I will have my work stuff (on-call) on a remote server. Since some of my on-call work involves connecting to things and having reliable connections is really useful. And I will generally stay in one place if I get called.

But for personal stuff, local makes more sense because I can seamlessly keep working regardless of whether I'm in a tunnel.



I'm going into more detail about this in a coming episode. But here are some considerations



Do take some time to experiment to find what is good for you.

Physical keyboard.

I suggest doing your own research to see what the current recommendations/best practices are since they may have changed since I last looked. Things to search for are

Some things to consider are


I had to restrict the contents of this post to keep it to a reasonable length. So I will cover the details I missed in subsequent posts. At the time of writing this, there are currently 3 followups to come. By the time they come out, there may be more. I've put a lot of time into this. If it's useful to you, or someone else; send them a link to this page.


It has been liberating to be able to continue my hobbies on my commute, but not have to carry several KGs. It's taken some time to get it right, and it will continue to evolve. But it was totally worth it.

Imported image from the old system
Above: Imported image from the old system

Imported image from the old system
Above: Imported image from the old system

Imported image from the old system
Above: Imported image from the old system

Posts using the same tags

RandomKSandom, the spiritual successor to Funnyhacks has begun....
Intro Chrooting to provide a desktop environment on a mobile device is not a new concept, but it is still with it's challenges. This post is about the various successes ......
Over the last while it has been becoming increasingly apparent that I'm simply trying to do too much. So let's address that.This post covers- Where is ......
Today I show you how to get some extra brightness on your LCD in the sun.This is part 2 where I repair a mistake I made in part 1 ......
I'm nearing the end of my sabbatical, and I did stuff! Here's an ultra short summary of what I did.Polishing projects This phase was to get my open source ......
Today we bring another unreleased episode from the archive to show you how to charge a phone that is too flat to charge. Overview The basic idea of this is ......
Today I dig up another unreleased FunnyHacks episode from the archive. This one is about a fly swat that I've turbocharged with an electric drill. This episode really hits on ......
Today I show you why it matters which lead is connected first when jump-starting a car, and why it's not obvious if you have an electronics background. The answer is ......
Today I show you the semi-working prototype of the final tablet.While I made prototypes of many parts, this was the only one bringing everything together, and there was still ......
Today I show you an adapter I made that converts a tablet into its own mouse.  This is basically the insides of a mouse, with a drastically shortened cable and ......
Today I reassemble a doorlock that was replaced after our flat was burgled. The result surprised me! Verifying the results To confirm my results, I compared this lock to a ......
Today I answer questions about running a laptop off AA batteries.It seems to be necessary to remind you that as with all hacks, don't do this on anything you ......
Today I show you how I did the dog eyes on the bike box. This is pretty much the same method that I used in the koala I don't ......
Today I show you how I pimped up a granny stroller to help me out during a tough time in my life. I broke my collar bone, which meant I ......
Today I show you more details with making the tablet. - Battery dock - Gluing without making too much mess - Planning the layout ......
Here I make a defective torch useful using a simple modification to stop the straps from falling off. In the original design it's very easy for the strap to slide ......
ColouredWeb generates and installs a custom stylesheet that re-colours the internet to make it easier for people who are sensitive to particular colours to use the internet. Here is an ......
Track where your time is going on the command line....
Maintain a single source of truth about your servers across different clouds, and interact with them quickly....
A language for robotics, and more....
Getting the videos done took much longer than I expected, namely because I had a lot more in my head than I realised, which lead to me recording over 6 ......
As mentioned here FunnyHacks is coming back. We're now days away.The last few weeks have been spent doing documentation, discovering little things that needed tidying and generally making this ......
FunnyHacks season 3 is back. I'm taking a break from work to pursue my passions for a few months. As a result, FunnyHacks is going to getting love. I've got ......
Every morning I look up at the ceiling and see a fuzzy representation of the world below. Light hits the objects and bounces off in various directions. Some of it ......
A few days ago I started playing with the idea of trying to post to facebook from a fresh windows 95 VM using only software that I could aquire from ......
Mass is a tool for manipulating lots of servers concurrently. Open up an SSH terminal to each server that maches your request, do the same with cluster SSH upload a ......
This is one of my more impressive looking builds. Not the most complex by any means, but it certainly looks cool. Where ever I take it, I get lots of ......
This is a tablet that I've built from an old Asus Eee 701 I've wanted a tablet for years. My motivation for building one instead of buying one was that ......
Today I talk about the technical details of making the bike box work. ......
Simply put, this is a box to put on the back of your bike and be seen. The response from this one has been amazing. If you were to only ......
One of the biggest challenges of capturing 3D footage is getting the footage syncronised. Sure, you can do it in post production. But on most cameras, you have granularity of ......
Slow mo footage of an RC car in puddles and on shingle. This is simply having fun with a radio controlled car to demonstraight the concepts discussed in 3DMount ......
Recording 3D footage on two 2D cameras can be quite challenging. In this episode I go through the technical details of making it happen. Adjustment I found making things loose ......
3D video is really taking off, and most of my work over the last year has been in 3D. So I thought that it was about time to show how ......
In this episode we are really starting to get somewhere! This was a lot of fun and I hope to get out there again before I leave NZ. We have ......
Today I walk you through the technical details of building the home made parachute.This is a stupid thing to do, so if you have not yet gone over the ......
Most work on this site is licensed under the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license which should allow you to do most of what you'd like to do. (Most ......
This is the first of at least a couple of compilation videos of our progress as we play with different ideas. We've taken literally hours of footage, so these compilations ......
The basic idea As a kid I always wanted to make a parachute. I kept jumping off hedges using a tiny sheet with the hope of sailing down. The ......
The basic idea Modifying a phone so that it can take headphones. The hardest bit about this hack is making it all fit in the phone... So it's not ......
A big thankyou to david at for featuring this episode!The basic idea So you've done all the little optimisations to make your laptop last an extra half hour. Wireless ......
The basic idea In this episose I power a camera and phone using a 3 battery batterypack. This hack is basically the next step after in getting the contacts ......
The basic idea Hook every audio source to every audio output in an easily switchable way. Series vs Parallel Choosing whether to hook things up in series or parallel ......
You may remember the car that could drive on the ceiling. It didn't last very long. So now I've turned it into a boat.This episode was filmed out in ......
Someone driving you up the walls? Get some space and drive on the ceiling instead! In this episode, I show you how to drive an RC car on the ceiling. ......
Radio Controlled models are a ton of fun, but sooner or later they end up auditioning for the trash can. This hack comes to the rescue to salvage all those ......
The basic idea Imagine your phone is ringing and you can't find it. Probably the last thing you want is for it to be quietly driving away from you. ......
Home | About | Contact | Cookies | Risks | Site map