Page 1 of 1
sign with my key problem
Posted: Mon Oct 07, 2013 8:54 pm
by sirobchGA0cda
Hello,
iI followed the tutorial to create a key, but when I save the application it asks me the keystore and the password, and private key password.
I do not know how to solve this problem, I'm looking on the forum and google but I can not find the answer.
With version 5.5 everything was ok.
I'm on mac osx lion v LiveCode. 6.1.1
Thank you in advance for your help.
Best regards
Boris
Re: sign with my key problem
Posted: Mon Oct 07, 2013 9:58 pm
by sirobchGA0cda
Hello,
I have found :
when creating the key with keytool, it asks you to create a password for the keystore, and then to the public key, do not put the same password, and voila it works for me.
Best regards.
Boris
Re: sign with my key problem
Posted: Mon Jan 27, 2014 9:08 pm
by Mag
Thank you, useful info. BTW, what is the difference between the first password and the second one?
Re: sign with my key problem
Posted: Wed Jan 29, 2014 4:16 pm
by MaxV
However you can't install it on an Android device, there is the following bug
http://quality.runrev.com/show_bug.cgi?id=11267

Re: sign with my key problem
Posted: Wed Jan 29, 2014 6:14 pm
by james8
MaxV, I'm using LiveCode Commercial 6.5 (rc 7) and also 6.5.1 on Windows - I use Jarsigner rather than LiveCode to sign my APKs (choose "Do not sign" in your standalone application settings) and these install fine on a variety of Android devices. Might be worth trying?
Re: sign with my key problem
Posted: Thu Jan 30, 2014 6:30 pm
by MaxV
I just tried with:
Code: Select all
jarsigner.exe -keystore mykey.keystore MyApp.apk myAlias
but it doesn't work...
Please, may you upload a working example?
Which
jdk do you have?
Re: sign with my key problem
Posted: Fri Jan 31, 2014 3:38 pm
by james8
MaxV, I'm using JDK 1.6
I understand there's a new version of LiveCode (6.5.2) so perhaps the signing issue has been resolved ... ?
When using Jarsigner you may wish to include the folder path to your keystore and APK like this for example:
jarsigner -verbose -keystore C:\folder\mykey.keystore C:\folder\myapp.apk myalias
Re: sign with my key problem
Posted: Fri Jan 31, 2014 6:11 pm
by MaxV
I used JDK 1.7.0_10 and JDK 1.7.0_51, both create an uninstallable APK. This is what I get from jarsigner:
Code: Select all
C:\Programmi\Java\jdk1.7.0_51\bin>jarsigner.exe -verbose -keystore esempio.keystore MarkDownEditor.apk sviluppo
Enter Passphrase for keystore:
Enter key password for sviluppo:
adding: META-INF/MANIFEST.MF
adding: META-INF/SVILUPPO.SF
adding: META-INF/SVILUPPO.RSA
signing: res/drawable/icon.png
signing: res/drawable/notify_icon.png
signing: res/layout/livecode_inputcontrol.xml
signing: AndroidManifest.xml
signing: resources.arsc
signing: classes.dex
signing: lib/armeabi/librevandroid.so
jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2041-06-18) or after any future revocation date.
Then I try to install on device and I get "NOT INSTALLED"!

I'll double check with JDK 1.6
Re: sign with my key problem
Posted: Fri Jan 31, 2014 6:21 pm
by MaxV
SOLVED.
JDk 1.7 messes signing process, so you have to declare the old (JDK1.6) sign mode, here is the correct code to sign:
Code: Select all
jarsigner.exe -sigalg MD5withRSA -digestalg SHA1 -verbose -keystore myKey.keystore myApp.apk myalias
WOW!!!!
