8000 Update DEX file magic · Issue #52 · mihaip/dex-method-counts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
Update DEX file magic #52
Open
Open
@neomafo88

Description

@neomafo88

https://github.com/mihaip/dex-method-counts/blob/master/src/com/android/dexdeps/DexData.java#L571-L572

static class HeaderItem {
  public static final byte[] DEX_FILE_MAGIC = { 0x64, 0x65, 0x78, 0x0a, 0x30, 0x33 }; // , 0x??, 0x00 };
}

private static boolean verifyMagic(byte[] magic) {
  return Arrays.equals(Arrays.copyOfRange(magic,0,HeaderItem.DEX_FILE_MAGIC.length), HeaderItem.DEX_FILE_MAGIC)
  && magic[HeaderItem.DEX_FILE_MAGIC.length] >= 0x30
  && magic[HeaderItem.DEX_FILE_MAGIC.length+1] == 0x00;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0