I've been working with Xposed lately (not the newer lollipop version, since I'm specifically working with older phones running Android 4.1), and I'm having a bit of trouble figuring out how to replace a specific asset. The file I need to replace is '/assets/bin/Data/Managed/Assembly-CSharp.dll'. Normally, I'd do this without Xposed, but I don't want to break the signature in this instance. To my understanding, this assembly is loaded by Unity through Mono, but I can't peg the methods I need to hook to do the replacement.
For reference, I've used this post as a guide regarding asset replacement. Just in case the two hooked methods mentioned in that post weren't used to load the aforementioned file, I hooked ALL of the following methods from 'android.content.res.AssetManager':
Obviously, some of those wouldn't be used in this case, but I wanted to cover all my bases just in case. I, then, had Xposed write to the log with the filename that each of those hooked methods was being called for. Unfortunately, the only file that came back was '/assets/bin/Data/settings.xml'. I'm assuming that these managed assemblies are loaded in a different manner than other assets. With that said, I'm at a bit of a loss. Does anyone know how Unity/Mono loads these managed assemblies from the APK (e.g. Which methods are called)? With that info, I think I can be at least one step closer.
For reference, I've used this post as a guide regarding asset replacement. Just in case the two hooked methods mentioned in that post weren't used to load the aforementioned file, I hooked ALL of the following methods from 'android.content.res.AssetManager':
Code:
open(String fileName)
open(String fileName, int accessMode)
openFd(String fileName)
openNonAssetFd(String fileName)
openNonAssetFd(int cookie, String fileName)
openXmlResourceParser(String fileName)
openXmlResourceParser(int cookie, String fileName)
Aucun commentaire:
Enregistrer un commentaire