How to fix "INVALID METADATA VERSION" error in dll files

It may happen with some Android games (and not only) that you see an error like this when trying to hack or simply browse a dll.

When this does happen, it means there's a missing or corrupt metadata version in the dll headers.

I'll be fast and simple. What we will do is replacing these headers using CFF Explorer and HxD (or your favourite HEX EDITOR.. even CFF Explorer if you do prefer) with some working metadata version headers.

If you don't have CFF Explorer installed yet, you can download it from here: 
CFF Explorer

Now, let's open CFF Explorer and move the affected dll into the left box:
Image

Then, click on .NET Directory and a sub menu will appear. Just select MetaData Header and a table will show at the right.
What you need to do is to copy the offset relative to the VersionString which represent the Version of the Metadata:

Image

As you can see, my Offset for the VersionString is: 00012118. I'll copy this offset.

Now, let's use the Address Converter in CFF Explorer, putting the offset into the "File Offset" field of this table and press Enter:

Image

What you will need now is simple, but you will just need to reply to this Topic to see how to complete the fix for the "Invalid Metadata Version" error:

Replace the first 10 bytes, starting from the one already highlited by CFF Explorer with: 76 32 2E 30 2E 35 30 37 32 37.

In my example, I'll need to replace

64 6D 61 31 38 38 71 64 71 00

with

76 32 2E 30 2E 35 30 37 32 37


From CFF Explorer you can do this by selecting the 10 bytes, and then, with a right click, selecting "Fill With" you will be able to paste the bytes you want to replace.

Image

If you're curious, the hex above, will replace every metadata version with "v2.0.50727" which is a common and accepted metadata version.

Now save and you're done!

I hope this tutorial will be useful for you and if you do have anything to share with us, do not hesitate to reply below!

Regards,

Sbenny


NOTE: Sbenny own the credits for this tutorial and he do authorize the sharing of it only if you give credits to Sbenny and put a backlink to this Topic.

Comments

Popular Posts

VMOS Pro Global CN FREE Custom ROMs | Gapps, ROOT, Xposed | Android 4.4.4, 5.1.1, 7.1.2, 9.0 ROMs | NO VIP

How to activate VMOS Assistant to run VMOS on Android 12 and above