How to Sign Apps: Difference between revisions
No edit summary |
No edit summary |
||
Line 59: | Line 59: | ||
* Keep Default settings, set stored path of the signed APK, then click Finish. | * Keep Default settings, set stored path of the signed APK, then click Finish. | ||
[[File:Signnext.png|frameless|left|thumb|caption]] | |||
=== Sign by Command Line Tool === | === Sign by Command Line Tool === | ||
wizarPOS provides a java signature tool to help developer sign the APK. You can use it in command line. Please download the [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/SignatureTools.jar signature tool]. Please make sure that you have already installed the JRE 1.6 or above in your PC. | wizarPOS provides a java signature tool to help developer sign the APK. You can use it in command line. Please download the [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/SignatureTools.jar signature tool]. Please make sure that you have already installed the JRE 1.6 or above in your PC. |
Revision as of 10:01, 17 May 2019
APK Signature And Verification
In standard Android system, all the applications should be signed before installed to system. Please refer to Google's resource for detail.
In wizarPOS terminal, the system will also verify the certificate chain of the APK signatures by the application root certificate, except the normal Android signature checking. So the terminal only allow the APK signed by the application root certificate or its sub certificate.
The developer should apply the development certificate from 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 in 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 by IDE
Please refer to Google Sign APP
- Click Build>Generate Signed Bundle/APK
- Select APK
- Choose keystore and input the info in the follow picture, click Next.
- Keep Default settings, set stored path of the signed APK, then click Finish.
Sign by Command Line Tool
wizarPOS provides a java signature tool to help developer sign the APK. You can use it in command line. Please download the signature tool. Please make sure that you have already installed the JRE 1.6 or above 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 parameter definitions:
Parameter | Value | Specification |
---|---|---|
--keytype | jks or pk8 | The type of the keystore which used to sign the APK. |
--keystore | The path of the jks key store file | It must be defined when using jks keystore |
--keyfile | The path of the pk8 file | It must be defined when using pk8 file as keystore. |
--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 |
--alias | Alias name of private key | Alias name of private key in jks file |
--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 |