after doing right-click on package -> Export signed application package... -> verify with valid keystore i got an APK.
To get sure i used jarsigner to check if my app is correctly signed.
$ jarsigner -verify -verbose -certs my_application.apk
and i got jar verified as response.
Is my APK now correctly signed with a release key? Ready to upload?
Also how can i check, like it is recommended by the android documentation, my signed apk on my phone? (To check if proguard didn't cut of something which is necessary for my app and so on..)
Any help is appreciated.
If your APK is not signed correctly, you will not be able to upload it to the Play-Store.
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.
I am facing some unexpected problem while trying to upload the latest exported signed APK, earlier i was using eclipse and now i am using android studio and i have followed all steps and exported the signed apk, Also i verified both old apk last uploaded and this exported release apk and verified using below command
$ jarsigner -verify -verbose -certs my_application.apk
Both result looks same, which means the apk is signed with same certificate, Still when i try to upload to google play its showing me below error message.What else i need to do?
Solution
In one of the Library module inside Android Studio, Below line was existing
Debuggable==true
I Removed it, then I was able to export the APK.
Do you remove the tag "debuggable true" from your build.gradle file?
I have really strange problem. Years ago I write an App which was written in Eclipse. Then I upgraded to Android Studio 0.4.3 Everything was work correctly but now I delete this AS and work with new version (Android Studio 141.xxxx).
The problem is, that I use the same JKS certificate, but after upload
to Google Play Store I see communicate about difference in finger
print.
You uploaded an APK that is signed with a different certificate to
your previous APKs. You must use the same certificate. Your existing
APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: D0:D9:BE:8B:D2:6A:5F:xxxxxxxxxxxxxxxxxxxx:F4:D9:91:66:06:12 ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: DA:53:9F:A7:D3:3C:8D:xxxxxxxxxxxxxxxxxxxx:CE:1F:F2:AB:0B:64 ]
I tried sign my app manual but then I have this communicate.
Upload failed You uploaded an APK with invalid or missing signing
information for some of its files. You need to create a valid signed
APK. Learn more about signing.
Anyone have an idea? Here is similar question but without answer.
Okey... Finally I resolve this Issue. But I still don't know why it occurs.
Firstly I make sure that I use the same jks before
jarsigner -verify -verbose:summary -certs old.apk
jarsigner -verify -verbose:summary -certs new.apk
Certificates looks the same. So I build my application and sign this with my certificate. But it doesn't work.
So I made it manually
I open my apk file with WinRAR and then, delete META-INF dir from app-release-unaligned.apk (app\build\outputs\apk in my case)
Paste zipalign.exe to folder with my app-release-unaligned.apk
Open CMD in folder with your apk (shift + right click + "Open command window here.")
Then I use manually jarsigner and then zipalign.exe.
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore key.jks -storepass MYPASSWORD app-release-unaligned.apk 1
zipalign -f -v 4 app-release-unaligned.apk app-release.apk
Then I upload app-release.apk to Google Console. Everything works great ;)
The problem I believe you have is that you uploaded your apk without using your own key-store file.
The file might have changed between IDE versions.
refer to this answer for an explanation on why this is a problem:
https://stackoverflow.com/a/4843261/3497739
Also read this reference page to understand how to properly sign your apk
https://developer.android.com/tools/publishing/app-signing.html
Good luck
Probably problem in keystore.
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: D0:D9:BE:8B:D2:6A:5F:xxxxxxxxxxxxxxxxxxxx:F4:D9:91:66:06:12 ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: DA:53:9F:A7:D3:3C:8D:xxxxxxxxxxxxxxxxxxxx:CE:1F:F2:AB:0B:64 ]
That means that you use incorrect keystore, not the keystore which you used to sign the previous version of APK.
Make sure that you use the same keystore file. If it the same - re-generate key again.
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