3

I would like to get, among other things, the status of the warranty bit on Samsung devices programmatically. Much like the information that is displayed in Odin mode.

I understand that the bit is not meant for polling, but I would like to know if there is any way to get it without having to create a container or during attestation.

Much like the KNOX Status Samsung app on GP https://play.google.com/store/apps/details?id=com.bryancandi.knoxcheck&hl=en

Thanks!

1 Answers1

2

You can get the warranty state like this:

adb shell getprop ro.boot.warranty_bit
and
adb shell getprop ro.warranty_bit

If both return 1 the warranty_bit is set 0x1

Regards,
Sebastian

k1ll3r8e
  • 729
  • 16
  • 22
  • Where are these properties stored? – user1118764 Nov 30 '16 at 09:56
  • @user1118764 they are set during the boot... You can't override them, I tried several times... – k1ll3r8e Dec 01 '16 at 06:33
  • Thanks. Do you know where in the boot they are set, e.g. in sboot.bin? Also, where are they set? In the TrustZone, or some other file in the file system like build.prop? Similarly, when getprop reads this, where does it read it from? – user1118764 Dec 01 '16 at 07:05
  • @user1118764 (i think) they are set after some knox checks. I had a look at some *.prop files but non of them had these entries... So, maybe there is a hidden partition/mount/file/etc which holds these entries. (But i can't tell u more, since i sold my Samsung and switched to Huawei.) – k1ll3r8e Dec 01 '16 at 22:00
  • @k1ll3r8e Samsung devices that have Knox probably use a customized version of the "getprop" command that will check for certain keys in hidden places. The funny thing is that there is at least one Knox-related entry in build.prop (ro.config.knox) – AlxDroidDev Feb 02 '17 at 13:42