+2 votes

Hello everyone,

I am trying to use script encryption feature available in android export. I have followed each and every step as in following pages, but my game crashes when starting. adb logcat shows multiple errors as follows:




ERROR: The MD5 sum of the decrypted file does not match the expected value. It could be that the file is corrupt, or that the provided decryption key is invalid.

Previously I used Godot 3.3 on Windows 10. But as the source downloaded was for 3.3.2, I downloaded Godot 3.3.2 & tried the same process again but still no luck.

After downloading source for 3.3.2.stable, I followed this procedure:

  1. In https://asecuritysite.com/encryption/keygen I selected aes-256-cbc & generated key. I got salt, key & iv

  2. Opened command prompt & used the above key in set SCRIPTAES256ENCRYPTIONKEY=yourgenerated_key command

  3. Then executed following commands in shown order:
    scons platform=android target=release androidarch=armv7
    scons platform=android target=release android
    cd platform/android/java
    .\gradlew generateGodotTemplates
    scons platform=android target=releasedebug androidarch=armv7
    scons platform=android target=releasedebug androidarch=arm64v8
    cd platform/android/java
    .\gradlew generateGodotTemplates

  4. I got some new files in bin folder without any errors

  5. Out of those files I copied androidrelease.apk & androiddebug.apk to C:\Users\Digital\AppData\Roaming\Godot\templates\3.3.2.stable. (Files with same names were already present in that folder, so I renamed the older files)

  6. In export settings set the above files in respective custom templates

  7. In export settings, set script export mode to Encrypted & set the same key here

When tried to run the project on android device with script mode to encrypted, splash screen appear for some time then the game is crashed. If the mode is set to compiled then the game is run normally.

Godot version 3.3.2-stable
in Engine by (55 points)

Please answer if anybody has succeeded in script encryption in Godot v3.3+ I am desperately waiting for an answer.

I followed the exact same steps and it still doesn't work for me either.

1 Answer

0 votes

I think I have finally found a solution here: https://github.com/godotengine/godot/issues/43817#issuecomment-849141454

I am not sure if this will break compatibility with any plugins, but so far all of the ones I am using work.

by (69 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.