luasdkcoronasdkgame-development

Decompile apk game built in corona sdk


A long time ago, I and a friend did a mini-game with corona sdk. We lost the source code and this week I finded the apk lost here.

I tried extract the .apk with ApkTool (https://ibotpeaches.github.io/Apktool/install/) and I got the imagens and sounds inside the assets folder. also inside it, I have a file resource.car compiled, but when open with notes I can see a little of the lua code. I think it's the code file.

IMAGE HERE

I can extract the code? How to do that? We really wish to continue developing the game.


Solution

  • The resources.car is a Corona specific archive.

    Using https://github.com/0BuRner/corona-archiver it can be extracted.

    Corona compiles the Lua files, file file.lua returns Lua 5.1 but most decompiler fail for unknown reasons.

    The software unluac (https://sourceforge.net/projects/unluac/) managed to decompile all files. game.lua has an invalid goto location but aside that all files should execute. Untested as I do not have Corona installed.

    Here is the decompiled source https://mega.nz/file/7sRACCSK#XiEosryl5jesG6uPeJdOqFsE8fLWDfmGSCOh-cTuHpk

    Since the code is barely readable after decompile, you may need to rewrite it anyways, but maybe you can confirm whether it works.