A Guide to Setting up a Development Environment on Android Devices
Nowadays phones and tablets are getting more computing power, memory, and storage. As developers, besides using the devices in our daily life or for developing mobile apps, in this guide, I am going to show how you can turn your Android phone or tablet into a programming or development environment for Go, Node.js, Python, and Rust, including setting up a Jupyter Notebook environment that you can use for data analysis and exploration. In practice you may not leverage this kind of setup on daily basis, but who knows it may be useful on certain occasions.
The only Android app that we need to install is Termux which provides an Android terminal emulator and Linux environment application that works directly with no rooting or setup required.
Once installed you should have an Android terminal emulator with bash shell.
Upgrade the packages by running
$ pkg upgrade
Since we will be using it for coding, I strongly suggest you install Hacker’s Keyboard.
For ease of illustration, I will be setting up remote access to Android devices. There are multiple ways to do this. Below I will show you how to set up a VNC server and OpenSSH.
Remote Access — SSH
- Install OpenSSH
$ pkg install openssh
2. To make it simple I will use password authentication. The recommended way of logging in is using public-key authentication.
Use the following command to find out the current user id. You need this for login later. In my case, the id is u0_a196.
Reset the password for the current id
3. Start OpenSSH at port 8022
$ sshd -p 8022