Everybody.
I have a trouble to build signed apk again for upgrading version from 1.0 to 1.1.
Followings are what i did.
First i built an apk by choosing 1) Let Expo handle the process!.
And then uploaded the apk to google store.
Nowdays, i have to upgrade the version, but i don't have any keystore file.
These are what i tried to do.
Downloaded upload_cert.der file from Google store.
Created a keystore file by this command
keytool.exe -importcert -file upload_cert.der -keystore <keystorefile>.keystore
Built an apk by choosing 2) I want to upload my own keystore!
But can't install the apk with an error.
When i run this command keytool -printcert -jarfile <apkname>.apk,
this message appears Not a signed jar file
So Could you everybody let me know please...
Is this really impossible to upgrade apk without original keystore
Or how to create a correct keystore from upload_cert.der file
Thanks.
Related
I have created a Xamarin Form application using Visual Studio 2017 in Windows 10 and archived the android application to APK file.
When I upload the APK to Google Play console to update my existing app, it says the APK is not signed. Then I used this command to sign the APK using the same certificate
apksigner sign --ks <KEYSTORE_FILE_NAME> --ks-key-alias <ALIAS_NAME> <APK_FILE_NAME>
When I try to upload the signed APK, it says the APK is not zipaligned. Then I used this command to zipalign
zipalign -f -v 4 <OLD_APK_FILE_NAME> <NEW_APK_FILE_NAME>
When I upload the zipaligned APK to console, it says the APK is not signed. After I sign using apksigner it says it is not zipaligned. I am keep on circulating in the same circle again and again.
Even after I zipalign the APK first and then sign, Same error messages are displaying again and again in same circle.
Even if I used jarsigner, the situation is same.
I followed the steps given here
https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing/signing-the-app-package/manually-signing-the-apk/
But the APK not getting uploaded. What am I doing wrong?
Please note this is not a duplicate question.
apksigner requires you to zipalign prior to signing. jarsigner requires you to zipalign after signing. This is documented in the zipalign docs.
I am using login with amazon in android. I got all the certificate like(SHA256,MD5 for release mode) and its working fine in release mode but when i publish in Google play store it showing me api key error.
java.lang.IllegalArgumentException: Invalid API Key
Any help is appreciated,thx.
You are using Upload-Cert SHA, You should change your API SHA to Play Store App-Signing SHA.
thanks to # Berat Eyüboğlu now my problem is solved. i just want to add more details. After following all the steps we need to run command(for that java have to install in the system)
keytool -printcert -file your.RSA
after that i got all the certificate that i used for api key.
Steps
go to build Generate Signed Apk (in android studio)
After getting signed apk just rename the APK extension to ZIP if necessary Unzip the APK file and extract CERT.RSA .
run this command in command prompt keytool -printcert -file CERT.RSA. (Keytool is located in the java/jdk/bin in windows) all the certificate like MD5,SHA1,SHA256 display command prompt.Use that details for API key.
When uploading a new apk to the play store after exporting an app from Android Studio, I was given this error message
http://i.stack.imgur.com/B03sJ.png
When I verified the SHA1 on the keystore it seems to match the necessary SHA1
http://i.stack.imgur.com/hgQf1.jpg
I then extracted the CERT.RSA file from the META-INF folder in the APK.
When running the following keytool command on the CERT.RSA (that was given to me by google developer console support) it equaled the invalid fingerprint (89:92...)
$ keytool -printcert -file CERT.RSA
Why does the fingerprint differ from the keystore and the apk?
I managed a workaround for this issue by manually signing the apk. It seems to be an issue with android studio in correlation with my keystore.
I have just finished and signed the apk through android studio,
then I have did an apk protect through apkprotect.com
when I am trying to upload the apk to play store I got this error " You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again. "
if I upload the original apk I got no errors,
I have tried to add zipalign true in the build.gradle but nothing happened
I have tried also disable and enable proguard .
You can run zipalign manually in command line:
zipalign [-f] [-v] <alignment> infile.apk outfile.apk
Note that zipalign is located inside ${sdk.dir}\tools
For more details visit zipalign
[Update]
Also, If you need to sign it you can run:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore YOURKEYSTORE unsigned.apk alias_name
(jarsigner is located inside java JDK_HOME/bin)
I got the same "You uploaded an APK that is not zip aligned... blah, blah" error when by mistake I tried to upload a DEBUG version of my .apk file to Google Play. It's a bit misleading error because the real problem is that you cannot distribute a debug version which additionally is not signed with your Google Android Developer key. (You can only upload an .apk compiled as release version, and it must be signed, which happens in the same step, at least if you're using Eclipse).
Make sure you distribute an .apk file which is your Signed Release version, as described here:
http://developer.android.com/tools/publishing/app-signing.html#releasecompile
This question and its answers are old; so we expect things to change. As of today, the zipalign tool is in the ANDROID_HOME directory under build-tools/[version]/ so my path is currently:
/android-sdk/build-tools/22.0.0/zipalign
Using the zipalign tool is not necessarily the answer here though, what you actually need to do is sign your apk.
Steps if using Xamarin for VS2017:
Build project
Right click and Archive project
Use Ad Hoc distribution channel
Sign your APK with your Signing Identity and Save As to produce an APK that is ZIP aligned.
Your APK can be uploaded to Google Play.
I was using Cordova, uploaded a signed APK but still got this error.
The ziptool is what helped me, it's located at ~AndroidSDK\build-tools\24.0.0\zipalign.exe
So for example :
"~\AndroidSDK\build-tools\24.0.0\zipalign.exe" -f -v 4 android-release-signed.apk android-release-signed-zipaligned.apk
I was using Cordova and the command line getting this error. I opened the project in Android Studio and used Android Studio to build the signed apk and the error went away.
When using the Cordova node.js CLI without going through Android Studio, it is necessary to update the PATH environmental variable to include the android build tools:
%ANDROID_HOME%\build-tools\29.0.2
Obviously the version number will change over time. Remember to close any CLI windows and re-open them to recognize the newly added path.
I am developing android application using titanium developer. I want to know the apk generated from titanium is a signed or unsigned apk ? and also i want to know is it generated in the debug mode or release mode. These information i need for releasing my app into market.
If its unsigned then how do I sign the application?
If its in debug mode then how do I change into releasing mode?
Anything you build and deploy to an emulator or local device via the "Run on Emulator" and "Run on Device" tabs are signed with a debug key that cannot be distributed via the market. When you create a key file and use that to package under the "Distribute" tab these are signed with your key and can be distributed through the market.
There are instructions on the android developer site for generating the certificate key file here:
http://developer.android.com/guide/publishing/app-signing.html#cert
Verifying apk file is signed
1) If apk file is not signed when you package for distribution in Titanium Studio, then you cannot install the yourproject.apk file in you device. (You can confirm that your apk file is not signed if this occurs)
2) Another way to verify is by using jarsigner -verify yourproject.apk
Signing unsigned apk file
1) You need to create Key store / password, this video will help you http://vimeo.com/10278960
(The process will appear in middle of the video, go through it)
2) After creating the keystore, run the below command to sign the apk file
jarsigner -verbose -keystore /path/to/keystore/file PROJECT.apk ALIASNAME
EX:
jarsigner -verbose -keystore /home/balan/tmp/KeyStore360/android.keystore myproject.apk androidalias
AFAIK apk generated from titanium is not signed. You will have to package the application for it be be signed.
See this video for more clarity Distributing Your Mobile Application