-
-
Save JonnyBanana/4f0a0cb9a56b646749ef152de11529bf to your computer and use it in GitHub Desktop.
Windows batch file to convert .java file to .smali
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: http://stackoverflow.com/a/29052019/404271 | |
echo JDK 7 is required | |
if not x%1==x goto doit | |
:usage | |
echo %~n0 ^<Java file without .java extension^> | |
goto end | |
:doit | |
set ANDROID_SDK_DIR=%UserProfile%\AppData\Local\Android\android-sdk | |
set ANDROID_JAR=%ANDROID_SDK_DIR%\platforms\android-23\android.jar | |
set ANDROID_BUILD_TOOL_DIR=%ANDROID_SDK_DIR%\build-tools\23.0.3 | |
javac -cp %ANDROID_JAR% %1.java | |
if errorlevel 1 goto end | |
cmd /c %ANDROID_BUILD_TOOL_DIR%\dx --dex --output=%1.dex %1.class | |
cmd /c baksmali -o . %1.dex | |
:end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment