4 ms·
Very cool project! Love the idea of a Java decompiler written in C — the speed must be great. Any plan to support `.dex` in the future? Also curious how you ha
by appendixv3 1y ago
Very cool project! Love the idea of a Java decompiler written in C — the speed must be great.
Any plan to support `.dex` in the future? Also curious how you handle inner classes inside JARs.
- tslater2006 1y agoThe readme shows support for dumping dex files. Edit: missed that it has a comment that stays "unsupport for now" but at least it looks like something planned
- deleted 1y ago[deleted]
- mdaniel 1y agoThe "jikes" compiler from IBM <https://github.com/daveshields/jikespg https://github.com/daveshields/jikespg> was written in C++ and was for the longest time screaming fast. It also had its own parser generator lpg which was fun to play with, if you're into those things <https://github.com/daveshields/jikespg https://github.com/daveshields/jikespg> It seems someone liked it and made a "v2" along with LSP support https://github.com/A-LPG/LPG2#lpg2 https://github.com/A-LPG/LPG2#lpg2
- amiga386 1y agoJikes also gave massively better error messages than the official Java compiler, from what I remember, and it certainly ran a lot faster on the Amiga (https://aminet.net/package/dev/lang/jikes https://aminet.net/package/dev/lang/jikes) than trying to run javac via Kaffe (https://en.wikipedia.org/wiki/Kaffe https://en.wikipedia.org/wiki/Kaffe) did.
- pjmlp 1y agoCertainly not everything on Jikes, given that it was one of the first bootstraped Java toolchains. https://www.jikesrvm.org/ https://www.jikesrvm.org/
- neocanable 1y agoI am writing the part of decompiling dex and apk. The current speed is about 10 times faster than that of Java, and it takes up less resources than Java. And the compiled binary is smaller, only about 300k. Thank you for your attention.
- mdaniel 1y agoThis has been my life experience with things written in C/C++, so speed doesn't matter. Or, I guess from an alternative perspective, it ran very fast, but exited very fast, too :-D $ ./objdir/garlic $the_jar_file -o out-dir -t $(nproc) Progress : 85 (1024)Segmentation fault: 11
- neocanable 1y agoSorry for giving you a bad experience. Please provide the jar file or class file. I hope I can fix it as soon as possible.
- uecker 1y agoIs it? This is my experience with Python. The C/C++ programs I use daily never seem to crash (Linux, bash, terminals, X, firefox, vim, etc.). It must be years ago one of those programs crashed while I used it.
- 1718627440 1y agoAlso a segfault IS the protection layer intervening, it is equivalent to a exception in other languages. The real problem is, when there is no segfault.
- uecker 1y agoThis is absolutely true. But even this does not happen in the software I use every day. Software written is C is definitely the most stable I use - by far. That there are people running around claiming that it is impossible to write stable software in C and it crashes all the time due to bugs is rather unfortunate, as it is far from the truth.
- neocanable 1y agoIt is processes inner classes recursively. First read all entry from jar, and analyze the relationships between classes. Then do some decompile job.
- neocanable 1y agothe project support dex and apk now.