Is there any way to convert smali to java for editing and vice versa

Viewed 14569

I am currently modding an app.I am beginner till now.I want to ask is there any way to convert smali file to java for editing and vice versa. I searched the whole internet,even xda forum could not give me accurate answer. There are dozen of methods though but none of them is convenient.

1 Answers

You can use Apktool to decompile/decode an APK and rebuilt it.

Generated files are in smali format.
To make it easier to understand/find the code you want to change, you can generate Java source code from APK file using JD GUI.
Generated Java files (most of the times) are not complete and can't be used to recompile the apk!

On Android Studio and IntelliJ you can use Java2Smali plugin to convert Java/Kotlin code to smali.

Related