/Il2CppSDKGenerator

An Il2Cpp SDK generator for Android (And probably IOS)

Primary LanguageC++

Il2CppSDKGenerator

An Il2Cpp SDK generator for Android (And probably IOS)

How to use

  1. Compile Il2CppSDK generator (or use release version)
  2. Get your DummyDll from using Il2CppDumper
  3. Open Il2CppSDK.exe
  4. Choose DLLs that has been generated by Il2CppDumper
  5. Choose script.json that has been generated by Il2CppDumper
  6. Wait for it and you are ready!

Make sure to copy Il2Cpp folder from Headers folder to your project! Don't forget to change "Internal.h" accordingly to the Il2CppDumper result (il2cpp.h)

How to use the SDK

Before you do anything, make sure to Attach current SDK to the game like this:

void MainThread()
{
  Il2CppAttach();
  
  LOG("Attached!");
  
  // Now you are free to use the SDK
}

Given Class:

class MainClass
{
  static MainClass Instance;
  static int StaticValue = 10;
  int Value;
  
  string ReadName()
  {
    return "Name";
  }
}

[-] Reading & Writing Fields (Static and Non Static)

void Test1()
{
  LOG("Static Value is %d", MainClass::Instance()->Value());
  LOG("Value is %d", MainClass::StaticValue());
  
  MainClass::Instance()->Value() = 9999; // Now Value is 9999
  MainClass::StaticValue() = 9999 // Now StaticValue is 9999
}

[-] Reading String

void Test2()
{
  Il2CppString *name = MainClass::Instance()->ReadName();
  LOG("Name is %s", name->CString());
}

The rest like calling functions (static/nonstatic) is the same like how you call function in a class.

Credits

dnlib: dnlib