I am trying to patch one .apk and I've found that you can do it using
apktool d your.apk
then patch smali files
apktool b com.your.package patched.apk
and finally jarsign it with debug key
The problem is that smali files are hard to read
I found great online tool: javadecompilers.com, which outputs java code.
My problem is that, after patching my app decompiled with this tool, I don't know how to build proper .apk from it.
I have tried just zipping it, changing extension from .zip to .apk and then signing it with jarsigner, but after uploading it to phone with
adb install patched.apk
It tells me
Failure [INSTALL_FAILED_INVALID_APK]
Probably this zipping and changing extension is wrong, but how to do it properly? Thanks.