The ModMyTM Family of Sites.
ModMyMoto - Software Modding Forums and Updates for Motorola Phones
Arrow_TcatSponsored Links

Arrow_TcatTag Cloud
Tags

Arrow_TcatLatest Threads
Mark Forums ReadMark Read


Arrow_TcatTop Posters
Top Posters

Arrow_TcatModMyGphone Forum
Android Forum | GPhone Forum

Go Back   ModMyMoto - Software Modding Forums and Updates for Motorola Phones : Design : Java Apps
Register Downloads FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2008, 06:13 AM
Skrilax_CZ's Avatar
Skrilax_CZ online
I eat small children
 
Join Date: Feb 2007
Location: Prague
Posts: 3,964
BST Feedback: (0)
Thanks: 1,295
Thanked 1,664 Times in 888 Posts
Troubleshooting [GUIDE] Obtain a developer certificate and sign a MIDlet with it to give permissions

This guide is a general guide which will work 100% on any Motorola J2ME phone. However there is more work to be done.

Those who have RSA signature bypassed phones with extended JAVA permissions don't need to worry about this.
This applies for all Motorola Phones including MOTOMAGX and SYMBIAN platform although I believe this is most useful for Synergy OS phones without RSA signature bypass available for their firmware.
The signature is phone specific and will work only on the phones you specify their UIDs in the request.
Be sure you run STOCK JAVA CERTIFICATES ON YOUR PHONE (scroll down how to).

Obtain a developer certificate
Sign up on developer.motorola.com, log in and search "Developer Certificate". It should be the first result ("Please read this ...", Answer ID 570). Scroll down to file attachments and follow the pdf guide. It is pretty well explained there and it will tell you how to extract your phone UID. Then read the resolution part. You submit request by asking a question.
NOTE: Update the Motodev when you download it.

JAD file and Manifest.mf file
Now this is a bit difficult part for those who does not know much info about the JAD. Not every application has JAD File with it, so you can use JAD Maker to generate a .jad file for it. Manifest.mf file can be found in the JAR archive in meta-inf folder. Please note that all information specified in the Manifest.mf must match to the information specified in the JAD file. Mismatches may result: "Failed. Invalid File." when installing the application.

Fixing Manifest.mf and JAD file
EVERYTHING that you edit by hand must be on one line!!! Now, open the Manifest.mf file (if you use WinRAR to open the JAR file, just doubleclick on it): make sure that there are not these lines and if they are there, delete the whole line:
MIDlet-Jar-URL:, MIDlet-Jar-Size: . Save it. (update in the archive)
(Some copilers add them there - don't ask me why.)

Open the JAD file and make sure MIDlet-Jar-URL: points to your jar archive (so it is like: MIDlet-Jar-URL: filename.jar, sometimes it points to an URL and that is resulting error). Leave the MIDlet-Jar-Size: for now). Save both files (update manifest.mf in the archive).

Signing & Giving Permissions
The easiest way how to sign an application is to use UPDATED MOTODEV (All ways are clearly described in the PDF file). The only problem here is that you must specify permissions for the application.

A) MOTODEV Signing
The Some applications like Opera Mini 4.1 have already specified permissions. Open JAD file or Manifest.mf and seek MIDlet-Permissions: and MIDlet-Permissions-Opt:. If that is the case, add them during the signing procedure exactly as they were. If that is not the case, add them yourself - scroll down here to know which to use. Sometimes dunno why MOTODEV say error during signing. Then you must do Manual Signing.

B) Manual Signing
The Some applications like Opera Mini 4.1 have already specified permissions. Open the JAD file or Manifest.mf file and seek MIDlet-Permissions: and MIDlet-Permissions-Opt:. If that is the case, only make sure they are same in both manifest.mf and JAD file. If you modified manifest.mf file before then right click on the jar file and click on properties. Write the Size (not Size on disk) in bytes to the MIDlet-Jar-Size: parameter in the JAD file. (Example: MIDlet-Jar-Size: 503412)

