I'm actually trying to repack a JAR file (after noping out some lines that cause conflicts) and here's my approach:
- Convert Jar into Dex (with dex2jar). It's worth noting that resources like jpgs are not packed along into Dex.
- Disassemble Dex into Smali and make modifications.
- Assemble Smali into Dex.
- Convert Dex into Jar (with jar2dex).
- jar uf my.jar resource1.jpg resource2.jpg
At last, the Jar doesn't seem to work. I checked the Jar with JD-GUI but found nothing wrong with the modified block of code. Anything wrong with my approach?