1

When I do a getprop in adb to get certain device properties, where are these device properties stored? Is it in some configuration file, the init file, or within the Android framework/kernel?

user1118764
  • 8,597
  • 18
  • 57
  • 100

1 Answers1

1

Its a simple plain text file located at:

/system/build.prop

Note: This file can be modified if the device is rooted.

  • Thanks. Are there any other places that certain properties reside? For example, I'm looking at a Samsung Galaxy S6, which has the following properties: ro.boot.warranty_bit and ro.warranty_bit. Neither are found in system/build.prop. – user1118764 Nov 30 '16 at 10:09
  • That I believe is a special case. I'm pretty sure for security reasons Samsung "hard coded" those values. If all you want to do is read there values via adb you can run "adb shell getprop ro.boot.warranty_bit". But for security reasons can't write/change them. I think they are hardware based(80% sure). – Programming4life Nov 30 '16 at 10:14
  • Thanks. I understand I can't change them. I'd just like to know where they are stored. – user1118764 Nov 30 '16 at 10:16
  • I know by design that the warranty bit information is stored in the ARM TrustZone hardware of the processor, and normally to get to it you have to use the KNOX SDK attestation API. This requires signing up for a KNOX developer license. I'm curious that without the SDK, I'm also able to get the warranty bit information with this pair of device properties, so I'm wondering if this information is in fact duplicated somewhere else that doesn't require KNOX APIs to retrieve. – user1118764 Nov 30 '16 at 10:22
  • Samsung is likely using there own version of "getprop" that uses the api to get the information. Likely private apis or something along those lines. You may be able to read the value by using the code found here: http://stackoverflow.com/questions/12091767/how-to-get-real-device-model-in-android – Programming4life Nov 30 '16 at 20:16