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
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
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
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
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
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
# 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:
# 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
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
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
from fileinfo import FileInfo import re file_info = FileInfo() filename_regex = r"^miuiandroid_gapps.*\.zip$" file_info.patch = 'GoogleApps/gapps-miui.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 MIUI Google Apps zip") def get_file_info(): return file_info
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
from fileinfo import FileInfo import re file_info = FileInfo() filename_regex = r"^ComaDose_V[0-9\.]+_Cossbreeder_[0-9\.]+\.zip" file_info.patch = 'jflte/Other/comadose.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 ComaDose zip") def get_file_info(): return file_info
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
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
from fileinfo import FileInfo import re file_info = FileInfo() filename_regex = r"^gapps-jb-[0-9]{8}-signed\.zip$" file_info.patch = 'Google_Apps/gapps-cyanogenmod.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 Cyanogenmod Google Apps zip") def get_file_info(): return file_info
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
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
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
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
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
from fileinfo import FileInfo import re file_info = FileInfo() filename_regex = r"^pa_gapps-full-4\.[34]-[0-9]+-signed\.zip$" file_info.patch = 'Google_Apps/gapps-paranoidandroid.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 Paranoid Android Google Apps zip") def get_file_info(): return file_info
from fileinfo import FileInfo import re file_info = FileInfo() filename_regex = r"^gapps-jb43-[0-9]+-dmd151\.zip$" file_info.patch = 'Google_Apps/gapps-doomed151.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 doomed151's Google Apps zip") def get_file_info(): return file_info
from fileinfo import FileInfo import re file_info = FileInfo() filename_regex = r"^ChronicKernel-JB4.3-AOSP-.*\.zip$" file_info.ramdisk = "jflte/AOSP/AOSP.def" file_info.patch = "jflte/Kernels/AOSP/chronickernel.dualboot.patch" def matches(filename): if re.search(filename_regex, filename): if "VZW" in filename or "ATT" in filename: file_info.loki = True file_info.bootimg = "boot.lok" file_info.patch = "jflte/Kernels/AOSP/chronickernel-loki.dualboot.patch" return True else: return False def print_message(): print("Detected ChronicKernel kernel zip") def get_file_info(): return file_info