This blog is NOT OFFICIAL website of Kali Linux. We just share Tutorials to learn Cybersecurity.

Kali Linux Easy Installation on Any Android Smartphone

Home
In some condition, in the way of pentest, a client may ask us to do a proper hacking attack in his own field. In that kind of case walking on a office or corporate environment with a laptop in hand may look suspicious, we need something more handy. Some small devices like cell phones or Raspberry Pi and using it to perform some cool attacks on their network.

In this tutorial we learn how we can install Kali Linux in Android smartphone without root and not using PC emulator.



There are many ways to install Kali Linux in android smartphone. If we have rooted android then we can install Kali NetHunter in supported devices, but in the case of non-rooted user there are only few ways are available. We can use PC emulator to install Kali Linux in non-rooted phone, but that process is very slow and PC emulator uses much resources of a phone. In this tutorial we learn an easy process, in this process we learn to install Kali Linux and other Linux distributions in mobile phone and smoothly run them.


Let's start,
We need some apps to install Kali Linux in our mobile phone. Those are
  1. Termux
  2. VNC viewer
  3. AnLinux
This apps are available in play store we need to install all these apps.

kali linux on android

Then first we open AnLinux app and it will open it's dashboard. Like following picture:

kali linux on android


Then we need to choose the Linux distro we want to install. We can install multiple distro without conflict, but here we only install Kali Linux. So we tap on choose and select Kali and click on "OK".

kali linux on android

Then we click on copy. The commands are copied on our clipboard. Then we click on lunch button, lunch button will start Termux app.

Now long press and paste copied commands in Termux and press "Enter".

kali linux on android
Then it will install required packages and one script will download and execute automatically, it will take time depending on our internet speed.

After finishing this step we need to run Kali Linux bash script by using following command:

./start-kali.sh

Now we can see the Kali Linux terminal root@localhost as following screenshot.

kali linux on android

Now we check the Linux distribution by using following command :

cat /etc/issue
kali linux on android

We can see the distro is Kali Linux Rolling.
To check the version of Kali Linux we run following command:

cat /etc/os-release
kali linux on android


Now we can see the version of our Kali Linux in the above screenshot.

In this Kali Linux system we can run any Kali Linux command, but in this distribution we did not get any pre-installed tool, we need to install our tools manually.

Here we update and upgrade our Kali Linux in our Android smart phone. To do that we apply following command:

apt-get update && apt-get upgrade
The screenshot is following:

kali linux on android

This process will take some time. After updating we can install any tool. In this tutorial we install nano text editor as example.

apt-get install nano

Yeh, now we are all done. Kali Linux is in our android smartphone. But it is in command-line interface (CLI). Some of us will prefer Graphical User Interface (GUI). GUI setting up Kali Linux in Android smartphone is very easy.. We need to install a desktop environment. To install and configure desktop environment we need to go go again in AnLinux application and click in the menu as shown in following screenshot.

kali linux on android


Then we need to choose our desktop environment. Then we choose for which Linux distribution we are using. Here we choose Kali Linux.
Then we got list of desktop environments, we choose xface4, this is recommended. Then we need to click on copy to copy those commands to install and configure Kali Linux's xface4 desktop environment.

kali linux on android

Then we open the Kali Linux's CLI in Termux and paste the copied command in clipboard. Here remember one thing we did not pasting the commands in Termux , we are pasting it in Kali Linux , and that Kali Linux is installed under Termux. Then xface4 desktop environment and VNC server will downloaded and configured automatically.

This will download and configure automatically.

kali linux on android


This will download 200 MB of data and almost 700 MB of disk space in mobile. This process also take some time depending on our phones performance and internet speed.

We need to configure between this process, it will prompt for keyboard layout etc, and we need to set the password for VNC server and choose n for no in the in the view-only password field.

After this we can access Kali Linux's Graphical User Interface via VNC viewer application, because this will automatically start VNC server.

We need to open VNC viewer application and we click on the "+" sign to add a new connection.


Here in this field we type the address and display number in our case that is localhost:1 as following:


