Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 11 termux java fixer #59

Open
XopmoH97 opened this issue Jul 11, 2021 · 5 comments
Open

Android 11 termux java fixer #59

XopmoH97 opened this issue Jul 11, 2021 · 5 comments

Comments

@XopmoH97
Copy link

XopmoH97 commented Jul 11, 2021

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 :-)

@NTT1906
Copy link

NTT1906 commented Jul 23, 2021

this is not fixed :< this is a replacement

@Legit-Das
Copy link

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:
Screenshot_20211028-093607_Termux

@Chaikew
Copy link

Chaikew commented Nov 14, 2021

Thxs, it worked !

@Chaikew
Copy link

Chaikew commented Nov 14, 2021

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: Screenshot_20211028-093607_Termux

You should run it like that : php ur_file_name.whatever

@Legit-Das
Copy link

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: Screenshot_20211028-093607_Termux

You should run it like that : php ur_file_name.whatever

Screenshot_20211126-030537_Termux
it shows me this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants