It's usually a good idea to ask me for the most current source code since I don't always remember to post it here.
Nmap for Android™ Source Code
Nmap for Android™ JavaDoc
(In the future I will set up a Git repository for easier access.)
This project was built using the Android™ SDK and Eclipse IDE.
Instructions for obtaining the Nmap source code.
Special thanks to Robert McCurdy and Vlatko Kosturjak for providing binary distributions of Nmap, cross-compiled for ARM processors, that are or were utilized in this distribution.
On 2011-01-10 I ran PMD on my source and...wow, there are a lot of bugs to fix.
A lot of the reported "bugs" are stylistic ("Class names should begin with an uppercase character"),
some are intruiging but won't have much impact
("Local variable 'msg' could be declared final"), some may improve performance
("Prefer StringBuffer over += for concatenating strings"), but a few
might actually show real bugs where side effects result from poor code
("Found 'DU'-anomaly for variable 's' (lines '425'-'484')"). Will soon use
this information to improve the codebase.
Update 2011-01-23: have gone from 227 violations in 0.4.6 down to 124 in
0.4.7. Working on 0.4.8 it's down to 45. Great tool, and although I disagree with a few of their recommendations it's helping performance.
If interested, here is a method trace one can analyze with TraceView. I'd appreciate another set of eyes on this if anyone has a minute. Thanks.