Frida Docs Unified
    Preparing search index...
    exports: {
        alloc: NativeFunction<NativePointer, [number | UInt64]>;
        arrayGetLength: NativeFunction<number, [NativePointerValue]>;
        arrayNew: NativeFunction<NativePointer, [NativePointerValue, number]>;
        assemblyGetImage: NativeFunction<NativePointer, [NativePointerValue]>;
        classForEach: NativeFunction<
            void,
            [NativePointerValue, NativePointerValue],
        >;
        classFromName: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue, NativePointerValue],
        >;
        classFromObject: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetArrayClass: NativeFunction<
            NativePointer,
            [NativePointerValue, number],
        >;
        classGetArrayElementSize: NativeFunction<number, [NativePointerValue]>;
        classGetAssemblyName: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetBaseType: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetDeclaringType: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetElementClass: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetFieldFromName: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        classGetFields: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        classGetFlags: NativeFunction<number, [NativePointerValue]>;
        classGetImage: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetInstanceSize: NativeFunction<number, [NativePointerValue]>;
        classGetInterfaces: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        classGetMethodFromName: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue, number],
        >;
        classGetMethods: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        classGetName: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetNamespace: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetNestedClasses: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        classGetParent: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetStaticFieldData: NativeFunction<
            NativePointer,
            [NativePointerValue],
        >;
        classGetType: NativeFunction<NativePointer, [NativePointerValue]>;
        classGetValueTypeSize: NativeFunction<
            number,
            [NativePointerValue, NativePointerValue],
        >;
        classHasReferences: NativeFunction<number, [NativePointerValue]>;
        classInitialize: NativeFunction<void, [NativePointerValue]>;
        classIsAbstract: NativeFunction<number, [NativePointerValue]>;
        classIsAssignableFrom: NativeFunction<
            number,
            [NativePointerValue, NativePointerValue],
        >;
        classIsBlittable: NativeFunction<number, [NativePointerValue]>;
        classIsEnum: NativeFunction<number, [NativePointerValue]>;
        classIsGeneric: NativeFunction<number, [NativePointerValue]>;
        classIsInflated: NativeFunction<number, [NativePointerValue]>;
        classIsInterface: NativeFunction<number, [NativePointerValue]>;
        classIsSubclassOf: NativeFunction<
            number,
            [NativePointerValue, NativePointerValue, number],
        >;
        classIsValueType: NativeFunction<number, [NativePointerValue]>;
        domainGet: NativeFunction<NativePointer, []>;
        domainGetAssemblies: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        domainGetAssemblyFromName: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        fieldGetClass: NativeFunction<NativePointer, [NativePointerValue]>;
        fieldGetFlags: NativeFunction<number, [NativePointerValue]>;
        fieldGetName: NativeFunction<NativePointer, [NativePointerValue]>;
        fieldGetOffset: NativeFunction<number, [NativePointerValue]>;
        fieldGetStaticValue: NativeFunction<
            void,
            [NativePointerValue, NativePointerValue],
        >;
        fieldGetType: NativeFunction<NativePointer, [NativePointerValue]>;
        fieldSetStaticValue: NativeFunction<
            void,
            [NativePointerValue, NativePointerValue],
        >;
        free: NativeFunction<void, [NativePointerValue]>;
        gcCollect: NativeFunction<void, [number]>;
        gcCollectALittle: NativeFunction<void, []>;
        gcDisable: NativeFunction<void, []>;
        gcEnable: NativeFunction<void, []>;
        gcGetHeapSize: NativeFunction<Int64, []>;
        gcGetMaxTimeSlice: NativeFunction<Int64, []>;
        gcGetUsedSize: NativeFunction<Int64, []>;
        gcHandleFree: NativeFunction<void, [number]>;
        gcHandleGetTarget: NativeFunction<NativePointer, [number]>;
        gcHandleNew: NativeFunction<number, [NativePointerValue, number]>;
        gcHandleNewWeakRef: NativeFunction<number, [NativePointerValue, number]>;
        gcIsDisabled: NativeFunction<number, []>;
        gcIsIncremental: NativeFunction<number, []>;
        gcSetMaxTimeSlice: NativeFunction<void, [number | Int64]>;
        gcStartIncrementalCollection: NativeFunction<void, []>;
        gcStartWorld: NativeFunction<void, []>;
        gcStopWorld: NativeFunction<void, []>;
        getCorlib: NativeFunction<NativePointer, []>;
        imageGetAssembly: NativeFunction<NativePointer, [NativePointerValue]>;
        imageGetClass: NativeFunction<NativePointer, [NativePointerValue, number]>;
        imageGetClassCount: NativeFunction<number, [NativePointerValue]>;
        imageGetName: NativeFunction<NativePointer, [NativePointerValue]>;
        initialize: NativeFunction<void, [NativePointerValue]>;
        livenessAllocateStruct: NativeFunction<
            NativePointer,
            [
                NativePointerValue,
                number,
                NativePointerValue,
                NativePointerValue,
                NativePointerValue,
            ],
        >;
        livenessCalculationBegin: NativeFunction<
            NativePointer,
            [
                NativePointerValue,
                number,
                NativePointerValue,
                NativePointerValue,
                NativePointerValue,
                NativePointerValue,
            ],
        >;
        livenessCalculationEnd: NativeFunction<void, [NativePointerValue]>;
        livenessCalculationFromStatics: NativeFunction<void, [NativePointerValue]>;
        livenessFinalize: NativeFunction<void, [NativePointerValue]>;
        livenessFreeStruct: NativeFunction<void, [NativePointerValue]>;
        memorySnapshotCapture: NativeFunction<NativePointer, []>;
        memorySnapshotFree: NativeFunction<void, [NativePointerValue]>;
        memorySnapshotGetClasses: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        memorySnapshotGetObjects: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        methodGetClass: NativeFunction<NativePointer, [NativePointerValue]>;
        methodGetFlags: NativeFunction<
            number,
            [NativePointerValue, NativePointerValue],
        >;
        methodGetName: NativeFunction<NativePointer, [NativePointerValue]>;
        methodGetObject: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        methodGetParameterCount: NativeFunction<number, [NativePointerValue]>;
        methodGetParameterName: NativeFunction<
            NativePointer,
            [NativePointerValue, number],
        >;
        methodGetParameters: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        methodGetParameterType: NativeFunction<
            NativePointer,
            [NativePointerValue, number],
        >;
        methodGetReturnType: NativeFunction<NativePointer, [NativePointerValue]>;
        methodIsGeneric: NativeFunction<number, [NativePointerValue]>;
        methodIsInflated: NativeFunction<number, [NativePointerValue]>;
        methodIsInstance: NativeFunction<number, [NativePointerValue]>;
        monitorEnter: NativeFunction<void, [NativePointerValue]>;
        monitorExit: NativeFunction<void, [NativePointerValue]>;
        monitorPulse: NativeFunction<void, [NativePointerValue]>;
        monitorPulseAll: NativeFunction<void, [NativePointerValue]>;
        monitorTryEnter: NativeFunction<number, [NativePointerValue, number]>;
        monitorTryWait: NativeFunction<number, [NativePointerValue, number]>;
        monitorWait: NativeFunction<void, [NativePointerValue]>;
        objectGetClass: NativeFunction<NativePointer, [NativePointerValue]>;
        objectGetSize: NativeFunction<number, [NativePointerValue]>;
        objectGetVirtualMethod: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
        objectInitialize: NativeFunction<
            void,
            [NativePointerValue, NativePointerValue],
        >;
        objectNew: NativeFunction<NativePointer, [NativePointerValue]>;
        objectUnbox: NativeFunction<NativePointer, [NativePointerValue]>;
        resolveInternalCall: NativeFunction<NativePointer, [NativePointerValue]>;
        stringGetChars: NativeFunction<NativePointer, [NativePointerValue]>;
        stringGetLength: NativeFunction<number, [NativePointerValue]>;
        stringNew: NativeFunction<NativePointer, [NativePointerValue]>;
        threadAttach: NativeFunction<NativePointer, [NativePointerValue]>;
        threadDetach: NativeFunction<void, [NativePointerValue]>;
        threadGetAttachedThreads: NativeFunction<
            NativePointer,
            [NativePointerValue],
        >;
        threadGetCurrent: NativeFunction<NativePointer, []>;
        threadIsVm: NativeFunction<number, [NativePointerValue]>;
        typeEquals: NativeFunction<
            number,
            [NativePointerValue, NativePointerValue],
        >;
        typeGetClass: NativeFunction<NativePointer, [NativePointerValue]>;
        typeGetName: NativeFunction<NativePointer, [NativePointerValue]>;
        typeGetObject: NativeFunction<NativePointer, [NativePointerValue]>;
        typeGetTypeEnum: NativeFunction<number, [NativePointerValue]>;
        valueTypeBox: NativeFunction<
            NativePointer,
            [NativePointerValue, NativePointerValue],
        >;
    }

    The core object where all the necessary IL2CPP native functions are held.
    frida-il2cpp-bridge is built around this object by providing an easy-to-use abstraction layer: the user isn't expected to use it directly, but it can in case of advanced use cases.

    The exports depends on the Unity version, hence some of them may be unavailable; moreover, they are searched by name (e.g. il2cpp_class_from_name) hence they might get stripped, hidden or renamed by a nasty obfuscator.

    However, it is possible to override or set the handle of any of the exports using Il2Cpp.$config.exports:

    Il2Cpp.$config.exports = {
    il2cpp_image_get_class: () => Il2Cpp.module.base.add(0x1204c),
    il2cpp_class_get_parent: () => {
    return Memory.scanSync(Il2Cpp.module.base, Il2Cpp.module.size, "2f 10 ee 10 34 a8")[0].address;
    },
    };

    Il2Cpp.perform(() => {
    // ...
    });

    Type Declaration