Then we click on next and type a name for our new computer, choose anything and click on Done.



Then we click on connect. Then we click "OK" in unencrypted connection bar. Next we need to type the password as we set before, then click on done.


Yap it's really done. The Kali Linux GUI will appear in front of us.


But this can't comes with any pre-installed tools, we can add required tools manually. For an example we can install metasploit framework by using following command:


apt-get install metasploit-framework

The screenshot is following:

kali linux on android

Yes we have successfully installed Kali Linux in our non-rooted Android smartphone.

But how to open it again?
We just need to open our Termux and type following command:

./start-kali.sh
Then the CLI version of Kali Linux will open. Then we start the VNC server by applying following command :

vnc server-start
Then we open VNC viewer app and connect with our previous connected computer, and we got the GUI of Kali Linux again atfer typing the password of VNC server.

Sharing is caring.
So please don't forget to share this post.

We can also install Kali Linux on cloud and network follow this guide.
For more follow us on Twitter and Medium.
author-img
Kali Linux

Comments

60 comments
Post a Comment
  • Unknown photo
    UnknownDecember 16, 2019 at 3:06 AM

    Had many issues after this tutorial just before had to rm udisks2 then dpkg --reconfigure for things to work, afterwards i was able to setup the vncserver, when trying to connect with vncviewer am getting connection closed unexpectedly, tried apt-get update && apt-get upgrade but everything seems to be updated with no errors, any ideas what might be the problem? knowing that am prompt to fill the password and right after am getting the problem mentioned earlier.

    Delete Comment
    • Kali Linux photo
      Kali LinuxDecember 16, 2019 at 5:30 AM

      You might be have some error in desktop installation. You can try following commands:

      sudo apt install udisks2
      sudo rm /var/lib/dpkg/info/udisks2.postinst
      sudo dpkg --configure udisks2
      sudo apt install xfce4

      Delete Comment
    • Ryan photo
      RyanJanuary 6, 2020 at 11:26 PM

      Can i connect to other phone which kali is installed with vnc viewer ? If yes how .

      Delete Comment
      • Kali Linux photo
        Kali LinuxJanuary 7, 2020 at 8:31 AM

        Thanks for your comment Ryan..I don't think it's possible in Kali hosted on termux.

        Delete Comment
        • Nasir Bangulzai photo
          Nasir BangulzaiMarch 14, 2020 at 12:40 PM

          Hello dear plz ask me how to hack wifi password on Android mobile phone in kali linux????

          Delete Comment
          • Kali Linux photo
            Kali LinuxMarch 14, 2020 at 2:36 PM

            Thanks Nasir for your comment. This is possible when you are in Kali Nethunter with supported devices. There is another way we can use WIBR+ or some other apps to brute-force WiFi passwords, but it works on only easy passwords.

            Delete Comment
            • Unknown Own photo
              Unknown OwnNovember 25, 2020 at 2:48 PM

              sir vnc server connect nhi ho rha

              Delete Comment
              • Kali Linux photo
                Kali LinuxNovember 27, 2020 at 6:46 PM

                Hey, this is a old method. You can try official kali nethunter-rootless.

                Delete Comment
              • Ryan photo
                RyanJanuary 7, 2020 at 10:00 PM

                Hi again .
                How to get the web browser ? I can't open it .

                Delete Comment
                • Kali Linux photo
                  Kali LinuxJanuary 8, 2020 at 7:02 PM

                  Hey Ryan, here we are using non rooted device.. Then firefox might not work try install chromium by using
                  apt install chromium
                  then run it using chromium command.

                  Delete Comment
                  • Ryan photo
                    RyanJanuary 8, 2020 at 8:04 PM

                    1st my default web browser doesn't work . It said fail to execute default web browser.
                    2nd it wants to install chromium-bsu and after download how can i open it ?

                    Delete Comment
                    • Kali Linux photo
                      Kali LinuxJanuary 8, 2020 at 9:51 PM

                      apply following command one by one


                      apt install chromium
                      chromium

                      Delete Comment
                      • Akki photo
                        AkkiMay 18, 2020 at 7:46 PM

                        Hii....can I get some more commands to install other tools...othert metasploit??

                        Delete Comment
                        • Kali Linux photo
                          Kali LinuxMay 18, 2020 at 7:54 PM

                          yes, all commands will be same as we install tools in Kali Linux PC version.

                          Delete Comment
                        • AnonymousJanuary 8, 2020 at 1:08 PM

                          I tried to install vnc but after downloading i get this error

                          /usr/local/bin/vncserver-start: line 4: vncserver: command not found

                          Delete Comment
                          • Kali Linux photo
                            Kali LinuxJanuary 8, 2020 at 7:04 PM

                            Thanks for your comment...This error usually occur when vncserver does not installed successfully... uninstall it and then install it again..

                            Delete Comment
                          • Krishna photo
                            KrishnaJanuary 20, 2020 at 6:43 PM

                            Actually when i tried mate terminal is showed a green desktop with no menu or taskbar. Please help me with it

                            Delete Comment
                            • Kali Linux photo
                              Kali LinuxJanuary 21, 2020 at 6:35 AM

                              Hi Krishna,Thanks for your comment. We did not got you clear. Did you trying to auto-hide things ?

                              Press alt+f2 and type following (try hacker's keyboard for alt button..this keyboard is available in play store):

                              mate-terminal

                              Then the terminal will come, then type following:

                              mate-panel --reset


                              Delete Comment
                            • kali linux logout photo
                              kali linux logoutApril 4, 2020 at 8:08 PM

                              by mistake i pressed logout
                              How can i start

                              Delete Comment
                              • Kali Linux photo
                                Kali LinuxApril 5, 2020 at 6:54 AM

                                close those apps. and open termux again and type following command
                                ./start-kali.sh

                                Delete Comment
                              • Unknown photo
                                UnknownApril 13, 2020 at 9:02 AM

                                Which keyboard layout we select . When I am selecting 1 ,when we entering password keyboard was not working ,plz reply me

                                Delete Comment
                                • Kali Linux photo
                                  Kali LinuxApril 13, 2020 at 11:03 AM

                                  try other keyboards. during the tutorial we have used gboard. You also can use hacker's keyboard.

                                  Delete Comment
                                  • Any buddy Can do (ABCD) photo
                                    Any buddy Can do (ABCD)April 29, 2020 at 1:50 PM

                                    Sir,
                                    When I open vnc viewver and I put detail in the vnc
                                    Vnc viewer ask me (the port on which the computer is listenings for a connection could not b contacted)
                                    What should I do

                                    Delete Comment
                                  • Organicranking photo
                                    OrganicrankingApril 19, 2020 at 5:43 PM

                                    I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Download prince of persia iso ppsspp

                                    Delete Comment
                                    • Any buddy Can do (ABCD) photo
                                      Any buddy Can do (ABCD)April 29, 2020 at 1:29 PM

                                      Sir,
                                      When I open vnc viewver and I put detail in the vnc
                                      Vnc viewer ask me (the port on which the computer is listenings for a connection could not b contacted)
                                      What should I do

                                      Delete Comment
                                      • Any buddy Can do (ABCD) photo
                                        Any buddy Can do (ABCD)April 29, 2020 at 1:51 PM

                                        How to find localhost

                                        Delete Comment
                                        • Kali Linux photo
                                          Kali LinuxApril 29, 2020 at 6:10 PM

                                          when the VNC server strars it will show the localhost:1 or localhost:2 where our VNC server is running. Usually it shows localhost:1 we just need to add it on VNC viewer application as shown in above article please read it carefully.

                                          Delete Comment
                                          • AnonymousMay 19, 2020 at 7:32 PM

                                            facing the same problem even after following above steps

                                            Delete Comment
                                            • Kali Linux photo
                                              Kali LinuxMay 19, 2020 at 8:26 PM

                                              You still didn't find the localhost?

                                              Delete Comment
                                              • AnonymousMay 21, 2020 at 4:39 PM

                                                yes

                                                Delete Comment
                                              • Unknown photo
                                                UnknownMay 8, 2020 at 12:47 AM

                                                very very helpful this blogs for me.

                                                Delete Comment
                                                • Kali Linux photo
                                                  Kali LinuxMay 8, 2020 at 8:16 AM

                                                  Thank you for this comment. This type of comments always inspired us to perform better.

                                                  Delete Comment
                                                • kevin photo
                                                  kevinMay 9, 2020 at 5:15 PM

                                                  In the event that the moment apps will perform well, it is probably going to get a great deal of progress gaming apps with large APK size.itools crack 2020 activation key

                                                  Delete Comment
                                                  • AnonymousJune 4, 2020 at 6:53 AM

                                                    first thank u,and can i use the same commands from the real kali linux?plz reply me

                                                    Delete Comment
                                                    • Kali Linux photo
                                                      Kali LinuxJune 4, 2020 at 7:46 AM

                                                      Yes you can use real Kali Linux commands like nmap, msfconsole, wireshark etc.

                                                      Delete Comment
                                                    • AnonymousJune 16, 2020 at 10:51 AM

                                                      i've installed kali linux using termux and i'm using using gui through vnc. Is there a way to use kali linux by installing it on android (via termux, offcourse) and instead of using vnc viewer on android to get gui, we could use vnc viewer on pc, say Windows 10, for gui on a local network or via internet? I mean, installing kali on android as usual via termux and then forwarding the gui component to another pc via vnc, instead of forwarding on the same android phone?

                                                      Delete Comment
                                                      • Kali Linux photo
                                                        Kali LinuxJune 16, 2020 at 5:19 PM

                                                        Yes we can do this local network. In this case we need to use the local IP of Kali in android in our PC's VNC viewer. It is possible but it is not worthy when we already own a Windows PC. There is lots of ways to installing Kali Linux on Windows system, that might be more powerful from an Android device.

                                                        Delete Comment
                                                        • AnonymousJune 17, 2020 at 12:17 AM

                                                          Can u please explain how to do it in detail? I just want to give it a try for learning purpose.

                                                          Delete Comment
                                                          • AnonymousJune 17, 2020 at 2:49 PM

                                                            Pls explain the process for the same.

                                                            Delete Comment
                                                            • Kali Linux photo
                                                              Kali LinuxJune 18, 2020 at 7:04 PM

                                                              did you ever used raspberry pi. We use raspberry pi computer headless (without display) and display it on our PC or Mobile via ssh connection. Search this topics on Google or Youtube you will get it.

                                                              Delete Comment
                                                            • Naser photo
                                                              NaserJune 23, 2020 at 6:32 PM

                                                              Any hack any thing

                                                              Delete Comment
                                                              • Sandeep Singh photo
                                                                Sandeep SinghJune 24, 2020 at 11:42 PM

                                                                dear sir,
                                                                my self sandeep singh
                                                                i did all setup and CLI mode work fantasticly but after step gui vnc can't connet with server what can i do for this error

                                                                Delete Comment
                                                                • Kali Linux photo
                                                                  Kali LinuxJune 25, 2020 at 8:10 AM

                                                                  Hi, Sandeep
                                                                  We will help you in this matter can you please explain what kind of error you're getting?

                                                                  Delete Comment
                                                                • L E G E N D S photo
                                                                  L E G E N D SJuly 6, 2020 at 1:45 PM

                                                                  Android operating system has been designed primarily for touchscreen mobile devices such as smartphones and tablet computers. Developed Initially by Android, Inc., backed financially by Google (later bought by Google in 2005), Android was unveiled in 2007 along with the founding of the Open Handset Alliance (a consortium of hardware, software, and telecommunication companies devoted to advancing open standards for mobile devices) Android is the buzz word in technology today with a market share of 42% across various devices worldwide. Mod Apk Download

                                                                  Delete Comment
                                                                  • Rahul photo
                                                                    RahulJuly 18, 2020 at 1:13 PM

                                                                    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

                                                                    Above error coming on every command

                                                                    Delete Comment
                                                                  • AnonymousJuly 19, 2020 at 6:02 PM

                                                                    Thanks for your hardworking man, honestly i am newbie in kali linux but in your tutorial i 've fast to understand and learned a lot. thanks man

                                                                    Delete Comment
                                                                  • Sithu Kyaw photo
                                                                    Sithu KyawNovember 7, 2020 at 10:43 PM

                                                                    Building dependency tree
                                                                    Reading state information... Done
                                                                    Some packages could not be installed. This may mean that you have
                                                                    requested an impossible situation or if you are using the unstable
                                                                    distribution that some required packages have not yet been created
                                                                    or been moved out of Incoming.
                                                                    The following information may help to resolve the situation:

                                                                    The following packages have unmet dependencies:
                                                                    xfce4-pulseaudio-plugin : Depends: libpulse-mainloop-glib0 (>= 0.99.1) but it is not going to be installed
                                                                    Recommends: pavucontrol but it is not going to be installed
                                                                    Recommends: pulseaudio but it is not going to be installed
                                                                    E: Unable to correct problems, you have held broken packages.
                                                                    root@localhost:~#
                                                                    How to solve,admin.

                                                                    Delete Comment
                                                                    • kavindu yeshan photo
                                                                      kavindu yeshanNovember 20, 2020 at 7:57 AM

                                                                      After installation how to install tools / application for it please explain

                                                                      (Set tool, firefox browser.....)

                                                                      Delete Comment
                                                                      • Kali Linux photo
                                                                        Kali LinuxNovember 20, 2020 at 7:26 PM

                                                                        Like we did in full Kali. If you want to install Firefox then you need to run following command:
                                                                        sudo apt-get install firefox-esr

                                                                        Delete Comment
                                                                      • ALLofit photo
                                                                        ALLofitNovember 24, 2020 at 1:35 AM

                                                                        Can I be able to install it and run on android version 10 in realme device and if yes then are the application like metasploit will run as it run on pc

                                                                        Delete Comment
                                                                        • darkRaiNovember 25, 2020 at 12:03 AM

                                                                          Yes, you can run Metasploit on this. I use a realme android 10 snapdragon device and it works good. I use metasploit all the time for payload creation and meterpreter seasons, I also able to search for exploits and auxiliaries on msfconsole, only one problem is we can't get the database support with mobile devices metasploit.

                                                                          But why this type of installation ? I mean this Kali installation is good, but there is official Kali nethunter for non-rooted phones. You should chack this out!

                                                                          Delete Comment
                                                                        • jopamungkasOctober 4, 2021 at 12:08 AM

                                                                          Get error when run VNC server,

                                                                          Delete Comment
                                                                          • Kali Linux photo
                                                                            Kali LinuxOctober 4, 2021 at 6:49 PM

                                                                            Can you please explain the error, then only we can help you. Thanks.

                                                                            Delete Comment
                                                                          • Spyzie photo
                                                                            SpyzieMarch 20, 2023 at 8:02 PM

                                                                            The instruction was successful. Ensure to have a smooth working internet connections.. Although I didn't use the vncviewer, rather I used a similar app available in f droid, as my connection base.. Nethunter kex

                                                                            Delete Comment
                                                                            • Spyzie photo
                                                                              SpyzieMarch 20, 2023 at 8:09 PM

                                                                              The installation was successful and completed. For a smooth installation, ensure to have a working internet connection. At least 4G network and you're good . Although I couldn't install the vncviewer properly, instead I installed another connection base. Nethunter kex

                                                                              Delete Comment
                                                                              • AnonymousNovember 8, 2023 at 3:33 AM

                                                                                How fix black screen

                                                                                Delete Comment
                                                                                • AnonymousNovember 9, 2023 at 8:07 AM

                                                                                  Thanks for your comment but please ask us cybersecurity related questions. We are not expert on repairing devices.

                                                                                  Delete Comment
                                                                                google-playkhamsatmostaqltradent