Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Nmap on Android: automatic build
From: David Fifield <david () bamsoftware com>
Date: Mon, 28 Feb 2011 23:18:18 -0800

On Tue, Feb 15, 2011 at 11:31:28PM +0100, Vlatko Kosturjak wrote:
Hello!

I have good news! Google released android-ndk-r5b which have that output
problem fixed. Therefore, nmap android binary now works perfectly. Also,
new NDK implements (almost) all C++ - therefore Crystax is not needed
any more. Still, we have that locale problem in liblua. But in short,
that means that build process is much simplified.

I looked at the patches. The one in Nping to remove -lpthread looks like
it does no harm even on non-Android, so I committed it.

As for the sysexits.h patch, could you turn that into an Autoconf check
and then do a preprocessor check for HAVE_SYSEXITS_H? nping_winconfig.h
would have
#undef HAVE_SYSEXITS_H

That leaves just the liblua change, which is annoying, but I think it's
better to keep as a patch rather than committing.

Therefore, I've made basic automatic build process which works against
latest SVN trunk of nmap (in attachment). Extract it to nmap dir. CD to
nmap-dir/android and run make.

This is really nice. According to the makefile, if you already have the
NDK, all you have to do is apply the patches, then run

PATH=$(NDKDEST)/bin:$(PATH) ac_cv_linux_vers=2 CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ 
LD=arm-linux-androideabi-ld ./configure --host=arm-linux-androideabi --without-zenmap --with-liblua=included 
--with-libpcap=internal --with-pcap=linux --enable-static
PATH=$(NDKDEST)/bin:$(PATH) make

I don't know what others think. My feeling is that we don't need an
android subdirectory until we have a package to build (comparable to the
setup.exe or nmap.dmg packages in the mswin32 and macosx
subdirectories). Those of you running Android, do you find a separate
makefile useful, or are you using a command like the above? Or are you
just using Vlatko's binaries?

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault