Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Convert .apk files to .jar files

Saturday, August 16, 2014


Download .apk file from market

  • Download any app from the Android Market [Go]
  • Install Astro File Manager from Android Market [Go]  
  • Open Astro > Tools > Application Manager/Backup and select the application to backup on SD card.
  • Mount the phone as USB and access 'BACKUPAPPS' folder to find the apk of targetapp.(lets call this targetapp.apk).
  • Copy it to your hard disk.

Decomiling apk to Dex format

  • Download Dex2Jar [GO] 
  • Android runs applications which are in Dalvik Executable (.dex) format.
  • Run the following command to convert apk to jar.
dex2jar targetapp.apk file(./dex2jar targetapp.apk on terminal)
                                                 File 'targetapp.apk.dex2jar.jar' is created
[Click to Enlarge]

Viewing/Decompiling the Jar files to Java


Method 1 : Use JavaDecomiler (JD)

  • Open 'targetapp.apk.dex2jar.jar' with jd-gui [Click to Download]  
  • File > Save All Sources to save the class files in jar to java files.
Method 2 : JAD
  • Extract contents of jar file on to a folder named src.  Use and unarchival utility like 7zip.
  • Keep 'src' folder in the same directory where JAD and targetapp jar is present.
  • Open JAD in cmd and execute the following command
jad -o -r -sjava -dsrc src/**/*.class (./jad on terminal)




Now src will contain decompiled Java files ready for manual code review.


Enjoy :)

Read more ...

Run JAR files on Android [ Install Jar on Android]

Saturday, May 24, 2014
There was a time that nokia was the phone that was reigning but it has been replaced by smartphones and some of us miss the apps we had on our nokia phones which for sure won't work on our android phones.
 As humans we all have the doubt like whether we can run jar files on Android or not, but now it’s possible with the application JBED.

What is JBED?

JBED is an .apk Android application which Run Java Games and Apps on Your Android Device. JBED is a Java Android Java Emulator, by using this application you can install .JAR/.JAD/Java/J2ME/MIDP games on Android phones. Now you can use all of your favorite .JAR application in your phones

Steps to Install Jar on Android:

Download JBED
Install JBED.apk in your Android Phone. Install JBED.apk is not different process. It also the same installation process like other Android applications.
Launch JBED application. Press menu button and choose SD card.
Select your .JAR/.JAD file that you want to install and run.
Now install the chosen application through JBED.
Now open the installed java application to run.

By this method we can run jar files on android phones. If you face any issue while installing JAR application then your mobile is not supporting fully. If you successfully install the JAR application also sometimes you will get some graphical and performance related issues.


JBED Errors

So many people has complaint that this JBED application is not working and throwing some errors in mobiles like orce Close” or ” Maybe no sd Card or SD card is busy errors.

Reason for the errors is JBED only works with below Android version 2.3.4.
How to avoid errors while using JBED application

You Android should be rooted with system manager or some other application.

Download libjbedvm.so and place in system\lib folder
Install the JBED.apk application and don’t play it.
Restart the phone, and try it .
Read more ...