Movatterモバイル変換


[0]ホーム

URL:


XDA Forums
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use analternative browser.

Nethunter Problems

Search This thread
By:

_Omicron_

New member
Aug 6, 2023
2
0
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?
 

_Omicron_

New member
Aug 6, 2023
2
0
I found the solution by myself, might help others:

The problem was, that the script files had a dos-format (with CR/LF). So dos2unix did the trick.

Bash:
kali:/data/data/com.offsec.nhterm/files/usr/bin # 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 kalikali:/data/data/com.offsec.nhterm/files/usr/bin # which dos2unix/system/bin/dos2unixkali:/data/data/com.offsec.nhterm/files/usr/bin # dos2unix ./kalikali:/data/data/com.offsec.nhterm/files/usr/bin # dos2unix ./android-sukali:/data/data/com.offsec.nhterm/files/usr/bin # ./kali┌──(root㉿kali)-[/]


Edit: these changes are not persistant, I had to change from CR/LF to LF only for these files in the sources as they are in the apk
 
```[Problem] NetHunter Terminal Error After Installation - Process completed (code 127)



Assalamu alaikum wa rahmatullahi



I m experiencing an issue with the Kali" NetHunter Terminal" application after installing NetHunter on my device.



"Device Information:"

- Device: Motorola Moto G Stylus 5G (2023)

- Model: XT2215-4

- Android Version: 12

- Status: Bootloader Unlocked, Rooted with Magisk



The Problem:

When opening the "NetHunter Terminal" app, I get the following error:

```



data/data/com.offsec.nhterm/files/usr/bin/kali: line 35

(Process completed(code 127) - press Enter)



```



What I ve Done:



- Installed NetHunter App from official store

- Installed NetHunter Bundle via Magisk

- Verified Root permissions

- Reinstalled multiple times



Questions:



1. What does "error code 127" mean exactly?

2. Is the problem from the app or from the kernel?

3. What are the correct steps to solve this problem?

4. Does the device need a custom kernel for NetHunter to work properly?



Observations:

- The main NetHunter app works but Terminal doesn t

- Root permissions are enabled and confirmed

- The device is not officially supported by NetHunter



Any help in solving this problem would be greatly appreciated.



Thank you for your time and assistance!

```
 

[8]ページ先頭

©2009-2025 Movatter.jp