Convert . Jar to . Dex

Asked

Viewed 848 times

0

Speak people! I decompiled an apk and it generated a class.dex. file I was able to turn that file into . jar and now I want to go back to .dex. How to do this?

1 answer

0


In Github there is the following project: https://github.com/pxb1988/dex2jar

You can download the compiled version on https://sourceforge.net/projects/dex2jar/files/

Inside the folder should contain the d2j-jar2dex.bat who does exactly what you need.

The scripts you see in the download:

  • d2j-baksmali
  • d2j-Dex-recompute-checksum
  • d2j-dex2jar
  • d2j-dex2smali
  • d2j-jar2dex
  • d2j-jar2jasmin
  • d2j-jasmin2jar
  • d2j-smali
  • d2j-Std-apk
  • d2j_invoke
  • I think he wants to revert from jar to Dex again. This project does that too?

  • @Yes, the name of the command speaks jar2dex, there are scripts to convert to both and also to APK. PS: I have not tested, I cannot affirm the quality and/or "precision".

  • Thanks Jão.. I’ll try here and put the result!

  • @Guilhermenascimento, There’s no such bat in git enough, but I have another one here that has. I did the reverse process to convert to . jar and it still didn’t work. Confirm me which line should I type in cmd for conversion. Thank you!

  • @Vsousavaldemir didn’t tell you to download git, look at the answer again, the link of the summers are ready to use are on sourceforge, is the second link.

  • @Guilhermenascimento, so it’s this same folder that I have here.. It really has the jar2dex there, yet it’s not converting. I’m thinking it might be something related to the command in cmd. What I’m putting is d2j-jar2dex classes.jar

  • @Vsousavaldemir appears some error?

  • @Guilhermenascimento appears the following:C: REVERSE ENGINEERING dex2jar>d2j-jar2dex o C REVERSE ENGINEERING dex2jar classes.jar classes.Dex d2j-jar2dex -- Convert jar to Dex by invoking dx. Usage: d2j-jar2dex [options] <dir> options: -f,-force force overwrite -h,-help Print this help message -o,-output <out-Dex-file> output . Dex file, default is $current_dir/[jar-nam e]-jar2dex.Dex version: 2.0 C: REVERSE ENGINEERING dex2jar>

  • @Vsousavaldemir try the command like this cd C:\ENGENHARIA REVERSA\dex2jar and then d2j-jar2dex C:\ENGENHARIA REVERSA\pasta_aonde_esta_o_jar\meujar.jar

  • @Guilhermenascimento made the same mistake. I don’t know what else could be.

  • @Vsousavaldemir tries with quotes: d2j-jar2dex "C:\ENGENHARIA REVERSA\pasta_aonde_esta_o_jar\meujar.jar"

  • @Guilhermenascimento got it!! I found the https://www.youtube.com/watch?v=LvHWe0UOkmU still thank you so much for your help and attention.

Show 7 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.