The goal is to get a full Linux environment running on minimal power in something like a mobile phone or very small tablet.
Q: What's a full Linux environment? A: For the purposes of this discussion, we'll say it's a well supported distribution running with a conventional window manager, good enough CPU, RAM, disk, screen, keyboard and mouse to do normal day-to-day task including development.
Q: So what is minimal power? A: Let's say a max of 5W, that is 1A at 5V. Why? Because that's the sort of power you can get from conventional Power Packs, so enabling long off-grid usage.
Q: So what is good enough CPU? A: From playing with many devices, anything fairly recent seems good enough. Specifically, a single core running at 1GHz is good enough to run Linux well.
Q: So what is good enough RAM? A: At 512MB things can swap, 1MB or more is good.
Q: So what is good enough disk? A: Enough to install a fully featured environment and have space to play. Let's say that is at least 8GB, preferably 32B or more (200GB is now quite affordable but often unsupported).
Q: So what is good enough screen? A: I have 3.5“ going, it's too small! 5” is probably minimally acceptable, anything over 7“ is probably going to take too much power so 7” is probably the sweet spot.
Q: So what is good enough keyboard/mouse? A: Any conventional bluetooth keyboard is probably good enough. There are a couple of links at the end for stuff I like.
So let's go through all the options:
I picked up a paperwhite 3 (7th generation) on eBay for £30 so this had to be worth a go. The main instructions are here. They are pretty confusing as they are old and outdated, what's more the old system images have been removed. However, for the paperwhite 3 there are other instructions here. This gets you to a rooted paperwhite running the latest software (currently 220.127.116.11). The installation of KUAL is convoluted, but then quite a bit of other stuff is easy.
This gets you to a root account you can ssh into/out from using kterm. To complete the job I need to work out how to port standard Linux packages, others have done it quite a bit is it is possible but hard work…
Being root you can set up a chrooted installation of Debian - I haven't had time to do this yet.
The Rasperry Pi is great, I love them and have lots. The main choice is between the tiny and low powered Raspberry Pi Zero W and the top dog Raspberry Pi 4. If you want all the specs then you want the Raspberry Pi comparison table and Raspberry Pi 4 comparison. The development enviroment is great, all that is missing is the screen.
They are fairly easy to set up, and they sit nicely over a model B. Rasbian has defaults for small screens that are a good starting point. However, the screen size is really small, it's a real strain to read and too small to do any work. The screen update is also very slow, perhaps because it's via the GPIO.
Conclusion: 3.5“ display is just too small.
The standard 5” is HDMA, such as this for £23.78. The resolution is 800×480 which is just about acceptable, given all the constraints.
TO DO: Reconfigure and measure power consumption. Informally it seems to be too high.
A basic kindle has a 6“ eInk screen, potentially big enough and has very low power consumption, but it's black and white. To match the power consumption I used a Raspberry Pi Zero W with a cheap OTG hub for a small keyboard/mouse and for USBnet to connect the Kindle and Pi (this way we don't need wireless on either device, which keeps the power down).
On the Pi Zero W:
On the Kindle Paperwhite 3:
These bits I haven't finished:
This is likely to be the least power solution for a full on Linux distribution.
“apt install xrdp” on the Raspberry Pi and “RD Client” on Android gives a full independent desktop on Android. However, it transmits bit images which are slow over WiFi. There may be optimisations where only certain windows are displayed on Android, but that is not what I'm after.
This works well (I used VNC viewer from RealVNC). As above, I haven't yet tweaked screen resolutions.
The main choice here is to root or not to root. As a useful rule of thumb, if your device is capable of running TWRP then you should go that route. If it's not then you can spend a lot of time trying to root without sucess. Also, if you can exploit a backdoor to get root then a malicous app could do the same - worth thinking about if you are going to trust your Android device with you Google account credentials.
Whilst Android is based on the Linux kernel, from what I've found it's near impossible to get a custom kernel to boot, and if it does it is very unlikely to support all the hardware as is needed (e.g. USB, WiFi, touchscreen). I've given up on this unless I stumble across a completely working system. The state of the art in this direction is LineageOS which is still Android, but you have control over everything.
I have a way to get a root shell on a Alcatel Joy 1, but don't know how to get a full “rooted” environment from that. TWRP isn't supported so this took a long time.
I have a Nexus 7 (2012) and it was easy to install TWRP. I haven't got any further yet.
The best app depends on what version of Android is running. For modern Android (currently 9) https://userland.tech/ seems to be best. As stands, it's not a full distribution, just a chroot environment for the standard Android kernel to make it look like a full Linux. Also there seems to be the need to use a remote desktop app (such as VNC) to see a full desktop. I haven't ruled this out yet, but it would seem to need a lot more work as may services need root access.
These are generally too heavy and power hungry. The closest option seems to be the Toshiba Satellite Mini l9w which is only 470g for the tablet, but all in comes to 980g. It has the advantage that it is USB charged.
Some tablets run a x86 processor, commonly the baytrail chipset. Linx and Acer seem to be the affordable choices:
a 8” screen is 30% bigger in area than an 7“ and will presumably use 30% more power. The 8” Linx is more than proportionally heavier, probably due to battery.
I mocked up the 7“ Linx using xrdp and a Raspberry Pi. Screen size was acceptable, refresh was terrible but that was xrdp over WiFi.
This may seem like cheating, but it does tick the boxes and it's how my main latptop works. The VM route has the huge advantage that Bluetooth, Wifi, screen rotation, etc should all work.
Thanks to eBay, I have a Acer tab 8 w for only £20 to try this out with. Although the documentation says that it only supports SD cards up to 32GB, it took a 200GB Sandisk card. VirtalBox was easy to get running once I'd updated Windows 10 to the current patch level. Getting xubuntu booted is much harder, at the moment I allocate only 380 MB RAM to VirtalBox and it says “Initramfs unpacking failed: write error” which I assume means it needs more space, at 400 MB RAM VirtalBox can boot if everything else has been cleaned out (i.e. just after a reboot). So far I get as far as the keyboard selection screen, then it all goes blank.
Even if it does work then I'm under the minimum RAM I thought I needed.
./isorespin.sh -i xubuntu-18.04.2-desktop-amd64.iso –atom
mount 18.104.22.168:/home/tonyr /mnt
dd if=/dev/mmcblk1 | gzip > /mnt/mmcblk1.img.gz
That should get you to running system. If it doesn't other useful resources are http://www.linxtablet.co.uk/viewtopic.php?t=2784 cd-rw.org and techradar. Maybe of interest are old notes from Feb 2015.