Wednesday, April 30, 2008

Samsung BlackJack I (WM6) Java Permissions

If you have a Samsung BlackJack I that is updated to Windows Mobile 6, you can use the built-in JBlend application for java apps rather than installing IBM J9. Any apps you install will have access to the Internet, but you have to give permission each time. In order to fix this, you will need a hex editor and probably have to have your phone "application unlocked" (you can find instructions for this with Google).

Connect your phone to your computer with ActiveSync. Explore to the /Windows/Java folder. You should find various files that are a number and the extensions will be like .jar, .jdx, .mss, etc. Each number represents a java application that you have installed.

To find the application you want to unlock, copy the .jdx file(s) to your computer. Use your hex editor to view the .jdx file. In the ASCII view, you should see the name of the original .jad file. You can use this information to identify which program the numbered .jar file is for.

In my case, I only have the gMail application installed, so my 0.jdx file mentions gMail, the google website, etc. Since I now know that all the 0.* files are for gMail, I copy the permissions file, which is 0.mss, to my computer.

Using the hex editor, change the byte at address 0x0A to 0x04. Save the file. Copy it back to your device, replacing the original 0.mss file.

Start Java on the BlackJack. Highlight the gMail app. Press Menu, Application, Permissions. You will now have options under all categories for "Blanket" and "Session." Blanket means it will always allow without asking. Session means it will ask the first time only.

Enjoy!

P.S. If you simply want to enable all your applications, I suggest that you just edit one .mss file, and then copy it over all the .mss files that are there. Also, you could find out which application 0.mss is for using the procedures above. Edit 0.mss and copy it back to your device. Then set the permissions the way you want on your device. Copy the updated 0.mss file over any other .mss files you have to give the same permissions to the other apps.

UPDATE: I have zipped up an already editted .mss file that you can copy over your existing .mss files. It will turn on the other selections, but still default to OneShot (for security). Once copied, you can change the permissions manually for each application. Get the zip file here.