First step : use apktool decompile apk
Apktool is a decompile tool that you can use to change the apk to source File
under the same folder as . apk shift+right Click, w start cmd followed by typing two commands Decompile
Browse the folder after decompile
Build is automatically generated by the system , Lib is the library , original inside is manifast, res General is used to the picture button and so on, Smali should be the source .
Notice the Decompileafter the source code isSmalilanguage, understand thatJavaconverted toSmaliwill lose some information when the, especiallyclassof Information, soSmaliconverted toJavaThere might be some problems., so just learn a little bit.Smalilanguage, Modify thisProject.
Open Small, Android is the support-v4 Library, com inside is the source we are looking for !
Now let 's look at the structure of the app .
Visually, it's only two of Activity .
R starts with resource in android , and this mainactivity must contain what we want to find. onCreate The entrance , $ $ is his sub-class.
After understanding the syntax, we can modify the source code
Step three : Recompile:
in the folder under the same folder shift+right Click, w Follow the Recompile Get . apk
After the recompile apk is compressed , get imisstest-final.apk, If you do not compress , the app runs with a larger system resource Footprint .
Fourth Step : Signature
Put thisapkput it in the real machine., found not installed, Uninstall the originalapkfound or could not be installed. think of usingEclipseorAndroid Studioat the time of development, installationapkwhen the lastSignatureit's all automatic., There 's no.
So download keytool generate . KeyStore, refer to :
When using jarsigner for signature , It was found that it needed JDK1.7 and had to 1.8 Uninstall First , go to Oracle installation 1.7
Later using jarsigner signature found that there was still a problem , saying that it could not find sun .... class ,
Check the StackOverflow and put the tools below Jdk7 Copy it.
Finally, using Jarsigner again, the signature is successful .
Use Apktool to hack the app