Android key password is missing - android-studio

I'm using the Android Studio 4.1.1 on MacBook, the AS has been updated several times.
I checked How to retrieve Key Alias and Key Password for signed APK in android studio(migrated from Eclipse), but it's not working, there is no AndroidStudio log files under the /Library/Logs directory.
How can I find the password?

I've found the password. Thanks god!

Related

Why does AndroidStudio fail when Building Signed APK for Google Play (says bad password, but I've confirmed password)?

I have a Keystore (.jks) which I used to sign the previous release of my App (.APK) for Google Play. That was 1 year ago or so.
Now, when I attempt to build and use my keystore, Android Studio gives me the following incorrect error:
Could not build signed APK. Keystore was tampered with, or password was incorrect.
Android Studio version information:
Android Studio Bumblebee | 2021.1.1 Patch 3
Build #AI-211.7628.21.2111.8309675, built on March 16, 2022
Runtime version: 11.0.11+0-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.11.0-49-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin (211-1.6.21-release-334-AS7442.40)
Current Desktop: ubuntu:GNOME
Here is the functionality I'm attempting to run:
Build => Generate Signed Bundle / APK
Displays the following screens...
When I click [Finish] button Android Studio attempts to build & it fails with the error:
Could not build signed APK. Keystore was tampered with, or password was incorrect.
That Is an Incorrect Error
However, that is not correct because I use a password manager to store the password, so I know I have the correct password. I also kept screenshots of the last time I ran this functionality so I could confirm the key alias and it is correct also.
Things I Tried
I tried rebuilding a couple of times & got the error.
I closed & restarted Android Studio & still got the error.
At one point Android Studio crashed with a bug report & I tried again & it failed again.
Why does this error occur?
I discovered some other people reporting what seemed to be an issue with having a password that contained special chars (# !, etc) at this link.
It does seem to be the same failure, but I finally got it to work & I will post the answer.
I started a console window and ran the following against my keystore.
$ keytool -list -keystore 'fakeNmae.jks' -storepass fake-password-same-one-i-used-in-android-studio
I saw the details of my keystore printed out in the console:
Keystore type: JKS Keystore provider: SUN
Your keystore contains 1 entry
fake-alias-name, Dec 15, 2019, PrivateKeyEntry, Certificate
fingerprint (SHA-256): 63:D3:69:69:39:29:5D:5E:14:20:E1:F6:FA:DF:ED
(fake data)
Warning: The JKS keystore uses a proprietary format. It is recommended
to migrate to PKCS12 which is an industry standard format using
"keytool -importkeystore -srckeystore fakeName.jks -destkeystore
fakeName.jks -deststoretype pkcs12".
Since I had to supply my password this confirmed that I was indeed using the correct password.
It also confirms that the keystore was not tampered with (corrupted).
I was a bit confused at this point.
Solution
I started AndroidStudio again & tried it again and it built the signed APK with no problem. I was able to upload it to Google Play.
Very odd. It seems that listing the details somehow fixed the issue in Android Studio. Would love to hear something about this from someone who might know why.
Maybe it has to do with that new warning about the PKCS12 format??
In my case it was the wrong alias, alias is specified during the creation of the keystore, so if the alias is not the same as the one specified during creation you definite get an error.

Password verification failed while generating signed bundle for my android app

Now I need to enter key store password and key password every time I generate a signed bundle even with a checked "Remember passwords".
It seems to appear with my new configuration of Android Studio 4.2 and Gradle 4.2.0
With the remembered passwords, I now got as the result of generating bundle "Password verification failed"
With re-entering the passwords, the generation goes fine.
What went wrong ?
Update : new version 4.2.1 of Android Studio. Still I can't build two releases in a row :
21:29 Executing tasks: [:app:bundleRelease] in project D:\Android Studio Projects\Acme
21:30 Gradle build finished in 52 s 8 ms
21:30 Generate Signed Bundle
App bundle(s) generated successfully for module 'Acme.app' with 1 build variant:
Build variant 'release': locate or analyze the app bundle.
21:30 Executing tasks: [:app:bundleRelease] in project D:\Android Studio Projects\Acme
21:31 Gradle build failed in 34 s 262 ms
21:31 Generate Signed Bundle: Errors while building Bundle file. You can find the errors in the 'Messages' view.
Execution failed for task ':app:signReleaseBundle'.
A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
Failed to read key acme_alias_name from store "D:\Android Studio Projects\acme\app\my-release-key.keystore": Keystore was tampered with, or password was incorrect
It's a bug introduced in the last studio version. Worked fine for years, with this version after generating a signed APK changing projects or modules results in this error on the next APK generation. They're corrupting the passwords, it's nothing to do with the file name.
You have to change your keystore file name without any special characters and numbers because I also faced same problem, in my case my keystore file name with underscore, I removed the underscore and tried, apk was build successfully. Try this and let us know.
From my point of view, this issue is closed with Android Studio Artic Fox 2020.3.1 Patch 2 version

android 3.4 - how to generate signed apk and build apk?

I'ved just updated from android studio 3.0.1 to 3.4, I cant seem to find the option to generate signed apk.
Also , I cant build apk, it has no effect. following is where I click.
https://i.imgur.com/4SGmgGG.png
How to generate signed apk now for android 3.4 ?
Click Generate Signed Bundle/APK in Build menu option.
https://i.stack.imgur.com/rQ6O5.png
The problem was solved with this.
the project was opened with this and caused the problem:
- Open an existing Android Studio project
this actually solved the problem when i opened this way:
import project (Gradle, Eclipse, ADT, etc)
try this
Clean Project
Rebuild project
Invalidate Caches and Restart
And then Build APK
You need to first generate a private key using keytool, For Example:
keytool -genkey -v -keystore my-release-key.jks-keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
The keystore as a file called my-release-key.jks, saving it in the current directory (you can move it wherever you'd like). The keystore contains a single key that is valid for 10,000 days
Sign your app manually from the command line
Sign APK to use zipalign and apksigner as described below.
step 1: Open Android Studio, select View > Tool Windows > Terminal—and navigate directory where unsigned APK.
step 2: unsigned APK using zipalign:
zipalign -v -p 4 my-app-unsigned.apk my-app-unsigned-aligned.apk
**step 3:**APK with your private key using apksigner:
apksigner sign --ks my-release-key.jks --out my-app-release.apk my-app-unsigned-aligned.apk
**step 4:**Verify that your APK is signed:
apksigner verify my-app-release.apk
then Configure Gradle to sign your app

android studio doesn't let me try different alias when building signed apk

I tried to build a signed apk but i wrote an incorrect alias and build failed, now whenever i try to build writing the correct alias and passwords build still fails but the error messagge is:
No key with alias 'old alias' found in keystore
Can someone explain me how do I build with a different alias name?
My keystore and alias passwords are 100% correct.
I know it's a bit old but what worked for me was cleaning the project (in Android Studio, go to option "Build" then "Clean project". It may vary depending on your Android Studio version) and then trying again to generate a signed APK with the right alias.

Android Studio local Subversion server

I'm running latest MacOS and Android Studio versions.
I've looked online for help regarding local SVN for Android Studio and all the tutorials gave me an online server option.
I didn't find what I was looking for. I did use file:///... for SVN URL, but it keeps asking me for authentication and my password isn't working. I'm thinking that some plugin is required, like in Eclipse (I had a local SVN in for my Eclipse workspace) or installing beforehand a SVN server.
But I would like a local SVN for my workspace in Android Studio.
How should it work?
Best regards.

Resources