Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Samsung KNOX api version on old devices like Jelly Bean

I have a Samsung Galaxy Camera 2 with Android 4.3 Jelly Bean (it's about the same age as the Samsung Galaxy S3).

Their docs tells me, on Jelly Bean I can find KNOX Api level 5 - 10.

So, how do I find out which KNOX Api level I actually have?

  • I couldn't find it in the system info page in the settings
  • I haven't found a way to retrieve it programmatically
like image 229
OneWorld Avatar asked May 05 '20 13:05

OneWorld


2 Answers

Manually

Newer devices

Settings > About Device > Software Information > Knox Version

software information menu

Older devices

Find your device here: Devices Secured by Knox

Programmatically

For API level 24 and higher you can retrieve the API level with EnterpriseDeviceManager.getAPILevel(). It returns any of the constants defined in EnterpriseDeviceManager.KNOX_VERSION_CODES.

With that integer value you can then go to the reference table and see more details.

like image 173
Mister Smith Avatar answered Oct 17 '22 08:10

Mister Smith


Preferred method: Get API Level as int

The documentation on EnterpriseDeviceManager.getAPILevel(); is wrong about the API level "Since: Knox API Level 24"!

EnterpriseDeviceManager.getAPILevel(); does actually work on old devices like the Samsung Galaxy Camera NX with Android 4.2.2 (returns 7) and Samsung Galaxy Camera 2 (returns 9) when using the backward compatibility library of KNOX (Knox SDK Support Library for Old Namespace Translation)!

Alternative method: Testing for methods

That's how we ended up testing for the KNOX Api level on old devices.

We looked for methods and classes in their documentation that only exist in certain API levels:

enter image description here

like image 2
OneWorld Avatar answered Oct 17 '22 08:10

OneWorld