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


Python FileInfo.patch方法代码示例

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


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

示例1: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^miuiandroid_jflte.*\.zip$"
file_info.ramdisk        = 'jflte/AOSP/AOSP.def'
file_info.patch          = 'jflte/ROMs/Other/miui.dualboot.patch'
file_info.need_new_init  = True

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

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

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

示例2: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^Slim_aroma_selectable_gapps.*\.zip$"
file_info.patch          = 'Google_Apps/gapps-slim-aroma.dualboot.patch'
file_info.has_boot_image = False

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

def print_message():
  print("Detected Slim Bean AROMA Google Apps zip")

def get_file_info():
  return file_info
开发者ID:nauddin257,项目名称:DualBootPatcher,代码行数:22,代码来源:gapps-slim-aroma.py

示例3: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^.*_AdamKernel.V[0-9\.]+\.CWM\.zip$"
file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch          = 'jflte/Kernels/TouchWiz/adam.dualboot.patch'
file_info.bootimg        = "wanam/boot.img"

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

def print_message():
  print("Detected Adam kernel zip")

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

示例4: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^UPDATE-SuperSU-v[0-9\.]+\.zip$"
file_info.patch          = 'Other/supersu.dualboot.patch'
file_info.has_boot_image = False

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

def print_message():
  print("Detected Chainfire's SuperSU zip")

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

示例5: FileInfo

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

file_info = FileInfo()

file_info.ramdisk        = 'jflte/AOSP/AOSP.def'
file_info.patch          = 'jflte/ROMs/Other/sense-geiti94.dualboot.patch'

def matches(filename):
  if filename.lower() == "sense5port.zip" or \
     filename         == "4.3 official port.zip":
    return True
  else:
    return False

def print_message():
  print("Detected geiti94's HTC Sense 5 port zip")

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

示例6: FileInfo

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import patch [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

示例7: print_message

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import patch [as 别名]
# 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):
  if re.search(filename_regex, filename):
    return True
  else:
开发者ID:luisafire666,项目名称:DualBootPatcher,代码行数:33,代码来源:Sample.py

示例8: print_message

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import patch [as 别名]
# 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'

# This is the patch file you generated. Just copy the patch into a subfolder in
# patches/ and put the path 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):
  if re.search(filename_regex, filename):
    return True
  else:
    return False

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

示例9: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^gapps-jb\([0-9\.]+\)-[0-9\.]+\.zip$"
file_info.patch          = 'Google_Apps/gapps-task650.dualboot.patch'
file_info.has_boot_image = False

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

def print_message():
  print("Detected Task650's Google Apps zip")

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

示例10: FileInfo

# 需要导入模块: from fileinfo import FileInfo [as 别名]
# 或者: from fileinfo.FileInfo import patch [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

示例11: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^[0-9]+-[0-9]+_GApps_Core_[0-9\.]+_signed\.zip$"
file_info.patch          = 'Google_Apps/gapps-banks.dualboot.patch'
file_info.has_boot_image = False

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

def print_message():
  print("Detected BaNks's Core Google Apps zip")

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

示例12: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^Evil_UnWizzed_v[0-9]+\.zip$"
file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch          = 'jflte/ROMs/TouchWiz/unwizzed.dualboot.patch'

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

def print_message():
  print("Detected Evil UnWizzed ROM zip")

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

示例13: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^KT-SGS4-JB4.3-TWGE-.*\.zip$"
file_info.ramdisk        = 'jflte/GoogleEdition/GoogleEdition.def'
file_info.patch          = 'jflte/Kernels/AOSP/ktoonsez.dualboot.patch'

def matches(filename):
  if re.search(filename_regex, filename):
    if 'VZW' in filename or 'ATT' in filename:
      file_info.patch    = 'jflte/Kernels/AOSP/ktoonsez-loki.dualboot.patch'
      file_info.bootimg  = 'boot.lok'
      file_info.loki     = True
    return True
  else:
    return False

def print_message():
  print("Detected ktoonsez kernel zip")

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

示例14: FileInfo

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

file_info = FileInfo()

file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch          = 'jflte/ROMs/TouchWiz/intrinsic-20130806.dualboot.patch'

def matches(filename):
  if filename == "iNTriNsiC 8-6-13.zip":
    return True
  else:
    return False

def print_message():
  print("Detected iNTriNsiC 20130806 ROM zip")

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

示例15: FileInfo

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

file_info = FileInfo()

filename_regex           = r"^I9505_-_Official_Google_Edition_.*Jamal2367.*\.zip$"
file_info.ramdisk        = 'jflte/GoogleEdition/GoogleEdition.def'
file_info.patch          = 'jflte/ROMs/TouchWiz/ge-jamal2367.dualboot.patch'

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

def print_message():
  print("Detected jamal2367's Google Edition ROM zip")

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


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