Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: lxman on April 07, 2011, 07:41:33 pm

Title: Help with signing a flash app
Post by: lxman on April 07, 2011, 07:41:33 pm
Hello all,

I have been working with TI Flash Studio, and I have the beginnings of a chemistry flash app going which loads and works fine on the emulator.  I have emailed TI (doesn't) cares and basically got a response that said that they'll think about getting back with me one of these days and maybe giving me a key to sign the app to put it on my calculator for testing purposes.  I will not belabor TI's attitude, as I am sure you all are already well aware of what it entails.

Anyway, in order to get the app out where I can test (and eventually distribute) it, I have downloaded the key files from brandonw's website.  I have also downloaded and attempted with rabbitsign and resign68k.  I am able to successfully sign the app (at least no errors are output and a file is created).  When I attempt to load the file to my calculator, however, I receive a "no matching certificate on the calculator" message, and of course it refuses to load.

Would any of you kind coders care to assist me in getting me up to speed on how to sign this app properly?

 ;D

Any assistance would be much appreciated.

Thank you in advance.
Title: Re: Help with signing a flash app
Post by: Ashbad on April 07, 2011, 07:49:30 pm
What signer are you using?  I personally use wappsign, and even though TI distributed it, it works fats and simple enough for quick testing.

Also, are you sure you did your app header correctly?  One mistake can kill the entire thing x.x depending on where it is.

And, thirdly, what calculator are you using, with what OS?  I doubt this has anything to do with it, but it's a good idea to check everything ;)

Edit: and are you using 0104.key?
Title: Re: Help with signing a flash app
Post by: lxman on April 07, 2011, 07:53:57 pm
Thank you for the quick reply.  It's an 89 Titanium with 3.10 AMS.  I have tried rabbitsign as well as resign68k.  They both sign the app without any error messages using the 0109 key (the free 89T app key) but, alas, when I try to load to the calc, it fails.

I hadn't tried wappsign yet.  I'll look around and see if I can find a copy of it.
Title: Re: Help with signing a flash app
Post by: Ashbad on April 07, 2011, 08:06:03 pm
Oh, 68K?  Sorry, I can only help with z80 assembly flash apps x.x I'm sorry :(

I'm sure there are a few people who will know though ;)
Title: Re: Help with signing a flash app
Post by: DrDnar on April 07, 2011, 09:40:00 pm
What operating system are you using, and where can I find the Microsoft JVM? >< I wanted to get into 68K flash apps, but TI's Flash Studio requires the Microsoft JVM, which Microsoft can no longer distribute due to a lawsuit from 2001. Which goes to show that TI stopped caring about the community long before the TI-84+ came out.

Also, what exact calculator hardware are you using?

I'd like to write some new 68K development tools, but without the Flash Studio, I can't easily generate and dissect sample applications.
Title: Re: Help with signing a flash app
Post by: lxman on April 07, 2011, 10:05:09 pm
XP SP3 within virtualbox on my Fedora 14 64 bit system

The jvm I found by doing a Google search for "msjavx86 download"

The calc reports HW ver 2, boot ver 2.2.2 and AMS 3.10
Title: Re: Help with signing a flash app
Post by: lxman on April 07, 2011, 10:09:56 pm
Ah, correction - make that hw version 4
Title: Re: Help with signing a flash app
Post by: FloppusMaximus on April 07, 2011, 11:23:38 pm
Maybe try using the 0103 key instead?  Unless you're doing stuff that specifically requires the Titanium hardware or OS 3.x, older 89 users will thank you. :)  In any case, I don't think I've ever seen any apps in the wild that used the 0109 key.
Title: Re: Help with signing a flash app
Post by: DrDnar on April 07, 2011, 11:27:09 pm
I was wondering about that. I'm guessing that the 0109 key is like the 010A key in terms of usefulness and popularity. Speaking of which, why isn't USB8X signed with it?
Title: Re: Help with signing a flash app
Post by: lxman on April 07, 2011, 11:39:46 pm
No, I'm just using standard TI pseudo-C.

I tried 0103 - still no good (I tried with both rabbitsign and resign68k).  The exact error message is "No certificate exists for the object being downloaded."  Should I be downloading some sort of certificate file?
Title: Re: Help with signing a flash app
Post by: FloppusMaximus on April 07, 2011, 11:49:20 pm
Weird.  Have you tried installing any official apps from TI?

Oh, and maybe this is a silly question, but did you edit the application header to use the correct key ID?  I've never worked with TI's 68k development tools, but they presumably default to using the 14F03 key (a special key that's only accepted by their emulator and isn't used on any real calculators.)

I was wondering about that. I'm guessing that the 0109 key is like the 010A key in terms of usefulness and popularity. Speaking of which, why isn't USB8X signed with it?
Maybe because usb8x was last updated in 2007?  :P
Title: Re: Help with signing a flash app
Post by: lxman on April 08, 2011, 12:18:50 am
Hmm, OK, you may be on to something here.

I did not edit the header to change the 14F03, but I do seem to remember seeing that number come up on one of my earlier attempts.  So what do I need to edit where to change that?

As to loading apps, yes, I have several other flash apps from TI and from ticalc which loaded without issue.
Title: Re: Help with signing a flash app
Post by: lxman on April 08, 2011, 01:28:20 am
HAH!  I found out how to do it!  It works   :evillaugh:

For those who are curious - and I am sure one or two are - here's how:

Go into the install directory for TI Flash Studio.
Look around for a file called sdk-89.key
Obliterate it  O.O
Create a new text file called sdk-89.key with the following:

[Redacted by request- TsukasaZX]

Note:  That's three lines.  And thanks to Lionel for those numbers.  I got them from an IRC chat between him and BrandonW.

Build your app.

Load it onto your calc.

Worked for me!  YMMV
Title: Re: Help with signing a flash app
Post by: jnesselr on April 08, 2011, 07:19:05 am
Yeah, bad idea to post those numbers there.  A VERY bad idea.  Please remove them immediately, thanks.

EDIT: they have been removed, thanks TsuakasaZX.
Title: Re: Help with signing a flash app
Post by: Lionel Debroux on April 08, 2011, 07:32:54 am
I don't read the entire board, I'm seeing those messages just now through the messages on the chan.
Yes, a way to have FlashApps signed by TIFS is fiddling with the sdk-89.key and sdk-92p.key files. It's even easier than using RabbitSign / resign68k if you have the source of the FlashApp.
But for compiling FlashApps, you have to withstand the horrible TIFS mess: buggy, limited, dependent on Microsoft's proprietary implementation of Java incompatible with the standard, etc.
Title: Re: Help with signing a flash app
Post by: jnesselr on April 08, 2011, 07:34:50 am
So would you say it's a good alternative as long as you have TIFS already?
Title: Re: Help with signing a flash app
Post by: Lionel Debroux on April 08, 2011, 07:37:59 am
Yes, fiddling with TIFS's files, so that it signs FlashApps with the 0103 key (for 89/89T FlashApps) or the 0101 key (for 92+/V200) when compiling them is better than letting TIFS sign them with these non-standard 14F03/14F01 keys and using RabbitSign/resign68k after the fact.
Title: Re: Help with signing a flash app
Post by: lxman on April 08, 2011, 08:56:08 am
Whoops, sorry, didn't know that I'd get anybody in trouble with that.

I'll be advised in the future.  Thanks for the correction.

Here's a random thought:

Since TIFS is only a front end for the Sierra compiler utilities, why not just write a new front end?  I know that the compiler wouldn't be improved, but some of the bugs in the IDE portion could at least be addressed.  Plus it could be made cross-platform relatively easily.

Just a thought.
Title: Re: Help with signing a flash app
Post by: lxman on April 10, 2011, 08:56:27 pm
I know this post is a few days old now, but I just discovered something that may be relevant, or may not.  With the demo flash app provided with TIFS, I opened it up and looked at project settings.  Under post-build, I found the following lines:

//\python\python "c:\src\simulators\68k\ti flash studio\tools\mkapplet.py" -n "App1" App1.out
//\perl\bin\perl "c:\src\simulators\68k\ti flash studio\tools\certc.pl" App1.src App1.cer
//\perl\bin\perl "c:\src\simulators\68k\ti flash studio\tools\flcerthdr.pl" App1 92+ app App1.cer App1

Needless to say I have already searched my hard drive, and the python and perl files are not present.  It appears to just be an oversight on some overworked programmer's part.  I never know, though, what information might be useful to others.  So, fwiw, here it is.