Skip to main content

How To install Kali Linux (nethunter) On Android (Without root) via proot-distro and install Kali Linux Xfce Desktop On Android using Termux


Kali Linux Desktop



What is kali linux?

Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security , This tutorial isn't only about learning how to install Kali Linux. Okay let's run down what we will be doing 

                      Table Of Content

•Installing Kali Linux Terminal

•Installing Kali Linux Desktop

•Installing Default packages 

•Creating vncserver port

•Closing vncserver port

•Closing multiple vncserver ports 

•Reseting Kali Linux

•Uninstalling Kali Linux 


Okay!!!!

Let's Begin


Requirements:

• Termux  : Click Here To Download Termux

 


Installation: 

 Please you can also copy and paste the commands below 

 
The First thing we have to do is to make sure our repositories are up to date, to do that type the command 


pkg update
 

It is essential to  install proot-distro and wget as we will be installing Kali Linux on proot-distro for easy installation.


 pkg install wget proot-distro


After that we need to add Kali linux rootfs profile to proot-distro list, to do that follow the guidelines below 

 

nano $PREFIX/etc/proot-distro/kali.sh


Paste the following code in it 

 
# This is a default distribution plug-in.
# Do not modify this file as your changes will be overwritten on next update.
# If you want customize installation, please make a copy.

DISTRO_NAME="Kali Linux (nethunter)"

TARBALL_URL['aarch64']="https://kali.download/nethunter-images/current/rootfs/kalifs-arm64-minimal.tar.xz"
TARBALL_SHA256['aarch64']="7e17a35e1528a5efc12bf1bbad00a764d38a5724e2b08a226849c594a3b3f029"
TARBALL_URL['arm']="https://kali.download/nethunter-images/current/rootfs/kalifs-armhf-minimal.tar.xz"
TARBALL_SHA256['arm']="62f07cd260cd31e9a84c25a331f3db0278d9ccdeb648522b69382946acdd8581"
TARBALL_URL['i686']="https://kali.download/nethunter-images/current/rootfs/kalifs-i386-minimal.tar.xz"
TARBALL_SHA256['i686']="e83cd8f57d6128efd64e88b191a1653ff315fffd78c05d536d2b6f63b2e6d49d"
TARBALL_URL['x86_64']="https://kali.download/nethunter-images/current/rootfs/kalifs-amd64-minimal.tar.xz"
TARBALL_SHA256['x86_64']="096290b7229ab81f1ac3b35324a7109dc19f1e2f5bf6aab1ff8254ebc95463ea"

 

Save with Ctrl+o and exit with Ctrl+x 

 

 


 

The next thing we're going to do is install kali linux, to do that type or copy and paste the command:


 proot-distro install kali

After this, you can now successfully login to your Kali Linux with the command:

proot-distro login kali

By default, after installation, Kali Linux on android rootless phone doesn't support upgrade, and that is because of  postgresql as it blocks the upgrade command from working on Kali, to fix this all we have to do is delete the postgresql file, we can delete the postgresql file with this command

rm -rf /var/lib/dpkg/info/postgresql* && dpkg --configure -a

This should fix the error and you can continue with using your Kali as usual
Now, you can update and upgrade kali repository with the command

   apt update && apt upgrade

Select "install package mainter's version " And now you can proceed to using Kali Linux as usual.

Now Install Kali Linux Xfce Desktop On Android :

Requirements:

• Termux  : Click Here To Download Termux

• AVNC :  Click Here To Download AVNC


How To install Kali XFCE Desktop

Login to your terminal with the command proot-distro login kali as shown in the previous article, then upgrade your terminal with the command

    apt full-upgrade

After that, the next thing we're going to do is install udisks2, you can install udisks2 with the command


apt install udisks2 


Now we remove the default udisks2 file and configure a new one, you can do that with the commands below.


Removing

   rm /var/lib/dpkg/info/udisks2.postinst

configuration

    echo "" >> /var/lib/dpkg/info/udisks2.postinst

Now you configure the dpkg file and hold udisks2, you can do that with the commands below.
Configuring dpkg

    dpkg --configure -a

