loading
Some Java apps for mobile come with pixelated, ugly icons. (opera mini, gmail...)
Here is how to change them, and how to avoid the pesky "Jad and Jar size do not match" error.

I am using Opera mini 4, a mac and a Nokia 5800 in my example.

What you will need:

- A mobile phone
- A Java app (1 Jad and 1 Jar file)
- A computer
- The web
- Photoshop (or similar program) * not necessary
- Extraction tool (stuffit, winrar or similar)
- Bluetooth or cable connection from Mac to Phone

Step 1: Get Your Jad and Jar Files

Download the app you want to use, and make sure you have both the Jad and Jar files.

(note the second image: this is what Opera Mini 4 looks like with it's default icon)

Step 2:

Right click and "save as" the icon you'd like to use for Gmail from the net.

It should be a PNG image with a transparent background, less than 100 x 100 px.

Google image search is what I used.

The one I downloaded was from Wikimedia commons. Please don't use other people's images unless they are under the appropriate Creative Commons licence.

Step 3: Check to See If the File Has a Transparent Background

I opened up the image in Photoshop to double check that it has a transparent background.

It does. If it doesn't, you can either delete the background colour and save as a PNG or just find a better image.

Step 4: Open the Jar File With Your Extraction Tool and Locate the Png Icon.

Open the JAR file with a good extraction tool, like Winrar or Stuffit.

Just open the file, don't extract it.

There is one png file in the JAR, this is the icon you want to replace.



Step 5: Replace the Icon

Rename your PNG file to the exact same file name, and drag it in.

In my case, the file name was i.png.

Save the JAR file, and close your extraction tool.


Step 6: Match the Jad and Jar File Sizes

Open the JAD file in a text editor.

Locate the size of the JAR file in the JAD.

Right click on the JAR and write down it's exact size in BYTES.

Edit the JAD file so that the file size after the line "MIDlet-Jar-Size:" matches the JAR file you edited.

Save and close.

This eliminates the error "Jad and Jar size do not match"

Step 7: Transfer and Install

Save the JAR and transfer both files to your phone via cable or bluetooth, etc.

Find the files in your file manager and Install the Java app.

If you matched the file sizes, it will install.

Step 8: Completion and Final Thoughts

Hooray! You now have an attractive icon for the App on your phone.

(please note: my phone's screenshot program compressed the image, the logo looks much nicer on my phone screen)

Final thoughts and how to edit files that just have a JAD (like Gmail)
The JAD file seems to be a text file and the JAR an archive.

You can find out lots of interesting info from the JAD file.

For instance, if you try and download the Gmail app, you just get the JAD file, and when you install to your phone, the Gmail app automatically downloads and installs the JAR, making it impossible to change the icon.

BUT in the JAD, you can find the URL to the JAR, pop it into your browser and download if to your computer, edit it to have a nice logo (as I have done in the image below) and transfer both files to your phone and install.

About This Instructable

10,428views

6favorites

License:

More by deleatur:Replace the ugly icon of mobile Java apps 
Add instructable to: