Home / Mobiles / How to Install Kali Linux on Android Step by Step Complete Guide

How to Install Kali Linux on Android Step by Step Complete Guide

How to Install and run Kali Linux on any Android Smartphone

Have you ever asked can you install any linux distro on you’re phone.?

Yes, Android may be based on Linux, but it’s not based on the type of Linux system you may have used on your PC. You can’t run Android apps on typical Linux distributions and you can’t run the Linux programs you’re familiar with Kali Linux on Android.

Linux makes up the core part of Android, but Google hasn’t added all the typical software and libraries you’d find on a Linux distribution like Ubuntu. This makes all the difference. In a nutshell, Linux makes up the core part on Android. Android is a derived part of linux which makes sense with proper guide yes, we can install linux on android smartphones.
Why You Can’t Run Desktop Linux Software on Android
Because Android doesn’t include a graphical X server or all the standard GNU libraries, you can’t simply run Linux applications on Android. You have to run applications written specifically for Android.
Why You Can’t Run Android Software on Desktop Linux

Linux doesn’t include the Dalvik virtual machine, so it can’t run Android apps. The Dalvik virtual machine and all of Android’s other software can’t simply be dropped onto a desktop Linux machine — you’d have to do more work to make Android apps output to a window on a standard desktop through Xorg.

So what are we waiting for lets begin and start installing a Linux based Distro on the Android phone.

In this tutorial, i’m going to use Debian based Kali Linux operating system. The procedure is almost same for Ubuntu too.

Why 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 Ltd.

Kali Linux is preinstalled with over 300 penetration-testing programs, including Armitage , nmap (a port scanner), Wireshark (a packet analyzer), John the Ripper (a password cracker), Aircrack-ng (a software suite for penetration-testing wireless LANs), Burp suite and OWASP ZAP (both web application security scanners).

The developers of Kali Linux aim to make Kali Linux available for ARM devices, We can install and run Kali Linux the hackers favorite os after being replaced by backtrack on our Android devices.

How are we going to run Linux on Android?

Easy, There are a number of free and non-free apps and scripts for Android that allow you to run a Debian Chroot on an Android device.

we have an option of running Linux inside Chroot or outside the Chroot.

Chroot?, A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children”

The scripts start by mounting the Kali Linux image file within the android file system and then mounts the sdcard and if you have it internal memory within the Kali Linux file system.

Chroot is then used to change the root directory to that of the mounted Kali Linux and a bash shell is then opened to allow you to control Kali Linux this is kind of like ‘booting’ the OS.

Things to be done before starting to Install and run any Linux Distubution on Android

  1. Root the device, ofcorse you need a rooted android device.Rooting is a process that allows you to attain root access to the Android operating system code (the equivalent term for Apple devices id jailbreaking). It gives you privileges to modify the software code on the device or install other software that the manufacturer wouldn’t normally allow you to.
  2. Make sure you’re device is running Android 2.1 above.
  3. Check if you’re device supports loop device most of the device does.
  4. Recommended At least 5 GB free space on internal or external storage.
  5. A fast Wireless connection (Optional if downloaded the Linux image manually). I would recommend downloading it manually. which does not give out any errors.
  6. Patience, Yes lot of Patience it took me a week to figure out everything and successfully install Kali Linux on Android. But chances are you can run it without any struggle as you’re reading this article.

