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

how to create `Byte[]` #531

Closed zhangguanzhang closed 1 month ago

zhangguanzhang commented 1 month ago

Il2Cpp.api.arrayNew(klass, length) always create uint32 array https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/master/src/api.ts#L43

        get arrayNew() {
            return r("il2cpp_array_new", "pointer", ["pointer", "uint32"]);
        },

how to create Byte[] or uint8 array

thinhbuzz commented 1 month ago

try Il2Cpp.array

Il2Cpp.array(Il2Cpp.corlib.class('System.Byte'), Array.from(uint8Array))