Note: I am only doing this for educational purposes with no intent to redistribute

I have decompiled an APK built with Unity successfully (Somewhat). Using an array of programs, I managed to extract all the games assets and the scripts, though I am trying to re-construct it in unity to debug. I imported all the original scenes, and how they were set up (including all the attached scripts required) though I am receiving anywhere from 200-999+ errors in the console before I even run.

Some of these issues are from invalid characters (Decompiler-Generated fields) within scripts, which can easily be resolved by renaming them to a friendlier format, however, I sat here for a good hour resolving these errors, when I completed the last shown error, i hit play, and it generated another few hundred errors.

Why would it be that, if I was able to extract the scripts successfully (seemingly zero obfuscation), that, when imported into unity, I am thrown so many errors? Why is this not a 1:1 translatable process? Or is this problem based upon too many variables to be determined based off my question?

Programs used:

  • dnSPY
  • UtinyRipper

Reconstructing a Unity project from binaries is often not possible because/when:

  • the project was reconstructed in different version of Unity
  • the reconstructed project uses different backend
  • there were postprocesses applied that changed assets and scripts in a way that is not compatible with Unity
  • bigger Unity projects sometimes use customized version of Editor or the engine

Also the reversing tools are not bug free.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.