Tools and Application you will be required to successfully Install and run Kali Linux and Debug. Just in case something goes wrong.

  1. SuperSu. is the Superuser access management tool of the future 😉 SuperSU allows for advanced management of Superuser access rights for all the apps on your device that need root. SuperSU has been built from the ground up to counter a number of problems with other Superuser access management tools.
  2. BusyBox. BusyBox is software that provides several stripped-down Unix tools in a single executable file. It runs in a variety of POSIX environments such as Linux, Android, and FreeBSD
  3. Terminal Emulator.The terminal (also known as shell and console) is an application in which you can execute commands directly
  4. JuiceSSH. The JuiceSSH is a ssh client used to connect to the Kali Linux by command line interface.
  5. VNC Viewer Android VNC Viewer, free download. Android VNC Viewer Connect to your PC remotely via your Android device. Android VNC Viewer is a nice, free app
  6. Linux Deploy. This application is open source software for quick and easy installation of the operating system (OS) GNU/Linux on your Android device. The application creates a disk image on a flash card, mounts it and installs an OS distribution
  7. Last, The actual Kali Linux Image of size 2.0 GB Compressed (4.5 GB Uncompressed) with all Security tools installed. You can choose the Light OS if  you don’t need security tools pre-installed. Download the File kalilinux.FULL.ext4.20131031.zip
  8. And Linux complete Installer just in case if Linux Deploy doesn’t work.

Make sure all the six Application and Kali Linux img file has been downloaded. Open SuperSu app and Grant root Permission to BusyBox, Terminal Emulator, and Linux Deploy.

Step by Step Guide to Install Linux on Android.

  1. Download kalilinux.FULL.ext4.20131031.zip and extract it to the Desktop using you’re favorite compression tool. Inside this zip file there will be two files name Kali_Linux.img and Kali_linux.img.md5 copy the Kali_Linux.img file to the Android Device.
  2. Create a empty folder in the sdcard or internal storage directory and name the folder Kali put the img file inside the Kali directory. and note down the path where the image file is located you will need it later.
  3. Navigate to Settings on you’re device and to Developer options and enable USB debugging.
  4. Open BusyBox App, make sure you had given the root permission for the all the application downloaded in SuperSu. Terminal Emulator and Linux deploy also need root permission.
  5. Unless you don’t give the root permission for the BusyBox  the Application does not open. Once you’re assigned root permission to the App. BusyBox will start Reading and replace android Symlink click on Install to Replace symlink with BusyBox Application.
    Next, Click on the Install button. Wait until the BusyBox completes its installation and replaces all system symlink with BusyBox links.
  6. Now we are done installing BusyBox. Close the Application but do not Unistall the App it will be useful. Now BusyBox had successfully replaced all the symlinks. Open Linux deploy Application and grant it root permission in the SuperSu.  
  7. Click on the Properties button Bottom Left. which looks identical to the Download button. Next will be promted with series of options regarding the type of Installation you need the important would be the Distribution, Architecture,Distrubution suite and Installation path i would recommend leaving others in default.
  8. Choose the Distribution which in case is we are installing Kali LInux and Architecture which is armhf most of the android is Armhf Architecture devices.
  9. Choose the Image path and set the Image path to the Location where you have moved the Kali_Linux.img File on the Android device. In this case I had moved it in Sdcard/kali/linux/linux.img. Error in the Path does not display any errors please be careful and set the path properly where is img file is present. 
  10. Installation type are of different types directory,file,partition. Chosing partition could make another ext4 partition in you’re existing fat32 partition. Choosing directory could create all linux directory on a android directory so i would recommend Installation type as File. so that it creates only one file which we could delete it if not necessary. 
  11. Distribution suite are of two types sana which was released last year feb. and then rolling which gets update daily day to day basis. rolling is good with lastest softwares and kali tools updates and hence no bug.
  12. As the Image boots up we need to access the machine and as we did not undergo installation procedure linux deploy app simply makes it easier for us to access machine using ssh and vnc server only if we had enabled it.Don’t forget to enable SSH and VNC.Enable mount points to mount android file system on linux.
  13. That’s it in the configuration step now get back. you have two options if you have already downloaded the img file and given the path of the image correct then just click configure and you’re linux should boot up.
  14. if you don’t have the img file which you did not download it before click on install to download the image file which would take more than 10 minutes depending on the wifi speed. (which in case for me was buggy ssh could not start up and i could not get vnc connection that is why i recommend you to download the image file first)
  15. Wait till you get the message Deployed.
  16. Next just simply click on Start to boot Kali Linux. once all the loop device mounts up and ssh and vnc starts without any error. Next step would be simply connect to the Linux System by using VNC viewer or JuiceSSH. I had use JuiceSSH and VNC Viewer for android.
  17. Open Vnc viewer in the Address form type localhost or 127.0.0.1 or the Ip address displayed on the linux deploy. which is 127.0.0.1::5900 type the password aaa2a710 you will get the Graphical User Interface of the Linux system.
  18. To access Linux through terminal use JuiceSSH username is android and password is aaa2a710. type sudo -i to get root on the linux system. Now we don’t need to get our laptop to hack anyone we can just do it using our Android phone make sure you’re carrier provides port forwarding.
  19. Enjoy Hacking and using Kali Linux on android smartphone. Nobody gets to know that you’re trying to hack someone just using you’re android phone. 😀

