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 - total earned - 0 BTC ($0 USD)

1
=
0
=
$0
Everyone, even non-registered users could send Bitcoin Tips to YOU if they are inspired by 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

Post Answer


Will Bitcoin Tipping become a new Internet Culture?


Please share our story! THANK YOU!