Once again I bring you a tip from the depths of you won’t find this nowhere on the internet. I tell you, to figure this stuff out you gotta trial and error to you bleed or sleep with somebody that knows somebody from RIM. So you’re running the rapc compiler right? (For those of you that don’t understand the lingo rapc is a program that creates Blackberry installable software from Java program files. You only have to be taller than this bar to use the tool.) You run the compiler and now you wanna know where’s all the extra RIM attributes in your jad file. I mean, they were just there a minute ago and now… no matter what you do, you can’t get them back! That’s what happened to me this morning. I was like, “I’m missing RIM attributes in my jad, SignatureTool.jar dropped the ball man!” But it wasn’t SignatureTool that was responsible. It was rapc!
Here’s the secret: you can’t run the compiler in the same folder as a jar with the same name as your midlet (the name you use with the -midletname flag). In short, rapc won’t overwrite an existing Jar. This and many other Blackberry compiling goodness will be made available as I work on improving the Blackberry build experience. That’s all for now keep yer browser locked…
I don’t have time to figure this out completely so I’m just gonna post a link. I’ve been wanting to tether my Blackberry to my Mac (or is it the Mac to the Blackberry?) to access the net but I can’t seem to get a straight answer. According to a pro on the Sprint forums you need your NAI? The phone is company owned so I don’t know how to get this info. But I’d sure like to try. Once again, shamelessly inlining:
To use a Mac with Phone As Modem support, you will need specific information to use the handset as a modem device. Among this criteria is the number to connect to the Sprint Network, and a username / password.
Your username (as provided in the Internet Connection settings through OS X) is your NAI. Your NAI is your Sprint email address for your phone. This is typically firstname.lastname@example.org.
You can find your NAI by going through the settings on your handset. The typical menu path on your Sprint handset to get your NAI is:
1. Settings > Phone Info > My Phone Number (View) > User Name — When selecting User Name, you will be given your NAI. It will follow the name pattern above (usernameXXX@sprintpcs.com) where XXX is a number.
2. You will need the Phone number to connect to. To access the Sprint Network, you will use #777 for the phone number on your phone.
PLEASE NOTE: If you do not have an applicable data plan, you will be charged data usage, so ensure you have an appropriate data plan for your type of use. Also, depending on your market (EVDO, vs Non-EVDO) connections speeds will vary. Instructions for pairing your handset via Bluetooth will be provided in this thread as well. In a situation with a handset like the RAZR2, where a data cable is NOT provided, you can pair wirelessly with your Mac using Bluetooth, eliminating the need for a cable. Bluetooth is standard on all MacBook, Macbook Pro, and the MacBook air laptop. It is also standard on all Intel based Mac Minis and the iMac. The Bluetooth pairing will allow you to not only use the handset as a Phone as modem, but also use iSync to link your Calendars and Contacts with you handset provided you have the appropriate iSync plug-in for your phone.
It’s Friday night and I finally found the answer to the last part of my SignatureTool.jar problem. See this post here that I will shamelessly inline for the fear of losing it to a random blog crash or deletion. The wonderful developers at Rim have never developed on Linux or Mac before. So they use backslashes in their path references! In short the post to download the ClassEditor software to poke around and change the values in the constant pool. (Get ClassEditor here then continue with the rest of the instructions.)
extract it, and run it with the command:
java -jar ce.jar
Open two class files extracted earlier: q.class and ad.class. ClassEditor will look something like this:
ClassEditor with q.class and ad.class
Start with q.class and select the Constant Pool tab. In this file we need to change string constants containing just a single backslash character. There are actually two constants in the pool but the first is just a reference to the second. The string we want is at index 223.
String constant at index 223
By default ClassEditor starts in read only mode so click the bright green Modify Mode(Off) button in the top right. The fields in the details area are now editable. Simply change the forward slash to a backslash and click Modify. Click save and that’s it for q.class!
String constant 223 modified
Select ad.class on left and locate constant 117, again in the Constant Pool tab.
String constant at index 117
Change the value from \sigtool.set to /sigtool.set and click Modify. Click save and that’s it for ad.class.
String constant 117 modified
Repack SignatureTool.jar and test
To repack SignatureTool.jar just cd to the temporary directory where you extracted the jar and rejar the class files
jar -cmf META-INF/MANIFEST.MF ../SignatureTool.jar *
Go up one directory and remove the temp directory
rm -rf tmp
To test that everything worked, just run the command
java -jar SignatureTool.jar
If should prompt you to locate a cod file. Just cancel this and click the Properties button in the main signature tool window. If you see a list of Registered Signers it worked!
I followed the above with my copy of the SignatureTool.jar from the 4.2.x JDE and it worked flawlessly. After patching the SignatureTool.jar I repackaged it with the signature.csk signature.db and signatuer.set files and deployed it to our internal repo. The plugin I was working on now works without problems. I wanna stay up and work on this a little longer. I think I’ll put this post up on Monday.
Shamelessly I copy something I found in the Blackberry forums. I don’t know what it means but I DO know it’s one of those things that you have to search far and wide for. Some guy wanted to get into some debug mode that I’d never heard of so he posted his question then later his own answer to the forum thread. Read the solution below:
1. Have a login/password to https://www.blackberry.com/EngineeringScreens/ (updated 5/30/2008)
2. On the BlackBerry pres ALT+CAP+H and leave it on this screen.
3. Once logged in to the link on #1, you will be asked to enter your PIN#, Uptime and Zip code of where your device is.
4. You will then receive a unlock code that is specific to this information (if you exit out of this help screen on the blackberry, the uptime number will be different thus your code will be different.)
5. Then enter the unlock code on the BlackBerry, holding the ALT key for numbers, capitals are not necissary.
6. This will give you access to the Trace Mode Engineering App
7. Select “Radio Engineering” screen
8. Select “CDMA Engineering” screen
9. Select “Operational Info” (2nd line ec/io, 3rd line rss)
10. Scroll down to “Neighbor Set Details” and get 1st line Active Pilot, 2nd through 20th will give Neighbor sites with ec/io for each.
*This code will only work for 30 days, then you will need to get a new code in the same way.
I just ran the Blackberry compiler from Maven… on my Mac. Two cans of Pabst Ice and one Mike’s hard cranberry lemonade into my dev cycle and I finally see a “.cod” file show from a pyx4Me project! It’s in the wrong folder, project root vs. projectroot/target but I can live with that for now. Anyone know a groovy way to set the working directory from a command string run by the overloaded String.execute() method? I don’t wanna call out to Runtime.exec and I don’t wanna write a bunch of platform checks in my plugin. Right now I’m one too many drinks swallowed to know whether or not String.execute() implies platform. In other words I don’t know if I need to code a prefixing “cmd /c ” on my string and check for Windows before calling String.execute(). I’m not happy with the impl because there were a few things I wanted to do better. Right now I’m spawning a java process because the GMaven plugin doesn’t set the rootLoader, which means I can’t dynamically append to my classpath. I’ll either have to set the rapc.jar as a dependency or figure something else out. I’m just glad I got this far! More updates later…
If you own a Blackberry device and you like to play with things, like ringtones or wallpapers, or games, or if you develop software for Blackberry devices like I do then listen up! That’s right, put your ear next to your web browser and listen! There’s a new threat for computer hardware and it effects you Blackberry users. It’s the white screen of death and it manifests as an infinite rebooting sequence. It’s scary as all heck, especially if you’re about to release Beta and have 160 manhours of testing to complete in the next day and a half and a strict policy on company issued Blackberrys that mandate you are not allowed to crack open the casing and tickle the electrons on the circuit board. (I know, what a dumb policy, right?) Here’s the solution I found while frantically scouring the web. The short answer is to use the application loader to perform a device wipe. You have to connect while the thing is on the white screen I think. However I kinda don’t think it matters because my (BB) screen went dark right after I entered my password, leaving me wondering what in the world the application loader was actually connected to since the phone was obviously dead. I would never have figured this out in a million years. I was going about it all wrong. In my dumb brain I thought, “Why not hook up to the backup and restore console in the Desktop manager? Because I wanna restore my Blackberry, right? I’m not trying to load applications, I wanna remove everything and start from scratch!” Well for what it’s worth hook up to the Desktop Manager application loader to fix a constantly rebooting Blackberry.
(Oh and here’s the best part! Right after I finally got it to start the wipe sequence a coworker asked me a question causing me to rotate my chair clockwise while the USB cord was threaded through the armrest resulting in a catastrophy that ended with the yoinking of my device from the desktop hitting the floor, and disconnecting the cable. I’m not sure what this is going to do to the restore because it’s still restoring as I update this post but I’m sure its not a good thing to disconnect the USB cord on an OS restore to an already malfunctioning device. It can’t be much better to rebound said device off of the floor.)