def __init__(self, buff, cm): DexObject.__init__(self, buff, cm) #print "init class data item" self.static_fields_size = bytecode.readuleb128(buff) #print "static field size ", self.static_fields_size self.instance_fields_size = bytecode.readuleb128(buff) #print "instace_fields_size : ", self.instance_fields_size self.direct_methods_size = bytecode.readuleb128(buff) #print "direct methods size : ", self.direct_methods_size self.virtual_methods_size = bytecode.readuleb128(buff) #print "end class data item" self.static_fields = [] self.instance_fields = [] self.direct_methods = [] self.virtual_methods = [] self._load_elements(self.static_fields_size, self.static_fields, EncodedField, buff, cm) self._load_elements(self.instance_fields_size, self.instance_fields, EncodedField, buff, cm) self._load_elements(self.direct_methods_size, self.direct_methods, EncodedMethod, buff, cm) self._load_elements(self.virtual_methods_size, self.virtual_methods, EncodedMethod, buff, cm)
def __init__(self, buff, cm): DexObject.__init__(self, buff, cm) self.type_idx = bytecode.readuleb128(buff) self.size = bytecode.readuleb128(buff) self.elements = [] for i in xrange(0, self.size): self.elements.append(AnnotationElement(buff, cm))
def __init__(self, buff, cm): DexObject.__init__(self, buff, cm) #self.__CM = cm #self.offset = buff.get_idx() self.field_idx_diff = bytecode.readuleb128(buff) self.access_flags = bytecode.readuleb128(buff) self.field_idx = 0 self.name = None self.proto = None self.class_name = None self.init_value = None self.access_flags_string = None
def __init__(self, buff, cm): self.offset = buff.get_idx() self.size = bytecode.readuleb128(buff) if self.size > 0x3f: self.size = self.size - 128 self.handlers = [] #print "EncodedCatchHandler : ", self.offset, " : ", self.size for i in xrange(0, abs(self.size)): self.handlers.append( EncodedTypeAddrPair(buff)) if self.size <= 0: self.catch_all_addr = bytecode.readuleb128(buff)
def __init__(self, buff, cm): DexObject.__init__(self, buff, cm) self.size = bytecode.readuleb128(buff) self.values = [] for i in xrange(0, self.size): self.values.append(EncodedValue(buff, cm))
def __init__(self, buff, cm): self.__CM = cm self.offset = buff.get_idx() self.utf16_size = bytecode.readuleb128(buff) self.data = bytecode.utf8_to_string(buff, self.utf16_size) expected = buff.read(1) if expected != '\x00': pass
def __init__(self, buff, cm): self.offset = buff.get_idx() #print "EncodedCatchHandlerList : ", self.offset self.size = bytecode.readuleb128(buff) self.list = [] for i in xrange(0, self.size): self.list.append(EncodedCatchHandler(buff, cm))
def __init__(self, buff): self.offset = buff.get_idx() #print "EncodedTypeAddrPair : ", self.offset self.type_idx = bytecode.readuleb128(buff) self.addr = bytecode.readuleb128(buff)