Closed thienha1 closed 1 year ago
mihoyo games have modified il2cpp binaries and hidden exports. thats why it don't work with common il2cpp tools
"No such file or directory" means it couldn't create the file where to write the dump, pass the directory as the second parameter: https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/ae7ef9ea2ca0e33fe50994179b2a4751541549e4/src/il2cpp/dump.ts#L3
(and make sure it exists!)
hmm ik that genshin (mobile version, idk about pc) have protections like hidden exports, encrypted metadata, etc... maybe hsr still not
"No such file or directory" means it couldn't create the file where to write the dump, pass the directory as the second parameter:
(and make sure it exists!)
I created this file
And still got this error
Code:
Il2Cpp.perform(() => {
// console.log(Il2Cpp.unityVersion);
Il2Cpp.dump("hsrsea.cs", "D:\APKLabs\Dumped Honkai Star Rail SEA");
}, "free");
hmm ik that genshin (mobile version, idk about pc) have protections like hidden exports, encrypted metadata, etc... maybe hsr still not
yeah mihoyo did that but still i dunno how modder could dump those encrypted file in PC... What tools they use?
idk sorry, you can try explore cheats for these games (akebi source available only for 3.2, i seen some hsr cheat). maybe it will help u
@thienha1 Oh yeah I think I know what's wrong (I don't have Windows so I can't really test...).
Here's how I generate the full path: https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/ae7ef9ea2ca0e33fe50994179b2a4751541549e4/src/il2cpp/dump.ts#L6
But as you can see, I use the Unix file separator char (/
) - illegal on Windows - instead of the correct one (\
).
Would you patch either your local copy (node_modules/frida-il2cpp-bridge/dist/index.js
) or the bundled script (_agent.js
) and see if it works?
@thienha1 Oh yeah I think I know what's wrong (I don't have Windows so I can't really test...).
Here's how I generate the full path:
But as you can see, I use the Unix file separator char (
/
) - illegal on Windows - instead of the correct one (\
).Would you patch either your local copy (
node_modules/frida-il2cpp-bridge/dist/index.js
) or the bundled script (_agent.js
) and see if it works?
I updated your script to latest version
But I tried this function dump without parameter 2 before of this game in old version, it work smoothly! Now I tried all of this with latest version for now, not work at all!
@thienha1
Hmm, this is weird to be honest.
However, just to make sure, would you replace the /
with \
at line 648?
And then:
Il2Cpp.perform(() => {
Il2Cpp.dump("hsrsea.cs", "D:\APKLabs\Dumped Honkai Star Rail SEA");
}, "free");
Another possibility is the app cannot write to that path, but again, I have no idea how it works on Windows; does the following Frida script works?
const file = new File("D:\APKLabs\Dumped Honkai Star Rail SEA\hello.cs", "w");
file.write("hello!");
file.flush();
file.close();
And, shouldn't it be: D:\\<and so on>
? Notice the double backslash
And, shouldn't it be:
D:\\<and so on>
? Notice the double backslash
Yeah, it temp working and get other issue...
You need to determine the Unity version by yourself (it doesn't have to be precise, though), then. Unfortunately I don't have Windows so I cannot find a workaround by myself.
Then, see https://github.com/vfsfitvnm/frida-il2cpp-bridge/issues/96#issuecomment-1042788077
Source code: