Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect color of iPhone / iPod [duplicate]

Possible Duplicate:
Detecting Color of iPhone/iPod touch?

Is it at all possible to detect the color of an iPhone / iPod - either natively or in the mobile browser?

I'm working with a designer who would love to make a web app respond to the color of the device.

enter image description here

like image 223
Ollie Glass Avatar asked Jan 10 '13 17:01

Ollie Glass


1 Answers

I don't think this is possible. The internal hardware (the "motherboard" keeping all the components together and the components themselves) is manufactured without any knowledge about the final casing. The same is true for the software (firmware and iOS), since all devices get an equal copy of exactly the same software, byte for byte identical, except for any serial numbers that might be embedded in the firmware. It might be the case that Apple uses different device serial number ranges for different casings, yet that is just a wild speculation.

It's like building a car: All components (engine, electronics, etc.) are equally manufactured, regardless with what color the final car will be coated. Actual the car is completely assembled, all hardware and all software, and ready to be used before it is color coated; and up to the last second the final decision how to color it may change.


UPDATE

I did some more investigations on this topic and I found out that the "wild speculation" is not as wild as I assumed it to be. It really seems to be the case that Apple uses different serial number ranges for different device colors. The serial number (as well as similar numbers, like the IMEI of iPhones) are the only parts of the device firmware that are different for each device manufactured.

Apple used the following serial number format in the past (not sure if this is still up-to-date, but it was still up-to-date for the iPhone 4):

AABCCDDDEEE

 AA = ID of the factory that manufactured the device.
  B = Year of production: 8=>2008, 9=>2009, 0=>2010, 1=>2011, etc.
 CC = Week number of the year.
DDD = Production index number, is reset every week, base-34 encoded.
EEE = Model ID.

The interesting value is the "Model ID". The same device generation has different Model IDs depending on their color and the amount of available storage.

I haven't found any complete list of all the possible values, though. And even if there was such a complete list, you still have the problem that you need to keep it up-to-date, since Apple is constantly releasing new models, so the list could be out-dated any couple of months (at least once or even twice a year). Here are some sample values for the last 3 digits of the serial number (EEE):

VR0: iPhone 2G Silver 4GB
WH8: iPhone 2G Silver 8GB
0KH: iPhone 2G Silver 16GB
Y7H: iPhone 3G Black 8GB
Y7K: iPhone 3G Black 16GB
3NP: iPhone 3GS Black 16GB
3NR: iPhone 3GS Black 32GB
3NQ: iPhone 3Gs White 16GB
3NS: iPhone 3Gs White 32GB
A4S: iPhone 4 Black 16GB
A4T: iPhone 4 Black 32GB

I haven't found any sample values for the current iPod generations so far.

like image 200
Mecki Avatar answered Sep 22 '22 15:09

Mecki