What are the properties of android.os.Build fixed?

I need a list of fixed properties of the android.os.Build class. I got a list from here. I am brave that I know, fixed. By correction, I mean the absence of changes in the firmware update, reset factory, ...

  • android.os.Build.VERSION.RELEASE // Current development code name or string "REL" if this is a release build.

  • android.os.Build.BOARD // The name of the base board, for example, "goldfish".

  • android.os.Build.BOOTLOADER // System loader version number.

  • android.os.Build.BRAND // The brand (for example, the operator) for which the software is configured, if any.

  • android.os.Build.CPU_ABI // Name of the instruction set (processor type + ABI convention) of the native code.

  • android.os.Build.CPU_ABI2 // Name of the second set of instructions (processor type + ABI agreement) of the native code.

  • android.os.Build.DEVICE // Name of industrial design.

  • android.os.Build.DISPLAY // Assembly identifier string to display to the user

  • android.os.Build.FINGERPRINT // A string that uniquely identifies this assembly.

  • android.os.Build.HARDWARE // Name of the hardware (from the kernel command line or / proc).

  • android.os.Build.HOST

  • android.os.Build.ID// Either a list of changes, or a label like "M4-rc20".

  • android.os.Build.MANUFACTURER // Manufacturer of the product / equipment.

  • android.os.Build.MODEL // The end user name for the final product.

  • android.os.Build.PRODUCT // The name of the generic product.

  • android.os.Build.TAGS // Comma separated tags describing the assembly, for example, "unsigned, debug".

  • android.os.Build.TYPE // Type of assembly, for example, "user" or "eng".

  • android.os.Build.USER

Please help me fill out the list.

+4
source share
3 answers

If you look at the source code on Build , you will see that all of these values, including those that are in bold, come from the system properties files. Therefore, any of these values ​​can be changed by ROM modems or the original manufacturer of the device at its discretion.

+13
source

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() .

+2
source

If I understand correctly (regarding your subsequent comment), you want to identify the device without integrating any registration or login mechanism.

Instead of implementing my own ID calculation algorithm, I would suggest using the OpenUDID implementation for android (see https://github.com/vieux/OpenUDID ).

+1
source

Source: https://habr.com/ru/post/1444553/


All Articles