NMAP in Android

NMAP Android
NMAP Android

In this post, I’m going to talk about my new library for using NMAP in any Android project. I’ve released the library in my GitHub and Bintray. Using the library, you can use NMAP on non rooted Android device.


It is similar to other projects available in Google play such as Network Mapper. Actually the binary library is based on the binary versions published by kost same author of Network Mapper.

The binary files of NMAP are available in kosts’s GitHub repository.

How To Use

There is three simple step for using the library in your project:

  1. Add INTERNET permission to the Manifest
  2. Add NMAPAndroid dependency in your app level Gradle file.
  3. Write the simple code!

Here is the permission:

<uses-permission android:name="android.permission.INTERNET" />

Here is the dependency:

implementation 'ir.mstajbakhsh:nmap-android:1.0.0'

Here is the simple code:

NMAPUtilities n = new NMAPUtilities(context);

final StringBuilder line_buffer = new StringBuilder();
OutputStream ops = new OutputStream() {
    public void write(int b) {
    	if (b == '\n') {
        } else {

try {
    n.execCommand(ops, "-A", "", "--system-dns");
} catch (Exception e) {

Here is the sample output of the project:

NMAP Android Sample Output


Due to the size limit, only two binary versions are included inside the library including: arm and x86. Additionally, the flow chart of automatic installation of the library is depicted below:

NMAP Android Automatic Installation Process

Source Code

The source code is available in my personal repository in GitHub. https://github.com/mirsamantajbakhsh/NMAPAndroid


Do not forget to buy me a cup of coffee. My bitcoin wallet address is:



No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *