Install Metasploit in android termux

install metasploit in android without root

In this Thread, I’m gonna show you how to install Metasploit Framework in Termux without any errors. You can use it for Android to Android/Windows hacking.

What is Metasploit ?

The Metasploit Project is a computer security project that provides information about security vulnerabilities and aids in penetration testing and IDS signature development.

Its best-known sub-project is the Metasploit Framework, a tool for developing and executing exploit code against a remote target machine


  • Android 5.0+ (no root needed)
  • Termux app
  • About 500 mb free space (For proper installation of Metasploit)

Metasploit Installation in termux

Type below commands to install metasploit in termux app:

$ pkg install unstable-repo
$ pkg install metasploit

These commands will install Metasploit. Enjoy hacking…😄

Alternative old Method

If you have problems with above method you can also try an old method for installation of metasploit.

$ apt install curl
$ curl -LO https://raw.githubusercontent.com/Hax4us/Metasploit_termux/master/metasploit.sh
$ chmod +x metasploit.sh
$ ./metasploit.sh

Some errors on installation

Error 1 : Nokogiri not found

Nokogiri error on metasploit installation in android termux

This is due to broken installation of dependency Nokogiri. To resolve this type following commands in termux :

Error 2 : Database error

Database error on installation of metasploit in android termux

check db_status

Database error on installation of metasploit in android termux

This means postgresql is not connected with msf_database.

To resolve this issue type following in termux:

$ mkdir -p $PREFIX/var/lib/postgresql
$ initdb $PREFIX/var/lib/postgresql
$ pg_ctl -D $PREFIX/var/lib/postgresql start

And restart metasploit. The error will be resolved.

Thanks for reading the thread. If you have any doubts or suggestions shoot it out on comments 😊.


  1. esto es en 2021 no logro que me funcione no se puede usar
    otra app como UserdLand
    oye una pregunta
    hay alguna manera de ejecutar comandos adb fastboot en un Android para por ejemplo desbloquear el bootloader del otro de celular a celular

    • Yes. You can use an android phone (already rooted) to root another one. You can run adb commands in termux for this.

Leave a Reply

Your email address will not be published.