Android Development Environment

Setting up a Linux-based Development Environment on an Android Phone

Akinwunmi Oluwaseun
3 min readMar 26, 2018

--

It’s hard living in Nigeria especially if you’re a beginner developer trying to gain the skills you’ll need to get that awesome job, a freelance developer or a remote worker without much resources.

As a Nigerian, you’ll have challenges with power. You’ll have to run predictive models in your head trying to calculate where you’ll have the best probability of getting electricity while carrying your heavy laptop.

In order to do some productive work, you’ll lose sleep and take so many health risks.

Therefore as a programmer and problem solver. I decided to tackle this challenge; Most of the programmers I know use Android devices.

I personally use two so it would be great if I could have a development environment running on Android. I could utilize the phone’s portability and battery capacity to increase my productivity.

After trying different solutions, I was able to set up a reasonable development environment on my phone. I would be sharing my solution in this 3 part series.

Requirements

The first thing you’ll need is an Android device preferably version 7 or higher.

We’ll be needing two softwares for our setup; Termux and Hacker’s keyboard.

Termux (Terminal Emulator and Linux Environment)

Termux is a Linux Terminal emulator. You can run standard Linux programs on it like you would on your linux terminal. It comes with the Debian package installer Advanced Packaging Tools (apt) which you can use to install most of the popular Linux programs out there. As you can imagine, the app is pretty awesome and personally it is my favorite 🐐 android app of all time.

Hacker’s Keyboard

Hacker’s Keyboard is keyboard developed by Klaus Weidner. It has a layout akin to a computer keyboard complete with Ctrl keys, Fn keys, Navigation keys, Esc… It is truly awesome and it is another one of my 🐐 android apps.

Setting up your development environment

Download and Install both termux and hacker’s keyboard.

After installing the apps, open Termux then change your keyboard to Hacker’s keyboard and run the following commands:

apt update
apt upgrade
apt install openssh git tmux vim

After successfully running these commands, try out your new development environment by completing this simple task:

Clone the awesome-mide repo using ssh or https

git clone https://github.com/204070/awesome-mide.git

Launch tmux

tmux

Open script with vim, edit and save changes

vim awesome-mide/script.py
  • Press i to edit the script,
  • Use the arrow keys to move your cursor to the name = “Me” line.
  • Replace Me with your name.
  • Press :wq to save and exit

Run your script

python awesome-mide/script.py

Press Ctrl + D twice to exit Tmux and Termux.

If everything worked fine without any problems that means you have a fully functional awesome mobile development environment.

Okay maybe not awesome yet 😅.

But Congratulations all the same.

In the next part, we’ll go over some basic commands to get started with our IDE.

Ja ne!

Shout out to the developers of Termux and Hacker’s keyboard for creating such awesome apps and giving them out for free. You guys rock.

Please don’t hesitate to give me a round of applause if you’ve found this post helpful by pressing the clap button a few times. It would mean a lot to me 😁.

--

--