How can you access the KNOX counter programmatically from the android SDK?
I would like my app to check the value to try and ascertain if it is running on a samsung phone that has been rooted.
I just decompiled KNOX Status. It looks like all the app is doing is getting the system property ro.boot.warranty_bit
. I'm not sure if this still works and I don't have a Samsung at the moment to test.
In terminal run:
adb shell getprop ro.boot.warranty_bit
If the result is 0
, then the warranty should be valid. You can use this class to get the system property in an Android app.