Package org.jf.dexlib2.dexbacked.raw
Class CdexHeaderItem
java.lang.Object
org.jf.dexlib2.dexbacked.raw.CdexHeaderItem
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intprivate static final byte[]private static final int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidannotateCdexHeaderFields(AnnotatedBytes out, DexBuffer buf) static intgetVersion(byte[] buf, int offset) Gets the dex version from an odex headerprivate static intgetVersionUnchecked(byte[] buf, int offset) static booleanisSupportedCdexVersion(int version) static booleanverifyMagic(byte[] buf, int offset) Verifies the magic value at the beginning of a cdex file
-
Field Details
-
MAGIC_VALUE
private static final byte[] MAGIC_VALUE -
SUPPORTED_CDEX_VERSIONS
private static final int[] SUPPORTED_CDEX_VERSIONS -
FEATURE_FLAGS_OFFSET
public static final int FEATURE_FLAGS_OFFSET- See Also:
-
DEBUG_INFO_OFFSETS_POS_OFFSET
public static final int DEBUG_INFO_OFFSETS_POS_OFFSET- See Also:
-
DEBUG_INFO_OFFSETS_TABLE_OFFSET
public static final int DEBUG_INFO_OFFSETS_TABLE_OFFSET- See Also:
-
DEBUG_INFO_BASE
public static final int DEBUG_INFO_BASE- See Also:
-
-
Constructor Details
-
CdexHeaderItem
public CdexHeaderItem()
-
-
Method Details
-
verifyMagic
public static boolean verifyMagic(byte[] buf, int offset) Verifies the magic value at the beginning of a cdex file- Parameters:
buf- A byte array containing at least the first 8 bytes of a cdex fileoffset- The offset within the buffer to the beginning of the cdex 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 fileoffset- 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) -
isSupportedCdexVersion
public static boolean isSupportedCdexVersion(int version) -
annotateCdexHeaderFields
-