If they are not, open the Manifest.mf file and add this line MIDlet-Permissions: and specify permissions (scroll down here to know which to use). Separate each permission using comma. Add the very same line to the JAD file. Again keep in mind that EVERYTHING that you edit by hand must be on one line!!! Save Manifest.mf file (update manifest.mf in the archive), then right click on the jar file and click on properties. Write the Size (not Size on disk) in bytes to the MIDlet-Jar-Size: parameter in the JAD file. (Example: MIDlet-Jar-Size: 503412)

So for example, your manifest.mf file should look like this before signing them:
Code:
 
MIDlet-Vendor: Jimm Project
Jimm-Version: 0.5.1
MIDlet-Version: 0.5.1
Manifest-Version: 1.0
FlipInsensitive: True
Created-By: Jimm Project
MIDlet-Name: Jimm
MIDlet-Info-URL: http://www.jimm.org/
Ant-Version: Apache Ant 1.7.0Beta2
Background: True
MIDlet-1: Jimm,icon.png,jimm.Jimm
MicroEdition-Configuration: CLDC-1.0
MIDlet-Icon: icon.png
MIDlet-Permissions: javax.microedition.io.Connector.socket,javax.microedition.io.Connector.file.write,javax.microedition.io.Connector.ssl,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https
MicroEdition-Profile: MIDP-2.0
MIDlet-Description: J2ME ICQ clone
and your JAD file like this:

Code:
Ant-Version: Apache Ant 1.7.0Beta2
Background: True
Created-By: Jimm Project
FlipInsensitive: True
Jimm-Version: 0.5.1
MIDlet-1: Jimm,icon.png,jimm.Jimm
MIDlet-Description: J2ME ICQ clone
MIDlet-Icon: icon.png
MIDlet-Info-URL: http://www.jimm.org/
MIDlet-Jar-Size: 171913
MIDlet-Jar-URL: Jimm.jar
MIDlet-Name: Jimm
MIDlet-Permissions: javax.microedition.io.Connector.socket,javax.microedition.io.Connector.file.write,javax.microedition.io.Connector.ssl,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https
MIDlet-Vendor: Jimm Project
MIDlet-Version: 0.5.1
Manifest-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-2.0
Now you can sign it manually (its 4) in the PDF Guide).

From the link in my signature there you can find some prepared Java Applications that just need to be signed. Also there is so wanted Google Maps that is already signed by them thus working on all phones.

Again MAKE SURE THAT YOUR CERTIFICATE AND THE SIGNATURE STRINGS ARE ON ONE LINE if you do not use MOTODEV!!!!
NOTE: Some text editors are not capable of putting over 1000 characters on one line and automatically split it in two - then you cannot use those.

Permissions
I described the probably most used permissions:
javax.microedition.io.Connector.http - Grants http access for internet connection
javax.microedition.io.Connector.https - Grants https access for internet connection
javax.microedition.io.Connector.socket - Grants socket access (used by Opera Mini, Jimm for internet connection)
javax.microedition.io.Connector.ssl - Grants ssl access (some apps may use that)
javax.microedition.io.Connector.file.write - Grants file write access
javax.microedition.io.Connector.file.read - Grants file read access
NOTE: Granting a premission that your phone doesn't support will result "Failed. Invalid File!" message when installing. If you are not sure about the support, give the permission to "MIDLet-Permissions-Opt:". Thus if you use MOTODEV and don't want to worry about this, you may tick the 'javax' box on the top when editing optional permissions. I did not test it myself but it should work.

Installing stock java certificates (only for Synergy OS phones)
Backup your P2k:/a/mobile/certs/root/x509 folder using P2K Commander. Then download stock java certs from the link in my signature. Install al those files into P2k:/a/mobile/certs/root/x509.

Note: Taken from RAZR2 V9 firmware (R263313_U_A0.03.43R_O) but should work on all Synergy OS phones.
Note: If you use unbranded firmware then you don't have to worry about this.

Installing the applcation - Synergy OS phones
Use MIDWay 2.8. If your phone has USB Settings menu item, switch it to Data Connection. Then BEFORE you plug it in go to Java Settings and Click Java App Loader, then connect it. Open MIDWay, open the signed JAD with it and install it and you are ready to use it.

Note: If you cannot see Java App Loader, you must do following seem edit first: SEEM 0032_0001; offset 43; bit 0 ON. (it seems to be same for all phones).

Installing the applcation - MotoMagX phones
Use Motorola Phone Tools. Open File Transfer Studio, copy both the *.jar and *.jad files to some folder in the phone.
Then use the phone file manager to navigate yourself to the folder you uploaded the game and click on it to install it. You are ready to use it.

FAQ

How to update the PATH Enviroment variable?
Type this console command: set PATH=%PATH%,C:\openssl\bin or wherever you installed open SSL. This will update the path just for the current console window (or go to registry for permament update)

Last edited by Skrilax_CZ; 05-22-2009 at 09:28 AM.. Reason: Updated
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
19 Users Say Thank You to Skrilax_CZ For This Useful Post
abelenki (04-04-2009), anezch (02-03-2009), Av3LaR (04-02-2009), babak5 (11-28-2008), berniesteven (06-19-2009), biyahero (05-12-2009), ferrarix (06-18-2009), inyong (06-04-2009), jacky.jack (10-18-2008), jaims009 (10-05-2009), jaykay (07-31-2008), mehlor (11-20-2009), mfhrdnsw03 (06-09-2009), R^7Z (07-22-2008), seiken_k1 (07-02-2009), TheEnlightenment (09-25-2009), Trickybitch (07-25-2008), whoistherabbit (03-10-2009), yrallen (11-13-2008)
  #2  
Old 06-01-2008, 08:44 AM
Semseddin's Avatar
Semseddin offline
Shine on you crazy diamond
 
Join Date: Nov 2006
Location: Turkiye
Posts: 6,264
BST Feedback: (0)
Thanks: 1,708
Thanked 2,415 Times in 1,003 Posts
Send a message via ICQ to Semseddin
Thanks for the great guide.

Stuck !!!
__________________
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #3  
Old 06-02-2008, 02:57 AM
evil slayer's Avatar
evil slayer offline
Moto My Way
 
Join Date: May 2007
Location: here and there
Posts: 668
BST Feedback: (0)
Thanks: 76
Thanked 81 Times in 64 Posts
Send a message via MSN to evil slayer
wow.....nice guide.useful for the modders who can't remove rsa from there phone.
thanx!!
__________________
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #4  
Old 06-02-2008, 05:01 AM
kent_lkc's Avatar
kent_lkc offline
No brick, no gain. Real modder.
 
Join Date: Dec 2006
Posts: 876
BST Feedback: (0)
Thanks: 114
Thanked 369 Times in 127 Posts
thanks for this useful information.
__________________

www.motoxtreme.info - Site Owner
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #5  
Old 06-02-2008, 04:29 PM
russoeternal's Avatar
russoeternal offline
E is for Ezra
 
Join Date: Dec 2006
Posts: 11,750
BST Feedback: (4)
Thanks: 2,259
Thanked 3,238 Times in 1,524 Posts
Awesome guide.
__________________
iPhone Evolution - blog para iPhone, cualquier cosa que necesites.
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #6  
Old 06-03-2008, 05:23 AM
Xitiz's Avatar
Xitiz offline
Graphics Guy
 
Join Date: Oct 2006
Location: Indeeyeah!
Posts: 2,908
BST Feedback: (0)
Thanks: 1,204
Thanked 1,060 Times in 164 Posts
Send a message via Yahoo to Xitiz
Good work.
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #7  
Old 06-03-2008, 05:55 AM
RaMi's Avatar
RaMi offline
E is for Ezra
 
Join Date: Jun 2007
Location: a:\ mobile\ system
Posts: 4,235
BST Feedback: (1)
Thanks: 1,404
Thanked 1,418 Times in 841 Posts
Amazing.
__________________
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #8  
Old 06-03-2008, 06:15 PM
rwill80 offline
Maybe Modder
 
Join Date: Jun 2007
Location: Orange County, California
Posts: 43
BST Feedback: (0)
Thanks: 1
Thanked 2 Times in 1 Post
Ok... stupid question, but how do you edit the manifest file? I understand you have to open the Jar file using something like WinRar, but do you just extract it, edit it, and replace it? Thanks!
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #9  
Old 06-04-2008, 02:35 AM
Skrilax_CZ's Avatar
Skrilax_CZ online
I eat small children
 
