In terms of using android.os.build serial as a unique identifier

  1. How/when is it generated
  2. When does it change
  3. Is it possible to manually change the value back to something that I had before
  4. Is it something that can be expected to be available across devices and operating systems

most of these properties are in /system/build.prop (or a file like that). But i believe the android.os.build.serial is actually set when the device first boots. The system gets the device serial number and adds it to the properties.

I actually found a commit in some cyanogenmod code that you can see how exactly it is set: (now this does say it is somewhat of a hack, but it is set when the device boots).

From Git:

57| sprintf(buf, "ro.serialno=%s", serial);
  • So can this value be easily changed (also considering that some users may be root)? – arcyqwerty Jul 28 '12 at 1:57
  • no, but i guess it could be changed with a custom ROM. if the custom ROM defines how the serial is retrieved from the device differently then how it is now. – Ryan Conrad Jul 28 '12 at 12:55
  • I mean, given root privileges, can a user modify build.props or some other file (possibly modifying the sqlite database) to alter this value? – arcyqwerty Jul 28 '12 at 15:29
  • no, it comes from the hardware. – Ryan Conrad Jul 28 '12 at 16:37
  • So if the number changed when I upgraded my rom (CM7 -> CM7.2) theres no easy way to change it back? – arcyqwerty Jul 28 '12 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.