Recently android devices are very cheap yet powerful enough to replace desktop/PC for every day tasks. For example, a android TV Box powered by A10 1GHz/1GB/4GB proc/mem/disk priced at only Rp 450k-600k, while dualcore procie priced at Rp 750k-850k, still much cheaper and more capable than PC/Net station…
We can set all of those environment development in android, natively. For lamp stack there are bunch of apps, I prefer domestic solution by Palapa Web Server, free of charge, or another domestic product, Bit Web Server, but we need to pay the bill. LAMP here means lighttpd, mysql, and php. Another tool for transporting files, we need ssh server, here I tried SSH Server from Ice Cold Apps. For nodejs, unfortunately no android package is available. You search nodejs, and some come up, but they’re only documentation… Alas, we need chrooted-environment here. I never try chrooted linux on android, so I can’t tell you how and what. But a quick search on Play Store, you’ll get Lil Debi, or Linux Installer, or else, just too much options, just choose one with highest star.
For development, I’d like to run full linux distro on these machine. On mine, A10 1GHz/1GB/4GB I installed linaro 12.10, and debian wheezy. Switching between two distro is easy, swap the external MicroSD and we’re done. Reboot, and we’re on another distro…
This little machine is now my backup machine for webdev projects in local git repos, synced to all machine I have/use.
So, what interesting here is we can fully build, create and package apps just as in normal linux machine, except all in ARM architecture. To make development even easier, I usually download minimal image like pengstick linaro, and complete the package I need later on. Usually I did this in TV Box machine via SSH, but recently I read a way to do the same thing in my current laptop. The key is chroot, and not to forget qemu-arm-static.
I assumed you use Ubuntu, so here are the steps:
- sudo apt-get install qemu-arm-static kpartx
- download linaro, or another distro based on ARM, e.g linaro-server.img
- sudo kpartx -a linaro-server.img
- sudo mount /dev/mapper/loop0p2 /mnt
- sudo mount -obind /dev /mnt/dev
- sudo mount -obind /dev/pts /mnt/dev/pts
- sudo mount -obind /proc /mnt/proc
- sudo mount -obind /sys /mnt/sys
- sudo chroot /mnt
- sudo apt-get uopdate, sudo apt-get install, etc., as you wish…
When you’ve done customizing your image, do sudo umount -a and sudo kpartx -d linaro-server.img
Lastly, transfer your tailored image into MicroSD, and boot from there.