Using apktool
you can decode resources to nearly original form and rebuild them after making some eventual modifications.
brew install apktool
Download an APK or copy one off your (rooted) phone
apktool d my-cool.apk
Open up the smali source folder and edit the sources (not in JAVA but smali code. If you need a better code inspection check following dex2jar and JD-JUI
).
apktool b my-cool.apk
brew install dex2jar
Download JD-GUI (or Github link)
d2j-dex2jar MY_APP.apk
Open jd-gui.app
and then pick MY_APP.jar
If JD-GUI won't open follow pilist changes: java-decompiler/jd-gui#360