def __init__(self, loglevel=logging.INFO):
    self.pid = (- 1)
    self.vid = (- 1)
    self.var1 = 10
    self.is_brom = False
    self.skipwdt = False
    self.interface = (- 1)
    self.readsocid = False
    self.enforcecrash = False
    self.debugmode = False
    self.preloader = None
    self.payloadfile = None
    self.loader = None
    self.ptype = 'kamakiri2'
    self.generatekeys = None
    self.bmtflag = None
    self.bmtblockcount = None
    self.bmtpartsize = None
    self.packetsizeread = 1024
    self.flashinfo = None
    self.flashsize = 0
    self.readsize = 0
    self.sparesize = 16
    self.plcap = None
    self.blver = (- 2)
    self.da = None
    self.gcpu = None
    self.pagesize = 512
    self.SECTOR_SIZE_IN_BYTES = 4096
    self.baudrate = 115200
    self.flash = 'emmc'
    self.cpu = ''
    self.hwcode = None
    self.meid = None
    self.target_config = None
    self.chipconfig = chipconfig()
    if (loglevel == logging.DEBUG):
        logfilename = os.path.join('logs', 'log.txt')
        fh = logging.FileHandler(logfilename)
        self.__logger.addHandler(fh)
        self.__logger.setLevel(logging.DEBUG)
    else:
        self.__logger.setLevel(logging.INFO)
def __init__(self, loglevel=logging.INFO):
    self.pid = (- 1)
    self.vid = (- 1)
    self.var1 = 10
    self.is_brom = False
    self.skipwdt = False
    self.interface = (- 1)
    self.readsocid = False
    self.enforcecrash = False
    self.debugmode = False
    self.preloader = None
    self.payloadfile = None
    self.loader = None
    self.ptype = 'kamakiri2'
    self.generatekeys = None
    self.bmtflag = None
    self.bmtblockcount = None
    self.bmtpartsize = None
    self.packetsizeread = 1024
    self.flashinfo = None
    self.flashsize = 0
    self.readsize = 0
    self.sparesize = 16
    self.plcap = None
    self.blver = (- 2)
    self.da = None
    self.gcpu = None
    self.pagesize = 512
    self.SECTOR_SIZE_IN_BYTES = 4096
    self.baudrate = 115200
    self.flash = 'emmc'
    self.cpu = 
    self.hwcode = None
    self.meid = None
    self.target_config = None
    self.chipconfig = chipconfig()
    if (loglevel == logging.DEBUG):
        logfilename = os.path.join('logs', 'log.txt')
        fh = logging.FileHandler(logfilename)
        self.__logger.addHandler(fh)
        self.__logger.setLevel(logging.DEBUG)
    else:
        self.__logger.setLevel(logging.INFO)