Col-E / Recaf

The modern Java bytecode editor
https://recaf.coley.software
MIT License
5.97k stars 463 forks source link

Expand search API to eventually support Android #697

Open Col-E opened 2 years ago

Col-E commented 2 years ago

The search API is heavily tied to the ASM library, which parses Java class files. Android classes are packaged into a single DEX which we parse using dexlib2.

The API will have to also be able to parse these Android classes and offer the same functionality.


Copying a suggestion from the discord below:

Well. JADX-Gui is great. But yeah JADX-Gui only works in combination with at least Notepad++ and APK-Tool. You will need at least 3 tools. I am modding GCam and I use 6 Tools: APK-Tool, JADX-Gui, Notepad++, Android Studio, WinMerge and BytecodeViewer. Recaf would make many things much easier for Android Reverse engineering. It is complete pain rn. Things I need for AndroidRE are:

  • Usage Search (Search where Methods are used in the APK via rightclickmenu)
  • Logcat Window via USB with adb
  • APK-Support (Decompilation and Compilation)
  • Comparing of different APKs (Compare Versions of Code even if class names changed)
  • Ressources Previews (Images, oggs, Vectorimagefiles, Vectorxml-files, XMLs, ... )
  • Ressource generation (Import vector images, import pngs, import oggs, ... )
  • Edit Ressources (Delete XMLs, Images, ... ; Edit XMLs)
  • Different Decompilers
  • Install compiled apk directly via adb
  • Start installed app via adb shell

To give a short list, some of that is already in Recaf. Then there would only be one case where you need a second Software and thats with binaries. So maybe it would be helpful to in- and export .so-files. You need Ghidra, cutter or IDA for that. But thats really advanced stuff.

metzger100 commented 1 year ago

It's also possible, that the classes are packed into multiple Dex-Files. That already caused bugs for Dex2Jar fixed with version 23. https://github.com/ThexXTURBOXx/dex2jar/releases/tag/v23

https://developer.android.com/studio/build/multidex

Col-E commented 1 year ago

In 4x we've generalized the search logic quite a bit, so this is much easier to implement now. We even have some basic skeletons of the Android work done.