Serial number from TC20
I am trying to retrieve Serial number from a TC20 device from an inhouse built app (Android Studio ArticFox: Kotlin&Java). This App is currently in development and not in production (not signed).
I have followed @darryncampbell , https://github.com/darryncampbell/OEMInfo-DeviceIdentifiers-Sample-Andr…
- Used StageNow to Apply MX Access manager settings
- To obtain Package Signature, I followed the steps as explain in section "Apps signed with the Android debug key" (using keytool) in https://github.com/darryncampbell/MX-SignatureAuthentication-Demo/blob/…
I was able to do all the above steps without any errors, but the Serial Number I get looks like a “Certificate” (see below)
Android Version: 8.1.0
OSx Version: 8.8
Any help with this is appreciated!
On devices running an Android OS version less than 10 you can use this method:
But - as documented on this reference side - you must have the "READ_PHONE_STATE" permission to get a valid result.
And you have to use a lower target SDK version.
Just wanted to provide an update to this issue, it turns out to be an issue with Android version. It worked good with Android 10, for Android 9 (and earlier) I think the solution is to use getSerial() as @richard-venderbosch mentioned.
Thanks all for your responses!