How Android app prevents two packs from revealing.

Source: Internet
Author: User


       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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.