Pseudo encryption
Pseudo-encryption is one of the encryption methods before the release of Android4.2.x system. APK (compressed file) is pseudo-encrypted with java code, and its modification principle is to modify the last five bytes of four consecutive bytes marked "P K 0 1 02". Odd numbers mean unencrypted and even numbers mean encrypted.
Although pseudo-encryption can play a certain role in preventing cracking, it will also have problems. First, after using pseudo-encryption to encrypt its APK, the market can't detect it safely, which leads some markets to refuse to upload such APK; Secondly, the encryption method and decryption method of pseudo-encryption have long been published, which greatly reduces its security; Thirdly, the Android4.2.x system cannot install pseudo-encrypted APK;; ; Finally, pseudo-encryption simply protects APK, java layer source code shell protection, core so library, resource files, master configuration files and third-party shelf packages are not protected. Note: The advanced version does not support this method, so do not try to use this encryption method.
Confusion protection
Change the original class name, variable name and method name with specific meanings into names that people can't understand, such as the method name getUserName, and program the method name.
Crack: patience
Runtime verification
Runtime verification mainly refers to obtaining the signature information locally when the code is started, and then checking the signature information to determine whether the application is genuine. If the signature information is not genuine, it will prompt piracy or direct crash. Of course, you can put the necessary data on the server.
Crack: find the part of smali file and judge whether it is equal. Change it to a constant true, which is invalid.
In short, after decompiling some apk, as long as it is written in java code, there will always be smil files. For smil files, if you read them patiently, you can still see some key codes.
Compared with the application, the game apk adopts cocos2d-x or unity3D, adopts cross-platform programs written by c++ and c#, and adopts JNI in the apk. Therefore, there is no smali, which can prevent static cracking of apk packets.
Of course, the game package apk will be loaded when it runs. * So enter the memory. Dynamic can also grab the corresponding data in memory. Only NDK is not a hierarchical relationship compared with Smali Cracking.