Q&A on installing kali Linux on Android phones

This article only provides solutions to problems encountered during installation. To view the installation link, please enter the tutorial page.

tutorial

https://www.hestudio.net/posts/install-kali-on-android-renew.html

some commands

Here I only explain the commands involved in my tutorial. To view the commands of other bloggers’ tutorials, please go to the corresponding blogger’s documentation. To view the usage of system commands, please visit https://www.kali.org/tools/

open command

Every time you enter Termux, you can startkalienter the kali Linux terminal by entering. If you want to enter the kali Linux terminal by default when entering Termux, please browse the article about setting up automatic startup and displaying text in Linux .

VNCServer commands

TigerVNCServer is pre-installed in this system package , if you are not used to it, please replace it yourself. Its common commands are as follows:

change Password
vncpasswd
run vncserver
vncserver
kill vncserver
vncserver -kill
other commands

See https://tigervnc.org/ for details

VNCServer Tutorial

open vnc

Initialize vncserver

This script has a built-in vncserver 1 service, but you still need to set it up a little bit.

Some models may report an error. If this happens, please visit https://www.hestudio.net/docs/kali_for_android.html#%E6%88%91%E5%BC%80%E5%90%AF%E4 %BA%86vncserver%E4%BD%86%E5%9C%A8vnc-viewer%E9%A1%B5%E9%9D%A2%E6%97%A0%E6%B3%95%E8%BF%9B%E5 %85%A5%E3%80%82 Or go to the QQ channel for help

For more vncserver operations, please go to https://tigervnc.org/

Change the vnc password first, otherwise you will not be able to connect!

vncpasswd
run vncserver
vncserver
kill vncserver
vncserver -kill
link to vnc
  1. Open VNC Viewer

VNC Viewer

  1. all the wayNext
  2. Click on the + sign

  3. Set the 4 digits after the link address port as the port number, like this
localhost:5901

The 4 digits after the port are the port number

  1. Save it at last

How to change the port of vnc

TigerVNC defaults 5900+Xto the version number. After restarting, the version number will continue to be assigned to the next digit, which means that we will often modify the port number of the vnc monitor.

If we specify a port at runtime, the port is actually fixed.

vncserver :1

In this case the vnc service will 5901run on the port. If you want to run on other ports, you can change 1 to other values.

If you need to fix an easy way, then we can try to create a script and quickly start it through a fixed port through the script.

echo "vncserver :1" >> /usr/share/vncserver-start
chmod +x /usr/share/vncserver-shart

It :1should be changed to the value you need, and vncserver-startshould be changed to the script name you want (need to be non-Chinese or special characters and not conflict with the original system commands). It can then be quickly started via a fixed port via a script later on.

If you need to make it start automatically at boot, please browse Linux settings to start automatically and display text

I have enabled vncserver but cannot enter the VNC Viewer page.

Because vncserver and the desktop environment have high requirements for device configuration, some devices will kill background processes, and some devices that have been manually configured to implement the tombstone mechanism cannot be used because the background is frozen (you can use a whitelist to ensure that termux is not frozen ). This problem cannot be cured. Some mobile phones that support software floating windows can try to use the floating window to make Termux run in the foreground.

If the performance of your device is low, no matter how you set it, it can’t solve this problem. Please change the device or try to use the official app (Root or brush is required)

Some mobile phones with relatively high configuration often have the highest system version, and Termux has not adapted it, so Termux will suddenly crash.

For Termux compatibility issues, please visit https://github.com/termux/termux-packages/wiki/Termux-and-Android-10 and https://developer.android.google.cn/about/versions/10/ behavior-changes-10?hl=zh-cn#execute-permission

Since Termux is not compatible with Harmony OS, it may not be available for Huawei or Honor users equipped with Harmony OS. In the actual test and user feedback, the Harmony OS 2.0 model (the test device is Honor 9x) can use functions other than vnc, and the Harmony OS 3.0 model (the test device is Huawei MatePad Pro) cannot be installed because the installation script cannot be recognized .

The network card information is not displayed, how to connect to the Internet, etc.

Due to problems such as mobile phone equipment, Termux cannot obtain your network card information, and cannot use some hardware-based functions.

The built-in Firefox cannot be used

This is an official bug. There was no such problem before. It belongs to the official jurisdiction of Kali and has nothing to do with me.

How does this work?

See https://www.kali.org/tools/ for details

what functions does it support

See this picture for details

What functions are supported

file corrupted while installing

Please do not lock the screen or switch the background during installation ! If the installation fails due to the above operations, please clean up the data and install again

If the error is not caused by the above reasons, please visit https://pd.qq.com/s/rvk1vn?shareSource=5 or go to the QQ channel for help

Termux TipsFailed to fetch

When prompted, enter

termux-change-repo

Then refer to the next operation.

How to choose the source when Termux chooses

termux-change-repo

If this page appears, I recommend that users in mainland China use Tsinghua source (the fourth from the bottom) or Beijing Foreign Studies University source (the third from the bottom). And it is best to use touch selection (not the soft keyboard at the bottom) to click on the corresponding text.

If you are using a source configured by yourself, you can click Cancel to close this window

This is the official document provided by Termux: https://github.com/termux/termux-packages/wiki/Mirrors#mirrors-hosted-in-china

report error[Process completed (signal 9) - press Enter]

When Android 12 and above users use Termux, sometimes it will be displayed [Process completed (signal 9) - press Enter]. This is because the PhantomProcesskiller of Android 12 limits the sub-processes of the application, and the maximum number of sub-processes allowed for the application is 32.

Here we take ColorOS 12.1 as an example (other system operations are slightly different)

Enable developer mode

  1. open settings

  1. Open "About phone"

  1. Open "Version Settings"

  1. Click "Version Number" 5 times in a row

  1. Enter your password (if you have one) to enable developer mode.

Open Termux

  1. Open Termux

Don't have Termux? Click here to install

  1. Install Android Tools
pkg install android-tools

  1. Floating window Termux
    takes advantage of the Android 12 feature to make Termux in a floating window state.

Configure wireless debugging

  1. Go to Settings --> System Settings --> Developer Settings

  1. Turn on wireless debugging

  1. Remember the displayed IP address and port, and enter it in Termux under the floating window

For example my IP address is 192.168.0.103:45367then I should enter

adb pair 192.168.0.103:45367

When displayed Enter pairing code:, enter the pairing code link.

  1. Link to adb
    and copy the IP address for future use.

For example my IP address is 192.168.0.103:41249, I should enter

adb connect 192.168.0.103:41249

when the output

* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 192.168.0.103:41249

, it means the connection has been successful.

  1. Set max child processes to be65536
adb shell device_config set_sync_disabled_for_tests persistent 
adb shell device_config put activity_manager max_phantom_processes 65536

Last update 2023.6.23

postscript

My blog https://www.hestudio.net


  1. This script has built-in TigerVNC ↩︎

Guess you like

Origin blog.csdn.net/a18845594188/article/details/131347216