android android This free lunch is applied, but there is a huge security shadow behind the free. We can detect the app using the app Detection tool.
"Android app two packs " and after the hack is implanted, the malicious code is repackaged. No matter from performance, user experience, appearance it is with regular > Exactly the same but behind it really quietly running a horrible program, it will unknowingly waste mobile phone power, traffic, malicious charges, peeping privacy and so on.
Face two times packaging a lot of companies have their own precautions, well-known companies almost all of their apps have done within the program to prevent its app was packaged two times, once packaged and re-run the program automatically quit. Next, I'll explain how to prevent the APP from being packaged two times.
To implement code internal preventionAPPbe packaged two times first to understandAPKprinciple of machine recognition,APKthe only identification is to rely on the package name and signature to do identification, similar to the Pea folder wash white, theMobile defender and other security software onAPKidentity of the cottage, they are dependent on the package name to determineAPKIt is then signed to determine whether it is a cottage. So the internal process of your own program can be started by acquiringAPKthe signature itself is then contrasted with the correct signature to identify whether it was packaged two times.
The packagemanag object allows you to get The signature of the APK itself.
By decomposing the code of the signature, a string of -around the string, this string is theAPKthe signature ofMD5value, by obtaining the signatureMD5values with the correctMD5value, you can identify itsAPKwhether it was pirated.
is a code block analysis of some of the apps that have been protected:
Is "XX province electric King" to prevent two times the key code of packaging
Is the "XX battery steward " to prevent two times the key code of packaging
The above two is the Smali layer of code, the above 2 Code is the download of the very high APP to prevent two times the processing of packaging, Its processed code is sure to use the key code that is
Landroid/content/pm/packageinfo;->signatures:[landroid/content/pm/signature.
This method can play a certain role in security, the general packaging party face It is helpless, if you understand some Smali Grammar Its role is equal to 0 .
How Android app prevents two packs from revealing.