Using apktool you can decode resources to nearly original form and rebuild them after making some eventual modifications.
brew install apktoolDownload an APK or copy one off your (rooted) phone
apktool d my-cool.apkOpen 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.apkbrew install dex2jarDownload JD-GUI (or Github link)
d2j-dex2jar MY_APP.apkOpen jd-gui.app and then pick MY_APP.jar
If JD-GUI won't open follow pilist changes: java-decompiler/jd-gui#360