Holding udisks2

    apt-mark hold udisks2

Now we install xfce
After finishing up with all of the procedures above, then Xfce Desktop is now safe for installation, to install xfce you can use the command:

    apt install xfce4 xfce4-whiskermenu-plugin 

 
The command above is going to install xfce, after that we're going to install other utilities like dbus launcher, qterminal, Firefox e.t.c you can simply use the command below to install all utilities at once:

    apt install qterminal dbus-x11 firefox-esr tigervnc-standalone-server kali-themes

Now we can launch vncserver by using the command:


vncserver -geometry 1500x720 -xstartup /usr/bin/xfce4-session 

 Then Create your Kali Linux password
 

After this go to AVNC tap on "+" icon below and fill in the vncserver details


NOTE: geometry size depends on the resolution of your phone





 
 
 

 Installing all default Kali Linux packages:

Now that we have logged into Kali desktop environment we are going to install all Kali Linux tool at once (Note: Please you need to have up to 15gb space on your phone and you need to have up to 2gb data subscription)

Go to termux, login to Kali and type this command:

 

 sudo apt install kali-linux-default 




Closing vncserver:

 
And you can always kill vncserver with the command  vncserver -kill :1(always remember to close vncserver before exiting termux) 

 



How To close multiple vncserver ports:

Okay I have experience a lot of problem with vncserver it creates another port and leave the old one connected (which makes it useless) whenever I forget to close it (you will experience the same issues) if you face this problem you have to ways to fix 

•Change the port number : go to AVNC, long tap on Kali Linux, click on edit and change the port number to the one matching the termux display

•Close all port: if you want to close all port all you need to do is type this command 

 

rm -rf /tmp/

 

When you type this command you will need to restart your Kali Linux type "Ctrl+D" then login in to Kali back  and type the vncserver command startup.The command above will delete the port folder and the port number will start counting from beginning 

 


 OR

 


 

 

 How To Reinstall kali Linux:

If you need help in resetting Kali Linux you can use this command to do so

proot-distro reset kali 

 

How To uninstall Kali Linux:

If you are bored of Kali Linux and want to uninstall  it (maybe to get another os) you can use this command

 

 proot-distro remove kali

 
 That is going to be all for this tutorial, if you have any questions to ask me regarding this article, you can let me know in the comments section below, hope to hear from you soon. Stay safe

Comments

Popular posts from this blog

How To Create a Strong Virus And A Payload with Python 2023

Let’s start by saying that viruses are a little bit anachronistic in 2023… nowadays other kinds of  malware (like worms for example:) are far more common than viruses. Moreover, modern operative systems are more secure and less prone to be infected than MS-DOS or Windows 95 were (sorry Microsoft…) and people are more aware of the risk of malware in general. Moreover, to write a computer virus, probably Python is not the best choice at all. It’s an interpreted language and so it needs an interpreter to be executed. Yes, you can embed an interpreter to your virus but your resulting virus will be heavier and a little clunky… let’s be clear, to write a virus probably other languages that can work to a lower level and that can be compiled are probably a better choice and that’s why in the old days it was very common to see viruses written in C or Assembly. That said, it is still possible to write computer viruses in Python, and in this article, you will have a practical demonstration. T...

How To install Windows 10 in Termux(Without rooting your Android phone)

   Hello guys what's up, Today we are going to see how easily we can run Windows 10 Operating System on Android Phone just by running few commands on Termux and if you will like this post I will also show you how to run the Windows 8.1 and Kali Linux GUI(Without root) on Android using Termux only in an upcoming post so just comment down below if you are interested. This method is quite interesting as this will make you understand how powerful a Linux terminal can be so without wasting any more time let’s start this tutorial. Below you will find all the resources you need and their download links so Download all the files, install, and copy it to your smartphone's Internal or External Storage. Requirements: •ZArchiver : Click Here To Download ZArchiver • Termux  : Click Here To Download Termux • AVNC :  Click Here To Download AVNC • Windows 10 : Click Here To Download The Windows 10 File After download the windows 10 file you need to Install termux and AVNC server...