Install VS Code in Android

Visual Studio Code is a source-code editor made by Microsoft for Windows, Linux and macOS. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git.

In this post, we will see how you can install vs code on an android device. We will use one of the most popular android terminals simulation called termux. This will allow you to use all of VS code functionality using your Web Browser.

Here are the steps how you can install :

Step 1 - Install termux

In order to install VS code, you will have to install termux using the following link.

Download Termux

The official release available on the play store doesn't seem to get the packages updated for some reason.

If upgrade command doesn't work on your termux, try to change the default repo by using the command below:

termux-change-repo

Step 2 - Install ubuntu using termux

Enter the following command on termux and ubuntu will start to install on your Android phone

pkg install wget openssl-tool proot -y && hash -r && wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/Ubuntu/ubuntu.sh && bash ubuntu.sh

start ubuntu by firing the following command:

./start-ubuntu.sh

Step 3 - Downloading code server

We will now download the latest release of code server from Github using the following command:

wget https://github.com/cdr/code-server/releases/download/v3.10.2/code-server-3.10.2-linux-arm64.tar.gz

This will download all the required binaries to run VS Code on Server.

Extract the tarball using the following command:

tar -xvf ./code-server-3.10.2-linux-arm64.tar.gz

enter the /bin folder of your code-server installation on ubuntu (running on your phone)

cd code-server-3.10.2-linux-arm64
cd bin

Step 4 - Set up a password and start using VS Code

Setup a password for your VS Code instance using the following command:

export PASSWORD="password"

Launch the code server using the following command:

code-server

Use VS Code in Browser:

When the sever is started successfully go to your Browser and paste http://localhost:8000  in the url bar. Now it will ask you to enter your password. Please enter the password which you have set using PASSWORD variable ( In our case it is 'password' ). After successfull login we can use VS COde in your android phone using any Browser.

Comments

Popular posts from this blog

How to make a Snake game using HTML , CSS and JavaScript

How To Save Money As Student