Example #1
0
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
Example #2
0
#
# 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):
Example #3
0
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
Example #4
0
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
Example #5
0
from fileinfo import FileInfo
import re

file_info = FileInfo()

filename_regex           = r"^TriForceROM[0-9\.]+\.zip$"
file_info.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'
file_info.patch          = 'jflte/ROMs/TouchWiz/triforce.dualboot.patch'
file_info.bootimg        = "aroma/kernels/stock/boot.img"

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

def print_message():
  print("Detected TriForceROM zip")

def get_file_info():
  return file_info
Example #6
0
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' ]
Example #7
0
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