Android obtains apk Information

Source: Internet
Author: User

If the aapt tool is not available, run the following command first:

  1. Cd $ ANDROID_HOME/platform-tools
  2. Ln-s ../build-tools/19.0.0/aapt
  3. Ln-s ../build-tools/19.0.0/lib
  4. Ln-s ../build-tools/19.0.0/aidl


    Test: $ aapt

    Android Asset Packaging Tool

    Too many other users ‵‵‵‵‵·


    Obtain the Apk package name, VersionCode, VersionName, and other information.

    You can use aapt to obtain information about the Apk, including packageName, title, and versionCode.

    Mac users download this AAPT, Windows users download this AAPT

    Run the following command on the console:

    Aapt dump badging ~ /Downloads/youku.apk

    You can get the following information:

    Package: name = 'com. youku. pad 'versionCode = '13' versionName = '2. 4.2'

    Uses-permission: 'android. permission. READ_PHONE_STATE'

    Uses-permission: 'android. permission. WRITE_EXTERNAL_STORAGE'

    Uses-permission: 'android. permission. wake_lock'

    Uses-permission: 'android. permission. SYSTEM_ALERT_WINDOW'

    Uses-permission: 'android. permission. WRITE_SETTINGS'

    Application-label: 'youku HD'

    ......

    Get Apk Signature

    First, download the wandoujia-tools.jar package to your local machine and enter such commands on the console (no line breaks)

    Java-cp~ /Downloads/Wandoujia-tools.jar com. wandoujia. tools. ApkSignatureToolsMain "~/Downloads/youku.apk"

    Note that the bold part represents the directory of the wandoujia-tools.jar you downloaded and the full path of the Apk you want to analyze, And the rest remains unchanged. The following two sentences are displayed after execution:

    SignatureMd5 = b791ac2c93d279c4a52b6bcc68c5c32e

    Md5 = b5ed58fa6fbb460c9b618fccfcc8cb37

    Indicates the MD5 Signature and the MD5 string of the file respectively.


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.