本文整理匯總了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