Skip to main content

install IPA package to iOS device with command line

Project description

Command line tool to print MD5 / SHA1 / SHA256 fingerprints of Android APK package.

Why we need it?

keytool no longer print MD5 after java8.

But sometimes we do need the MD5 for example, in WeChat and AliPay developer console.

Some alternative tools do not work well:

  1. Gen_Signature_Android.apk, need to be install to Android device, sometimes refused by Android device.

  2. jadx, a powerful to decompile APK, we can view details of APK package, but it's too heavy.

To view the fingerprints, a very tiny command line tool will be enough.

Installation

Please make sure your Python is v3.7 or above.

python3 --version
python3 -m pip install apk-signature

Or, clone from GitHub:

git clone https://github.com/floatinghotpot/apk-signature.git
cd apk-signature
python3 -m pip install -e .

How To Use

apk-signature <path_to_apk_file>

Example:

apk-signature myapp.apk

How It Works

Here are the steps that the tool actualy runs:

# unzip the IPA file to tmp folder
mkdir ./tmp
unzip <path_to_apk_file> -d ./tmp

# run openssl to extract certificate file from CERT.RSA
openssl pkcs7 -inform DER -in ./tmp/META-INF/CERT.RSA -print_certs -out ./tmp/CERT.cert

# print the fingerprints in upper case
openssl x509 -in ./tmp/CERT.cert -fingerprint -noout -md5
openssl x509 -in ./tmp/CERT.cert -fingerprint -noout -sha1
openssl x509 -in ./tmp/CERT.cert -fingerprint -noout -sha256

# print the fingterprints in lower case
openssl x509 -in ./tmp/CERT.cert -outform DER | openssl dgst -md5
openssl x509 -in ./tmp/CERT.cert -outform DER | openssl dgst -sha1
openssl x509 -in ./tmp/CERT.cert -outform DER | openssl dgst -sha256

# clean up the tmp folder
rm -r ./tmp

Dependency

It will call openssl, so make sure it's installed first.

If not installed, install it with Homebrew:

brew install openssl

Credits

A simple tool created by Raymond Xie, to print the MD5/SHA1/SHA256 signature of APK package with command line.

Any comments are welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apk-signature-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

apk_signature-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file apk-signature-1.0.0.tar.gz.

File metadata

  • Download URL: apk-signature-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.14

File hashes

Hashes for apk-signature-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e61b7be5b76d77e583b1ec050075776a6f0953724cf5d92ab55ec5efa66fac92
MD5 ca426b6cf8d692c161138abdbb4fa155
BLAKE2b-256 feaad1ba736db1bc88097c612a62d64f9146131e16b1203a63939e3af90303d1

See more details on using hashes here.

File details

Details for the file apk_signature-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: apk_signature-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.14

File hashes

Hashes for apk_signature-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcccdff18af0793305e552ab8059a1e9dfb9240755513a12ece4e7af71e43c8d
MD5 6bf942833a80c9e60fd8fd0870708429
BLAKE2b-256 bf52bfc77e0f4b5e7bfdf76e8bdc767de84dfaad8af89391d7f8bfec588e2bef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page