trite.io - posts

Installing VSCode in Termux on an Android phone

Created: January 20, 2022

Was curious about getting VSCode running on my Samsung Note 9. I have a wireless bluetooth keyboard, so why not.

The process was pretty simple in the end, just needed to figure out a few parts first.

Install steps

Came down to effectively 2 commands (3 if manually checking the installed node version like I am here):

1
2
3
4
$ pkg install -y yarn nodejs python git binutils
$ node -v
v17.4.0
$ FORCE_NODE_VERSION=17.4.0 yarn global add code-server --ignore-engines

The --ignore-engines flag may not have been needed in the end, I’m still a little unclear as to exactly what all it does.

Either way here’s some shots of the install progress on my phone, pkg and yarn installs together probably took about 10-15 minutes, perhaps less:

pkg install command yarn install command

Once installed it’s time to fire up the VSCode server:

1
$ code-server &

It will start and then notify you about a config.yaml file that you’ll need to open for a password when connecting to the server:

starting up vscode

Now opening a browser and navigating to the supplied uri (localhost on 8080 in this case):

vscode browser login

At this point crack open that config file and snag the password:

vscode password

Logging in should show the good old welcome screen:

vscode welcome screen

Hello world in python:

vscode python hello world

Links

Some of the links visited during this, solution largely ended up being a combination of several of these: