当前位置: 首页>>代码示例>>Python>>正文


Python FileInfo.bootimg方法代码示例

本文整理汇总了Python中fileinfo.FileInfo.bootimg方法的典型用法代码示例。如果您正苦于以下问题:Python FileInfo.bootimg方法的具体用法?Python FileInfo.bootimg怎么用?Python FileInfo.bootimg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fileinfo.FileInfo的用法示例。


在下文中一共展示了FileInfo.bootimg方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: FileInfo

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import bootimg [as 别名]
from fileinfo import FileInfo
import re

file_info = FileInfo()

filename_regex           = r"^negalite-.*\.zip"
file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch          = 'jflte/ROMs/TouchWiz/negalite.dualboot.patch'
file_info.bootimg        = "kernel/stock_kernel/kernel/boot.img"

def matches(filename):
  if re.search(filename_regex, filename):
    return True
  else:
    return False

def print_message():
  print("Detected Negalite ROM zip")

def get_file_info():
  return file_info
开发者ID:nauddin257,项目名称:DualBootPatcher,代码行数:23,代码来源:negalite.py

示例2: print_message

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import bootimg [as 别名]
#
# So, when we go patch a file, if we see "UPDATE-SuperSU-v" at the beginning,
# followed by 1 or more of either numbers or a period and then ".zip", then we
# know it's a SuperSU zip. Of course, a simpler pattern like ^.*SuperSU.*\.zip$
# would work just as well.
filename_regex           = r"^.*SuperSU.*\.zip$"

# This is the type of ramdisk. Run the 'list-ramdisks' file in the useful/
# folder to see what choices are available. (It's pretty obvious, you'll see)
file_info.ramdisk        = 'jflte/AOSP/AOSP.def'

# If the zip file you're patching does not have a kernel, set this to false.
file_info.has_boot_image = True

# If the boot image has a different name or is in a subfolder, change this.
file_info.bootimg        = 'boot.img'

# These two lines enable the autopatcher. In most cases, this is sufficient.
file_info.patch          = autopatcher.auto_patch
file_info.extract        = autopatcher.files_to_auto_patch
# If, for whatever reason, the autopatcher doesn't work, uncomment this line,
# copy your patch to patches/ and put the patch here.
#file_info.patch          = 'jflte/AOSP/YourROM.patch'

def print_message():
  # This is the message that is shown if the file to be patched is this one.
  print("Detected The Name of Some ROM")

###

def matches(filename):
开发者ID:luisafire666,项目名称:DualBootPatcher,代码行数:33,代码来源:Sample.py

示例3: FileInfo

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import bootimg [as 别名]
from fileinfo import FileInfo
import re

file_info = FileInfo()

filename_regex           = r"^FoxHound_.*\.zip$"
file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.bootimg        = "snakes/Kernels/Stock/boot.img"

def matches(filename):
  if re.search(filename_regex, filename):
    if re.search("_3.[0-9]+", filename):
      file_info.patch    = 'jflte/ROMs/TouchWiz/foxhound-3.0.dualboot.patch'
    else:
      file_info.patch    = 'jflte/ROMs/TouchWiz/foxhound.dualboot.patch'
    return True
  else:
    return False

def print_message():
  print("Detected FoxHound ROM zip")

def get_file_info():
  return file_info
开发者ID:nauddin257,项目名称:DualBootPatcher,代码行数:26,代码来源:foxhound.py

示例4: FileInfo

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import bootimg [as 别名]
from fileinfo import FileInfo
import common as c
import re

file_info = FileInfo()

filename_regex           = r"^GE.*\.zip$"
file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.has_boot_image = True
file_info.bootimg        = 'kernel/boot.img'

def print_message():
  print("Detected Goldeneye")

###

def matches(filename):
  if re.search(filename_regex, filename):
    if 'ATT' in filename:
      file_info.loki     = True
      file_info.bootimg  = 'kernel/boot.lok'
    return True
  else:
    return False

def get_file_info():
  return file_info

def extract_files():
  return [ 'META-INF/com/google/android/updater-script' ]
开发者ID:nauddin257,项目名称:DualBootPatcher,代码行数:32,代码来源:goldeneye.py

示例5: FileInfo

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import bootimg [as 别名]
from fileinfo import FileInfo
import re

file_info = FileInfo()

filename_regex           = r"KB-.*\.zip$"
file_info.ramdisk        = 'jflte/GoogleEdition/GoogleEdition.def'
file_info.patch          = 'jflte/ROMs/TouchWiz/kangabean.dualboot.patch'
file_info.bootimg        = "boot.lok"
file_info.loki           = True

def matches(filename):
  if re.search(filename_regex, filename):
    return True
  else:
    return False

def print_message():
  print("Detected Kangabean ROM zip")

def get_file_info():
  return file_info
开发者ID:nauddin257,项目名称:DualBootPatcher,代码行数:24,代码来源:kangabean.py


注:本文中的fileinfo.FileInfo.bootimg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。