def get_files_types(self):
        """
            Return the files inside the APK with their types (by using python-magic)
        """
        try:
            import magic
        except ImportError:
            return {}

        l = {}

        builtin_magic = 0
        try:
            getattr(magic, "Magic")
        except AttributeError:
            builtin_magic = 1

        if builtin_magic:
            ms = magic.open(magic.MAGIC_NONE)
            ms.load()

            for i in self.get_files():
                l[ i ] = ms.buffer(self.zip.read(i))
        else:
            m = magic.Magic()
            for i in self.get_files():
                l[ i ] = m.from_buffer(self.zip.read(i))

        return l

            Return the files inside the APK with their types (by using python-magic)
        
airtest/utils/apkparser/apk.py