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

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

Prerequisite :

Installation :

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
And now you can proceed to using Kali Linux as usual.
Now Install Kali Linux Xfce Desktop On Android :
 

Prerequisites:

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

  • sudo apt full-upgrade
After that, the next thing we’re going to do is install udisks2, you can install udisks2 with the command
  • sudo apt install udisks2
Now we remove the default udisks2 file and configure a new one, you can do that with the commands below.

Removing

  • sudo 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

  • sudo 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:
  • sudo 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:
  • sudo apt install qterminal dbus-x11 firefox-esr tigervnc-standalone-server kali-themes
Now you can launch vncserver by using the command:
  • vncserver -geometry 1600×720 -xstartup /usr/bin/xfce-session
NOTE: geometry size depends on the resolution of your phone 
And you can always kill vncserver with the command vncserver -kill :1 (always remember to close vncserver before exiting termux)
 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

I am a seasoned software engineer and passionate tech YouTuber with over 100,000 subscribers. I enjoy exploring emerging technologies and sharing insights with the tech community.

Sharing Is Caring:

0 thoughts on “How To install Kali Linux (nethunter) On Android via proot-distro and install Kali Linux Xfce Desktop On Android”

Leave a Comment