Free simple tool for creating keystore file

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
kroka
Posts: 52
Joined: Fri Sep 28, 2007 10:20 am
Location: Berlin, Germany
Contact:

Free simple tool for creating keystore file

Post by kroka » Wed Nov 16, 2016 10:31 am

Hello everybody,

I just built a little tool that might be helpful for beginners - but it can also save time for advanced developers deploying their apps on Android.

"Keymaker" does what its name says: It creates a valid keystore file you need to sign your LiveCode-app with if you want to distribute it through Google PlayStore.

You enter all the data - most important the App Alias Name and the Password (will be used both for keystore and private) and the personal data. The tool will save your personal data so it appears automatically next time you use it. All you need to fill in then is alias name and password. After klick on "Generate keystore file" you can save the file wherever you like and use it to sign your LiveCode app with.

No more searching for the complex keytool-command, entering it in the console, going through the prompts and so on. This can save time and pain each time you create an Android app.

Image

Of course it is required to have JDK and Android SDK installed beforehand.

It's still kind of beta but it works for me.

http://www.fehr-media.de/downloads/Keymaker_Windows.zip

http://www.fehr-media.de/downloads/Keymaker_Mac.zip

Try it out if you like - any feedback welcome!

Regards

Kroka
Last edited by kroka on Thu Nov 17, 2016 6:23 pm, edited 2 times in total.
"irgendwas is immer"

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5679
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Simple tool for creating keystore file

Post by jacque » Wed Nov 16, 2016 5:48 pm

What a good idea. Wish I'd thought of that. Thanks!
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Ledigimate
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 132
Joined: Mon Jan 14, 2013 3:37 pm

Re: Free simple tool for creating keystore file

Post by Ledigimate » Thu Nov 17, 2016 7:33 pm

Thank you, Kroka!

I'm just curious, though... Does Google Play Store really accept apps signed with a self-signed key instead of one issued by a Certificate Authority?
010100000110010101100001011000110110010100111101010011000110111101110110011001010010101101010100011100100111010101110100011010000010101101001010011101010111001101110100011010010110001101100101

kroka
Posts: 52
Joined: Fri Sep 28, 2007 10:20 am
Location: Berlin, Germany
Contact:

Re: Free simple tool for creating keystore file

Post by kroka » Thu Nov 17, 2016 7:35 pm

Simple answer: Yes.
"irgendwas is immer"

AxWald
Posts: 472
Joined: Thu Mar 06, 2014 2:57 pm

Re: Free simple tool for creating keystore file

Post by AxWald » Fri Dec 30, 2016 1:03 pm

Hi,

for some strange reasons it creates a 0-Byte file "releasekey.keystore" here, which, when used to sign a StandAlone-to-be, results in an error:

There was an error saving the standalone application
signing failed - keystore load: null


Tested on 2 Machines running Win 10-64,
LC (community) 6.7.10 or 9.0 dp3,
JDK 1.8.0_91 or _92,
compiling for Android 4.0 IceCream Sandwich.

Compiling with "Sign for development only" results in functional apk's.

Any idea what's wrong here with this otherwise great & promising tool?

Have fun!
Livecode programming until the cat hits the fan ...

kroka
Posts: 52
Joined: Fri Sep 28, 2007 10:20 am
Location: Berlin, Germany
Contact:

Re: Free simple tool for creating keystore file

Post by kroka » Fri Dec 30, 2016 1:28 pm

It's working fine for me and for some others who reported using it.

If it is creating a 0-byte-file, it means the app hasn't found the keytool.exe - are you sure you have installed the Android SDK (and the JDK) properly?

Kroka
"irgendwas is immer"

AxWald
Posts: 472
Joined: Thu Mar 06, 2014 2:57 pm

Re: Free simple tool for creating keystore file

Post by AxWald » Fri Dec 30, 2016 5:31 pm

Hi,

thx for the quick reply!
Well, just updated Android Studio (2.2.3 now), was quite old ;-)
Updated to JDK 8u112 too, seems I missed some in between ...

No difference - 0-Byte file as result. Livecode compiles the StandAlone (dev_signed) happily, and it runs on my tablet. Ah, forgot to mention that I'm actually compiling for 4.0.3, API 15.

To make sure all is OK on my machine I created a cert by hand:

Code: Select all

C:\Program Files\Java\jdk1.8.0_112\bin>keytool.exe -genkey -v -keystore release.keystore -alias MyAppName -keyalg RSA -keysize 2048 -validity 10000
Keystore-Kennwort eingeben:
Neues Kennwort erneut eingeben:
Wie lautet Ihr Vor- und Nachname?
  [Unknown]:  My Name
Wie lautet der Name Ihrer organisatorischen Einheit?
  [Unknown]:  CEO
Wie lautet der Name Ihrer Organisation?
  [Unknown]:  AWC
Wie lautet der Name Ihrer Stadt oder Gemeinde?
  [Unknown]:  Munich
Wie lautet der Name Ihres Bundeslands?
  [Unknown]:  Bavaria
Wie lautet der Ländercode (zwei Buchstaben) für diese Einheit?
  [Unknown]:  DE
Ist CN=My Name, OU=CEO, O=AWC, L=Munich, ST=Bavaria, C=DE richtig?
  [Nein]:  Ja

