Programmatically check if Android phone has TEE and what TEE vendor it is - Trustonic, OPTEE, Qualcomm's QSEE, etc?

0
=
0
+
0
No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.
0

Some features of my Android app are depending on a TEE (Trusted Execution Environment / ARM TrustZone) being present on the phone. How from my Java app can I detect if this phone has a TEE installed, and if so, what vendor's TEE it is? Thanks!

Thanks

sdfgsdfg

asdfasdfsdf

1 Answer

1
=
0
=
$0
Internet users could send Bitcoin Tips to you if they like your answer!

I would suggest the following approach (not tested):

1 - get a list of all running processes

List of system processes is not available through Android SDK API, so we would use Runtime.exec(...) to execute OS command and to capture its output into string variable. We would use /system/bin/ps (but we could have used /proc and then do some proc output parsing)

String cmd = "/system/bin/ps"; // alternative cmd would be "/proc" but then we would need to loop through proc subdirectories, etc
// run cmd and read its output into string
java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(cmd).getInputStream()).useDelimiter("\\A");
String cmdRes = s.hasNext() ? s.next() : "";

2 - loop through the list trying to find known TEE client drivers

SEND BITCOIN TIPS
0

Too many commands? Learning new syntax?

FavScripts.com is a free tool to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.

Boost your productivity with FavScripts.com!

Post Answer