I am quite new to android, this question maybe quite simple. But i do need your help. I am preparing to submit a update to google play now. When i export the android application, there is a keystore selection dialog. But i don't have the keystore. The project was developed by another company before. Now we only have the source code and the google play developer account. After reading the Signing Your Applications, i know i need to generate one. But there is still something i am not sure about this.
The keystore generate command as below:
$ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
This is a self-signed certificate. Is this sufficient for me to submit the update? Or need me to generate another one ? if so, then how to do that?
Any suggestion would be much appreciated.
For creating your own Keystore go to C:\Program Files\Java\jdk1.6.0\bin and execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -genkey -v -keystore app.keystore -alias app -keyalg RSA -keysize 2048 -validity 300000
It'll created your app.keystore in C:\Program Files\Java\jdk1.6.0\bin directory and by using this keystore you can sign you application. You must keep this keystore safe because of your app next update.
Update: command for generate SHA-1 from your app.keystore
D:>keytool -v -list -alias app -keystore "D:app.keystore" -storepass app -keypass app
Right click to the project --> select Android tools -->Export signed Application package
this bring you to window "Export Android Application"
Complete the rest. this will give you signed apk as well as keystore
You can take help from this link too :https://www.youtube.com/watch?v=IYhJp-jqJyM
You'll need the original keystore, otherwise you won't be able to update the application on the Play Store. Ask the previous developer to give the one he used to sign the application, then save it in the safest place you can think of.
Related
I'm trying to deploy my Flutter app to Android. According to the Flutter documentation we have to sign our apps. The first step is to create an upload keystore. There are apparently two ways to do this.
The first method uses Android Studio. The instructions say:
In the menu bar, click Build > Generate Signed Bundle/APK.
Here's a screenshot of Build in Bumblebee 2021.1.1:
Where is Generate Signed Bundle/APK?
I clicked Build > Flutter > Build App Bundle. This ran for awhile and finished without error messages.
The second method uses the CLI. You enter this (on a Mac or Linux):
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
That prompted me for a keystore password. What is that and where do I get one?
I'm supposed to see a upload-keystore.jks file in my home directory. Does this mean in my project's home directory or my user home directory? I don't see that file.
Next, I'm told to
Create a file named [project]/android/key.properties that contains a reference to your keystore:
storePassword=<password from previous step>
keyPassword=<password from previous step>
keyAlias=upload
storeFile=<location of the key store file, such as /Users/<user name>/upload-keystore.jks>
What password from what previous step? And where is the key store file located?
I apologize if this is all obvious to Android users. I've always used iPhones. I bought my first Android phone yesterday and this is completely baffling to me.
Thank you #ישו אוהב אותך. The mistake is that when you run
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
it prompts you: Enter keystore password: It should say Create new keystore password or Enter new keystore password.
I made up a unique new password swordfish and entered it. I was prompted for my name and address and then told:
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 /Users/TDK/upload-keystore.jks -destkeystore /Users/TDK/upload-keystore.jks -deststoretype pkcs12".
So apparently there's a second item that needs to be updated in the documentation.
I ran the new command and now I see a file upload-keystore.jks in my user home directory (not in my project home directory).
I'll post a ticket with Flutter the make these two updates.
Followed some guides but I cannot get it quite right. I will show you the process below that does not make it quite work.
First of all I started off by acquiring an API-key on google console and i put that into my project.
I acquired the sha 1 by typing this into the terminal:
keytool -list -v -keystore ~/.local/share/Xamarin/Mono\ for\ Android/debug.keystore -alias androiddebugkey -storepass android -keypass android
The map now runs smoothly and fine in my xamarin project when I run it on my device.
Then when I try to upload the project I create a keystore named: "myproject.keystore" and I give it the Alias and password: "myproject" as well.
Just like this:
$ keytool -genkey -v -keystore myproject.keystore -alias myproject -keyalg RSA -keysize 2048 -validity 10000
When I now upload the app to google play and it gets accepted I cannot see the map.
Try comparing your project settings between DEBUG and RELEASE to find a difference. Or check for any hard coded API keys or anything that that would be different between the two environments.
Edit:
So after your myproject.keystore is created, you need to extract the SHA-1 from that keystore and add that to the Credential list in Google.
So if you created your myproject.keystore in ~/Users/Someone/Desktop/, then you would extract the keystore the same way you did with the DEBUG version:
keytool -list -v -keystore ~/Users/Someone/Desktop/myproject.keystore
That should give you the second SHA-1 that you need to add to the Google site.
I got the SHA-1 fingerprint from using the keytool for my application on my key that I sign the application with when I upload it to the play store.
But when I open the app on my phone for testing it says it is not the right key. ANy ideas what I could be doing wrong?
Not sure what more information i can give without giving security info for my app, so if you can help give me anymore information that I can not think of please let me help you help me.
First for the development generate a SHA-1 from debug.keystore:
Navigate to C:\Program Files\Java\jdk1.6.0\bin>..... where your bin located then execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "D
:debug.keystore" -storepass android -keypass android
or
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "C:\Documents and Settings\user1\.android\debug.keystore" -storepass android -keypass android
Now, you can get one SHA-1 certificate and generate API key from Google API console. Add this key into your manifest.xml file. remember this API key only for the development. Using this key built apk u can not publish into market.
Now, turn to make your own keystore: execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -genkey -v -keystore OWN.keystor
e -alias ALIASNAME -keyalg RSA -keysize 2048 -validity 300000
and give all the required details for this keystore. Now time to generate SHA-1 from your OWN.keystore execute below commnad
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias ALIASNAME -keystore "C:\Program Files\Java\jdk1.6.0\bin\OWN.keystore" -storepass PASSWORD -keypass KEYPASSWORD
Now, you can get one SHA-1 certificate and generate API key from Google API console. Replace this key into your manifest.xml file. Now your app is ready to publish into market.
This may helpful to you.
Have you tried to completely remove the application and then install it all over again. This key might be got cached and even if you install the application with new key.
So before you install your application with the new key, try to remove the application completely from the phone.
You can as well go over this blog post I wrote and make sure you do all the steps right in producing the key:
Google Maps API V2 Key
I am upgrading Android application that was previously uploaded to the market.
The algorithm is as follows:
Using Eclipse Android tools I export unsigned application package
Then, I am using the same script as at the 1st uploading:
keytool -genkey -v -keystore almeesoft.keystore -alias almeesoft -keyalg RSA -validity 10000
The script asks for the passcode.
Honestly, I do not remember the passcode that I used the 1st time, so I guess
The application is starting uploading
However, at the and I am getting the message
“The apk is not properly signed”
You must sign the apk with the same private key you used when you first uploaded it. If you do not remember the password then you are out of luck. You will not be able to ever update this application. You will need to upload this as a different application with a unique package name.
You are at big loss if you have forgot your password, signing a apk with different keystore will result in different application on android market.
read this
I was incorrect blaming the problem on the forgotten password. There are 2 scripts one needs to run at the first uploading
1.
keytool -genkey -v -keystore .keystore -alias -keyalg RSA -validity 10000 -keypass -storepass
2.
jarsigner -verbose -keystore .keystore .apk -keypass -storepass
The generated file .keystore should be saved.
On the 2nd uploading (updating) only the 2nd (!) script should be run using the same *.keystore file.
after finishing my android application development i used the command showing below to get private key, but it shows some errors such as "The Keystore was tampered with or password was in correct"
$ keytool -genkey -v -keystore DEBUG.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Is my problem with DEBUG.keystore?? Should i need to generate another keystore for public release??
Yes, you should definitely generate another key for public release (and keep it in a save place for future updates).
See http://developer.android.com/guide/publishing/app-signing.html#releasemode for details.
EDIT:
If you'r using Eclipse, use the ADT Plugin for Android to create your keyfiles and sign your application.