View APK Signature

Source: Internet
Author: User
Tags certificate fingerprint

use shell to write a script to view the APK signature. Code is rarely and very simple

 #! /Bin/bashmypath = 'pwd' filepath = "" mkdir. temp_for_certificatmcm. temp_for_certificatecount = 0 while [-n "$1"] do count = $ [$ count + 1] echo "(# $ count)" 'basename "$1 "'": "If ['expr substr" $1 "1 '="/"] # absolute path then filepath =" $1 "else # Relative Path filepath =" $ mypath/$1 "fi Path = 'jar TF" $ filepath "| grep RSA '# Find the RSA file jar XF In the APK $ filepath $ path # extract the RSA file from keytool-printcert-File $ path # view the fingerprint certificate Rm-r $ path # Delete the decompressed file echo "------------------------------------------" shift done CD .. rm-R. temp_for_certificate 

(Save it to a file and name it getcertificate)

 

Usage:

 
Getcertificate superuser.apk skype3.0.apk

Output:

(#1) superuser.apk:

Owner: Cn = Adam shanks, ou = Android, O = soupcoconut, L = fwb, St = Florida, c = us

Issuer: Cn = Adam shanks, ou = Android, O = soupcoconut, L = fwb, St = Florida, c = us

Serial number: 4c614057

Validity Period: Tue Aug 10 20:04:39 CST 2010 to Sat Dec 26 20:04:39 CST 2037

Certificate fingerprint:

MD5: D2: 42: 30: AA: Be: 81: 62: 30: Fe: B4: 0e: F1: Cf: 11: B0: C0

Sha1: 5f: 11: 3f: C2: C2: 0a: 7c: 9B: D9: 28: 19: 22: 6a: 32: A1: 90: 4b: 75: EF: 8b

SignatureAlgorithmName: sha1withrsa

Version: 3

--------------------------------------------

(#2) skype3.0.apk:

Owner: Cn = Skype, ou = mobile client, O = Skype, L = London, c = GB

Issuer: Cn = Skype, ou = mobile client, O = Skype, L = London, c = GB

Serial number: 4c0e1962

Validity Period: Tue Jun 08 18:20:18 CST 2010 to Fri Jul 20 18:20:18 CST 2040

Certificate fingerprint:

MD5: 37: 5f: 1A: 56: C5: 2a: 51: FF: 35: F3: 6C: C5: A6: 69: 54: EC

Sha1: 77: 18: 07: D1: B8: 41: 4d: 69: 89: E7: D8: EF: 0b: 97: 97: 24: 3B: 93: 1f: 95

Signature algorithm name: sha1withrsa

Version: 3

--------------------------------------------

 

You can also useJarsigner

 
Jarsigner-verify-verbose-Certs superuser.apk

 For detailed usage of jarsigner, see help.

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.