I'm playing with a great Android to Java converter named UnDX. You can find it at
it uses BCEL to convert the files. It's in beta, has some errors.
So, I decided to create my own converter using ASM. The idea is simple:
- Create a DEX reader extending ClassReader. Here call all the Visitor events to generate the java code.
- Use ASM to manipulate the java bytecode.
- Create a DEX ClassWriter. It must be exactly the same for java, but after generating all the bytearrays it must use dx command to create de DEX file.
The idea is simple, I had some tests and it works! I'm generating the java code and I can manipulate it.
I'll tell you later what happens with some big DEX files.