Join Date: Feb 2007
Location: Prague
Posts: 3,964
BST Feedback: (0)
Thanks: 1,295
Thanked 1,664 Times in 888 Posts
Open the JAR in WinRAR, then double click on the manifest.mf file. It will prompt you if it should update it in the archive when oyu close notepad. Or, you can do it the very same way you say.
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #10  
Old 06-05-2008, 12:05 AM
Gagan_rocks's Avatar
Gagan_rocks offline
Be a Rebel
 
Join Date: Jan 2007
Location: India
Posts: 4,046
BST Feedback: (0)
Thanks: 559
Thanked 913 Times in 13 Posts
Send a message via Yahoo to Gagan_rocks
Nice guide there
thanks
__________________
"Giggs can twist your blood"
- Sir Alex FERGUSON
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #11  
Old 06-08-2008, 01:41 PM
ramoo's Avatar
ramoo offline
I Mod Moto
 
Join Date: Aug 2007
Location: I Really Dont Know !
Posts: 286
BST Feedback: (0)
Thanks: 0
Thanked 5 Times in 6 Posts
thank you thank you thank you !!
__________________
Siggy by Krawls
CLICK BUTTON BELOW IF U LIKED THE POST
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #12  
Old 06-10-2008, 12:56 AM
atmfrank offline
Itty Bitty Modder
 
Join Date: May 2008
Posts: 14
BST Feedback: (0)
Thanks: 0
Thanked 0 Times in 0 Posts
I am trying the get this signing process down for my Z9 and not having any fun at all. Have email exchanges going with the MOTODEV people. So far I have:
a bound certificate for the Z9
installed MOTODEV SDK for Java ME
installed the cert
began signing GMM, Opera or any other apps
the operations keeps failing with "Failed, invalid file" no matter what I try. I checked for root certs, Security/Cert Management says I have a (P) USMotorola root cert installed.

Still awaiting the next reply from MOTODEV. The validated my cert, the UID is correct, so I am at a loss explaining this. It is possible that AT&T policy is "operator signed", preventing 3rd party signed apps on the phone ? That would be a nightmare

Cheers, -atmfrank
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #13  
Old 06-10-2008, 04:42 AM
Skrilax_CZ's Avatar
Skrilax_CZ online
I eat small children
 
Join Date: Feb 2007
Location: Prague
Posts: 3,964
BST Feedback: (0)
Thanks: 1,295
Thanked 1,664 Times in 888 Posts
First, install stock java certificates to your phone (new section in guide). You can download already signed GMM from the link in my sig. Then make sure that all info that is in both manifest.mf and JAD file matches to each other.

Last edited by Skrilax_CZ; 06-10-2008 at 04:52 AM..
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #14  
Old 06-10-2008, 12:47 PM
atmfrank offline
Itty Bitty Modder
 
Join Date: May 2008
Posts: 14
BST Feedback: (0)
Thanks: 0
Thanked 0 Times in 0 Posts
Problem is the file system doesn't have manifest.mf. I found a binary file named "srsfile", which appears to have cert information at the end of it. I already added the MOTO... certs to root folder. These were missing, but I have not replaced all of them. Same results.

I have three cing.... certs in the kjava folder. The Security/Cert Management list shows two (P) USCingular certs, one has a lock symbol in front. It also has (P) USIllinois, which appears to be the Motorola 40-1 security domain. Also with a lock symbol. In theory at least this is the one my signing cert references, which is bound to the 40-1 security domain.
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
  #15  
Old 06-11-2008, 12:41 AM
deepaksrivastav's Avatar
deepaksrivastav offline
Of Mice and Modders
 
Join Date: Mar 2007
Posts: 94
BST Feedback: (0)
Thanks: 16
Thanked 30 Times in 12 Posts
Good guide mate !
__________________
is for Ezra
StumbleUponDelicious Digg Reddit Newsvine Google Yahoo Reply With Quote
Reply

  ModMyMoto - Software Modding Forums and Updates for Motorola Phones : Design : Java Apps
Tags: ,



M3 Home

M3 Modding Guides

M3 Downloads Section

M3 Modding Software Downloads

M3 Phone Specific Downloads

M3 Skin Downloads

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump