Slide # 1

1

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 2

2

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 3

3

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 4

4

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Slide # 5

5

GET TUTORIALS RELATING TO JAVA S40 N AlchemyOS N OTHER OS!!! Read More

Sunday, 7 April 2013

get developer certificate and sign a MIDlet with it to give permissions

Hello my  Friends,i m back this one of the useful tutorial you should know. Don't wasting your time.... let's have a look !!! 


Note: 
!.  It will work 100% on any Motorola J2ME phone.
2. Those who have RSA signature bypassed phones with extended JAVA permissions don't need to worry about this.
3. 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.
4. The signature is phone specific and will work only on the phones you specify their UIDs in the request.
5. Be sure you run STOCK JAVA CERTIFICATES ON YOUR PHONE (scroll down how to).


Obtain a developer certificate:

1.  Sign up on developer.motorola.com, log in and search "Developer Certificate". (Please read, Answer ID 570).
2.  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:1. Every application may not has JAD File with it, so you can use JAD Maker to generate a .jad file for it.
2. Manifest.mf file can be found in the JAR archive in "META-INF" folder.

Note:
 
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:Note: EVERYTHING that you edit by hand must be on one line.

1. Open the Manifest.mf file. 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.)
2. 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).
3.  Save both files (update manifest.mf in the archive).

Signing & Giving Permissions:    Use UPDATED MOTODEV for this. The only problem here is that you must specify permissions for the application.

    A) MOTODEV Signing
    1. 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:.
    2. 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.

Note: Sometimes dunno why MOTODEV say error during signing. Then you must do Manual Signing.

    B) Manual Signing
    1. 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:.
    2. 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).
    3. 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.


Note: 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).

For example, your manifest.mf file should look like this before signing
  1. MIDlet-Vendor: Jimm Project
  2. Jimm-Version: 0.5.1
  3. MIDlet-Version: 0.5.1
  4. Manifest-Version: 1.0
  5. FlipInsensitive: True
  6. Created-By: Jimm Project
  7. MIDlet-Name: Jimm
  8. MIDlet-Info-URL: http://www.jimm.org/
  9. Ant-Version: Apache Ant 1.7.0Beta2
  10. Background: True
  11. MIDlet-1: Jimm,icon.png,jimm.Jimm
  12. MicroEdition-Configuration: CLDC-1.0
  13. MIDlet-Icon: icon.png
  14. 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
  15. MicroEdition-Profile: MIDP-2.0
  16. MIDlet-Description: J2ME ICQ clone
Copy the Code
And your JAD file like this:
  1. Ant-Version: Apache Ant 1.7.0Beta2
  2.     Background: True
  3.     Created-By: Jimm Project
  4.     FlipInsensitive: True
  5.     Jimm-Version: 0.5.1
  6.     MIDlet-1: Jimm,icon.png,jimm.Jimm
  7.     MIDlet-Description: J2ME ICQ clone
  8.     MIDlet-Icon: icon.png
  9.     MIDlet-Info-URL: http://www.jimm.org/
  10.     MIDlet-Jar-Size: 171913
  11.     MIDlet-Jar-URL: Jimm.jar
  12.     MIDlet-Name: Jimm
  13.     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
  14.     MIDlet-Vendor: Jimm Project
  15.     MIDlet-Version: 0.5.1
  16.     Manifest-Version: 1.0
  17.     MicroEdition-Configuration: CLDC-1.0
  18.     MicroEdition-Profile: MIDP-2.0
Copy the Code
Now you can sign it manually.

Note:
1.  MAKE SURE THAT YOUR CERTIFICATE AND THE SIGNATURE STRINGS ARE ON ONE LINE if you do not use MOTODEV!!!!
2.  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.

3. 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


4.  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):1.  Backup your P2k:/a/mobile/certs/root/x509 folder using P2K Commander.
2.  Download stock java certs from the link in my signature. Install al those files into P2k:/a/mobile/certs/root/x509.

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

    
Installing the applcation - Synergy OS phones:1.  Use MIDWay 2.8. If your phone has USB Settings menu item, switch it to Data Connection.
2.  BEFORE you plug it in go to Java Settings and Click Java App Loader, then connect it.
3.  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:1.  Use Motorola Phone Tools.
2.  Open File Transfer Studio, copy both the *.jar and *.jad files to some folder in the phone.
3.  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.

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)


plz comment below........

0 comments:

Post a Comment