Home  >  Article  >  Operation and Maintenance  >  How to encrypt Android apk released by unity

How to encrypt Android apk released by unity

WBOY
WBOYforward
2023-05-13 11:10:221506browse

Security issues of the Unity3D program

Code security issues

The core assembly file Assembly-CSharp.dll of the Unity3D program is a standard .NET file format, with method names and class names attached. , type definitions and other rich metadata information, which can be easily decompiled and tampered with tools such as DnSpy, and the code logic, class names, method names, etc. can be seen at a glance. Once the code logic is decompiled, it is easy to breed various types of plug-ins and destroy the balance of the game. If there are loopholes in the code logic, it is easy to be discovered and exploited, which may cause unpredictable losses to developers.

Resource Security Issues

During the compilation and packaging phase, the Unity3D program will package resources into Asset Bundle files through the Unity editor. Asset Bundle is a public compressed class file format, using Asset Studio, etc. Tools can parse, display and extract it. If not protected, it can easily be stolen for secondary development. For online games, you can also change the material attributes of some scene resources to transparent to achieve a perspective effect.

Requirement 1: Encryption protection of Android U3D-APK

Two compilation methods: ill2cpp and mono. Different compilation methods have different encryption methods. Unzip the Android Unity3D apk and check the lib library directory. If the lib directory contains the libmono.so library, it means that the Unity3D compilation option is mono. In this case, the entire apk directory needs to be packed.

How to encrypt Android apk released by unity

If the lib directory contains the libil2cpp.so library, it means IL2CPP is selected when compiling the Unity3D option. At this time, the so library in the lib directory needs to be protected.

How to encrypt Android apk released by unity

Encryption tool

Virbox Protector version 1.6. Trial download: https://shell.virbox.com/apply.html

Encryption example: angrybots5.5.3.apk (compilation option: mono)

Encryption process

  1. Import angrybots5.5.3.apk into VirboxProtector

How to encrypt Android apk released by unity

  1. ##Set encryption options and resource encryption

How to encrypt Android apk released by unity

  1. Start protection

How to encrypt Android apk released by unity

Packing successful After that, ssp.apk will be generated, and then the packed ssp.apk will be re-signed and packaged before it can be installed normally.

Encryption effect

Code encryption effect
Code decompilation effect before encryption

How to encrypt Android apk released by unity

Code decompilation effect after encryption

How to encrypt Android apk released by unity

Comparison of resource encryption effect

How to encrypt Android apk released by unity

Requirement 2: Control Authorized use of device programs

Solution 1: SenseLock 5 encryption lock

Solution introduction
The SenseLock 5 encryption lock is a USB encryption lock that must be supported on Android devices By plugging in a USB device, SenseLock 5 can control the usage time, frequency, function modules, etc. of the software. If you remove the encryption lock, the device will not be able to run U3D programs.

How to encrypt Android apk released by unity

Solve the problem
  • Prevent random copying of software

  • Limit software usage time

  • Limit software usage times

How to use SenseLock 5 encryption The lock can be used together with Virbox Protector to encrypt code and resources while also controlling software authorization. At the same time, Senselock 5 encryption lock also provides an SDK, which can quickly authorize the write lock without the need for code development. Use tools throughout the process to operate encryption and write locks. You only need to purchase a development kit from the DeepSearch Digital Shield Mall to start testing. Solution 2: Smart License

Solution Introduction

Smart License supports program authorization control under Android and ARM platforms, and the use form is an authorization code (16 letters and numbers) ), can quickly realize one-code-one-machine and one-code-multi-machine solutions. At the same time, the time limit of the software and the limited use of functional modules can be quickly realized.

FeaturesHow to encrypt Android apk released by unity

Bind hardware to prevent copying

The authorized device will generate a local cache file and bind it to the device hardware, effectively preventing theft of authorization by copying files

  • Intelligent authorization

China Unicom’s authorization activation, usage, and device information barriers are comprehensively summarized to provide developers with detailed business data to assist developers in implementing marketing strategies and improving products

  • Authorization Automation

Automatic activation and automatic recovery of authorization reduce the management work of developers, reduce the support workload in the product promotion process, and improve the product experience.

  • Visual data display board

Visual data display allows developers to control authorization usage

  • Support Wide range of applications and flexible application

Supported hardware products include (not limited to) Huawei HiSilicon, Dahua, Hikvision EZVIZ and other smart cameras; supports use on connected or non-connected devices

How to use

Smart License provides a free trial. First, you need to register a Virbox LM developer account (https://developer.lm.virbox.com/). After registration, you can log in to VirboxLM for authorization. Code generation and management. You can contact DeepSearch to customize the SDK for encryption and authorization development.

The above is the detailed content of How to encrypt Android apk released by unity. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete