android-keystore
A problem occurred evaluating project ‘:app’. > path may not be null or empty string. path=’null’
For me it was a pathing problem. I was following the flutter guide https://flutter.io/docs/deployment/android Create a file named <app dir>/android/key.properties that contains a reference to your keystore: For some reason I (wrongfully) placed my “key.properties” in the app_dir/android/app folder, and this gave me the error. * What went wrong: A problem occurred evaluating project ‘:app’. … Read more
Release APK file not showing google maps
Reason for this issue This occurred because there are different SHA1s in debug and release types. Fix for this issue Add the SHA1 of the keystore used to build the release APK to Google console Steps: Get the path of the keystore when you generate signed APK Build —-> Generate Signed APK.. Save the key … Read more
No key with alias found in keystore
The problem seems to be with the wrongly spelled key alias In my case the alias should have been toyanath patro where I wrongly tried to use toyanathpatro . So the best suggestion would be: Don’t use space or invisible character in the key alias. as far as possible There is a small selection button … Read more
Android Studio – Keystore was tampered with, or password was incorrect
I had a similar problem while updating my app. The keytool was not reading the correct keystore file and instead pointing to an older keystore file that I created months ago and not used. Searched for some solutions online but didn’t find one. Almost gave up but I thought about cleaning the project by clicking … Read more
Android 9 – KeyStore exception android.os.ServiceSpecificException
Finally I found a solution. It looks like since Android P (KeyStore.PrivateKeyEntry) keyStore.getEntry(“alias”, null) is not a proper way to get private key. I was able to get rid of this warning by accessing private/public key this way KeyStore keyStore = KeyStore.getInstance(“AndroidKeyStore”); keyStore.load(null); PrivateKey privateKey = (PrivateKey) keyStore.getKey(“alias”, null); PublicKey publicKey = keyStore.getCertificate(“alias”).getPublicKey();
Android Keystore Error “could not generate key in keystore”
public class EncryptionApi18AndAbove{ private Context context; private KeyStore keyStore; private static String alias = “alias”; public EncryptionApi18AndAbove(Context context) { this.context = context; try { keyStore = KeyStore.getInstance(“AndroidKeyStore”); keyStore.load(null); } catch (Exception e) { // bla bla } } private String createNewKeys(String alias, Context context) { try { if (!keyStore.containsAlias(alias)) { Calendar start = Calendar.getInstance(); Calendar … Read more
Android Fingerprint API Encryption and Decryption
I found the final piece of the puzzle on the Android Issue Tracker, another known bug causes the unrestricted PublicKey to be incompatible with the Cipher when using OAEP. The work around is to add a new OAEPParameterSpec to the Cipher upon initialization: OAEPParameterSpec spec = new OAEPParameterSpec( “SHA-256”, “MGF1”, MGF1ParameterSpec.SHA1, PSource.PSpecified.DEFAULT); mCipher.init(opmode, unrestricted, spec); … Read more