Tutorial on using Ionic to pack Android apk

Source: Internet
Author: User
Tags pack

Ionic after the project has been developed, it needs to be packaged. If you need to be on the shelves, on the Android side, you'll need to sign and upload them to the App store after the package is finished.

The first is about apk signatures, where the installation of the Android program is distinguished by the package name (package name), that is, the same package name is considered to be the same program. This allows for upgrades, replacements. But the package name is a string that can be viewed, so that it can be faked, and then someone else can create an application to replace your application with the result imaginable. The signature is to prevent such a situation from happening, when your program is signed and installed, only the same package name and signature of the program can be replaced by installation. The signature is not simple to be forged, thus ensuring the security of the program.

First, packing APK

Ionic bulid Android//pack Test Kit
Ionic build--release Android//Packaged official package
The ionic package is particularly simple, only one command, the above command is used to pack the test package, which already contains a signature, can be directly installed on the phone, but not used to apply the market, the second command is packaged into a unsigned apk, can not be directly installed, requires a second step.

Ii. Signature APK

1. Generate signature (. keystore) file

Keytool-genkey-v-keystore demo.keystore-alias demo.keystore-keyalg rsa-validity 20000
Keytool is the tool name,-genkey means to perform a digital certificate operation, and-V indicates that the details of the generated certificate will be printed;

-keystore the filename of the Demo.keystore certificate;

-alias Demo.keystore indicates the alias of the certificate

-keyalg RSA to generate a key file of the algorithm used;

-validity 20000 The validity period of the digital certificate;

Input will let you answer some questions about your company and area, these answers must remember, later update apk need to use, the best screenshot record.

2. Signature APK

Jarsigner-verbose-keystore/yourpath/demo.keystore-signedjar demo_signed.apk demo.apk Demo.keystore
Jarsigner is the tool name,-verbose indicates that the details of the signature process are printed;

Certificates generated prior to-keystore/yourpath/demo.keystore

-signedjar demo_signed.apk after signing the APK

demo.apk need to sign the APK

Alias of Demo.keystore Certificate

Related Article

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.