Generieren von Schlüsselpaar (Typ RSA, 2.048 Bit) und selbst signiertem Zertifikat (SHA256withRSA) mit einer Gültigkeit von 10.000 Tagen
        für: CN=My Name, OU=CEO, O=AWC, L=Munich, ST=Bavaria, C=DE
Schlüsselkennwort für <MyAppName> eingeben
        (RETURN, wenn identisch mit Keystore-Kennwort):
[release.keystore wird gesichert]
And - it works :)

Assume there's a new quirk somewhere in the communication, thus I added the whole cmd line junk (only minimally altered). May it be of help to you :)

Have a good time, und einen guten Rutsch!
Livecode programming until the cat hits the fan ...

kroka
Posts: 52
Joined: Fri Sep 28, 2007 10:20 am
Location: Berlin, Germany
Contact:

Re: Free simple tool for creating keystore file

Post by kroka » Fri Dec 30, 2016 6:49 pm

I'll have another look at the tool. Maybe the regkey I am using to locate the keytool.exe isn't working for your version. Thank you for the report - so I can fix the problem.

Und wenn schon auf Deutsch, dann...

Schau gerne mal bei livecode-blog.de rein! :-)

Viele Grüße - und ein gutes Neues Jahr!

Kroka
"irgendwas is immer"

simon.schvartzman
Posts: 419
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Free simple tool for creating keystore file (EDITED)

Post by simon.schvartzman » Tue Feb 11, 2020 10:50 pm

Hi guys, in spite the fact that this is a relatively old thread may be @kroka and/or @AxWald are still reading the forum.

I have been using this extremely helpful tool but suddenly it is failing to generate the file exactly the same as reported by @AxWald. I wonder if a solution was ever found to the problem...

Otherwise does any one have an alternative to advice?

Many thanks in advance

Regards

EDIT: it seems the tool has some difficulties handling passwords with too many special characters (like $!@). Once I choose a PW with just letters and numbers everything worked fine.
Simon
________________________________________
To ";" or not to ";" that is the question

AxWald
Posts: 472
Joined: Thu Mar 06, 2014 2:57 pm

Re: Free simple tool for creating keystore file

Post by AxWald » Thu Feb 13, 2020 8:25 pm

Hi,

I never got it to work. Unfortunately it's a SA so I cannot debug it, additionally.
Though I remembered that once I had collected all the information about keys, and even started a stack for myself.

So I searched, found and finalized my own Keystore generator - it's, after all, nothing more than a few parameter collected in a GUI & thrown at a shell, using 'keytool.exe' from the android package.
I need some more time for testing (first APK signed already) & GUI scrubbing, then I'll post it here.

Quick Info: To do it the hard way, open a shell & go to the directory where your '.keystore' shall be created. Then run this:

Code: Select all

"[F:\Trash can\jdk1.8.0_824]\bin\keytool.exe" -genkeypair -keystore [yourAppAlias].keystore -storepass [yourPassword] -keypass [yourPassword] -dname "CN=[Your Name], OU=[yourOrgaUnit], O=[yourOrga], L=[yourCity],S=[yourState], C=[yourCountryCode]" -alias [yourAppAlias] -keyalg RSA -keysize 2048 -validity 100000
Replace anything in (and including) square brackets with the correct values. This makes a certificate valid for 100000 days (last value). For non-Win systems you'll want to replace the complete FilePath of the keytool.exe (at the beginning).

Have fun!
Livecode programming until the cat hits the fan ...

simon.schvartzman
Posts: 419
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Free simple tool for creating keystore file

Post by simon.schvartzman » Thu Feb 13, 2020 8:33 pm

Hi many thanks for replying but after all I got the original tool working
EDIT: it seems the tool has some difficulties handling passwords with too many special characters (like $!@). Once I choose a PW with just letters and numbers everything worked fine.
Cheers!
Simon
________________________________________
To ";" or not to ";" that is the question

AxWald
Posts: 472
Joined: Thu Mar 06, 2014 2:57 pm

Re: Free simple tool for creating keystore file

Post by AxWald » Fri Feb 14, 2020 5:37 pm

Hi Simon,

I read it. Nevertheless I decided to finish mine, and there's a reason:

We're in quite sensitive area here - we're generating certificates that should provide security to the users of our software. Using a closed source tool (that, above all, contains a tsNet lib ...) doesn't look, IMHO, like the proper way to do it. Especially if it is just a wrapper for a shell command.
Thus I want another solution.

The attached stack here works for Windows. There's no plan to make versions for Linux (my Mint doesn't work with Android SDK ...) and Mac (I don't code for muggers*), but the code is open & GPL, so whoever wants should have no problem. At least this shows how it is done. There's Help ("?") and Info ("i") included, it gives more explanations.

Have fun!
awa_KeyMaker.zip
Quick & Dirty Windows stack for Android KeyStore Creation
(10.14 KiB) Downloaded 83 times
*) This doesn't mean the users. It means the company telling me:
"If you want to write software for our platforms, you must shell out heavy $$$ 'cause we don't allow you to use other equipment. And you must shell out more $$$ annually, else we don't allow you the use of our required SDK. And last, you must give us near a third of all your earnings! HarHar!"
Muggers. That they don't ask for my firstborn - maybe they shy the feeding costs ...
Livecode programming until the cat hits the fan ...

Post Reply

Return to “Android Deployment”