當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。