-1

I have extracted Dex file using Apk editor And decomplied using Jadex Now I want to recompile Jar to Dex using android Phone can any one help me ?

Robert
  • 33,260
  • 14
  • 84
  • 130
Jawad
  • 1
  • Its always good to provide as much context as possible. For example here you are specifying Android but you do not specify what version (Platform) this is just an example of how you can add some helpful context. See here https://stackoverflow.com/help/how-to-ask – Nigel Savage Jan 27 '20 at 19:46

1 Answers1

1

I assume you are referring to Jadx not Jadex.

Jadx has the command to save the decompiled project as gradle project.

A Gradle project can be loaded into Android studio. And theoretically you can then recompile the app and get back an app that works identically like the original app does.

Practically this does not work in 99.9% of all cases because:

  1. Jadx failed to decompile some methods.
  2. The generated code contains minor problems that need to be corrected manually
  3. Very complex functions may be decompilable but the code has slightly changed and therefore does not exactly work like the original byte code.

In general decompiling an app using Jadx is the totally wrong approach if you want to recompile it. In my opinion the most reliable way to decompile and recompile an app is using apktool. In the decompiled smali sources you can modify the methods you want to change. For a better understanding of the code you can decompile the relevant classes/methods in Jadx, too.

For simplified building of smali snippets you can use Android Studio: use code parts decompiled ba Jadx, copy it into an Android Studio project, compile it and open the compled APK file using Jadx. Select the class that contains the code, open the samli tab for it and copy the smali code out of it. This is usually easier than programming directly in Smali. See also this question:Convert .Java file to .Smali file

Robert
  • 33,260
  • 14
  • 84
  • 130