Installed successfully Magisk26.1 and TWRP using WETA-TF5-Kernel on Android 10. Then flashed Kali-generic from twrp. After reboot I can update Nethunter app from F-Droid (2023.3) but not NetHunter Terminal. It fails with "error -8 the new package is requested a shared user which is already installed on the device and does not have a matching signature". I tried to remove the shared user from packages.xml, but after a reboot it remains there. So I got the NetHunter-Terminal-Code from Git and compiled my own. I could install that Version but now when I open the Terminal is shows:
exec("/data/datacom.offsec.nhterm/files/usr/bin/kali"): No such file or directory
I tried around in a SU-Shell and got a strange behaviour. I cannot execute the script from bash, but when I execute all the lines from the script it works:
Bash:
bash-5.2# ls -lahtotal 768Kdrwx------ 2 u0_a238 u0_a238 4.0K 2023-08-25 14:35 .drwx------ 4 u0_a238 u0_a238 4.0K 2023-08-25 14:35 ..-rwxr-xr-x 1 u0_a238 u0_a238 648 2023-08-25 14:35 android-su-rwxr-xr-x 1 u0_a238 u0_a238 1.4M 2023-08-25 14:35 bash-rwxr-xr-x 1 u0_a238 u0_a238 1.0K 2023-08-25 14:35 kalibash-5.2#bash-5.2# ./kalibash: ./kali: cannot execute: required file not foundbash-5.2# cat ./kali#!/data/data/com.offsec.nhterm/files/usr/bin/bash# Version: 1.0.2# export path for android bins/toolsexport PATH=/data/data/com.offsec.nhterm/files/home/.nhterm/script:/data/data/com.offsec.nhterm/files/usr/bin:/data/data/com.offsec.nhterm/files/usr/sbin:/sbin:/system/bin:/system/xbin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/odm/bin:/vendor/bin:.SU1=$(which su)SU2="$SU1 -c $@"# clear out old viewclear# unset things and readd chroot thingsunset PATHunset TMPunset TMPDIRunset HOMEunset LD_PRELOADunset LD_LIBRARY_PATH## Combine android $PATH to kali chroot $PATHexport PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binexport TERM=xterm-256colorexport LANG=en_US.UTF-8export HOME=/rootexport TMP=/tmpexport TMPDIR=/tmpexport USER=rootexport MAIL=/var/mail/rootexport LOGNAME=rootexport SHLVL=1# Lets pass a binky export here too ;)export YOU_KNOW_WHAT=THIS_IS_KALI_LINUX_NETHUNTER_FROM_JAVA_BINKY$SU2 /system/bin/chroot /data/local/nhsystem/kalifs subash-5.2# #!/data/data/com.offsec.nhterm/files/usr/bin/bashbash-5.2# # Version: 1.0.2sr/bash-5.2#/data/databash-5.2# # export path for android bins/toolsterm/files/usr/sbin:/sbinbash-5.2# export PATH=/data/data/com.offsec.nhterm/files/home/.nhterm/script:/data/data/com.offsec.nhterm/files/usr/bin:/data/data/com.offsec.nhterm/files/usr/sbin:/sbin:/system/bin:/system/xbin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/odm/bin:/vendor/bin:.unset things and readd chroot thingsunset PATHunset TMPunset TMPDIRunset HOMEunset LD_Pbash-5.2#bash-5.2# SU1=$(which su)RELOADunset LD_LIBRARY_PATH## Combine android $PATH to kali chroot $PATHexport PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binexport TERM=xterm-256colorexport LANG=en_US.UTF-8export HOME=/rootexport TMP=/tmpexport TMPDIR=/tmpexport USER=rootexport MAIL=/var/mail/rootexport LOGNAME=rootexport SHLVL=bash-5.2# SU2="$SU1 -c $@"bash-5.2#1# Lets pass bash-5.2# # clear out old viewbash-5.2# cleara binky export here too ;)export YOU_KNOW_WHAT=THIS_IS_KALI_LINUX_NETHUNTER_FROM_JAVA_BINKY$SU2 /systembash-5.2#bash-5.2# # unset things and readd chroot things/bin/chroot /dbash-5.2# unset PATHbash-5.2# unset TMPbash-5.2# unset TMPDIRbash-5.2# unset HOMEbash-5.2# unset LD_PRELOADbash-5.2# unset LD_LIBRARY_PATHbash-5.2#bash-5.2# ## Combine android $PATH to kali chroot $PATHbash-5.2# export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binbash-5.2# export TERM=xterm-256colorbash-5.2# export LANG=en_US.UTF-8bash-5.2# export HOME=/rootbash-5.2# export TMP=/tmpbash-5.2# export TMPDIR=/tmpbash-5.2# export USER=rootbash-5.2# export MAIL=/var/mail/rootbash-5.2# export LOGNAME=rootbash-5.2# export SHLVL=1bash-5.2# # Lets pass a binky export here too ;)bash-5.2# export YOU_KNOW_WHAT=THIS_IS_KALI_LINUX_NETHUNTER_FROM_JAVA_BINKYbash-5.2#bash-5.2# $SU2 /system/bin/chroot /data/local/nhsystem/kalifs su┌──(root㉿kali)-[/]└─#
Any advice?