Termux-Java
Termux-Java copied to clipboard
Android 11 termux java fixer
Hi! After install java not working, error: "Bad system call" I write this script and fixed this issue:
#!/data/data/com.termux/files/usr/bin/php
<?php
$jdk = '/data/data/com.termux/files/usr/share/jdk8/bin';
$bin = '/data/data/com.termux/files/usr/bin';
$files = opendir($jdk);
while($file = readdir($files)) {
if(is_file("$jdk/$file") && file_exists("$bin/$file")) {
$script = file_get_contents("$bin/$file");
$script = str_replace('exec', 'proot -0', $script);
file_put_contents("$bin/$file", $script);
echo "Fixed $file :-)\n";
}
}
This script writed on php, install php( pkg install php ) and proot ( pkg install proot ) and run this script :-)
this is not fixed :< this is a replacement
Hi! After install java not working, error: "Bad system call" I write this script and fixed this issue:
#!/data/data/com.termux/files/usr/bin/php <?php $jdk = '/data/data/com.termux/files/usr/share/jdk8/bin'; $bin = '/data/data/com.termux/files/usr/bin'; $files = opendir($jdk); while($file = readdir($files)) { if(is_file("$jdk/$file") && file_exists("$bin/$file")) { $script = file_get_contents("$bin/$file"); $script = str_replace('exec', 'proot -0', $script); file_put_contents("$bin/$file", $script); echo "Fixed $file :-)\n"; } }This script writed on php, install php( pkg install php ) and proot ( pkg install proot ) and run this script :-)
How do I run the script? Saved this as java_install.sh and ran, got this:

Thxs, it worked !
Hi! After install java not working, error: "Bad system call" I write this script and fixed this issue:
#!/data/data/com.termux/files/usr/bin/php <?php $jdk = '/data/data/com.termux/files/usr/share/jdk8/bin'; $bin = '/data/data/com.termux/files/usr/bin'; $files = opendir($jdk); while($file = readdir($files)) { if(is_file("$jdk/$file") && file_exists("$bin/$file")) { $script = file_get_contents("$bin/$file"); $script = str_replace('exec', 'proot -0', $script); file_put_contents("$bin/$file", $script); echo "Fixed $file :-)\n"; } }This script writed on php, install php( pkg install php ) and proot ( pkg install proot ) and run this script :-)
How do I run the script? Saved this as java_install.sh and ran, got this:
You should run it like that : php ur_file_name.whatever
Hi! After install java not working, error: "Bad system call" I write this script and fixed this issue:
#!/data/data/com.termux/files/usr/bin/php <?php $jdk = '/data/data/com.termux/files/usr/share/jdk8/bin'; $bin = '/data/data/com.termux/files/usr/bin'; $files = opendir($jdk); while($file = readdir($files)) { if(is_file("$jdk/$file") && file_exists("$bin/$file")) { $script = file_get_contents("$bin/$file"); $script = str_replace('exec', 'proot -0', $script); file_put_contents("$bin/$file", $script); echo "Fixed $file :-)\n"; } }This script writed on php, install php( pkg install php ) and proot ( pkg install proot ) and run this script :-)
How do I run the script? Saved this as java_install.sh and ran, got this:
You should run it like that :
php ur_file_name.whatever
it shows me this