Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for two-way mapping, Asm2Dex #33

Open
Col-E opened this issue Apr 9, 2023 · 1 comment
Open

Support for two-way mapping, Asm2Dex #33

Col-E opened this issue Apr 9, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Col-E
Copy link

Col-E commented Apr 9, 2023

I'm currently looking into Android support on my project, Recaf (rewrite work where this would apply to), and am evaluating a number of potential paths. One such path would be the following:

  1. Read a DexFileNode from classes.dex
  2. Take each DexClassNode instances, store in a Map<String, DexClassNode>
  3. When a Android class is edited, lazily map it to a JVM class, edit that, then map back into DexClassNode
  4. Save changes to classes.dex by using DexFileWriter to take the Map<String, DexClassNode> and pack it back into classes.dex

One problem, I don't see anything to facilitate a Asm2Dex process. If need be I'd be willing to contribute work towards making it.

If you have any thoughts on how this process could be improved I'd love to hear 'em.

@ThexXTURBOXx ThexXTURBOXx added the question Further information is requested label Apr 10, 2023
@ThexXTURBOXx
Copy link
Owner

Hi, that's a good one!
dex2jar uses the dx compiler for its jar2dex command which would trigger a complete recompile (which is the reason why it is a bit wonky -- see here)
An option to facilitate asm2dex would be very nice indeed. The closest option for now are the methods in the J2IRConverter class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants