GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 09-16-2007, 12:59   #1 (permalink)
Major Poster
 
Join Date: Nov 2004
Age: 49
Posts: 41
Member: 93767
Status: Offline
Thanks Meter: 2
How to decompile end recompile jar files???


I have downloaded DJ Decompiler. When I decompile class files, I save it as ***.java. But i can't recompile it, although I have installed JDK too. How can I recompile one class file from a jar file and rebuild the jar file? Please help with an example reversing and rebuilding.
  Reply With Quote
Old 10-12-2007, 20:01   #2 (permalink)
Major Poster
 
Join Date: Nov 2004
Age: 49
Posts: 41
Member: 93767
Status: Offline
Thanks Meter: 2
JAVA REVERSE ENGINEERING: Decompiling and Recompiling Jar Files

TOOLS USED:

1. DJ Java Decompiler- Program which decompiles jar or class files to source code in text format *.java. More info at site:
Code:
http://members.fortunecity.com/neshkov/dj.html
2. JADMaker- Makes .jad file from .jar files
Code:
http://www.geocities.com/mangokun/jadmaker/jadmaker.htm
3. Java SDK- Platform to develop Java Applications.
Code:
http://java.sun.com/j2se/1.4.2/download.html
4. Sony Ericsson SDK 2.5.0 for the Java(TM) ME Platform (127 MB)- To recompile source codes to a jar file include an emulator.
Code:
http://developer.sonyericsson.com/getDocument.do?docId=96957
You can see the files in a jar file with winrar. There are image files, manifest file class files etc. I f you want change the jar file read carefully.

1. Step:
With JADMaker make a .jad file from .jar file. Drag and drop the jar file over the JADMaker icon.

2. Step:
From Java ME SDK menu open WTK2>KToolbar. You can use different SDK'S or more professional tools like eclipse or Netbeans IDE's.

From KToolbar File menu select Create Project from JAD/JAR File and select the .jad file created at first step.

Now we have created the folders. Where?
Inside C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\ apps Folder.
We can make without creating a project this work, too.

3. Step:
Open with 1. tool java decompiler the .jar file. Archiver shows all the files within jar archive file. Select all with mouse and click Decompile button. Select Folder to save the files. The file structure must be the same as in jar file. Answer the question asked yes. Now inside the folder there are some class files and some jad files. Don't change the folder structure. .jad dosyaları files are source codes of class files. Change the .jad extensions to .java. You can delete class files. Now copy this folder inside the apps folder mentioned at 2nd step.
Now our project is ready. But icons and other files missing. Include them with opening the jar file with winrar. The folder structure must be the same.

4. Step:
We have source codes. So we can make changes. Some codes won't be decompiled. You can see some strange codes, but it is easy to guess the right code. Select Build from KToolbar menu. If we have made mistakes, the compiling will be aborted and errors will be shon under.
If compiling succeeded, when we select Run command, the application will be opened in emulator. Some applications wont run in the emulator or on phone.

5. Step
Now it's time to make jar file. From KTollbar Project menu select Create Package.

Inside the C:\SonyEricsson\JavaME_SDK_CLDC\PC_Emulation\WTK2\ apps folder of our project jar and jar files are ready inside the bin folder. You van use them now.

If you use a program, buy the program. This tutorial is written to show the weakness of jar files and to help the programmers.
  Reply With Quote
Reply

Bookmarks


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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to decompile end recompile jar files??? engart Java, iOS, Android, Symbian development 1 09-18-2007 09:40
how to istall Jad or Jar files onto xda o2 iq mazz4 Java, iOS, Android, Symbian development 0 05-21-2007 00:19
How to Run .jad and .jar files on LG KG200? umarriaz2k7 LG 0 02-26-2007 10:56
how to use jad & jar file? bawa Nokia Multimedia 11 09-12-2003 10:40
How to decompile an S45 or SL45 *.bin file? ntc_silver Siemens-Benq RingTones and WallPapers 4 01-15-2003 11:01

 



All times are GMT +1. The time now is 02:43.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.18005 seconds with 9 queries

SEO by vBSEO