Encrypting PCK in Godot 4.x (v4.7) without APK Expansion Files (OBB): Best Practices & Alternatives?

Godot Version

Godot v4.7

Question

Hi everyone,

I am working on a project in Godot 4.7, and I’m facing a security challenge regarding asset protection on Android builds.

As you know, modern Android export workflows (especially AAB / Google Play requirements) no longer rely on traditional APK expansion files (OBB), making standard OBB-based asset separation tricky or obsolete. Furthermore, using encryption_key on the PCK directly embeds the key or relies on compile-time flags, and basic obfuscation plugins/tools provide very limited security against reverse engineering.

Given this setup in Godot 4.x:

  1. What is the current recommended/best practice to protect game assets (textures, scripts, scenes) from being easily extracted from a Godot Android build?

  2. Since standard PCK encryption requires a compiled custom export template with the decryption key baked in (which can still be dumped if someone reverses the C++ binary), how do other developers handle enterprise-grade asset security in Godot?

  3. Are there any active plugins, native modules, or custom export strategies that address secure asset loading in Godot 4.7?

Any advice, architectural suggestions, or pointers to relevant GitHub issues/PRs would be greatly appreciated. Thanks!

func _ready() -> void:
    print("hello world")

Short version: on a client build you can raise the cost of extraction, but you can’t make it impossible, because the device has to decrypt the assets to use them. Anything the game can read, a determined person with the binary can read too.

That said, a reasonable setup in 4.x looks like this:

  1. Build a custom export template with SCRIPT_AES256_ENCRYPTION_KEY set, and enable PCK encryption in the export preset (you can choose which files or folders get encrypted). This stops the casual tools that just unpack a .pck, which covers most people who would try. (Check the docs for your exact version on Android, as support has changed between releases.)
  2. In the export preset, set GDScript export mode to binary tokens (or compressed binary tokens) instead of text, and use release export templates. Again, a speed bump, not a lock.
  3. If you need several packs, keep the base content in the main export and load extra .pck files with ProjectSettings.load_resource_pack(). That works fine with AAB, since you don’t need OBB for it; the extra packs can ship inside the app or be downloaded.
  4. For anything that really must not leak (unreleased content, competitive logic, purchasable items), the only solid answer is to keep it on a server and send it only when needed, or validate it server-side.

In practice most projects stop at step 1 or 2 and rely on copyright/takedowns for the rest, since stronger client-side schemes mostly cost you time without changing the outcome.

I haven’t tested it myself but you can try to build Godot with the godot-secure scripts: