sign with my key problem

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sirobchGA0cda
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 47
Joined: Wed Dec 21, 2011 10:42 am
Contact:

sign with my key problem

Post by sirobchGA0cda » Mon Oct 07, 2013 8:54 pm

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
My application "GeoMaths" is available on Itunes and Google Play !

sirobchGA0cda
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 47
Joined: Wed Dec 21, 2011 10:42 am
Contact:

Re: sign with my key problem

Post by sirobchGA0cda » Mon Oct 07, 2013 9:58 pm

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
My application "GeoMaths" is available on Itunes and Google Play !

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: sign with my key problem

Post by Mag » Mon Jan 27, 2014 9:08 pm

Thank you, useful info. BTW, what is the difference between the first password and the second one?

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: sign with my key problem

Post by MaxV » Wed Jan 29, 2014 4:16 pm

However you can't install it on an Android device, there is the following bug http://quality.runrev.com/show_bug.cgi?id=11267
:cry:
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

james8
Posts: 7
Joined: Thu Jan 09, 2014 3:04 pm

Re: sign with my key problem

Post by james8 » Wed Jan 29, 2014 6:14 pm

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?

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: sign with my key problem

Post by MaxV » Thu Jan 30, 2014 6:30 pm

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?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

james8
Posts: 7
Joined: Thu Jan 09, 2014 3:04 pm

Re: sign with my key problem

Post by james8 » Fri Jan 31, 2014 3:38 pm

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

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: sign with my key problem

Post by MaxV » Fri Jan 31, 2014 6:11 pm

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
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: sign with my key problem

Post by MaxV » Fri Jan 31, 2014 6:21 pm

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!!!! :D
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply