直接的.java到.smali转换。可能?直接、java、smali

2023-09-04 05:37:21 作者:梦游去告白

我正与baksmali / smali工具。 但有时我需要的.java类纂要.smali文件。所以我先用Eclipse编译和第二拆开.apk文件到一组.smali文件。

I'm working with baksmali/smali tools. But sometimes I need to compile .java class to .smali file. So I've to first compile it with Eclipse and second disassemble the .APK to a set of .smali files.

是否有可能直接编译的.java到.smali一个单一的工具?

Is it possible to directly compile .java into .smali with one single tool?

我无法找到一个解决方案,我自己...

I couldn't find a solution myself...

推荐答案

的javac或类似的程序可以用来转换源$ C ​​$ C到的.class。

"javac" or similar program can be used to convert the source code to .class.

Android的的dx用于的.class转换的Dalvik .dex

Android's "dx" is used to convert .class to Dalvik .dex.

的该结果可以与Smali工具进行处理。您应该能够从脚本调用所有的这些直接

The result of that can be processed with the Smali tools. You should be able to invoke all of these directly from a script.