本文整理汇总了Python中multiboot.fileinfo.FileInfo.ramdisk方法的典型用法代码示例。如果您正苦于以下问题:Python FileInfo.ramdisk方法的具体用法?Python FileInfo.ramdisk怎么用?Python FileInfo.ramdisk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiboot.fileinfo.FileInfo
的用法示例。
在下文中一共展示了FileInfo.ramdisk方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import ramdisk [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import re
file_info = FileInfo()
filename_regex = r"^cm-[0-9\.]+(-[0-9]+-NIGHTLY)?-[a-z0-9]+\.zip$"
file_info.ramdisk = 'hammerhead/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 official CyanogenMod ROM zip")
def get_file_info():
return file_info
示例2: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import ramdisk [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import re
file_info = FileInfo()
# Didn't check Illusion
# Just so I don't need to redownload, illusion filenames:
# Echoe_Illusion_RomTHEMED_v7_09Nov_Vzw_v2.zip
# AT&T_Echoe_Illusion_Rom_v7_09Nov.zip
filename_regex = [ r"^Echoe[ _]?(Rom|SLIM).*\.zip$",
r"^S4_Echoe.*\.zip" ]
file_info.ramdisk = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch = autopatcher.auto_patch
file_info.extract = autopatcher.files_to_auto_patch
file_info.bootimg = 'boot.img'
def print_message():
print("Detected Echoe TouchWiz ROM zip")
def matches(filename):
for regex in filename_regex:
if re.search(regex, filename):
return True
return False
def get_file_info():
return file_info
示例3: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import ramdisk [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 ramdisk [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
file_info = FileInfo()
file_info.name = "geiti94's HTC Sense 5 port"
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 filename.lower() == "sense5port.zip" or filename == "4.3 official port.zip" or filename == "ALPHA V1.5.zip":
return True
else:
return False
def get_file_info():
return file_info
示例5: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import ramdisk [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 = 'jflte/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'
示例6: FileInfo
# 需要导入模块: from multiboot.fileinfo import FileInfo [as 别名]
# 或者: from multiboot.fileinfo.FileInfo import ramdisk [as 别名]
from multiboot.fileinfo import FileInfo
import multiboot.autopatcher as autopatcher
import re
file_info = FileInfo()
filename_regex = r"^Slim-.*.zip$"
file_info.name = 'SlimRoms'
file_info.ramdisk = 'd800/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 get_file_info():
return file_info