The QCOM hardware KeyMaster on LineageOS 14.1 is broken https://jira.lineageos.org/browse/BUGBASH-590 https://jira.lineageos.org/browse/BUGBASH-505 https://github.com/andOTP/andOTP/issues/16 See https://android.stackexchange.com/questions/168168/wifi-certificate-auth-problem-on-rr-5-8-0-android-7-1-1-cyanogen-based-rom 12-02 10:26:50.203 3064 3064 E QCOMKeyMaster: Len returned is < 0 len = 0 12-02 10:26:50.203 3064 3064 E Keymaster0Engine: Error -1 extracting public key 12-02 10:26:50.206 28600 28600 W System.err: java.security.ProviderException: Failed to load generated key pair from keystore 12-02 10:26:50.220 28600 28600 W System.err: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:518) 12-02 10:26:50.220 28600 28600 W System.err: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.generateKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:470) 12-02 10:26:50.220 28600 28600 W System.err: at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:699) 12-02 10:26:50.220 28600 28600 W System.err: at org.shadowice.flocke.andotp.Utilities.KeyStoreHelper.loadOrGenerateAsymmetricKeyPair(KeyStoreHelper.java:82) 12-02 10:26:50.220 28600 28600 W System.err: at org.shadowice.flocke.andotp.Preferences.PasswordEncryptedPreference.(PasswordEncryptedPreference.java:73) 12-02 10:26:50.220 28600 28600 W System.err: at java.lang.reflect.Constructor.newInstance0(Native Method) 12-02 10:26:50.220 28600 28600 W System.err: at java.lang.reflect.Constructor.newInstance(Constructor.java:430) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.GenericInflater.createItem(GenericInflater.java:385) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:432) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:483) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.GenericInflater.rInflate(GenericInflater.java:495) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:327) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.GenericInflater.inflate(GenericInflater.java:264) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:280) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:609) 12-02 10:26:50.220 28600 28600 W System.err: at android.preference.PreferenceManager.setDefaultValues(PreferenceManager.java:568) 12-02 10:26:50.220 28600 28600 W System.err: at org.shadowice.flocke.andotp.Activities.MainActivity.onCreate(MainActivity.java:288) 12-02 10:26:50.220 28600 28600 W System.err: at android.app.Activity.performCreate(Activity.java:6684) 12-02 10:26:50.220 28600 28600 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) 12-02 10:26:50.221 28600 28600 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637) 12-02 10:26:50.221 28600 28600 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2751) 12-02 10:26:50.221 28600 28600 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 12-02 10:26:50.221 28600 28600 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496) 12-02 10:26:50.221 28600 28600 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 12-02 10:26:50.221 28600 28600 W System.err: at android.os.Looper.loop(Looper.java:154) 12-02 10:26:50.221 28600 28600 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6186) 12-02 10:26:50.221 28600 28600 W System.err: at java.lang.reflect.Method.invoke(Native Method) 12-02 10:26:50.221 28600 28600 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 12-02 10:26:50.221 28600 28600 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 12-02 10:26:50.221 28600 28600 W System.err: Caused by: java.security.UnrecoverableKeyException: Failed to obtain X.509 form of public key 12-02 10:26:50.221 28600 28600 W System.err: at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePublicKeyFromKeystore(AndroidKeyStoreProvider.java:230) 12-02 10:26:50.221 28600 28600 W System.err: at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStoreKeyPairFromKeystore(AndroidKeyStoreProvider.java:259) 12-02 10:26:50.221 28600 28600 W System.err: at android.security.keystore.AndroidKeyStoreKeyPairGeneratorSpi.loadKeystoreKeyPair(AndroidKeyStoreKeyPairGeneratorSpi.java:509) 12-02 10:26:50.221 28600 28600 W System.err: ... 28 more 12-02 10:26:50.221 28600 28600 W System.err: Caused by: android.security.KeyStoreException: Unknown error 12-02 10:26:50.221 28600 28600 W System.err: at android.security.KeyStore.getKeyStoreException(KeyStore.java:676) 12-02 10:26:50.221 28600 28600 W System.err: at android.security.keystore.AndroidKeyStoreProvider.loadAndroidKeyStorePublicKeyFromKeystore(AndroidKeyStoreProvider.java:231) 12-02 10:26:50.221 28600 28600 W System.err: ... 30 more 12-02 10:26:50.271 28600 28600 W System.err: java.io.FileNotFoundException: /data/user/0/org.shadowice.flocke.andotp/files/secrets.dat (No such file or directory) 12-02 10:26:50.272 28600 28600 W System.err: at java.io.FileInputStream.open(Native Method) 12-02 10:26:50.272 28600 28600 W System.err: at java.io.FileInputStream.(FileInputStream.java:146) 12-02 10:26:50.272 28600 28600 W System.err: at org.shadowice.flocke.andotp.Utilities.FileHelper.readFileToBytes(FileHelper.java:78) 12-02 10:26:50.272 28600 28600 W System.err: at org.shadowice.flocke.andotp.Utilities.DatabaseHelper.loadDatabase(DatabaseHelper.java:63) 12-02 10:26:50.272 28600 28600 W System.err: at org.shadowice.flocke.andotp.Activities.MainActivity.onCreate(MainActivity.java:327) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.Activity.performCreate(Activity.java:6684) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2751) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496) 12-02 10:26:50.272 28600 28600 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 12-02 10:26:50.272 28600 28600 W System.err: at android.os.Looper.loop(Looper.java:154) 12-02 10:26:50.272 28600 28600 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6186) 12-02 10:26:50.272 28600 28600 W System.err: at java.lang.reflect.Method.invoke(Native Method) 12-02 10:26:50.272 28600 28600 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 12-02 10:26:50.272 28600 28600 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 12-02 10:26:50.273 28600 28600 W System.err: java.io.FileNotFoundException: /data/user/0/org.shadowice.flocke.andotp/files/secrets.dat (No such file or directory) 12-02 10:26:50.273 28600 28600 W System.err: at java.io.FileInputStream.open(Native Method) 12-02 10:26:50.273 28600 28600 W System.err: at java.io.FileInputStream.(FileInputStream.java:146) 12-02 10:26:50.273 28600 28600 W System.err: at org.shadowice.flocke.andotp.Utilities.FileHelper.readFileToBytes(FileHelper.java:78) 12-02 10:26:50.273 28600 28600 W System.err: at org.shadowice.flocke.andotp.Utilities.DatabaseHelper.loadDatabase(DatabaseHelper.java:63) 12-02 10:26:50.273 28600 28600 W System.err: at org.shadowice.flocke.andotp.View.EntriesCardAdapter.loadEntries(EntriesCardAdapter.java:113) 12-02 10:26:50.273 28600 28600 W System.err: at org.shadowice.flocke.andotp.View.EntriesCardAdapter.(EntriesCardAdapter.java:81) 12-02 10:26:50.273 28600 28600 W System.err: at org.shadowice.flocke.andotp.Activities.MainActivity.onCreate(MainActivity.java:333) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.Activity.performCreate(Activity.java:6684) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2751) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496) 12-02 10:26:50.273 28600 28600 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 12-02 10:26:50.273 28600 28600 W System.err: at android.os.Looper.loop(Looper.java:154) 12-02 10:26:50.273 28600 28600 W System.err: at android.app.ActivityThread.main(ActivityThread.java:6186) 12-02 10:26:50.273 28600 28600 W System.err: at java.lang.reflect.Method.invoke(Native Method) 12-02 10:26:50.273 28600 28600 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 12-02 10:26:50.273 28600 28600 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)