Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 32
Registered: ‎03-31-2011
My Device: PlayBook
My Carrier: Developer

Has anyone been able to get debug tokens working?

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: 1.1.0.0
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: 1.1.0.0
Application-Version-Id: testMS4xLjAuMCAgICAgICAgICA
Application-Category: core.games
Application-Requires-System: Tablet OS/1.0.0.0
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.

--------
An addictive new puzzle game for PlayBook: Twystem HD
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Has anyone been able to get debug tokens working?

Unsigned apps are seperate from traditional, signed apps. They have their own ID so you can have the same app, both signed and unsigned on the device.
Contributor
Posts: 32
Registered: ‎03-31-2011
My Device: PlayBook
My Carrier: Developer

Re: Has anyone been able to get debug tokens working?

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!

--------
An addictive new puzzle game for PlayBook: Twystem HD
Contributor
Posts: 32
Registered: ‎03-31-2011
My Device: PlayBook
My Carrier: Developer

Re: Has anyone been able to get debug tokens working?

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?

--------
An addictive new puzzle game for PlayBook: Twystem HD
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Has anyone been able to get debug tokens working?

hey benjismith,

how are u doing all of the debug token stuff and deployment? Flash Builder or Command Line?
J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
Posts: 32
Registered: ‎03-31-2011
My Device: PlayBook
My Carrier: Developer

Re: Has anyone been able to get debug tokens working?

[ Edited ]

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.

--------
An addictive new puzzle game for PlayBook: Twystem HD
Contributor
Posts: 32
Registered: ‎03-31-2011
My Device: PlayBook
My Carrier: Developer

Re: Has anyone been able to get debug tokens working?

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!

--------
An addictive new puzzle game for PlayBook: Twystem HD
Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Has anyone been able to get debug tokens working?

hey,

glad you got it worked out -- just one question though: what SDK are you using to do all this? Double check and make sure you are using the 1.0.1 SDK and not any of the older ones. good luck!
J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
Posts: 32
Registered: ‎03-31-2011
My Device: PlayBook
My Carrier: Developer

Re: Has anyone been able to get debug tokens working?

Yep. I'm definitely using the 1.0.1 SDK.

--------
An addictive new puzzle game for PlayBook: Twystem HD
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Has anyone been able to get debug tokens working?

Dont forget -devMode argument