Running VS Code on an Android Device
If you're the sort of person whose phone is their workhorse as I am, then finding a decent IDE for quick edits on code is while a personal choice a bit of a problem as there are not many out there. While I'm not advocating trying to do all your coding on a phone, having access to a familiar interface would make things useful.
With its library of plugins and easy-to-use interface VSCode is the defacto standard for many when editing code such as Ansible, bash or Python.
While it's not supported as an app on Android it is possible with a little tinkering to get it working on your phone.
Termux is a Terminal emulator for Android which doesn't require root, it's available on either the Google Play store or fDroid for download. Once installed you get a local terminal which can run bash, fish, zsh or others and the same tools you use on Linux desktops like ssh, nano, rsync and grep are all available and there is a package management system to pull in other applications
The first step is to install Termux from either the Google Play store or FDroid and launch the application. This will take you to a command prompt.
Install Termux Files
Once installed we need to update the system and install some key filesnnUpdate termux:
apt-get update && apt-get upgrade -y
apt-get install wget -y
apt-get install proot -y
apt-get install git -y
Go to HOME folder:
IF this all went forward ok, we are now ready to install Ubuntu onto the app.
Install Ubuntu on Termux
MFD Gaming has a script which will do the heavy lifting for this and install Ubuntu 20.10 (at the time of writing) into Termux (Link Below) Download script:n
git clone https://github.com/MFDGaming/ubuntu-in-termux.git
Go to script folder:n
Give execution permission:n
chmod +x ubuntu.sh
nRun the script:n
Now just start ubuntu:n
apt update apt upgrade
apt install wget
Install VSCode on Termux
Now Ubuntu is running in Termux the next step is to install the ARM version of VS Code into the Termux environment
Note: To Find the latest version please look at
tar -xvf ./code-server-3.7.1-linux-arm64.tar.gz
cp -r code-server-3.7.1-linux-arm64 /lib/
ln -s /lib/code-server-3.7.1-linux-arm64/code-server /bin/
Open VSCode on your mobilennHaving Installed vscode you can now run the server
nCopy the passcode it generates as you'll need this to log in laternnAlternative method for getting a password
open in Browser on Android Devices
in the browser and paste the passcode generated in the terminal
The reality is I'd suggest that unless you're running this on a Linux Tablet then really it's a bit too fiddly to use as a daily driver however it is a good guide for seeing the power of Termux and what you could do with it.