Class OdexHeaderItem

java.lang.Object
org.jf.dexlib2.dexbacked.raw.OdexHeaderItem

public class OdexHeaderItem extends Object
  • Field Details

  • Constructor Details

    • OdexHeaderItem

      public OdexHeaderItem()
  • Method Details

    • verifyMagic

      public static boolean verifyMagic(byte[] buf, int offset)
      Verifies the magic value at the beginning of an odex file
      Parameters:
      buf - A byte array containing at least the first 8 bytes of an odex file
      offset - The offset within the buffer to the beginning of the odex header
      Returns:
      True if the magic value is valid
    • getVersion

      public static int getVersion(byte[] buf, int offset)
      Gets the dex version from an odex header
      Parameters:
      buf - A byte array containing at least the first 7 bytes of an odex file
      offset - The offset within the buffer to the beginning of the odex header
      Returns:
      The odex version if the header is valid or -1 if the header is invalid
    • getVersionUnchecked

      private static int getVersionUnchecked(byte[] buf, int offset)
    • isSupportedOdexVersion

      public static boolean isSupportedOdexVersion(int version)
    • getDexOffset

      public static int getDexOffset(byte[] buf)
    • getDependenciesOffset

      public static int getDependenciesOffset(byte[] buf)