vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
974 stars 199 forks source link

Documentation and tests #261

Open vfsfitvnm opened 1 year ago

vfsfitvnm commented 1 year ago

Hi all! This discussion made me realize we need to massively improve the documentation and usability of this project.

However, we can address these two problems if we had the source code of a simple game, so that we could create a tutorial to show how to think and what to do when using frida-il2cpp-bridge (also, it would allow testing!).

For documenting, the ideal game should be catchy and well-made, whereas it should be cross-platform and compatible with the Unity versions supported by frida-il2cpp-bridge for testing.

Edit: https://github.com/vfsfitvnm/frida-il2cpp-bridge/issues/261#issuecomment-1493015414 We can have separated sources for testing and documenting.

Steps:

This is the high level plan - I don't even know the feasibility of it. Most importantly, I don't know how much time it requires and I can't even estimate its time of arrival (ETA).

Possibly useful: https://github.com/game-ci/docker https://github.com/nneonneo/Il2CppVersions

vfsfitvnm commented 1 year ago

For the game, these are some possible choices. Beware I didn't check if they fulfill the requirements - and we should ask the author(s) for permission, first.

ChuJiani commented 1 year ago

I just created a template for this library and I think it could be a good starting point for beginners. Please let me know if there are any issues that I should correct.

vfsfitvnm commented 1 year ago

Thanks, it looks good! Here's another template :P

Chensem commented 1 year ago

perfect ~

vfsfitvnm commented 1 year ago

Find a way to build IL2CPP tests sources. Ideally, we should also edit the IL2CPP source code to apply some common anti reverse engineering techniques (for code coverage).

Thanks to @djkaty (blog, file) I managed to build a "standalone" shared library for Linux, GameAssembly.so (already played around with frida-il2cpp-bridge :stuck_out_tongue_winking_eye: ).

It means testing does not need a real game anymore! This simplifies the whole process by a lot.

Bash script: https://gist.github.com/vfsfitvnm/bada5805f46d5198e8757986fa9c8cc9

djkaty commented 1 year ago

Thanks to @djkaty (blog, file) I managed to build a "standalone" shared library for Linux, GameAssembly.so (already played around with frida-il2cpp-bridge 😜 ).

It means testing does not need a real game anymore! This simplifies the whole process by a lot.

Bash script: https://gist.github.com/vfsfitvnm/bada5805f46d5198e8757986fa9c8cc9

Sick project, would never have seen it without the tag mention. Looks really impressive, amazing work!

vfsfitvnm commented 1 year ago

Sick project, would never have seen it without the tag mention. Looks really impressive, amazing work!

Thank you for the kind words, but it wouldn't have been possible without Frida! And, of course, thank you for your valuable resources about IL2CPP :smiley_cat:

vfsfitvnm commented 1 year ago

Determine where these tests should run (locally or GitHub actions).

The biggest concern with using GitHub Actions is the slow feedback (i.e. I don't want to push and wait to see if I broke something), so local tests are preferred. However, if I got it correctly, GitHub Actions can be ran on Windows and MacOS too at no cost - so I can comfortably make changes or tests to see if I broke cross platforming.

So, the answer is both (https://github.com/nektos/act)! Writing the actions will be very painful, however :<

vfsfitvnm commented 1 year ago

Alright, the first step to setup a test environment would be building and publishing Docker images (we cannot use https://github.com/game-ci/docker as they only provide 2018+ images):

UPON-2021 commented 11 months ago

Can we use INDEPENDENT GAMES or BUY-OUTS for single player games for testing and documenting?

vfsfitvnm commented 11 months ago

I don't know, we must ask for permission to the owner(s) of the game, but I don't think they would accept (comprehensibly).

I already run tests locally (see the test folder), they surely need more work, but a real game isn't necessary anymore.