Get required software
-
Java SDK (JDK) from Sun (you should already have this)
-
Java Wireless Toolkit (WTK) also from Sun
Import an existing certificate (if you have one)
- If you’ve purchased a certificate from Verisign (or another provider) you need to import the certificate into your J2SE keystore.
- Try using the following command
keytool -import -alias {myalias} -file {mycertificate}(I haven’t been able to test this since I don’t have a proper certificate) - Run
keytool -listto see your new certificate - Next you must export the certificate so you can import it to your phone
- Run
keytool -export -alias {myalias} -file mycertificate.crt - Import the certificate into your phone (see below for details)
Create and import a new (test) certificate
- You need to use keytool (from the JDK)
- I used the following command
keytool -genkey -alias {myalias} -keyalg RSA -validity 365 - This will prompt you for a keystore password, enter your keystore password (if you have an existing keystore) or the one you want to use if you don’t have one yet
- Fill in all the prompts about location/company name etc.
C:\j2sdk1.4.2_08\bin>keytool -genkey -alias company -keyalg RSA -validity 365
Enter keystore password: password
What is your first and last name? [Unknown]: My Name
What is the name of your organizational unit? [Unknown]: company
What is the name of your organization? [Unknown]: company
What is the name of your City or Locality? [Unknown]: location
What is the name of your State or Province? [Unknown]: location2
What is the two-letter country code for this unit? [Unknown]: GB
Is CN=My Name, OU=company, O=company, L=location, ST=location2, C=GB correct? [no]: yes
Enter key password for(RETURN if same as keystore password): - Run
keytool -listto see your new certificate - Next you must export the certificate so you can import it to your phone
- Run
keytool -export -alias {myalias} -file mycertificate.crt - Import the certificate into your phone (see below for details)
Build and package the application
- Use
javacto build your MIDlet paying special attention to your classpath and bootclasspath options (otherwise preverification will fail). I also set target to 1.1 and source to 1.3 - Generate your JAD file the critical attributes in the JAD are
MIDlet-Jar-URL, MIDlet-Jar-Size, MIDlet-Permissionswe also includedMIDlet-Icon, MicroEdition-Configuration, MicroEdition-Profile, MIDlet-Name, MIDlet-Push-1, MIDlet-Icon, MIDlet-Description and MIDlet-Version - Generate the MANIFEST.MF file based on your JAD, you must remove
MIDlet-Jar-SizeandMIDlet-Jar-URL - Both these tasks can be completed using the wtkJad Antenna task
- Package and preverify the app using the wtkPackage Antenna Task you must set the classpath and bootclasspath properties correctly otherwise Preverification will fail
Sign the application
- Sign the Application using
jarsigner - Run
jarsigner -keystore {mykeystore} -storepass (mypassword} {myjar} {myalias} - Now you have a signed jar you need to update the
MIDlet-Jar-Sizein your JAD - Now add the certificate to the JAD using
JadTool.jarfrom the WTK - Run
java -jar JadTool.jar -addcert -alias {myalias} -storepass {mypassword} -keystore {mykeystore} -inputjad {myinputjad} -outputjad {myoutputjad} - Now add the signature to the JAD again using
JadTool.jar - Run
java -jar JadTool.jar -addjarsig -alias {myalias} -jarfile {myjar} -storepass {mypassword} -keypass {mypassword} -keystore {mykeystore} -inputjad {myinputjad} -outputjad {myoutputjad}
Deployment
- Deploy this to a web server with the MIME types set correctly and download it to your phone and it will be a trusted 3rd party application
- You can also deploy applications to phones by sending the JAR & JAD to the phone over Bluetooth or Infrared or a cable depending on your phones features. On Nokia phones the files
appear in your SMS Inbox
Installing the Certificate on the phone
- Import the certificate into your phone, in Windows XP SP2 I could do
this by right clicking the file and selecting "Send to Bluetooth Device",
you should be able to send files by cable or Infra Red (IR) too. NB: I
haven’t found anyway of importing a certificate on a Series 40 phone - Once the certificate is installed it needs to be authorised for
"Application Installation". On my phone (Nokia 6680) this is under
Tools->Settings->Certificate Management->Trust Settings, I turned on
everything but I think "Application Installation" is all you need
Common Problems
- Application not installed using the JAD: The application is only trusted if it is installed using the JAD, the application will still install from the jar but it won’t be trusted.
- Application trust settings not set: Once your application is installed you need to specify how much trust to give it (it doesn’t get all permissions by default). On a Nokia Series 60 phone these are found under the App. Manager.
- Root certificate missing from phone: The Java Verified certificate and/or Verisign certificates are missing from some phones check under Tools->Settings->Certificate Management for the relevant certificate
- Authorization Failed: – There are a whole host of possible reasons behind this here are the ones I’ve come across
- Certificate missing from phone, double check your certificate is installed and has been marked as trusted for application installs in Certificate Management
- Reboot: Uninstall the application completely then reboot your phone try taking the battery and SIM out too, often things get themselves in a twist, especially if you’ve been re-installing a lot without uninstalling first
- JAD/JAR mismatch: Double check the application size in the JAD, remember it’s the number of bytes that is important NOT the size on disk
- Browser cache: If you’re installing over the air make sure you clear your browser cache before installing
- I’ve heard but not verified that line breaks in the
MIDlet-Permissionscan cause problems but it seems ok to me on Nokia 6680/6630/6230i (could be firmware dependent?) - The
MIDlet-Permissionsattribute is the cause of a lot of problems (especially since the documentation is often wrong/missing or different depending on the phone), try leaving it out first and add permissions in one at a time. Some phones will complain about permissions they don’t support, some will ignore them
- There is a bug in some early Nokia 6600 firmwares that stop the install of trusted MIDlets
- Certificate not valid yet: If you generated the certificate yourself it may have a start validity date of tomorrow, also if your PC and phone dates are different you may be outside the period of validity of the certificate
- No certificate management on Series 40 phones, you can install a signed application but behavior is strange with self signed certificates
- JadTool problems: I haven’t experienced any of these issues but lots of other people have
- "I have issues if I try to use the jadtool manually. I have a certificate chain and can’t seem to get the second certificate added to the JAD file using any WTK jadtool. The interesting part however is that I can successfully sign the midlet using any of the same WTK GUI interfaces – they add the second certificate correctly. My steps:
- Use 1.4.2_06 jarsigner.exe to sign jar
- Use WTK (2.2 or 2.3 beta) jadtool to addcert with certnum 1
- If I call jadtool to addcert with certnum 2 the same certificate is inserted as cert 1-2 I’m assuming I am doing something incorrectly since the WTK gui seems to be working just fine"
- "I received a post on the KVM news group on the topic that states there is a bug in the jadtool and the author claims to have filed a bug report and posted a patch: http://archives.java.sun.com/cgi-bin/wa?A2=ind0508&L=kvm-interest&F=&S=&P=9858 One interesting note that was also posted was that the cert JAD params are static so once you get them from the WTK correctly you can put them statically in the ant script."
- "I am trying to sign a MIdlet for Nokia 6620 device. I am using a Verisign Code Signing certificate that actually contains two certificates (User and Intermediate CA). I am using the WTK 2.2 signing tool. Do you know if this tool support two certificates when signing ? The signature is added to the JAD file with two certificates but I have been getting security error when installing. I have checked on the device and there are different root certificates installed for Verisign but it still fails !
- "If you want, you can download the sprintpcs developer kit as it supports dual certs (http://developer.sprintpcs.com). However, I never got that cert to work on the Nokia (6620/cingular) phone, although it does work on sprint phones (with developer root enabled). Ultimately, I only got things to work by creating the cert as described in this blog and installing that on the phone. Bizarrely, even though the root cert for my versign-signed cert *was* on the 6620 phone, it still would never install my MIDlet as you would think it should."
- "I have issues if I try to use the jadtool manually. I have a certificate chain and can’t seem to get the second certificate added to the JAD file using any WTK jadtool. The interesting part however is that I can successfully sign the midlet using any of the same WTK GUI interfaces – they add the second certificate correctly. My steps:
- Old phones (6230/i, 6682) don’t support x509 certificates, WPKI has been suggested as a possible solution but I haven’t investigated this
- Socket connections can be problematic (http://discussion.forum.nokia.com/forum/showthread.php?t=68306 ) possibly due to the WAP infrastructure and the services provided by an operator. HTTP is a much safer protocol to use
- "Go online and check application validity": Yes/No. If I click on yes button the phone I get the following error: "Certificate revoked for this application" and the installation fails. To rectify this go to Tools -> Manager -> Menu -> Settings -> Online Certif Check [ On / Off / Required] There is also a Default address setting. If the online control setting is required, the check will fail, if there is no default address. see http://discussion.forum.nokia.com/forum/showthread.php?t=71071
Trust Domains
- There are 4 different trust domains in MIDP2 (manufacturer, operator, trusted third party, and untrusted). Trusted Third Party is the only one of any use to us really.
It gives the following options on my Nokia 6680 (Vodafone UK):
Network Access: Not Allowed, Ask every time, Ask first time
Messaging: Not Allowed, Ask every time App
Auto-Start: Not Allowed, Ask every time, Ask first time
Connectivity: Not Allowed, Ask every time, Ask first time, Always allowed
Multimedia: Not Allowed, Ask every time, Ask first time
Read User Data: Not Allowed, Ask every time, Ask first time, Always allowed
Edit User Data: Not Allowed, Ask every time, Ask first time, Always allowed - These settings are defined by the operator and the phone manufacturer and therefore vary between phone, manufacturer and operator.
Unresolved Problems
- I managed to sign the JAD with this format using J2ME WTK utilities, but when trying to install it on the device I get a message "Application authentication failed 909".
Sample JAD
MIDlet-Jar-URL: MyApp.jar
MIDlet-Jar-Size: 201365
MIDlet-Name: MyApp
MIDlet-Vendor: EC1M
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-Icon: logo.png
MIDlet-Push-1: sms://:6553,net.ec1m.MyApp.midp.MyAppMIDlet,*
MIDlet-Description: MyApp MIDlet
MIDlet-Permissions: javax.microedition.io.PushRegistry,javax.microedition.io.Connector.sms...
MIDlet-Version: 1.0.67 MIDlet-1: MyApp, logo.png,net.ec1m.MyApp.midp.MyAppMIDlet
MIDlet-Certificate-1-1: MIICODCCAaECBEKqpfswDQYJKoZIhvcNAQEEBQAwYz...=
MIDlet-Jar-RSA-SHA1: EUsAch/.../hEZOsJsiCjBOhNs/3FSw4=
Sample Manifest
Manifest-Version: 1.0
MIDlet-Name: MyApp
Created-By: 1.4.2_05-b04 (Sun Microsystems Inc.)
MIDlet-Push-1: sms://:6553,net.ec1m.MyApp.midp.MyAppMIDlet,*
MIDlet-1: MyApp, logo.png, net.ec1m.MyApp.midp.MyAppMIDlet
MicroEdition-Configuration: CLDC-1.1
Ant-Version: Apache Ant 1.6.2
MIDlet-Icon: logo.png
MIDlet-Vendor: EC1M
MIDlet-Permissions: javax.microedition...
MIDlet-Version: 1.0.67
MicroEdition-Profile: MIDP-2.0
MIDlet-Description: MyApp MIDlet
Sample Ant Build File
I’ve put our EC1M ant build file up on our website to (hopefully) make all this a little easier for you.
Other Resources
This FAQ on the Nokia Forum is worth a read. (Thanks chortya for the link)






83 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Dear David:
About your “Unresolved Problems” , this is because you have not create a RSA SHA-1 signature of the JAR. You can find the detail about the install verification process of the jar file from this website : http://www.iua.upf.es/~mkalten/teaching/sysintII/midp20/javax/microedition/midlet/doc-files/PKITrust.html
And for those user using latest motorola phone, i have to tell you a bad news. After a deep investiage of the files inside the phone firmware (as you may know , those files inside ……/kjava is the cert. file and the most important file “j2me_domain_registry.sm” is the registry file), you should have NO WAY to install your own cert for verify your jar file or install your jar file signed by your own created cert. The reason is , j2me_domain_registry.sm is a file stored information about which root CA is allowed for verify the signing of a jar. I check and disassembled that file already, the very bad news is you can’t change the content of that file since it is signed by motorola CA. (Actually the structure of the file is simple, but it is meaningless since we cant change the content of it.)
>Unresolved Problems
>
> 1. I managed to sign the JAD with this
>format using J2ME WTK utilities, but when
>trying to install it on the device I get
>a message “Application authentication >failed 909″.
I had this error for a while, and it was down to having a couple of certs on the phone that had the same DN string. Had to delete them both and reinstall the correct one.
JadTool is fixed in WTK 2.5 Beta
http://archives.java.sun.com/cgi-bin/wa?A2=ind0607&L=kvm-interest&P=R498&I=-3
Hi,
I am struggling to understand one simple thing: What exactly does a 3rd Party domain certificate achieve for the Midlet?
Does it:
a) remove the “untrusted midlet. install?” message at the OTA download?
b) remove the “application wants to send/receive data from the network. is this ok?” message when HTTP of UDP is used?
c) remove the “Ask Once, Ask every time…” message?
cheers
DK
Thanks for tutorial.
Some queries:
1. What all companies provide certificate to sign midlets?
2. Will this process work for Nokia N and E series phones (Symbian 9.1 OS)? Or we need to talk to javaverified?
Hi,
This process should work fine on Symbian phones. I’d recomend this process for development testing only. If you need to market the application I think Java Verified is a good idea
The short answer to what a third party trusted certificate gives you is “it depends”. In our case we removed the prompt evertime we accessed the addressbook. You can usually relax the security settings on a signed app but it all depends on the phone and carrier. Usually you can’t turn off prompts if it will cost the user money
Thnx for tutorial. But it doesn’t seem to work on s60 3rd (Symbian 9.1)
Self-generated certificate isn’t accepted by the phone for applications installations, it’s restricted to ¨normal¨ internet certificate usage, only ¨Internet¨, ¨Online checking¨ options are available in certificate management settings. I’ve also found an explanation <a href=”http://discussion.forum.nokia.com/forum/showthread.php?t=85660″>here</a>
<br><blockquote>Q: Can I use a certificate and key created by me to sign my midlets?<br>
Yes, you can run a midlet signed with a certificate created by you on emulators. Self-signing does not work on Series 40 devices nor S60 3rd edition devices.¨
</blockquote>
Let’s hope there will be some workaround…
What a pain, it’s certainly ok on Series 60 2nd Edition devices (6680, 6620 etc) begs the question how are you meant to test apps if you can’t test sign them
Hi everyone,
i followed the tutorial above and created my own certificate. But when I try to install it on my device (Sony Ericsson K800i) it says “invalid certificate”.
Is there a way to get a self signed certificate running on a K800i??
I hope you can help me…
Thx,
HD
For Motorola handsets it seems you have to use their Development MIDlet Signing Process. Swing by http://developer.motorola.com/ and search for that phrase after signing up to see the process they require you to go through in order to make it work.
I’m having a problem whenever I try to load my signed application. I got a signature from verisign (class 3 digital ID), however even after going through the steps outlined above (with no errors reported) and loading onto the phone, I still get an authentication error; specifically, on the LG LX350, I get the error “909 Application Authentication error.” I have tried other devices as well, and none of them have worked…<br /><br />
So, some questions:<br />
1. Will the signature I received from verisign work? I know that a few of the phones I’ve tried this on support verisign certificates but maybe I got the wrong class? <br />
2. Is there anything special I need to do to OTA this application? I’ve been able to download it unsigned and it works fine.<br /><br />
Thanks in advance for the help.
Is there any easy way to validate the integrity of the jar in java to check the signatures in a jad are still valid? The reason I ask is I am attempting to automate some of this in a little tool to make my life easier and I want to be able to validate the finnish jad / jar before i waste time testing OTA?
<p>Thanks for setting this up David, I’ve already found lots of useful information here.<br />
<br />
I am experiencing the same problem that Joel is – 909 App Authentication error, on the Sanyo 7400 (sprint). Both the jad and the jar have been signed, and I’ve followed the steps listed here without error with one exception: I have not installed the certificate on the phone. I’ve searched the Sprint developer page looking for ways to do this, but I only found steps for the windows smart mobile phones. I haven’t found any way to do this on standard OTA deployments. The technical director for the company hiring us to do this says that as far as they know there is no cert put on the phone explicitly, that midp2 does this itself.<br />
<br />
So my questions are:<br />
1) Do I need to place the certificate on the phone for OTA deployment?<br />
2) If so, how do I do this? If not, is there something special that needs to happen for OTA deployed jars to get authenticated? I’ve tried several signing methods (command line, WTK2.0 gui, sprint’s launchpad) and none of them have worked. Any clues you can give me will be greatly appreciated. Thanks for your consideration.</p>
I negelected to mention in my first post that I enabled developer root on the phone. Assuming we can trust the sprint webpage the phone should be good to go, so that isn’t the problem.
<p>I’ve used jarsigner to verify the jar. It said my jar was valid even though I still get 909 Authentication errors, so I can’t say exactly how useful it is, but it at least told me my certificate was still valid and gave me the expiration date. The syntax is like this:<br />
<br />
<span class=”HTML-0020Code–Char”>C:\jdk1.3\bin\jarsigner -verify -verbose -certs d:\TestApplet.jar</span></p>
Do you think some sort of hacking could be made to substitute one of the present certificates with your own on a motorola phone? I had the idea of placing my custom certificate over the &quot;operator&quot; certificate, without modifying the domain registry file. This could work, although is not a valid solution for distributing your apps to the world.
bah stupid html. Lose the span stuff, this is the call:<br />
C:\jdk1.3\bin\jarsigner -verify -verbose -certs d:\TestApplet.jar<br />
<br />
Teach me not to preview…
Why everytime I reinstall application on my Nokia 6630 I must redefine all application trust settings under the App. Manager? Does a manner exist to do this one time forever?
Hi, David!
Could You describe the contents of j2me_domain_registry.sm file for latest Motorola phones, please? I have 2 such files, and for 1st one there is no any rights for unsigned midlets, but for 2nd there are some rights.
Bst rgrd, Rek>pth
<p>Hi, I’ve never come across one of thes files. Perhaps somebody else who reads this can help??</p>
<p>Dave</p>
Hello !<br />
I have followed your tutorial and have successfully signed my midlet and installed but I still get &quot;Allow this application to send SMS?&quot; popup what am I doing wrong? I have Nokia 3230.
<p>Hi,</p>
<p>We are seeing the same error ” Authentication failure , Unknown content provider certificate issued by CA&quot; on/while download of the jad file.</p>
<p>Could any one found a solution for this.. </p>
<p>We see one could download all the CA roots from <a href=”http://www.verisign.com/support/roots.html”>http://www.verisign.com/support/roots.html</a>. This gives all the root certs of VeriSign – Thawte Combined Roots. But which one of these cert needs to be installed on L.G phone and what are the steps for installation of these certs.</p>
<p>Regards,<br />
Nagendra<br />
C.T.O<br />
<a href=”http://www.tejasoft.com”>www.tejasoft.com</a></p>
<p> </p>
<p>Hi,</p>
<p><span style=”FONT-SIZE: 8pt; FONT-FAMILY: Arial; mso-fareast-font-family: ‘Times New Roman’; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA”>Does a J2ME application needs to be signed for it to successfully install and run on Nokia Series 60 phones? My unsigned application works fine on the emulators and I am thinking of not getting it signed&hellip; unless singing is mandatory for it to work properly on Nokia series 60 phones. </span></p>
<p>Hi,</p>
<p>The short answer is &quot;It depends&quot;. You only need to sign your application if it accesses any of the protected resources (e.g. network, addressbook, calender etc.). Some (most?) aggregators of content (Nokia, Orange, Vodafone etc. won’t touch your app unless it’s signed. It really depends what your app does, how you want to sell it and how annoying/frequent the security messages would be to your user.</p>
<p>Hope this helps </p>
<p>Dave</p>
Hi,
Sorry for the delay in replying (on holiday at the moment).
I don’t know the Saynyo phone in question so I can’t help with that specifically but if you signed the jar/jad with your own certificate (i.e. not one boaught from Verisign/Thawte) you will need to install the certificate on the phone, I know for a fact you can’t do this on all phones though so this could be your problem.
Try sending it via bluetooth/cable from your PC, often it will end up in your SMS inbox and you can install it from there but again this depends on your phone.
Otherwise try copying it to a memory card and opening it from within the phones File Explorer (if it has one).
If you have a certificate from Versign/Thawte/JavaVerified their root certificate SHOULD be on the phone but some phones are missing the some root certificates.
Hope this helps.
Dave
Under “Authorization Failed”, you need to have a valid sim card in order to install. Those phones which can operate without a sim card will encounter this error.
Hi David Hayes,
I followed ur step…
Generate a certificate and signed my jar and all the necessary steps.
Now my problem is i want to attach that certificate with my application or i want to import that certificate in phone what’s the steps to do this? please reply…
You can reply me on priyesh@usindia.com
Thanks.
Hi all,
Once the JAR/JAD signing process is done, can I modify the JAD???
Thanks.
Hello ppl,
My question is: After the signature process is done, can I modify the JAD file? <br /><br />
Our process input the MIDlet-Jar-Size at the OTA.
<br />
Thanks
Hi,
I believe you can modify the JAD file as long as you don’t modify any of the properties that need to match properties in the manifest. Caveat, I haven’t tried this so your best bet would be to test it…
hi , i followed all the steps but still getting the error on nokia 6681 – “Installation security error, unable to install”. The JAD/JAR signed with verisign trial certificate. plz help!!! thanks.
Hi folks,
I’m using Nokia E61. Question: Are there some way to when I install a midlet don’t be necessary to configure the ’suite settings’ to ‘always allowed’???
[]s
as of Antenna 0.9.5, There is a new wtksign task that makes signing as easy as singing.
Does anyone know what code signing certificate is “Yahoo Go” using ? ( Since it has a very large device supported list )
Hi Its a nice tutorial.
i have signed my jad and jar and when i have transferred to a series 40 mobile i cannot install the application. it is saying invalid application.
i am not able to install certificate also.
for certificate it is saying file format not supported.
If you can’t install the appilcation I’d guess your jar is corrupt in some way, take a look at the manifest and check it looks ok. Also try and run it in an emulator (the Nokia ones are good). Try installing both using the jar and the jad, sometime if you can’t install from the jad the jar will be fine (pointing to a bad jad). I never found a way of installing a certificate on a series 40 phone. They seem to handle security in a very different way to the series 60 phones
Hi,
When i execute jad file appears a error message: impossible to verify digital signature. (in PDA)
please help. thanks
I have purchased the Verisign class 3 certificate and signed my jar and jad using this certificate.
The application correctly installs on the SonyEriccson but failed to installed on Samsung D900. Do you know any thing about the root certificates installed on the samsung D900?
Nobody wants an annoying application that’s always asking for permission to do routine things. The current trusted computing model that Java is using doesn’t seem to give us any reliable way to solve this problem. Does it?
We don’t have this trusted model in other computing environments and we get by just fine. Nobody needs to sign applications on Windows, OS X, Linux, etc. So is this progress, or just a step in the wrong direction?
Hi,
When browsing nokia n70 memory in mobimb I found certs file in path c:/System/Data/CACerts.dat.
Could someone verify if this file is available in S60 3rd phones too. If so then it might be possible to install self signed certificate first to a S60 2nd phone and then hard copy the CACerts.dat file to the S60 3rd phone.
btw. What are the costs to have a java midlet signed? I have made a small midlet for a small company and now the problem is I can’t install the midlet for their new phones (E50) because certificate won’t install to those S60 3rd phones.
I am from a porting company, i spent a lot of time on the certification and there is one big problem in the signing procedure you are providing:
->In JavaME you do not need to sign the JAR (and you should not).
JadTool.jar creates the digital signature of your JAR (SHA1 digest with the key of the certificate) and put it in the JAD.
It is not required to sign the JAR, even if it’s possible : if you do so, it will create a digital signature of a signed jar – meaning a signature of signature.
->It will works on S60 (and you need to update the MIDlet-Size of the jad before signing it)
->BUT, it won’t work on any S40 (and Sony Ericsson built on S40), giving the error “Invalid application” at the end of the installation process.
->There’re also other advantages to not sign the JAR: it won’t add unnecessary extra data in your jar (5 to 10ko) and you do not need to update the the MIDlet-Size.
jarsigner.exe is for the J2SE applications (when there is not file descriptor like the jad file).
Regards
Damien
The WTK Signing Tool (at least 2.5.1 and upper) just uses the JadTool.jar and the MEKeyTool.exe.
If you pay attention, the WTK Sign MIDlet Utility only ask you for the JAD file and ONLY modifies the JAD file (the JAR isn’t modified, event a single byte).
I would recommand also to always set all the required permissions in the JAD and to modify the JAD (e.g on the fly creation) only before signing it to avoid problems.
Finally i would recommand to get at least a Verisign Class 3 and a Thawte Premium server CA certificate to cover a significant range of mobile and to script the signing process (batch or/and sh like i did – using a combination of keytool.exe from the JDK and JadTool.jar from the WTK to have a maximum of flexibility) to sign a huge list of JAD/JAR in one shot (which is not possible with the WTK utility).
Hope it will help some of you,
Regards
my SE k800i says “invalid certificate”. you what to do?
sry for my bad english.
About “invalid certificate” it can be everything and nothing…It depends on a lot of things since the messages displayed are not always clear.
Without more information such as the way you signed it, the tools used, the type of certificate, the Certificate Authority, how you installed it, i cannot make a precise diagnostic.
If it’s a self sign certificate i would check that the export of your certificate i correctly installed on the phone and its date of validity.
If it’s a CA certificate, i would check first its validity, if the certificate reply has correctly been imported then check in the certificate list of the phone if it has the required CA roots.
Finally the basic things, do not modify the jad after the signature, check it has all the required fields, that the jar is not signed.
Regards,
Damien – Mobile Distillery
thanks for the fast answer
i have made an own certificate like it was written in the tutorial.
I’ve checked the date and it’s correct.
Can you please how to install a certificate…I have a 5300 Xpress Music phone and every time I import the cert file the phone indicates a invalid file format…Pls help!!!
It is painful to pay for the midlet to sign? Why should we pay it? It is my phone, if I want to install some application that I developed, why should I pay Verisign money!!! And also I hate the operators that disabled the J2ME API. Why? Because some API be disbaled onpurpose by the operator, like AT&T. Fox eample, nokia phone model 6085, when release in other country you can access getSnapshot() while in US you can’t. Why the AT&T or cingular disable the getSnapshot API. It is my phone and I as the owener of the mobile phone, should control the phone myself. Agree?
I’ve made my own certificate using keytool. I try to install it via bluetooth, but my phone (SE w810i, K610i) says “invalid certificate”. What’s wrong with the certificate?
please help
i found solution at least for SE w810i: the suffix of cert-file must be .cer (not .crt) – no more complaints about invalid certificate
but till now i did not get my phone to install my app via jad file (i followed the howto step by step and the resulting jad looks like the above mentioned sample)
anyone some ideas?
Sorry gentlemen, it is NOT possible to install your own Java MIDlet signing certificate on ANY mobile phone. Or has anyone found a way to assign a certificate to one of the phones security domains (Unidentified, Identified 3rd Pary, Operator, Manufacturer)? The phones come with pre-installed root certificates, each assigned to a security domain. Only the manufacturer can install the certificates. (Only exception: an operator/carrier can bring one on the SIM card.) If anyone else could install / modify a root certificate, it would break the whole Java ME security concept. Don’t believe me? Go to your phone manufacturer’s developer forum and ask them.
For your better understanding of the Java ME security concept please read JSR 118, MIDP 2.1, chapters 3 and 4 (http://www.jcp.org/en/jsr/detail?id=118)
Actually, this whole security model is stuffed anyway, and stiffles innovation and opensource.
See:
http://javablog.co.uk/2007/08/09/how-midlet-signing-is-killing-j2me/
They should have left an exception to allow the OWNER of the phone to accept a 3rd party certificate (maybe with a disclaimer that if you do, the app could read/write your filesystem etc)
hello i have sign certificate of Thawte and have sussecfully signed my application build. my problem is this signed build is working on nokia devies and sonyerrsion devices but when i instal my application on motorola or sumsung devices it give me application error .
please reply me its urgent.
Hello everybody, my name is Damion, and I’m glad to join your conmunity,
and wish to assit as far as possible.
Hi,
I’ve been able to sign files without probs for ages but when the jad is in a different place than the jar, the wtk utility is ‘unable to locate http://…../xxxx.jar‘ or $xxxx.jar$ so won’t sign it.
Is there a way to avoid this problem if the jar needs to be on a different server?
Thanks,
I’m trying to build a secure phone application and I was wondering if you can help me? Do you have an updated tutorial to this one? The instructions seem pretty complicated and I was hoping there was an easier way of doing this.
i have bought my own certificate and signed my application when i send it to mobiles it look trusted but when i install it it give me an error Authorization failed i send it without Midlet Permission but it don’t send Sms may Anyone Help
Hello,
how relevant is the 1.step where I should sign my .jar file with jarsigner?
Question: I have a Verisign cert for my midlet. What added value does WTK signature ( MIDlet-Jar-RSA-SHA1: ) give me?
I have one in our JAD now, but if I change the JAR which I intend to do, I’d rather do without the extra signing step if Verisign is enough
Hello Chris,
as far as I understood the signing procedure,
signing without MIDlet-Jar-RSA-SHA1 is dangerous.
When am I allowed to compare, it’s like signing check without money amount in it.
With the cert you identifies yourself and with this WTK signature you says what you sign.
If someone changes your midlet code, WTK signature will be broken-> your signature isn’t valid anymore.
And you’re right whenever you change your code, you have to sign again.
I wanna sign third-party .jar using this guide. But I can’t. It is said that I should sign .jad file. But I don’t have any.
Hello!
I have made the other big tutorial through (http://browndrf.blogspot.com/2006/06/build-and-install-singed-midlet.html), but always got the error: “Error verifying certificate provider” blah-blah. I was very sad and had no idea what to do. Then I begun to read your site, and in the common problems topic I’ve finally found: the date! After the restart the device’s date was in still 2006… Too early for my cert.
Thank you very much! At last, my midlet is trusted!
Anett
Hi All,
I have certificates from both Thawte and Verisign – is there any way to sign midlet with BOTH in one go?
Thanks,
Boris
Hi all,
An other bad news is that Motorola does’t support third party CA like Thawte and Verisign cetrificates on their new handsets , so no j2me developer could target Motorola handsets with those certificates.
I purchased a certificate from thawte and it sucks now on my Motorola handset.
Read the original Answer from Motodev:
https://support.developer.motorola.com/cgi-bin/motodev.cfg/php/enduser/popup_adp.php?p_sid=a256j_kj&p_lva=&p_li=&p_faqid=568&p_created=1170297506&p_sp=
Any other comments ?
- Antoine Nzeyimana
@navneet
Read the original Answer from Motodev:
https://support.developer.motorola.com/cgi-bin/motodev.cfg/php/enduser/popup_adp.php?p_sid=a256j_kj&p_lva=&p_li=&p_faqid=568&p_created=1170297506&p_sp=
I am really amazed that it is so complicated and with so many manual steps. I mean, this is 2009 and not 1975!
I wished somebody would be smart enough to simplify the process or make a program that does it for you.
Hello
Could someone please tell the procedure to get a manufacturer certification from Nokia, S40 platform
I am looking to retrieve the cell Id and I need the manufacturers signing process in order to use that API
Thanks
i tried to install the self issued certifiacte to my nokia 5700 , either by using BT or cable, but it keeps giving me “format not supported” error meessage .
searching forum nokia i found that its not possible any more to do that .
any other soultion ?
http://discussion.forum.nokia.com/forum/showthread.php?t=126206
Hello all;
i have samsung e250 i used some explorers and media,mp3 players but i noticed that no program can explorer my mobile files only computer can do i think that cause all programs untrusted am i right? if i m how i make a program trusted i know very litle about java should i use cmd to sign jar file or certificate?
isnt there easy way like program do from jar file
in motorola to make it recognize your certificate
the only thing u need to do is to open ur certificate
in a hex editor and insert 2 bytes in offset 0×00000000
of the file
where the
byte 1 is 0×00 and
byte 2 is 0×01
so u can see your certificate in the certificates list
after rebooting your phone
but now
i can’t sign my application with it. .because
my w510 says the file is invalid or the application
is out of date
i know that j2me_domain_registry.sm contain the information
about the certificates installed, so if i can hack that file
i can get my certificate to work as one of CA in my phone
do anyone know how to edit it ?
?
Oke, so my previous post was deleted ? Why ? And I found out my other email-address (pjbbeng@gmail.com) has already been blocked ? Can you tell me why ?
Hi,
Not sure what happened to your previous comment, must have been eaten by my spam filter.
I’ll see if I can find it but feel free to post again. Sorry for the inconvenience
Dave
hey i made all steps without error and it works on wtk(i mean my project jar jad does not give any error on wtk ) HOWEVER when i try yo install to cell phone n78 btw, it says something like jar and jad mismatch …is there any comment
Continuing the Discussion