Is global-metadata.dat loader different between android and windows and ios?

I tried to write a metadata parser using the source code of libil2cpp for windows app. It works fine for both windows and ios app. However, when I try to apply this tool to android’s global-metadata.dat, an error occurred: assert(s_GlobalMetadataHeader->version == 21) will fail. My questions is that is the format of global-metadata.dat different between android and ios or windows?

No, the format will be the same for all platforms that use IL2CPP. Note that different versions of Unity often have a different metadata format. The the format is not something we publish or version, so we could easily break a metadata parser in the future. But global-metadata.dat is not platform specific.