Home > Article > Operation and Maintenance > How to encrypt Android apk released by unity
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.
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.
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.
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.
Virbox Protector version 1.6. Trial download: https://shell.virbox.com/apply.html
Encryption example: angrybots5.5.3.apk (compilation option: mono)
Import angrybots5.5.3.apk into VirboxProtector
Solution Introduction
Features
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
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!