TL;DR: Moral of the story: You will probably restore a junkie code for some low developer/ newbie company after some hard work that has no real market value.
Most developers today use pro guard to obfuscate their code
Any serious gamer in this field takes care first and foremost of his own code
By the end of this post, most folks will laugh at me. Since the following is deprecated it will get you banned easily.
if you can't learn java, there is kotlin try it it has a great potential for the future
But for historical purposes, I am wrting this.
1- Reverse an apk back to original source code.
Use jadx gui. There is an option to restore project to gradle.
Problem is you need some serious working to get it work, that, if you are lucky and the code isn't obfuscated
If you are persistent enough you can understand the logic behind the app, get some working classes, methods etc.
2- inject your ads into the app mainly admob and reupload: (working but useless as of today)
2-1- use apktool to decompile the app apktool d app.apk
2-2 change app name
2-3- use an editor/ search and replace command: sed etc search for the package name change it. then replace dots with slashes and append L (Big L) at the beginning of the package and replace with your own.
example:
original package: com.company.app your package: com.company2.app2
- replace com.company.app with com.company2.app2
- replace L/com/company/app with L/com/company2/app2
2-4 change folder names:
company becomes company2 and app becomes app2
2-5 change resources
2-6 look for ca-app to change ad ids
2-6 build apk: apktool b app -o newapp.apk
2-7 sign apk by using apk signer (google it)