本文整理汇总了Python中multiboot.fileinfo.FileInfo.extract方法的典型用法代码示例。如果您正苦于以下问题:Python FileInfo.extract方法的具体用法?Python FileInfo.extract怎么用?Python FileInfo.extract使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiboot.fileinfo.FileInfo
的用法示例。
在下文中一共展示了FileInfo.extract方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import extract [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import re
file_info = FileInfo()
filename_regex = r"^Kernel-Alucard.*AOSP.*\.zip$"
file_info.ramdisk = 'jflte/AOSP/AOSP.def'
file_info.patch = autopatcher.auto_patch
file_info.extract = autopatcher.files_to_auto_patch
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected Alucard AOSP kernel zip")
def get_file_info():
return file_info
示例2: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import extract [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import re
file_info = FileInfo()
filename_regex = r"^FoxHound_.*\.zip$"
file_info.name = "FoxHound"
file_info.ramdisk = "jflte/TouchWiz/TouchWiz.def"
file_info.bootimg = "snakes/Kernels/Stock/boot.img"
file_info.patch = [autopatcher.auto_patch, "jflte/ROMs/TouchWiz/foxhound.dualboot.patch"]
file_info.extract = [autopatcher.files_to_auto_patch, "META-INF/com/google/android/aroma-config"]
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def get_file_info():
return file_info
示例3: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import extract [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
from multiboot.autopatchers.jflte import GoogleEditionPatcher
import re
file_info = FileInfo()
filename_regex = r"^I9505_-_Official_Google_Edition_.*Jamal2367.*\.zip$"
file_info.name = "jamal2367's Google Edition"
file_info.ramdisk = 'jflte/GoogleEdition/GoogleEdition.def'
file_info.patch = [ autopatcher.auto_patch, GoogleEditionPatcher.qcom_audio_fix ]
file_info.extract = [ autopatcher.files_to_auto_patch, GoogleEditionPatcher.files_for_qcom_audio_fix ]
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def get_file_info(filename = ""):
if 'Final-R1.1' in filename:
file_info.bootimg = 'kernel/ktoonsez/boot.img'
return file_info
示例4: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import extract [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import multiboot.fileio as fileio
import re
file_info = FileInfo()
filename_regex = r"^cm-.*noobdev.*.zip$"
file_info.ramdisk = 'hammerhead/AOSP/cxl.def'
file_info.patch = [ autopatcher.auto_patch ]
file_info.extract = [ autopatcher.files_to_auto_patch, 'system/build.prop' ]
# ROM has built in dual boot support
file_info.configs = [ 'all', '!dualboot' ]
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected chenxiaolong's noobdev CyanogenMod ROM zip")
def get_file_info(filename = ""):
return file_info
# My ROM has dual-boot support built in, so we'll hack around that to support
# triple, quadruple, ... boot
def multi_boot(directory, bootimg = None, device_check = True,
partition_config = None):
updater_script = 'META-INF/com/google/android/updater-script'