Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Direct .java to .smali conversion. Possible?

Tags:

android

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.

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

I couldn't find a solution myself...

like image 232
OGP Avatar asked Mar 27 '11 09:03

OGP


1 Answers

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

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

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

like image 100
fadden Avatar answered Sep 28 '22 17:09

fadden