当前位置: 首页>>代码示例>>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;未经允许,请勿转载。