Java Code Examples for org.jf.dexlib2.dexbacked.DexBackedDexFile#readerAt()

The following examples show how to use org.jf.dexlib2.dexbacked.DexBackedDexFile#readerAt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AnnotationItem.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public static String getReferenceAnnotation(@Nonnull DexBackedDexFile dexFile, int annotationItemOffset) {
    try {
        DexReader reader = dexFile.readerAt(annotationItemOffset);
        reader.readUbyte();
        int typeIndex = reader.readSmallUleb128();
        String annotationType = dexFile.getType(typeIndex);
        return String.format("annotation_item[0x%x]: %s", annotationItemOffset, annotationType);
    } catch (Exception ex) {
        ex.printStackTrace(System.err);
    }
    return String.format("annotation_item[0x%x]", annotationItemOffset);
}
 
Example 2
Source File: AnnotationItem.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public static String getReferenceAnnotation(@Nonnull DexBackedDexFile dexFile, int annotationItemOffset) {
    try {
        DexReader reader = dexFile.readerAt(annotationItemOffset);
        reader.readUbyte();
        int typeIndex = reader.readSmallUleb128();
        String annotationType = dexFile.getType(typeIndex);
        return String.format("annotation_item[0x%x]: %s", annotationItemOffset, annotationType);
    } catch (Exception ex) {
        ex.printStackTrace(System.err);
    }
    return String.format("annotation_item[0x%x]", annotationItemOffset);
}
 
Example 3
Source File: AnnotationItem.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
public static String getReferenceAnnotation(@Nonnull DexBackedDexFile dexFile, int annotationItemOffset) {
    try {
        DexReader reader = dexFile.readerAt(annotationItemOffset);
        reader.readUbyte();
        int typeIndex = reader.readSmallUleb128();
        String annotationType = dexFile.getType(typeIndex);
        return String.format("annotation_item[0x%x]: %s", annotationItemOffset, annotationType);
    } catch (Exception ex) {
        ex.printStackTrace(System.err);
    }
    return String.format("annotation_item[0x%x]", annotationItemOffset);
}
 
Example 4
Source File: AnnotationItem.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public static String getReferenceAnnotation(@Nonnull DexBackedDexFile dexFile, int annotationItemOffset) {
    try {
        DexReader reader = dexFile.readerAt(annotationItemOffset);
        reader.readUbyte();
        int typeIndex = reader.readSmallUleb128();
        String annotationType = dexFile.getType(typeIndex);
        return String.format("annotation_item[0x%x]: %s", annotationItemOffset, annotationType);
    } catch (Exception ex) {
        ex.printStackTrace(System.err);
    }
    return String.format("annotation_item[0x%x]", annotationItemOffset);
}
 
Example 5
Source File: VariableSizeListIterator.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
protected VariableSizeListIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.startOffset = offset;
    this.size = size;
}
 
Example 6
Source File: VariableSizeLookaheadIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeLookaheadIterator(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    cachedItem = readNextItem(reader);
}
 
Example 7
Source File: StaticInitialValueIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
public StaticInitialValueIteratorImpl(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    this.size = reader.readSmallUleb128();
}
 
Example 8
Source File: VariableSizeIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.size = size;
}
 
Example 9
Source File: VariableSizeListIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeListIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.startOffset = offset;
    this.size = size;
}
 
Example 10
Source File: VariableSizeLookaheadIterator.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
protected VariableSizeLookaheadIterator(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    cachedItem = readNextItem(reader);
}
 
Example 11
Source File: StaticInitialValueIterator.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
public StaticInitialValueIteratorImpl(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    this.size = reader.readSmallUleb128();
}
 
Example 12
Source File: VariableSizeIterator.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
protected VariableSizeIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.size = size;
}
 
Example 13
Source File: VariableSizeListIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeListIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.startOffset = offset;
    this.size = size;
}
 
Example 14
Source File: VariableSizeLookaheadIterator.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeLookaheadIterator(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    cachedItem = readNextItem(reader);
}
 
Example 15
Source File: StaticInitialValueIterator.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
public StaticInitialValueIteratorImpl(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    this.size = reader.readSmallUleb128();
}
 
Example 16
Source File: VariableSizeIterator.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.size = size;
}
 
Example 17
Source File: VariableSizeListIterator.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeListIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.startOffset = offset;
    this.size = size;
}
 
Example 18
Source File: VariableSizeLookaheadIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeLookaheadIterator(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    cachedItem = readNextItem(reader);
}
 
Example 19
Source File: StaticInitialValueIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
public StaticInitialValueIteratorImpl(@Nonnull DexBackedDexFile dexFile, int offset) {
    this.reader = dexFile.readerAt(offset);
    this.size = reader.readSmallUleb128();
}
 
Example 20
Source File: VariableSizeIterator.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
protected VariableSizeIterator(@Nonnull DexBackedDexFile dexFile, int offset, int size) {
    this.reader = dexFile.readerAt(offset);
    this.size = size;
}