WURFL is the industry standard for mobile device information - it's main job is to take a user-agent and match it to a device and attributes, however it can be queried to also get lists of devices and attributes with a little bit of effort.
The actual WURFL datasource is in a flat xml structure and is a little less complicated to get your head around to start with, but using one of the developed APIs will make the learning curve easier.