[SOLVED] How to convert .jar or .class to .dex file?

Issue

I’m going to edit the Opera Mini v6.5 server because it is blocked in our country.

Now I have unpacked the ‍‍‍‍‍‍‍.apk file extracted classes.Dex then converted it via dex2jar.bat, now modified the server.

My problem is I want to repack the .jar or .class to classes.Dex. How do I do it?

Solution

Here is a solution that was helpful in my case…

Suppose .jar file sits in “c:\temp\in.jar”. In command prompt window cd to ..\android-sdk\platform-tools.
To get .apk execute:

dx --dex --output="c:\temp\app.apk" "c:\temp\in.jar"

To get .dex file execute:

dx --dex --output="c:\temp\dx.dex" "c:\temp\in.jar"

Answered By – Pavel Netesa

Answer Checked By – Timothy Miller (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *