account arrowhead-down arrowhead-up mobile-menu search sm-bold-x x-skinny-rounded x-skinny arrowhead-right social-facebook social-googleplus social-instagram social-linkedin social-pinterest social-qzone social-renren social-tencent social-twitter social-vkontakt social-weibo social-youku social-youtube

Please help us improve our website

Take our customer survey to evaluate your visit.

It should only take a few minutes to answer five quick questions. Just click the Launch survey button at the end of your visit to begin.

cancel
Showing results for 
Search instead for 
Did you mean: 

Please read this if you considering unlocking the boot loader or rooting your phone.

Important information

Please note that you may void the warranty of your phone and/or any warranty from your operator if you unlock the boot loader. You should only unlock the boot loader of your phone if you are an advanced user with good knowledge of the technology and risks involved.

For more information go here http://unlockbootloader.sonymobile.com/

Please also note

The Sony Xperia support team will not be able provide any support, related to unlocking the boot loader or rooting your phone.

We also recommend you to read the below blogposts.

http://developer.sonymobile.com/wp/2011/03/29/unlocking-the-boot-loader-in-the-new-xperia%e2%84%a2-smartphones/

http://developer.sonymobile.com/wp/2011/04/14/option-to-unlock-the-boot-loader-now-available-for-advanced-developers/

http://developer.sonymobile.com/wp/2011/09/28/sony-ericsson-supports-independent-developers/

Best regards
Sony Xperia support team

Secure Hardware issue after 256 calls

Visitor
Message 1 of 3
525 Views
Message 1 of 3

Secure Hardware issue after 256 calls

I am generating a key using the Android keystore API in order to detect if the secure hardware is used and it works fine the 256 or so first times, but afterwards I get an error.

 

Here is the incriminated code:

SecretKeyFactory factory = SecretKeyFactory.getInstance(key.getAlgorithm(), "AndroidKeyStore");
KeyInfo keyInfo = (KeyInfo) factory.getKeySpec(key, KeyInfo.class);
boolean isProtectedBySecureHardware = keyInfo.isInsideSecureHardware();

 

At first, I always get true, but on the 257's time, I get an exception

W/System.err: java.security.ProviderException: Failed to obtain information about key. Keystore error: -33
 W/System.err:     at android.security.keystore.AndroidKeyStoreSecretKeyFactorySpi.getKeyInfo(AndroidKeyStoreSecretKeyFactorySpi.java:82)
 W/System.err:     at android.security.keystore.AndroidKeyStoreSecretKeyFactorySpi.engineGetKeySpec(AndroidKeyStoreSecretKeyFactorySpi.java:73)
 W/System.err:     at javax.crypto.SecretKeyFactory.getKeySpec(SecretKeyFactory.java:501)
W/System.err:     at com.mycompany.myclass.mymethod(Myfile.java:1631)

The exception is preceded by the following logs:

E/keymaster1_device: Get key charac send cmd failed
E/keymaster1_device: ret: 0
E/keymaster1_device: resp->status: -33

 

Then afterwards I always get false, and in the logcat I can see the following error:

E/keymaster1_device: Generate key send cmd failed
E/keymaster1_device: ret: 0
E/keymaster1_device: resp->status: -33

This does not happen on non-Sony devices, so I guess there is a low level bug regarding hardware management? Any way to fix or circumvent this?

2 REPLIES 2
Regular
Message 2 of 3
498 Views
Message 2 of 3

Re: Secure Hardware issue after 256 calls

Are you on Sony rom, or on AOSP? If AOSP, are you using legacy keymaster, or the vendor provided?

Visitor
Message 3 of 3
385 Views
Message 3 of 3

Re: Secure Hardware issue after 256 calls

I am on Sony ROM.

I found this issue with some devices from Fujitsu as well (arrows) after 512 calls.