Skip to content
JikGuard
Log in

Android Protection User Guide

Learn how to configure the JikGuard Protection Tool, protect Android APK and AAB builds, encrypt supported game assets, and sign release packages.

Before you start

Prepare the tool files and your Android build before running a command.

JDK and tool files

See Downloads for tool package information.

Install a Java Development Kit (JDK) on Windows, macOS, or Linux. Keep config.ini and the modules directory next to the JAR. On macOS and Linux, grant execute permission to the platform executables in modules.

Open a terminal in the tool directory. The examples use JikGuard.jar; substitute the JAR filename supplied with your release.

Prepare your build

Have your APK or AAB ready. File paths can be absolute or relative. Put paths containing spaces in double quotes.

Make sure the build machine can connect to JikGuard during protection.

Configure the Protection Tool

Open config.ini next to the JAR. Replace the example values with the values for your project.

Game Key — required for protection

Enter the Game Key for your project. Register for a JikGuard account at user.jikguard.com.

[gamekey]
key=YOUR_GAME_KEY

Standalone APK or AAB signing accepts a placeholder Game Key.

Working directory — optional

To choose where JikGuard creates temporary mini packages, create a writable directory and enter its path under [packworkdir]. With the default APK settings, the mini package is created beside the input build.

[packworkdir]
dir=C:\Builds\JikGuardWork
Custom game engine library

For a game engine other than Unity, Unreal Engine, or Cocos, specify the filename of its native shared library under [engineso].

[engineso]
name=libMyEngine.so

Protect an APK or AAB

Set your Game Key first. Use -autoconfig to load your project's protection settings. The required -inputfile option identifies the build to protect.

Package name: Use the package name assigned to your license. Finalize it before protection; changing it afterwards may prevent the app from starting.

Protect an APK

java -jar JikGuard.jar -autoconfig -inputfile game.apk

Default output: game_jikguard_protected.apk, beside the input file.

Protect an AAB

java -jar JikGuard.jar -autoconfig -inputfile game.aab

Default output: game_jikguard_protected.aab, beside the input file.

Command options and output paths

OptionUsage
-autoconfigLoads your project's protection settings.
-inputfile <path>Required. Path to the APK or AAB.
-outputfile <path>Optional. Specify a different output name or location.

Signing workflows

You can sign during protection or sign an existing package in a separate step. These workflows are alternatives, not sequential steps.

JikGuard aligns APKs before signing. For AAB signing, add the JDK directory containing jarsigner to PATH.

Configure the signing key

Set these four fields under [signinfo] in config.ini. Use a relative or absolute keystore path. For compatibility, we recommend an ASCII-only path.

[signinfo]
keystore-path=C:\Keys\game-release.jks
alias=release
password=YOUR_KEYSTORE_PASSWORD
alias-pwd=YOUR_KEY_PASSWORD
FieldWhat to enter
keystore-pathRelative or absolute path to the keystore. An ASCII-only path is recommended.
aliasAlias for the signing key.
passwordKeystore password.
alias-pwdPassword for the key identified by the alias.

Check all four values if signing fails. For APKs, omitting signver uses the bundled signer's defaults for v1, v2, and v3 signing. If your release specifically requires v1 only, add signver=v1 under [signinfo].

Protect and sign in one runAPK or AAB · 2 commands

Add -sign to the protection command for your package type.

APK — protect and sign

java -jar JikGuard.jar -autoconfig -sign -inputfile game.apk

AAB — protect and sign

java -jar JikGuard.jar -autoconfig -sign -inputfile game.aab
Google Play App Signing

In Play Console, copy the SHA-256 fingerprint from the App signing key certificate section, not the upload key certificate. Replace PLAY_CERT_SHA256 with that value.

java -jar JikGuard.jar -autoconfig -sign -inputfile game.aab -sha256 PLAY_CERT_SHA256

If using -sign, configure your local signing key in config.ini first.

Sign an existing APKAPK · default or custom output

Use the signing-only command with [signinfo]. A placeholder Game Key is accepted.

java -jar JikGuard.jar -optype_sign_apk -inputfile game.apk

Default output: game_jikguard_signed.apk, beside the input. Use -outputfile to choose a different destination.

Sign an existing AABAAB · default or custom output

Use the signing-only command with [signinfo]. A placeholder Game Key is accepted. Ensure the JDK directory containing jarsigner is in PATH.

java -jar JikGuard.jar -optype_sign_jar -inputfile game.aab

Default output: game_jikguard_signed.aab, beside the input. Use -outputfile to choose a different destination.

Using your existing release-signing workflow

You can also sign the protected APK or AAB in your own Android release process. For APKs, align the package as required, sign with your release key, and verify the signature before testing or distribution. For AABs distributed through Google Play, sign with your upload key before uploading.

Your signing credentials remain in your environment.

Encrypt game assets

Encrypt assets separately from the APK or app bundle. Enter your project's Game Key in config.ini before running any of these commands.

Unity AssetBundlesZIP archive or directory

Pass a ZIP archive of AssetBundle files to -optype_assetbundle_enc.

java -jar JikGuard.jar -optype_assetbundle_enc -inputfile bundles.zip

Default output: bundles_jikguard_protected.zip, beside the input ZIP.

You can also pass an AssetBundle directory. Use -outputfile to choose the output archive or directory.

Unity DLLsSingle DLL or ZIP · HybridCLR hot updates

Use -optype_dll_enc for a single DLL or ZIP archive containing Unity DLLs, including DLLs distributed as HybridCLR hot updates.

Single DLL

java -jar JikGuard.jar -optype_dll_enc -inputfile HotUpdate.dll

ZIP archive

java -jar JikGuard.jar -optype_dll_enc -inputfile assemblies.zip

Default output: a ZIP archive next to the input, such as HotUpdate_jikguard_protected.zip or assemblies_jikguard_protected.zip. Use -outputfile to choose another path.

Cocos assetsDirectory or ZIP · select file extensions

In config.ini, add an [encAsset] section. List one extension per line, number entries consecutively starting at 1, include the leading dot, and match the case of the filenames.

[encAsset]
1=.js
2=.png

For a resource directory, specify a separate output directory so it is easy to locate the encrypted assets.

Resource directory

java -jar JikGuard.jar -optype_cocos_asset_enc -inputfile assets -outputfile assets-encrypted

ZIP archive

java -jar JikGuard.jar -optype_cocos_asset_enc -inputfile assets.zip

Default output: assets_jikguard_protected.zip, beside the original. Use -outputfile to choose a different ZIP file.