Android Application signature Problems

Source: Internet
Author: User

I. signature code (first configure the jdk path, keytool and jarsigner are both java class libraries) 1. generate the signature file keytool-genkey-alias MyFirstApp. key store-keyalg RSA-validity 40000-keystore MyFirstApp. keystore2. apply the signature file to the file signature jarsigner-verbose-keystore MyFirstApp. keystore-signedjar MyFirstApp_signed.apk MyFirstApp.apk MyFirstApp. keystore (note: the apk file cannot be installed normally after jdk7 is signed. Add the following parameter-digestalg SHA1-sigalg MD5withRSA in the signing program jarsigner. parameter description 1. keytool usage: -certreq [-v] [-protected] [-alias <alias>] [-sigalg <sigalg>] [-file <csr_file>] [-keypass <keystore password>] [-keystore <keystore>] [-storepass <keystore password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-changealias [-v] [-protected]-alias <alias>-destalias <target alias> [-keypass <keystore password>] [- keystore <keystore>] [-storepass <keystore password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [- providerarg <parameter>]... [-providerpath <path list>]-delete [-v] [-protected]-alias <alias> [-keystore <keystore>] [-storepass <repository password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-exportcert [-v] [-rfc] [-protected] [-alias <alias>] [-file <authentication file>] [-keystore <keystore>] [-storepass <keystore password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-genkeypair [-v] [-protected] [-alias <alias>] [-keyalg <keyalg>] [-keysize <key size>] [-sigalg <sigalg>] [-dname <dname>] [-validity <valDays>] [-keypass <keystore password>] [-keystore <keystore>] [- storepass <repository password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-genseckey [-v] [-protected] [-alias <alias>] [-keypass <keystore password>] [-keyalg <keyalg>] [-keysize <key size>] [-keystore <keystore>] [-storepass <repository password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-help-importcert [-v] [-noprompt] [-trustcacerts] [-protected] [-alias <alias>] [-file <Authentication file>] [-keypass <keystore password>] [-keystore <keystore>] [-storepass <keystore password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-importkeystore [-v] [-srckeystore <source keystore>] [-destkeystore <target keystore>] [-srcstoretype <source storage type>] [-deststoretype <target storage type>] [-srcstorepass <source Database Password>] [-deststorepass <target database password>] [-srcprotected] [-destprotected] [--destprotected] srcprovidername <source provider name>] [-destprovidername <target provider name>] [-srcalias <source alias> [-destalias <target alias>] [-srckeypass <source keystore password>] [-destkeypass <target keystore password>] [-noprompt] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-keypasswd [-v] [-alias <alias>] [-keypass <old keystore password>] [-new <new keystore password>] [-keystore <keystore>] [-storepass <keystore password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-list [-v |-rfc] [-protected] [-alias <alias>] [-keystore <keystore>] [-storepass <repository password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [-providerarg <parameter>]... [-providerpath <path list>]-printcert [-v] [-file <authentication file>]-storepasswd [-v] [-new <new repository password>] [- keystore <keystore>] [-storepass <keystore password>] [-storetype <storage type>] [-providername <Name>] [-providerclass <provider Class Name> [- providerarg <parameter>]... [-providerpath <path list> 2. jarsigner usage: [Option] jar file alias jarsigner-verify [Option] jar file [-keystore <url>] keystore location [-storepass <password>] password for keystore integrity [-storetype <type>] keystore type [-keypass <password>] private key password (if different) [-sigfile <File>]. SF /. name of the DSA file [-signedjar <File>] Name of the signed JAR file [-digestalg <algorithm>] Name of the digest algorithm [-sigalg <algorithm>] Name of the signature algorithm [-verify] verifies the signed JAR file [-verbose] and outputs detailed information during signature/verification. [-certs] outputs detailed information and displays the certificate during verification. [-tsa <url>] location of the timestamp institution [-tsacert <alias>] Public Key Certificate of the timestamp institution [-altsigner <class>] Name of the signature mechanism class [-altsignerpath <path list>] The Position of the alternative signature mechanism [-internalsf] is included in the signature block. SF file [-sectionsonly] does not calculate the hash of the entire list [-protected] keystore protected authentication path [-providerName <Name>] provider name [-providerClass <class> encryption service provider name [-providerArg <parameter>]... main class file and constructor Parameters

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.