{"id":16538798,"url":"https://github.com/sbabcoc/linux-on-android","last_synced_at":"2025-03-04T00:45:01.585Z","repository":{"id":56746986,"uuid":"407683368","full_name":"sbabcoc/Linux-on-Android","owner":"sbabcoc","description":"How to set up a Java development environment on an Android phone","archived":false,"fork":false,"pushed_at":"2025-02-04T21:10:10.000Z","size":4981,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T06:55:40.047Z","etag":null,"topics":["andriod","arch-linux","eclipse","proot-distro","termux"],"latest_commit_sha":null,"homepage":"","language":"Slash","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbabcoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-17T21:25:25.000Z","updated_at":"2025-02-04T21:10:14.000Z","dependencies_parsed_at":"2024-11-14T12:49:38.384Z","dependency_job_id":"f76222a7-8628-4f26-a28d-0a45a73af988","html_url":"https://github.com/sbabcoc/Linux-on-Android","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbabcoc%2FLinux-on-Android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbabcoc%2FLinux-on-Android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbabcoc%2FLinux-on-Android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbabcoc%2FLinux-on-Android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbabcoc","download_url":"https://codeload.github.com/sbabcoc/Linux-on-Android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241763751,"owners_count":20016162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["andriod","arch-linux","eclipse","proot-distro","termux"],"created_at":"2024-10-11T18:46:50.665Z","updated_at":"2025-03-04T00:45:01.557Z","avatar_url":"https://github.com/sbabcoc.png","language":"Slash","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux-on-Android\nHow to set up a Java development environment on an Android phone\n\n## Revised installation\n\n* Install **CodeBoard** (on-screen keyboard)\n* Install **UserLAnd** from Play Store\n* Launch **UserLAnd** and open Arch Linux (graphical interface)\n* Set random placement option of TWM:\n  * `cp /usr/share/X11/twm/system.twmrc .twmrc`\n  * `nano .twmrc`\n  * Move insertion point down to the blank line following the first set of options\n  * Add line: `RandomPlacement`\n  * Type `\u003cctrl-x\u003ey\u003center\u003e` to save changes and exit\n  * **NOTE**: This change eliminates the step of \"placing\" applications at launch\n* Update package registry:\n  * `sudo pacman -Syu`\n* Install developer tools:\n  * `sudo pacman -S base-devel glibc`\n* Install `man`:\n  * `sudo pacman -S man`\n* Install `git`:\n  * `sudo pacman -S git`\n  * `git config --global user.email \"john.smith@email.com\"`\n  * `git config --global user.name \"John Smith\"`\n  * `git config --global credential.helper store`\n  * `git config --global fetch.prune true`\n  * Perform a \"push\" to GitHub, entering username and PAT (personal access token)\n* Install archive utilities:\n  * `sudo pacman -S zip unzip xarchiver`\n* Install `yay` package manager:\n  * NOTE: This package must be built locally, because no one appears to have published it for the `aarch64` architecture.\n  * https://github.com/Jguer/yay#source\n* Install **Visual Studio Code** via `yay`:\n  * `yay -S visual-studio-code-bin`\n  * Create `code-flags.conf` file:\n    * `nano .config/code-flags.conf`\n    * Add line: `--no-sandbox`\n    * Add line: `--user-data-dir=/home/userland/.vscode-data`\n    * Type `\u003cctrl-x\u003ey\u003center\u003e` to save changes and exit\n    * **NOTE**: This is needed because **UserLAnd** doesn't maintain correct ownership/permissions of file:  \n`/opt/visual-studio-code/chrome-sandbox`\n* Set editor, difftool and mergetool for `git`:\n  * `git config --global core.editor nano`\n  * `git config --global -e`\n```\n[core]\n  editor = code --wait\n[diff]\n  tool = vscode\n[difftool \"vscode\"]\n  cmd = code --wait --diff $LOCAL $REMOTE\n[merge]\n  tool = vscode\n[mergetool \"vscode\"]\n  cmd = code --wait $MERGED\n```\n* Install SdkMan:\n  * `curl -s \"https://get.sdkman.io\" | bash`\n* Install Maven:\n  * `sudo pacman -S maven`\n* Install Gradle:\n  * `sdk install gradle`\n* Install/create Maven/Gradle/GitHub artifacts:\n  * ~/.m2\n    * settings.xml\n  * ~/.gnupg\n    * secring.gpg\n    * pubring.gpg\n  * ~/.gradle/\n    * gradle.properties\n* JDK11, JDK8:\n  * `sudo pacman -S jdk11-openjdk`\n  * `sudo pacman -S jdk8-openjdk`\n* Add exports for **JDK8_HOME** and **JDK11_HOME** to `.bashrc`:\n  * `~/.bashrc`\n  ```\n    export JDK8_HOME=/urs/lib/jvm/java-8-openjdk\n    export JDK11_HOME=/urs/lib/jvm/java-11-openjdk\n  ```\n  \n* Create Maven toolchains configuration:\n  * `~/.m2/toolchains.xml`\n  ```\n    \u003c?xml version=\"1.0\" encoding=\"UTF8\"?\u003e\n    \u003ctoolchains\u003e\n      \u003c!-- JDK toolchains --\u003e\n      \u003ctoolchain\u003e\n        \u003ctype\u003ejdk\u003c/type\u003e\n        \u003cprovides\u003e\n          \u003cversion\u003e8\u003c/version\u003e\n        \u003c/provides\u003e\n        \u003cconfiguration\u003e\n          \u003cjdkHome\u003e/usr/lib/jvm/java-8-openjdk\u003c/jdkHome\u003e\n        \u003c/configuration\u003e\n      \u003c/toolchain\u003e\n      \u003ctoolchain\u003e\n        \u003ctype\u003ejdk\u003c/type\u003e\n        \u003cprovides\u003e\n          \u003cversion\u003e11\u003c/version\u003e\n        \u003c/provides\u003e\n        \u003cconfiguration\u003e\n          \u003cjdkHome\u003e/usr/lib/jvm/java-11-openjdk\u003c/jdkHome\u003e\n        \u003c/configuration\u003e\n      \u003c/toolchain\u003e\n    \u003c/toolchains\u003e\n  ```\n\n* Install `wget`:\n  * `sudo pacman -S wget`\n* Install Bazelisk:\n  * `wget https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-arm64`\n  * `mv bazelisk-linux-arm64 bazelisk`\n  * `chmod +x bazelisk`\n  * `mv bazelisk /usr/sbin/bazelisk`\n* Install `buildifier`:\n  * `wget https://github.com/bazelbuild/buildtools/releases/download/v6.1.2/buildifier-linux-arm64`\n  * `mv buildifier-linux-arm64 buildifier`\n  * `chmod +x buildifier`\n  * `mv buildifier /usr/sbin/buildifier`\n* Install `jed` editor:\n  * NOTE: This package must be built locally, because no one appears to have published it for the `aarch64` architecture.\n  * `sudo pacman -S slang libxt`\n  * `git clone https://github.com/jedsoft/jed.git`\n  * `cd jed`\n  * `./configure --prefix=/usr/local`\n  * `make clean`\n  * `make`\n  * `make xjed`\n  * `make install`\n* Install **Firefox** and its driver:\n  * `sudo pacman -S firefox geckodriver`\n* Disable Firefox sandboxing in `.bashrc`:\n  * `~/.bashrc`\n  ```\n    export MOZ_FAKE_NO_SANDBOX=1\n  ```\n* Open Firefox\n  * `dbus-run-session -- firefox`\n\n\n* Clone the Selenium Foundation repository:\n  * `git clone https://github.com/sbabcoc/Selenium-Foundation.git`\n  \n## Hardware/Accessories\n\n* LG Velvet (LM-G900TM)\n  * Android 11\n  * MediaTek Dimensity 1000C MT6883 2,00 GHz [Number of cores: 8]\n  * Internal memory: 128 GB\n  * RAM memory: 6 GB\n  * 1080 x 2460\n* Pixio PX160 Portable Monitor\n  * 1920 x 1080\n* Folding Bluethooth keyboard/trackpad\n* Zippered hard-sided case for keyboard, cables, and power supply\n\n## Stuff you probably won't need\n\n#### LLVM and CLang\n  * `sudo pacman -S llvm`\n  * `pacman -S llvm-libs`\n  * `pacman -S clang`\n  * `pacman -S python-pip`\n  * `pacman -S cbindgen`\n  * `pacman -S nodejs npm`\n  \n#### To install JDK7 with SunEC support:\n* `pacman -S jdk7-openjdk`\n* Install **SubEC** components from **Linux-on-Android** repository into JDK7\n\n#### To build the SunEC JAR:\n* Install Mercurial (version control client):\n  * `sudo -u scoba yay -S mercurial`\n* ... with which I downloaded the source for OpenJDK 7\n* ... so that I could build a JAR from the SunEC source files\n* ... which I dropped into the jre/lib/ext folder of java-7-openjdk\n* I duplicated the 'libsunec.so' native library from JDK8 to JDK7, which hasn't blown up yet.\n\nNOTE: The ability to drop an unsigned encryption library into the JRE without complaint was more than a bit surprising. Although this required file-system access, this seems like a bit of a security vulnerability to me.\n\n#### To clone the `geckodriver` repo, you need the 'git-cinnabar' extension:\n* Clone and build `git-cinnabar` extension:\n  * `git clone https://github.com/glandium/git-cinnabar.git`\n  * `cd git-cinnabar`\n  * `make`\n  * Add `git-cinnabar` folder to the **PATH**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbabcoc%2Flinux-on-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbabcoc%2Flinux-on-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbabcoc%2Flinux-on-android/lists"}