04-24-2011 03:30 PM
I put the device into development mode. I deployed the debug token to the device. I performed a hard-reboot and I can see the properties of the debug token in the "security" settings.
Now I'm trying to deploy an unsigned bar file, and I can't get it to work.
Has anybody gotten this to work?
I modified my "blackberry-tablet.xml" file and added the "author" and "authorID" nodes (using an "authorID" value pulled out the debug token's manifest file). But when I look inside the resultant bar file (built either with or without the "-devMode" flag on the command lien), it's full of test values instead of legitimate IDs:
Package-Type: application Package-Author: Benjamin Smith Package-Author-Id: testQmVuamFtaW4gU21pdGggICA Package-Name: twystem Package-Id: testdHd5c3RlbSAgICAgICAgICA Package-Version: 184.108.40.206 Package-Version-Id: testMS4xLjAuMCAgICAgICAgICA Package-Architecture: armle-v7 Application-Name: Twystem HD Application-Id: testdHd5c3RlbSAgICAgICAgICA Application-Description: Tap and twist the colored pieces. Match colors, create combinations, and earn huge bonuses. This game is totally addictive. Application-Version: 220.127.116.11 Application-Version-Id: testMS4xLjAuMCAgICAgICAgICA Application-Category: core.games Application-Requires-System: Tablet OS/18.104.22.168 Application-Development-Mode: false
What's the deal here? There are five IDs that start with "test". I'm not sure where all those values are supposed to come from, but I assume the "Package-Author-Id" value is supposed to be the same as the one from my "blackberry-tablet.xml" file (which is the same as the "Package-Author-Id" in my debug token manifest.
This whole process is so ridiculous I can hardly stand it.
04-24-2011 03:39 PM
04-24-2011 03:45 PM
Oops. I should have mentioned the punchline:
When I try to deploy to the device, using this command:
blackberry-deploy -installApp -device <DEVICE IP> -password <DEVICE PASSWORD> -package twystem.bar
I get the error message "result::failure 500 BarFileUnsignedError"
Ummmmm... of course it's unsigned. That's the whole point!
04-24-2011 03:50 PM
Thanks John! I understand that the application ID could be different for an unsigned app.
But... shouldn't the Package-Author-Id match the values in the debug token? Isn't why there's a debug token in the first place?
04-24-2011 04:40 PM
04-24-2011 04:53 PM - edited 04-24-2011 04:54 PM
I don't use FlashBuilder. I've been using FlashDevelop (which works just fine for writing AS3 code, but it doesn't do any of the deployment magic).
So I've been doing all my deployment stuff via the command line. So far, I've eventually been able to figure out how to do everything I need (usually after several hours googling error messages and reading other people's horror stories). But at this point I'm totally stumped.
04-24-2011 05:27 PM
Okay, I found a solution. It's not ideal, but it works.
0) Make sure the device already has a debug token successfully deployed, and that the device is currently running in development mode.
1) Package the bar file (using the "-devMode" flag)
2) Change the file extension on the resultant bar file to ".zip"
3) Unzip the contents of the bar file.
4) Within the unzipped directory structure, find and open the file "META-INF/MANIFEST.MF"
5) Change the "Package-Author-Id" value from "testXXXXXXXXXX" to your real author ID (found in the manifest of the debug token bar file)
6) Zip the archives back up, and change file extension from "zip" back to "bar"
7) Deploy the application to the device, using this command:
blackberry-deploy -installApp -device <DEVICE IP> -password <DEVICE PASSWORD> -package <BAR FILE NAME>
I'm not crazy about this process, becuase it means I have to manually hack into the bar file and rewrite its manifest (or maybe I'll write a little python script to do it for me). But at least it finally works!
04-24-2011 06:01 PM