def __init__(self, theSdkPath='',
                       thePort=5554,
                       theImageDirPath='',
                       theRunHeadlessFlag=False,
                       theAvdName=None,
                       theLogger=Logger()):
        self.sdkPath = Utils.addSlashToPath(theSdkPath)
        self.port = thePort
        self.imageDirPath = Utils.addSlashToPath(theImageDirPath)
        self.runHeadless = theRunHeadlessFlag
        self.log = theLogger
        
        self.avdName = theAvdName

        self.emulator = None

        self.logcatRedirectFile = ''
        self.logcatRedirectProcess = None

        self.adbProcess = None
    def __init__(self,
                 theSdkPath='',
                 thePort=5554,
                 theImageDirPath='',
                 theRunHeadlessFlag=False,
                 theAvdName=None,
                 theLogger=Logger()):
        self.sdkPath = Utils.addSlashToPath(theSdkPath)
        self.port = thePort
        self.imageDirPath = Utils.addSlashToPath(theImageDirPath)
        self.runHeadless = theRunHeadlessFlag
        self.log = theLogger

        self.avdName = theAvdName

        self.emulator = None

        self.logcatRedirectFile = ''
        self.logcatRedirectProcess = None

        self.adbProcess = None
    def __init__(self, theApkFile, theSdkPath='', theLogger=Logger()):
        self.apkFile = theApkFile
        self.sdkPath = Utils.addSlashToPath(theSdkPath)
        self.log = theLogger

        self.sampleId = random.randint(1, 1000000)
        self.apkFileName = Utils.splitFileIntoDirAndName(theApkFile)[1]
        self.apkPath = Utils.splitFileIntoDirAndName(theApkFile)[0]
        self.package = ''
        self.manifest = {'activityList':[],
                         'activityAliasList':[],
                         'serviceList':[],
                         'receiverList':[],
                         'providerList':[],
                         'uses-permission':[]}
        
        self.__extractFromPermissions()
        self.__extractApplication()