How to Sign Apps: Difference between revisions

From wizarPOS
Line 2: Line 2:
In Android system, all the application should be signed before installed to terminal. Please refer to [https://developer.android.com/studio/publish/app-signing.html Google's resource] for detail.
In Android system, all the application should be signed before installed to terminal. Please refer to [https://developer.android.com/studio/publish/app-signing.html Google's resource] for detail.
<p>In wizarPOS terminal, the system will also verify the certificate chain of the APK signatures, except the normal Android signature checking. So the developer should apply the development certificate to wizarPOS. Please refer to this document [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/wizarPOSDevCertificateApplyGuide_en.pdf wizarPOSDevCertificateApplyGuide_en.pdf]. After you get the CSR reply from wizarPOS, please import the certificate chain file to your key store. Then the APK signed by this key store can be installed to wizarPOS production terminal.
<p>In wizarPOS terminal, the system will also verify the certificate chain of the APK signatures, except the normal Android signature checking. So the developer should apply the development certificate to wizarPOS. Please refer to this document [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/wizarPOSDevCertificateApplyGuide_en.pdf wizarPOSDevCertificateApplyGuide_en.pdf]. After you get the CSR reply from wizarPOS, please import the certificate chain file to your key store. Then the APK signed by this key store can be installed to wizarPOS production terminal.
<p>
<p>By default, the additional signature verification is not required in developing mode terminal. So you can use ADB to install and debug the normal Android APK to developing mode terminal.
By default, the additional signature verification is not required in developing mode terminal. So you can use ADB to install and debug the normal Android APK to developing mode terminal.
<p>The wizarPOS application root certificate can also be update to acquire's own application root certificate to let acquirer (terminal owner) control the terminal application totally.
<p>
The wizarPOS application root certificate can also be update to acquire's own application root certificate to let acquirer (terminal owner) control the terminal application totally.


== How to sign app ==
== How to sign app ==

Revision as of 02:57, 26 April 2019

APK Signature Verification

In Android system, all the application should be signed before installed to terminal. Please refer to Google's resource for detail.

In wizarPOS terminal, the system will also verify the certificate chain of the APK signatures, except the normal Android signature checking. So the developer should apply the development certificate to wizarPOS. Please refer to this document wizarPOSDevCertificateApplyGuide_en.pdf. After you get the CSR reply from wizarPOS, please import the certificate chain file to your key store. Then the APK signed by this key store can be installed to wizarPOS production terminal.

By default, the additional signature verification is not required in developing mode terminal. So you can use ADB to install and debug the normal Android APK to developing mode terminal.

The wizarPOS application root certificate can also be update to acquire's own application root certificate to let acquirer (terminal owner) control the terminal application totally.

How to sign app

Sign in an application project

Please refer to Google Sign APP

Sign an APK

WizarPOS provide a signature tool, it is a tool running in PC, and help the developer to sign their APK. Please download the signature tool. Before running it, please make sure that you have installed the JDK operation environment in your PC.

Run signature tool

In PC, run the follow command:

 java -jar SignatureTools.jar sign [--keytype jks|pk8] [--apk <FILE>] [--out <FILE>] [--keystore <FILE.jks>] [--alias <String>] [--keyfile <FILE.pk8>] [--certs <FILE>] [--storepass <String>] [--keypass <String>]

SignatureTools.jar is the signature tool. The following table shows the parameters and their illustrations.

Parameter Value Specification
--keytype Jks or pk8 The store path of the jks file or pk8 file
--apk The file path of the apk before signed The file path of the apk before signed
--out The file path of the apk after signed The file path of the apk after signed
--keystore The file path of the jks file When keytype is jks, this must be assigned
--alias Alias name of private key Alias name of private key in jks file
--keyfile The file path of the pk8 file When keytype is pk8, this is the private key file path
--certs Certificates file path When keytype is pk8, this is the certificate chain
--storepass Password of keystore file Password of keystore file
--keypass password of private key password of private key in jks file or pk8 file