Making a mobile chroot practical


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.

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

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.

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.


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 used.at 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.

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.

Released 2017-02-12. Link to this page. Tags: practical, proot, android, sailfish, kindle, fh, mobile, phone, debian, android, sailfish, jolla, vnc, proot.

Other posts using the same tags

FunnyHacks season 3 returning - 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 loads ...
s3, fh
Jump starting: Which lead first? - 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.https://www.youtube.com/watch?v=iaLmIc-3zZYThe answer is that ...
batCar, carBattery, car, battery, explosion, fh, jump, start, jumpStart, shortCircuit
Audio switch - The basic ideaHook every audio source to every audio output in an easily switchable way.http://www.youtube.com/watch?v=FLQPZP69RtQSeries vs ParallelChoosing whether to hook things up in series or parallel affects the impedance of ...
fh, s1, audio, switch, series, parallel, fh9
Biscuit Reloaded - *read in batman voice*The quest is nearing its end. But first we must eliminate more wrong biscuits.Biscuit! WHERE IS SHE?... it!2PS: I just re-read this... It will make absolutely no ...
biscuit, offTopic, wrongBiscuit, fh
Pimped granny stroller - Today I show you how I pimped up a granny stroller to help me out during a tough time in my life.https://www.youtube.com/watch?v=5sVqhHbTJeIWhy?I broke my collar bone, which meant I couldn't ...
pimped, hacked, granny, stroller, fh, s3
Running a laptop off AA batteries - A big thankyou to david at lifehacker for featuring this episode!The basic ideaSo you've done all the little optimisations to make your laptop last an extra half hour. Wireless is ...
laptop, AAs, alternate, power, volts, amps, battery, pack, s1, fh, series, parallel, fh10
Tarp Parachute - Technical details - 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 risks, ...
tarp, fh, s2, funnyhacks, tech
Pin hole camera - 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 ...
fh, misc
My Sabbatical - I'm nearing the end of my sabbatical, and I did stuff! Here's an ultra short summary of what I did.https://www.youtube.com/watch?v=Ik_-ft0GoO0Polishing projectsThis phase was to get my open source projects that ...
Converting an RC car to a boat - 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 ...
fh, s1, boat, fh6, magnetCar, car, rc
Back lit LCD - part2 - Today I show you how to get some extra brightness on your LCD in the sun.https://www.youtube.com/watch?v=_AJVCS5RlnAThis is part 2 where I repair a mistake I made in part 1 and ...
lcd, practical, fh, s3
YEEEEEE HAAWWWWWwwww! - Slow mo RC car - 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 /3DMounthttp://www.youtube.com/watch?v=42VkVBO4lcMFor the ...
in3D, fh, s2, rcCar, 3DMount, puddle, shingle, splash, banjo, slowmo, wildcard
3DMount - Capturing 3D footage - 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 ...
3DMount, two, cameras, techniques, steroscopic, separation, anaglyph, convergence, point, 3D, funnyhacks, talky, in3D, fh, s2
Tablet mouse - Today I show you an adapter I made that converts a tablet into its own mouse. https://www.youtube.com/watch?v=MwqozQ-fDv8This is basically the insides of a mouse, with a drastically shortened cable and all ...
tablet, mouse, fh, s3
Mass - Intro - Well over a year ago I introduced mass, which is a tool for managing large numbers of servers. It's come along way in that time, and it's well and truly ...
massIntro, achel, fh, software, mass, sabbatical
Demolition derby soccer with rc cars - You'll see in this episode that it was more about action than destruction. Over an hour and a halfs footage went into about 9 minutes, so it's all action :)http://www.youtube.com/watch?v=pUmW83aWsN0There ...
fh, s2, funnyhacks, demolition, derby, soccer, rcCar
Running a cellphone and camera off AA batteries - The basic ideaIn this episose I power a camera and phone using a 3 battery batterypack. This hack is basically the next step after this. In this edition I've also ...
cellphone, mobile, phone, AAs, battery, batterypack, fh, s1, camera, cellPhoneBattery, fh8
Tarp parachute - Our first tries - 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 ...
tarp, funnyhacks, tarpaulin, parachute, first, tries, , fh, s2, wildcard
Fixing a defective head torch - Here I make a defective torch useful using a simple modification to stop the straps from falling off.http://www.youtube.com/watch?v=DdcgrwIoCt4In the original design it's very easy for the strap to slide to ...
head, torch, fh, repair, flaw
Turbocharged fly swat - 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.https://www.youtube.com/watch?v=qzmM19550gMThis episode really hits on the ...
fh, fly, swat,
3D Sync - Tech talk part 2/2 - 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 ...
3DSync, tech, adapter, sync, fh, s2, 3DSyncTech1
Tablet: More info - Today I show you more details with making the tablet.http://www.youtube.com/watch?v=a-LBQUXBOo4Battery dockGluing without making too much messPlanning the layoutStock softwareAuto loginTouch screen calibration
tablet, build, fh, s3
3D Mount - Technical part 1/2 - Recording 3D footage on two 2D cameras can be quite challenging. In this episode I go through the technical details of making it happen.http://www.youtube.com/watch?v=8Cj7mPtbu6oAdjustmentI found making things loose and then ...
3DMount, fh, funnyhacks, s2, in3D, two, cameras, mounts, adjustment, see3D
Repairing and improoving a radio controlled car - The basic ideaBring the legend of an awesome radio controlled car back to life, and make some improovements along the way!http://www.youtube.com/watch?v=67nmq5xhxrsRisksIf you actually use your radio controlled car, you've got ...
fh, s2, in3D, rc, car, fast, traxx, repair, improovements
3D Mount - Technical part 2/2 - This is part 2 of 3DMountTech1 where I talk about the technical details of recording 3D video. Here I continue that with information about rendering the video.http://www.youtube.com/watch?v=MInnJ43cdd4
3DMount, fh, funnyhacks, s2, in3D, two, cameras, mounts, adjustment, see3D, crosseye, polarized, glasses, interlaced, sidebyside, alternatve, interleaved, 3DMountTech1
Season 3 update - As mentioned here, FunnyHacks is coming back. We're now days away.http://www.youtube.com/watch?v=ugPDuawRNvwThe last few weeks have been spent doing documentation, discovering little things that needed tidying and generally making this stuff ...
fh, s3, update, cow
Syncronising 3D footage - When you create 3D footage from two sources, there will be issues getting the two sources in sync. This episode is all about getting that 3D footage in sync, and ...
fh, s2, in3D, sync, 3D, cable, adaptor
Windows 95 insanity - 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 ...
win95, nostalgia, fh
DoneIt - Intro - DoneIt is a time tracker for working out where your time is going.http://www.youtube.com/watch?v=AetzOZAwi5YFor me there were a few things I wanted to achieve with itBe able to say what I've ...
achel, software, fh, doneItIntro, doneIt, sabbatical
Home made parachute! - Further "experimentation" :D - 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 ...
tarp, parachute, tarpaulin, fh, funnyhacks, s2, wildcard
Prototype tablet - Today I show you the semi-working prototype of the final tablet.https://www.youtube.com/watch?v=4roWEexPGvsWhile I made prototypes of many parts, this was the only one bringing everything together, and there was still learning ...
fh, tablet, prototype
Where is FunnyHacks going? - Over the last while it has been becoming increasingly apparent that I'm simply trying to do too much. So let's address that.https://www.youtube.com/watch?v=WJfmZr7e98sThis post coversWhere is FunnyHacks going?Where has it been?Life ...
fh, next
How secure is your lock? - Today I reassemble a doorlock that was replaced after our flat was burgled. The result surprised me!https://www.youtube.com/watch?v=Iiotn7p-d4EVerifying the resultsTo confirm my results, I compared this lock to a new lock ...
fh, repair, understand, security
Season 3 has a date - 03/03/2014 - 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 ...
update, s3, fh
Achel - Introduction - Achel is a programming language that I have been working on for the past 13 years (I said 12 in the video, it has been a long time!) There has ...
fh, language, achelintro, achel, sabbatical
Box - Tech talk - Today I talk about the technical details of making the bike box work.http://www.youtube.com/watch?v=lFGBY3QYCcA
box, bonus, tech, fh, s2, box, tech, doggy
Repairing and optimizing an old radio controlled car - tech details - In this episode I discuss the technical details of repairing and improving a really old radio controlled car. http://www.youtube.com/watch?v=WOVCY-o_ZdwThe most important change was the battery since the old one wouldn't ...
fh, s2, in3D, rcCar, lipo, battery, repair, optimize
ColouredWeb - Intro - 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 ...
achel, colouredWeb, fh, sabbatical
Tarpaulin parachute - The basic ideaAs 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 reality was ...
fh11, fh, in3D, tarpaulin, parachute, rope, shackle, s2
Laptop AAs revisit - Today I answer questions about running a laptop off AA batteries.https://www.youtube.com/watch?v=vkhyOVcxUIEIt seems to be necessary to remind you that as with all hacks, don't do this on anything you can't ...
laptopAAs, AAs, s2.5, fh, miliamps, volts, amps, capacity
Building a tablet from a netbook - 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 ...
s3, eee, laptop, convert, translucent, glow, blue, fh
Carphone - The basic ideaImagine 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. Well that's ...
fh, s1, fh1, car, phone, cellphone
Mass - For when you want to look like a hacker from the movies, but actually do something useful! ;) - http://www.youtube.com/watch?v=dPUHCjfkiicMass 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 ...
funnyhacks, software, fh, mass
Repairing the circuit board of an RC car - If you're really going to use a radio controlled car, it will break from time to time. Doing maintenance and repairs becomes essential if you don't want to pay stupid ...
rcCar, fh, s2, fix, circuit, solder, dry, joint, intermittent, reception
Jumpstarting a cellphone - Today we bring another unreleased episode from the archive to show you how to charge a phone that is too flat to charge.https://www.youtube.com/watch?v=ebplWZgfP0gOverviewThe basic idea of this is to charge ...
fh, s2.5, jump, jumpStart, phone, charge, batter
Tablet: Lots of photos and info - 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 ...
tablet, build, fh, s3
Running a cellphone on AAs - This remains one of my favourite hacks. It didn't make it into the show simply because I blogged about it before I started the show.It's really simple: find out what ...
cellPhoneBattery, old
Permission to do stuff - 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 ...
copyright, fh
Dog eyes - 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.https://www.youtube.com/watch?v=2DkUe37AlDISadly I don't have ...
dog, eyes, bike, box, koala, fh, s2.5
Driving a car on the ceiling - 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.http://www.youtube.com/watch?v=fcXJ0CqWb-0What ...
fh, s1, fh4, car, rc, boat, magnets
Headphoning a phone - The basic ideaModifying 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 that hard. ...
fh, s1, phone, headphones, fh7
Bike box - 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 ...
bike, bikebox, fh, s2, talky, awesome, conversation, starter
3D Sync - Tech talk part 1/2 - I've been refinining capturing 3D footage for quite a while now, and my adapter for syncing the cameras was a big part of that. There's a lot to cover, so ...
3DSync, tech, adapter, sync, fh, s2