Perfare / Zygisk-Il2CppDumper

Using Zygisk to dump il2cpp data at runtime
MIT License
2.14k stars 5.24k forks source link

No type in List and Dictionary #172

Open ArifRios1st opened 7 months ago

ArifRios1st commented 7 months ago

image

how to get type of List or Dictionary ?

kotori2 commented 6 months ago

Got the idea from Il2CppArray* vm::Type::GetGenericArgumentsInternal(Il2CppReflectionType* type, bool runtimeArray). Might not covering all the cases.

    if (prop_class) {
        LOGI("prop %s %s", il2cpp_class_get_name(prop_class), prop_name);
        if(prop_class->generic_class) {
            const Il2CppGenericInst *inst = prop_class->generic_class->context.class_inst;
            for (size_t generic_id = 0; generic_id < inst->type_argc; generic_id++) {
                LOGI("generic type %zu: %s", generic_id, il2cpp_type_get_name(inst->type_argv[generic_id]));
            }
        }
    }

Result:

image

Since this approach depends on precise Il2CppClass offsets to work and Perfare already removed the versioned offset controls, I'm not gonna file a PR.