目录

Application Encryption

The application encryption feature can effectively increase the difficulty in reverse engineering of application code. However, defending against reverse engineering is a continuous attack-defense confrontation process. Other security hardening measures need to be taken for higher levels of code protection.

Introduction

To protect application code security and your core assets, HarmonyOS provides an end-to-end mechanism to protect the kernel-level application code throughout its lifecycle based on system security.

You can submit an application release request to AppGallery Connect and choose whether to encrypt the uploaded package.

Then the application code will be encrypted by AppGallery Connect after the release request is approved. When the application is installed on a device, the installation file is still protected after being stored on the device, which effectively guards the application. When the application is started, it is decrypted as required.

The system-level application encryption stands out with the following features:

Supported Country/Region

Chinese mainland

Encryption Impact

  1. The encrypted application may slightly increase performance overheads during startup and running.

  2. The encrypted application is larger in size than the unencrypted one and may slightly increase the download and installation time.

The impact of application encryption has been optimized at the system level. In certain enhanced versions, the performance and package size of the application stay nearly the same with or without encryption.

Protection Effect

The application encryption feature protects core assets (for example, .abc files) in the application package. Unencrypted code files can be decompiled. After encryption, the security of the code files is greatly enhanced, increasing the difficulty in reverse engineering.

Procedure

The application encryption feature allows applications to be encrypted in the release process and decrypted on demand at runtime. It enhances application security while minimizing your adaptation work, ensuring a seamless and secure user experience.

Currently, the widgets.abc file of the ArkTS widget service does not support encryption.

The following outlines how the application encryption feature is utilized throughout the application lifecycle:

FAQs