當前位置: 首頁>>代碼示例>>Python>>正文


Python FileInfo.ramdisk方法代碼示例

本文整理匯總了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")
開發者ID:nauddin257,項目名稱:DualBootPatcher,代碼行數:33,代碼來源:slim.py

示例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
開發者ID:nauddin257,項目名稱:DualBootPatcher,代碼行數:22,代碼來源:infamouskernel.py

示例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
開發者ID:nauddin257,項目名稱:DualBootPatcher,代碼行數:22,代碼來源:bootimg.py

示例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
開發者ID:nauddin257,項目名稱:DualBootPatcher,代碼行數:22,代碼來源:ge-MaKTaiL.py


注:本文中的fileinfo.FileInfo.ramdisk方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。