Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

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);
share|improve this answer
    
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
    
Ok thanks :)... –  arcyqwerty Jul 28 '12 at 19:32
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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