Below is the complete source of the InfoHelper.java backend used by Andvestigate. It is cobbled together from dozens of Stackoverflow threads, blogs across the internet, and my own work. I do not guarantee it's accuracy -- mileage tends to vary between Android versions.
Andvestigate is available on Google Play or you can visit the Andvestigate project page.