本文整理汇总了Python中fileinfo.FileInfo.ramdisk方法的典型用法代码示例。如果您正苦于以下问题:Python FileInfo.ramdisk方法的具体用法?Python FileInfo.ramdisk怎么用?Python FileInfo.ramdisk使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fileinfo.FileInfo
的用法示例。
在下文中一共展示了FileInfo.ramdisk方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FileInfo
# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import ramdisk [as 别名]
from fileinfo import FileInfo
import common as c
import re
file_info = FileInfo()
filename_regex = r"^Slim-.*.zip$"
file_info.ramdisk = "jflte/AOSP/AOSP.def"
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected Slim Bean ROM zip")
def get_file_info():
return file_info
def extract_files():
return ["META-INF/com/google/android/updater-script"]
def patch_files(directory):
lines = c.get_lines_from_file(directory, "META-INF/com/google/android/updater-script")
示例2: FileInfo
# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import ramdisk [as 别名]
from fileinfo import FileInfo
import re
file_info = FileInfo()
filename_regex = r"^Infamous_S4_Kernel.v.*\.zip$"
file_info.ramdisk = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch = 'jflte/Kernels/TouchWiz/infamouskernel.dualboot.patch'
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected Infamous kernel zip")
def get_file_info():
return file_info
示例3: FileInfo
# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import ramdisk [as 别名]
from fileinfo import FileInfo
import re
file_info = FileInfo()
filename_regex = r"^.*\.img$"
file_info.ramdisk = 'jflte/AOSP/AOSP.def'
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected boot.img file")
print("ASSUMING RAMDISK IS FOR AOSP. USE patchramdisk SCRIPT IF IT'S FOR TOUCHWIZ")
def get_file_info():
return file_info
示例4: FileInfo
# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import ramdisk [as 别名]
from fileinfo import FileInfo
import re
file_info = FileInfo()
filename_regex = r"^i9505-ge-untouched-4.3-.*.zip$"
file_info.ramdisk = 'jflte/GoogleEdition/GoogleEdition.def'
file_info.patch = 'jflte/ROMs/TouchWiz/ge-MaKTaiL.dualboot.patch'
def matches(filename):
if re.search(filename_regex, filename):
return True
else:
return False
def print_message():
print("Detected MaKTaiL's Google Edition ROM zip")
def get_file_info():
return file_info