I am not going to solve problems with Build consistency, as Mark has illustrated why there is no guaranteed answer. Instead, I want to answer your goals and intentions.
If I understand correctly, you are trying to uniquely identify a single device. First, I point you to this answer , from which you can simply conclude that a general solution is impossible. Either resetting the factory default settings, or switching SIM cards (if it has a device) will change any unique identifier and trick your application into thinking that it is a different user.
You need to rethink what you are trying to accomplish. Why do you need to uniquely identify the device? If you are trying to identify the user, then this thinking does not cope with several devices. This is currently especially true for Jellybean 4.2, where the device can support multiple users. See also this insightful Android Developers blog post .
Can you connect his Google account? Or an account for your own service? If you can identify the user, then it is trivial to identify individual devices through UUID.randomUUID() .
source share