├── README.md └── install-ubuntu-on-termux.md /README.md: -------------------------------------------------------------------------------- 1 | # Install-Android-Studio-in-Termux 2 | 3 | ## First need to Login to Ubuntu. 4 | 5 | Download and install termux from [here.](https://github.com/termux/termux-app/releases) 6 | 7 | install ubuntu from [here.](install-ubuntu-on-termux.md) 8 | 9 | ## Now login to user in ubuntu 10 | 11 | ## update and install jdk-11 12 | 13 | ```bash 14 | sudo apt update 15 | sudo apt install openjdk-11-jdk -y # or openjdk-17-jdk 16 | ``` 17 | ## GUI Mode (need to Termux-x11 installed) 18 | ### Install Termux-x11 from [here.](https://github.com/termux/termux-x11.git) 19 | 20 | # 21 | ## Setup Android Studio 22 | 23 | ### To use android studio in termux need to some files and steps. 24 | 25 | download android studio linux tar from [here.](https://developer.android.com/studio) 26 | 27 | 28 | Download android-sdk and cmdline-tools from [here](https://github.com/AndroidIDEOfficial/androidide-tools/releases/tag/sdk). 29 | 30 | Also Download build-tools and platform-tools from [here](https://github.com/AndroidIDEOfficial/androidide-tools/releases/tag/v33.0.3) according to your devices `arch`. 31 | 32 | 33 | Now Create `Android` directory in Ubuntu `$HOME` directory 34 | and extract android-studio,android-sdk into ubuntu `$HOME/Android/` directory 35 | and extract cmdline-tools, build-tools and platform-tools in `$HOME/Android/android-sdk/` dir. 36 | 37 | # 38 | Now open terminal and edit .bashrc file . 39 | ```bash 40 | nano ~/.bashrc 41 | ``` 42 | add these lines to .bashrc 43 | 44 | ```bash 45 | export ANDROID_HOME=$HOME/Android/android-sdk 46 | ``` 47 | save it. 48 | 49 | run this in terminal. 50 | ```bash 51 | source ~/.bashrc 52 | ``` 53 | # 54 | ## Now run android studio 55 | 56 | `bash ~/Android/android-studio/bin/studio.sh` 57 | 58 | Cancel setup wizard and uncheck show agin setup wizard. 59 | 60 | Now Android Studio setup is completed. 61 | 62 | ### Note:- there is an error to build apk in this process to fix it use following commands. 63 | 64 | ### to fix aapt2 error go to [this](https://github.com/Lzhiyong/termux-ndk/issues/106#issuecomment-1133898302) link. 65 | 66 | 67 | ### Hope You did it. 68 | 69 | If you encounter any error please first google. 70 | # 71 | **Note:- Layout Manager Not Working.** 72 | **(Tested and Working:- NDK , ADB WI-FI)** 73 | 74 | **to use NDK, download from [here](https://github.com/Lzhiyong/termux-ndk/releases)** 75 | # 76 | ## $Thanks$ 77 | -------------------------------------------------------------------------------- /install-ubuntu-on-termux.md: -------------------------------------------------------------------------------- 1 | # Install Ubuntu in Termux 2 | ## Open Termux and run following commands 3 | 4 | ```bash 5 | pkg update -y 6 | apt install x11-repo 7 | apt install proot-distro pulseaudio 8 | ``` 9 | 10 | ## After installation of `proot-distro` install ubuntu by following cammands. 11 | 12 | `proot-distro install ubuntu` 13 | 14 | ## now login to ubuntu 15 | `proot-distro login ubuntu` 16 | 17 | ## After login run following commands to install `xfce4` desktop Env. 18 | ```bash 19 | apt update -y 20 | apt install sudo gvfs-daemons xfce4 xfce4-terminal thunar-archive-plugin ffmpeg tzdata apt-utils xz-utils vim dbus-x11 21 | ``` 22 | 23 | ## After all installed , Create user and password 24 | 25 | `adduser username` 26 | ### Replace `username` with your username 27 | 28 | ### Now add user to sudoers 29 | `vim /etc/sudoers` 30 | ### add user `username ALL=(ALL:ALL) ALL` below to `root ALL=(ALL:ALL) ALL` 31 | ### now logout from ubuntu by `exit` 32 | 33 | ## After all set login ubuntu to added user 34 | ```bash 35 | pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 36 | proot-distro login --user username ubuntu --shared-tmp --bind /dev/null:/proc/sys/kernel/cap_last_cap 37 | ``` 38 | # 39 | ## That's it for install ubuntu on Termux. 40 | 41 | --------------------------------------------------------------------------------