目录

How do I package multiple HAPs from different projects into a single App Pack?

  1. Build each HAP module from the respective projects using the Build Hap menu in DevEco Studio. Obtain the unsigned HAP and pack.info file from the outputs folder.
  2. Merge the pack.info files of all modules to create an application-level pack.info file with content in the following format:

    In summary.app, include the unique configuration for the entire package. In summary.modules and packages, enter the first values from the corresponding module-level pack.info files.

  3. Go to the lib folder of the SDK toolchain and run the following command for packing: java -jar app_packing_tool.jar --mode app --force true --pack-info-path [path_to_pack.inf] --hap-path [comma_separated_list_of_hap_files] --out-path [output_path_with_.app_extension]
  4. Go to the lib folder of the SDK toolchain and run the following command to sign the App Pack: java -jar hap-sign-tool.jar sign-app -mode localSign --keystoreFile [p12_signature_file] --keystorePwd [keystore_password] --keyAlias [key_alias] --keyPwd [key_password] --signAlg [signing_algorithm] --profileFile [p7b_signature_file] --appCertFile [CER_signature_file] --inFile [path_to_unsigned_App_package] --outFile [path_to_signed_app_pack]