Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I install java runtime on Android device?

I need to install some packages and Linux programs on my android devices. for example I want to use something similar YUM or get-apt command (I know these are Linux Commands) through windows powershell connected to my android device. but it does not recognize these commands. even ADB does not work, e.g. adb update -y is unknown command. How can i do this, is it possible. if the android kernel is linux so I guess there must be a way. I checked this but didnt help me:

Is it possible to install the JDK on an android device?

Thanks

EDITED: I used the link below , thanks to my friend for good answer. this is the command i used :

pkg install wget && wget https://raw.githubusercontent.com/MasterDevX/java/master/installjava && bash installjava

BUT when i run java command it says "Killed". No Idea!

like image 512
Azzurro94 Avatar asked Oct 16 '22 03:10

Azzurro94


1 Answers

Try Termux, a linux terminal emulator for android.A minimal base system is installed automatically - additional packages are available using the APT package manager. You can use following commands to install java8.

  1. pkg install git
  2. git clone https://github.com/MasterDevX/Termux-Java.git
  3. cd Termux-Java
  4. chmod +x installjava
  5. bash installjava

When installed, run java -version to check, if it's correcty installed. After that you can run java using Java command.

like image 75
Buddhika Bandara Avatar answered Oct 26 '22 23:10

Buddhika Bandara