How Android SHA1 and package gets

Source: Internet
Author: User
Tags sha1

Get the App package name

Open the Androidmanifest.xml profile for the Android app project, and the package property corresponds to the app bundle name.
As shown, the contents of the Red box:


Get SHA1 value

The SHA1 values under development mode (Debug) and Release mode (release) are different, and when releasing the APK, you need to reconfigure key according to the KeyStore of the release apk, and get the method of SHA1 in the release mode refer to method two.
Here are two ways to get SHA1 values.
Method One (recommended)
With ADT 22 or later, you can view it directly in Eclipse.
Windows: In Eclipse, turn on Android---Build, Window, preferances.
MAC: Turn on Android---Build, Eclipse/adt->preferances, in Eclipse.
The value in "SHA1 fingerprint" in the Pop-up dialog box is the SHA1 value for the Android signing certificate, as shown in:


Method Two
Using the Keytool (JDK's own tool), follow these steps:
1. Run into the console.


2. Enter the CD in the pop-up console window. Android navigates to the. Android folder.


3. Continue to enter commands in the console.
The development mode uses Debug.keystore, the command is: Keytool-list-v-keystore debug.keystore
The release mode uses the APK corresponding to the KeyStore, the command is: keytool-list-v-keystore apk KeyStore
As shown below:


Prompt for KeyStore password, development mode default password is Android, release mode password is the password set for apk keystore. Enter the key after the carriage return (if you do not set a password, you can directly enter), at this time you can get the SHA1 value in the information displayed in the console, as shown in:


Description: The KeyStore file is a certificate file for Android signing.

How Android SHA1 and package gets

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.