Conclusion :All the Android devices are not same each device has different options and file systems it took me a week to setup and run Linux on android without any issues I also used bootscript which is from Linux Complete Installer to help figure out the errors Which helped Understand that  was facing the mount problem. Possible errors you might end up with

  1. Cannot execute script because of the permission.
  2. Cannot find the loop device. Loop Device missing.
  3. Cannot create loop device.
  4. Cannot attach img to the loop device.
  5. Cannot mount loop device.

Every problem has a solution. This were the errors I had overcome while installing the linux by downloading and running it manually. Hope you don’t find any of this errors. Feel free to comment below. Ask me if you need the Updated script of bootscript to find out the errors.

 Missed out any steps? Finding trouble? Comment below and we would help you 🙂

About Jay Kumar Ryan

Check Also

miui_theme

How to apply Third Party themes on suspended MIUI Designer Accounts

Recently new rules have been introduced for Theme Designer Account due to which it is …

8 comments

  1. I’m impressed, I have to say. Really rarely do I encounter a blog that’s both educative and entertaining, and let me let you know, you may have hit the nail on the head. Your idea is excellent; the difficulty is something that not enough people are speaking intelligently about. I’m very completely happy that I stumbled across this in my seek for one thing referring to this.

  2. I am usually to blogging and i genuinely appreciate your content material. The post has really peaks my interest. I’m going to bookmark your internet site and maintain checking for new details.

  3. i have to try install hacking tools via net huntet but its failed.plz help me ..
    9553235904 its my whatsapp number

    • Did you download Net Hunter for Nexus? If so it doesn’t work. Please download Net Hunter for OnePlus one.

      Unzip the file and remove the “anykernelzip folder”. after removing,repack the files to zip format using winrar or 7zip.

      copy the new zip file into your sd card or phone storage and flash it using your own custom recovery.

      After reboot you will be booted with Net Hunter. The terminal will open.
      Important : You will lose you’re Existing Custom Rom.

  4. I can’t mount loop device

    • Does you’re kernel Support Loop device? Its very easy to check whether your device supports LOOP Device or not. Just follow the steps:-

      1.open your terminal emulator and go to the root directory. Now type
      cp /proc/config.gz /sdcard/kernel_config.gz

      1. You will find a file named kernel_config.gz on your sdcard root.
      2. Unzip the archive with Winrar or 7zip and open the file inside with any text editor.

      3. Now look for the configure option – CONFIG_BLK_DEV_LOOP=y

      4. If it is written as CONFIG_BLK_DEV_LOOP is not set or CONFIG_BLK_DEV_LOOP=n then your device doesn’t support loop device.

      If Yes, Make sure that the loop device is in suitable format ext3 and ext4 will works. changing it to ext4 worked for me.

      Still facing same issue I’m sure it probably must be the permission issue. Change the permission of the Loop and it should mount.

  5. Sir i am getting mount error….plz solve this..

    • As I have clearly mentioned in the post. If you’re facing issue while mounting loop device, Make sure you’re device supports loop device. You can find loop device by listing in terminal. Eg ls /dev/block/. Let’s say you’re device supports loop device if the problem still exists. It’s likely because of the file system change it to ext3 if the loop device file system is or of any other type. Lastly change the permission of the loop device.

Leave a Reply

%d bloggers like this: