These days, mobile phones are basically computers. And not just any computer. If you have a smartphone, then it’s the same kind of computer as a regular ol’ laptop. Sure, the two look different, but once you get “under the hood” they look and feel remarkably similar.
I didn’t have a compelling reason—other than sheer curiosity, I suppose—to pop the hood of my Android smartphone until my one and only laptop suffered a severe electronics failure. It was unusable. It wouldn’t boot. (Thankfully, I’ve kept regular backups in an encrypted disk image on an external drive, so I didn’t lose any data.) Not having “a computer” is a really big deal to me, but I wasn’t totally without a computer. I had a smartphone. Necessity being the mother of invention (or resourcefulness as the case may be), I decided to dive into my Android device while I was waiting on my laptop repair.
My mission, which I chose to accept, was to see if I could turn my Android phone into a fully fledged web development console. Lo and behold, I could. And it’s not even that hard, but I did have to do some digging.
That’s because searching the ‘net for phrases like “web development on Android” mostly returns information on how to code and debug websites for mobile browsers, rather than how to use mobile phones as your environment for developing websites. Once I figured out which tools were suited for the task (and my personal tastes), though, everything else fell into place.
Tools for using Android as a development environment
I favor free, small, utilitarian apps that do one thing well, run with as few permissions as possible, and do not have advertisements. This means I looked for apps that could offer desktop-like functionality in the Android operating system. After some trial and error, here are the ones I found and like.
OI File Manager (filesystem explorer)
Pretty much everything on a computer ultimately gets represented as files on a filesystem. So, if you’re going to be writing code, you need to put that code into files. But smartphone interfaces like Android and iOS present you with apps to use, not a filesystem to browse. I have always hated this, in part because it’s just another way for companies to try to own your experience rather than giving you control of it. But also because it’s just downright clumsy given the underlying technology.
Some newer Android systems come with an app called File Manager that does give you some ability to create folders and move files (like the pictures in your Gallery app’s Albums) around. But it’s pretty limited and doesn’t show you all the files on your phone, like the hidden so-called “dotfiles.”
Enter OI File Manager.
This is an free, open-source, drop-in replacement for Android’s filesystem explorer. Using OI File Manager, you can move, rename, copy, and even share a file or batches of files all in one click. Even if you’re not a developer, I highly recommend grabbing OI File Manager, available on the Google Play Store.
VimTouch (source code editor)
Vi or Emacs? Vi, duh. Why? Because it’s small, fast, and available everywhere. Sure enough, an Android version exists, too. And it does what it says on the tin. VimTouch even has handy buttons for frequent commands like writeout (:w) and yank line (yy) to make your small-screen keyboard editing that much less painful.
Screenshot of VimTouch running on an Android phone and displaying an HTML file for editing.
On that note, and while not specifically related to development, I also picked up the Hacker’s Keyboard from the Google Play Store. This is a replacement for the software keyboard that ships with your Android device designed to make special characters often used in programming languages (like brackets or braces) easier to type.
The one drawback is that Hacker’s Keyboard doesn’t work well with TalkBack, Android’s built-in assistive technology for people who are visually impaired. This matters to me in principle, but thankfully I’m not visually impaired, so its failure to integrate with that part of the Android system doesn’t deter me. YMMV.
Alternative: 920 Text Editor
If you’re not already familiar with vim, using it can feel a little alien. In my searching, I also really liked the 920 Text Editor. It’s a more traditional text editor akin to Notepad++, so I grabbed both.
All of my projects are saved in git version control repositories. I need to be able to pull, commit, and push to those repositories. SGit fits the bill. It’s an ad-free, open source, full-featured git client with SSH transport support and even a built-in text editor and file browser, all clocking in at under 1.6MB. I particularly liked that the developer even went through the pains of removing unnecessary permissions from the application in a recent update to SGit on the Google Play Store.
Lyesoft’s AndFTP is a popular general purpose file transfer app that can FTP, SFTP, and SCP files around. Again, I liked that it’s small (1.27MB), feature-rich with its own file browser and transfer resume support, and is ad-free. An easy one-click install of AndFTP from the Google Play Store.
Most Android devices come with the Google Chrome web browser pre-installed. It’s designed to be fast, and it is. If you don’t have an objection to using a Web browser built by an ad-supported company that probably already knows everything about you (as I do), you might as well stick with it.
That said, nothing beats Firefox’s ecosystem of add-ons and plugins. This is even more true for a developer, because one of the many functions conspicuously absent from smartphone Web browsers is a “View source” button. Luckily, View Source Mobile, an add-on for Firefox for Android, restores this vital function to the web browser.
Screenshot of Firefox for Android displaying the HTML source code of a web page using the “View Source Mobile” add-on.
Alternative: VT View Source
There’s also an app called VT View Source which does much the same thing, but runs as a full app instead of a Firefox for Android add-on. It has a few extra goodies like a one-click “Save to file” button. That can be useful if you’re going to be doing a lot of work. You can use Android’s “Share” functionality in your Web browser (whether Chrome or Firefox or some other browser, like the popular Dolphin Browser) to pass the URL to VT View Source and load it up.
In practice, I found that VT View Source didn’t always load the pages I tried to feed it, so I had to go back to Firefox’s “View source” add-on. Nevertheless, it’s good to know this alternative exists if for some reason Firefox for Android won’t work for you.
The main reason this whole task was easier than I thought it was going to be is because Palapa Web Server packages a full LAMP-like development stack into a single, free Android app. Palapa Web Server gives you Lighttpd, MySQL, and PHP all pre-configured. It even offers to install PHPMyAdmin for you so you can create and manage MySQL databases right from your phone’s browser.
Best of all, you can edit the server config files right in the app itself. I took advantage of this to bind both the Lighttpd and MySQL servers to
localhost, for security reasons. By default, turning on the servers will accept incoming network connections from anyone on your network, effectively giving people in-the-know a backdoor into your phone. That’s not good.
Screenshot of the Lighttpd server config screen in the Palapa Web Server app for Android.
Other useful apps
The above apps are core utilities you’ll need to do some programming on your Android phone. Ultimately, the hardest part is working with the incredibly small screen. But even that can be eased by getting yourself a Bluetooth keyboard.
Even with all the above tools, though, my Android phone still felt very much like a smartphone. It didn’t really feel like a computer system in the way I was used to. So, here are the other tools I found and like that really make full use of Android’s Linux roots.
Note that for most of these to be interesting, you really ought to root your phone. If you’re not familiar with the process of rooting an Android phone, LifeHacker’s “Everything You Need to Know About Rooting Your Android Phone” is a good place to start reading.
If you have rooted your phone (it’s worth it), it’s a good idea to ensure you know what apps actually have superuser (“root”) access, and be able to revoke that permission from apps that don’t need it anymore. That’s where a superuser access manager like SuperSU comes in. It replaces the
su binary on your system and pipes requests from apps to use it through it, so that it can enforce restrictions you put on which apps are allowed to use the root user and which aren’t.
Screenshot of SuperSU on Android displaying superuser access rights for the AdBlock Plus app.
I liked SuperSU because it’s a plain and easy, no-frills access manager.
Android Terminal Emulator
Every decent computer system needs a command line. Jack Palevich’s Android Terminal Emulator is that thing, for Android. It’s tiny. It’s colorful. Get it.
Once you explore the command line environment on Android for a few moments, you’ll notice that there’s not actually a lot there. The standard GNU/Linux utilities you’re probably already familiar with just aren’t available. That’s because they’re not installed.
BusyBox is what will give them to you. And, after you’ve rooted your phone, BusyBox Free is the best app package I’ve found for installing them on an Android phone. (It’s open source, too.) Once installed, you’ll be able to do things like
netstat -an | grep -i listen in the Android Terminal Emulator just as you could on any other Linux distro.
Screenshot of a full Linux command line running on an Android phone using a combination of BusyBox Free and the Android Terminal Emulator apps.
Even with BusyBox installed, one thing you’ll still be missing is a stand-alone SSH client for remote logins. That’s where the open source ConnectBot app comes in. It’s basically a terminal emulator, but one that connects to other computers (running SSH servers) and gives you a command line prompt on those machines. This is invaluable if, for instance, you ever find yourself on the move and need to quickly restart your website’s Web server.
Security and privacy essentials
Finally, if you care about your privacy and security (and you should), here’s a few more apps you don’t want to miss:
Orbot (Tor anonymizing proxy)
Orbot is Tor for your Android phone. If you’re unfamiliar with Tor, I suggest you read at least the start of my comprehensive guide to using Tor on Mac OS X.
The good folks who ported it to Android even made a snazzy walkthrough for complete beginners. Check it out.
ChatSecure (Jabber+OTR for Android and iOS)
If you do any serious chatting on your phone, you’ll want to pick up ChatSecure from the Google Play Store. Not only is it a multi-account Jabber client (so it works with Google Talk and Facebook Chat and so on), it can automatically encrypt your chats with anyone else who’s using an Off-The-Record (OTR) chat client, too.
For more apps like this, such as encrypted text messaging and voice calls, check out Open WhisperSystem’s TextSecure and RedPhone. (And if you have an iPhone, or if your friends do, tell them to go try Signal, the free encrypted voice calling app for iPhone.)
I’ve said it before and I’ll say it again: advertisements are malware. Thankfully, AdBlock Plus does a pretty amazing job at getting rid of them. It works best if you’ve rooted your phone, but even if you haven’t, installing and configuring this app by following its easy on-screen instructions can turn those annoying ads in pretty much any app into blank “can’t load this image” squares.
Killing ads means you use less of your data plan (no need to load an ad!), which also saves you money. There’s just no good reason for any Android phone not to have this app. (And hey, there are AdBlock Plus versions for your laptop’s Web browser, too. Hint hint nudge nudge.)
What about you?
I did some serious research, but things change quickly in the computer world. Did I miss an awesome app? Do you have a cool tip for getting the most desktop-like experience out of an Android phone? Share your favorite apps and tips in the comments. :)