Protect Android shared library (.so libs)

Protect Android shared library (.so libs)

Similar to the traditional Linux model, shared libraries in Android are relocatable ELF files that map to the address space of the process when loaded. To save memory and avoid code duplication, all shared objects shipped with Android are dynamically linked.

Virbox Protector supports to protect Android shared library in both GUI tool and CLI tool with multiple encryption technology. Developer can protect and encrypt the .so lib to specified functional level, with obfuscation, virtualization, code of encryption etc. The protected .so libs can be effectively to defend the debug and dump in memory.

Protect .so library in 5 steps

  1. Import file: import .so library which need to be protected by Virbox Protector;

  2. Set the configuration of "Function Option"; (Protect specified functions);

  3. Set the configuration of "Protection Option"; (Protect .so library in general);

  4. Click to Start the "Protection" Process;

  5. Backup the source file. rename the protected file to source file name and save the "Configuration" file;


Sign-up Virbox Protector and install the Virbox Protector;

Open Virbox Protector and sign in with your account;

Above pre-requisition is for test/evaluation Virbox Protector only, To protect formal and commercial release .so library, pls purchase and get the related Virbox Protector license.

Protection Process

1. Import the .so library which you want to protect into Virbox protector

Drag the .so library into the Virbox protector directly, or:

Open file from Virbox Protector menu--> File-->Open File

Then Virbox Protector will parse the file to be protected automatically:

2. Set the configuration of "Function Option"

Virbox Protector supports to protect the .so library to the specified function's level and provides several protection mode for developer selection to protect the critical functions.

Developer may select the functions contained in the so library and set the protection mode to specified functions here.

Click "Add Functions" button, left click to select the functions which you want to protect, right click to set the protection mode: Virtualization, Obfuscation, Encryption,

Ctrl+A to select “all of Function"

Not recommend to select and protect "all of functions" due to negative impact to execution performance.

Comparison of Security of Protection mode: Virtualization>Obfuscation>Encryption

3. Set the configuration of "Protection Option"; (Protect .so library in general);

Developer may set the protection configuration to the so library in general here:

3.1 Set the output path and new protected project name

3.2 Click to set the general protection to .so library;

Compression: To compress the file size and prevent the static decompiling

If the file size is too small, the compressed file size may not smaller or even bigger than the source file size;

Memory Check(Verify the code Integrity): When program executed in memory, The loader of Virbox Protector will check each memory block to ensure the code integrity to prevent tampering, repackaging;

Anti-Debugging: select to defend the debug tools to debug the project to prevent reverse engineering;

It is recommend to click above options in "Protection Options";

4. Click to Start the "Protection" Process

When you complete the setting to "Function Option" and "Protection Option", Click to the button "Protect Selected Projects" in the Menu, to start the "Protection" Process. and click "OK" to complete the Protection process.

5. Backup the source file. rename the protected file to source file name and save the "configuration" file

Go to output directory, you will find 2 new file has been generated:

The "" is source file which not be protected. you need to keep the source file to another directory and not distribute this source file to your user.

The "" is the configuration file which save all of protection option setting

The "" is the protected file. you need to rename this file to source file for further testing or distribution later.

Last updated