Skip to content
This repository was archived by the owner on Jul 14, 2024. It is now read-only.

Latest commit

 

History

History
127 lines (83 loc) · 4.37 KB

README_EN.md

File metadata and controls

127 lines (83 loc) · 4.37 KB

Translated from Chinese Simplified by ChatGPT 3.5.

Use Code on Your Android Tablet(code-server

简体中文

README简体中文.md

What is this repository?

This repository is actually the source code of an Android WebView application with a shell, which points to http://127.0.0.1:8080/.

I created this project because I felt that the existing solutions for running code-server on Android tablets, which involve emulating a local Linux server and running code-server on top of it, had interfaces that were not very appealing. Therefore, I created an Android WebView shell application that adapts to unconventional screen sizes, hides the navigation bar but not the status bar, to address this issue. This can save time for those with the same requirement.

If you have any suggestions or feedback regarding this repository, please feel free to submit issue(s) or PR.

How to use?

Initial Configuration

Download the Termux app from F-Droid: https://f-droid.org/en/packages/com.termux/

In the Releases section of this repository, download the 8080 app, or you can compile it yourself.

After the download is complete, open the Termux app and enter the following command to select the mirror for Termux:

termux-change-repo

Then enter the following commands to install OpenSSL and the Ubuntu environment:

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

Then, enter the following command to start the Ubuntu environment:

./start-ubuntu.sh

Once inside the Ubuntu environment, enter the following command to download and extract code-server:

apt update && apt upgrade

Please note to replace the angle brackets and their contents with the corresponding version number, for example: wget https://github.com/coder/code-server/releases/download/v4.15.0/code-server-4.15.0-linux-arm64.tar.gz.

wget https://github.com/coder/code-server/releases/download/<VERSION>/code-server-<VERSION>-linux-arm64.tar.gz

Please note to replace the angle brackets and their contents with the corresponding version number, for example: tar -xvf ./code-server-4.15.0-linux-arm64.tar.gz.

tar -xvf ./code-server-<VERSION>-linux-arm64.tar.gz

Move to the extracted directory:

Please note to replace the angle brackets and their contents with the corresponding version number, for example: cd code-server-4.15.0-linux-arm64/bin.

cd code-server-<VERSION>-linux-arm64/bin

Enter the following command to set a temporary password for accessing code-server:

Please note to replace the angle brackets and their contents with your desired password.

export PASSWORD="<PASSWORD>"

Start code-server:

./code-server

Open the 8080 app that you downloaded from this repository and enter the password you set to access code-server.

Subsequent Usage

Open Termux and execute the following commands:

./start-ubuntu.sh

Please note to replace the angle brackets and their contents with the corresponding version number.

cd code-server-<VERSION>-linux-arm64/bin

Please note to replace the angle brackets and their contents with your set password.

export PASSWORD="<PASSWORD>"
./code-server

Then open the 8080 app.

Additional Notes

  • Since Termux stores files in a private directory (data/data), non-root devices cannot access it. Therefore, you can install various server management tools in the Ubuntu environment, such as SSH or web-based tools, to manage files.

  • The permanent password for code-server is stored in the password field of the ~/.config/code-server/config.yaml file in the Ubuntu environment. To change the permanent password, you can modify the value of the password field.

  • All configurations for code-server are stored in ~/.local/share/code-server instead of within code-server itself. Therefore, upgrading or changing code-server itself will not result in configuration loss.