本文整理汇总了Python中multiboot.patchinfo.PatchInfo.autopatchers方法的典型用法代码示例。如果您正苦于以下问题:Python PatchInfo.autopatchers方法的具体用法?Python PatchInfo.autopatchers怎么用?Python PatchInfo.autopatchers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类multiboot.patchinfo.PatchInfo
的用法示例。
在下文中一共展示了PatchInfo.autopatchers方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
def __init__(self, **kwargs):
super(ModifiedStandard, self).__init__(**kwargs)
self.files_list.append('META-INF/com/google/android/updater-script')
def patch(self, directory, file_info, bootimages=None):
updater_script = 'META-INF/com/google/android/updater-script'
lines = fileio.all_lines(os.path.join(directory, updater_script))
StandardPatcher.insert_dual_boot_sh(lines)
StandardPatcher.replace_mount_lines(file_info.device, lines)
StandardPatcher.replace_unmount_lines(file_info.device, lines)
StandardPatcher.replace_format_lines(file_info.device, lines)
StandardPatcher.insert_unmount_everything(len(lines), lines)
# Insert set kernel line
set_kernel_line = 'run_program("/tmp/dualboot.sh", "set-multi-kernel");\n'
i = len(lines) - 1
while i > 0:
if 'Umounting Partitions' in lines[i]:
lines.insert(i + 1, set_kernel_line)
break
i -= 1
fileio.write_lines(os.path.join(directory, updater_script), lines)
patchinfo.autopatchers = ModifiedStandard
示例2: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo
patchinfo = PatchInfo()
patchinfo.matches = r"^SHOstock-.*\.zip$"
patchinfo.name = 'SHOstock'
patchinfo.ramdisk = 'jflte/TouchWiz/TouchWiz.def'
patchinfo.autopatchers = [StandardPatcher]
示例3: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.patchinfo import PatchInfo
import os
patchinfo = PatchInfo()
patchinfo.name = 'Xposed Framework Disabler'
patchinfo.autopatchers = ['Other/xposed.dualboot.patch']
patchinfo.has_boot_image = False
def matches(filename):
filename = os.path.split(filename)[1]
return filename == 'Xposed-Disabler-Recovery.zip'
patchinfo.matches = matches
示例4: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.autopatchers.cyanogenmod import DalvikCachePatcher
from multiboot.patchinfo import PatchInfo
patchinfo = PatchInfo()
patchinfo.matches = r"^cm-[0-9\.]+(-[0-9]+-NIGHTLY|-RC[0-9]+)?-[a-z0-9]+\.zip$"
patchinfo.name = 'Official CyanogenMod'
patchinfo.ramdisk = 'jflte/AOSP/AOSP.def'
patchinfo.autopatchers = [StandardPatcher, DalvikCachePatcher]
示例5: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.autopatchers.base import BasePatcher
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo
import multiboot.fileio as fileio
import os
patchinfo = PatchInfo()
patchinfo.matches = r"^negalite-.*\.zip"
patchinfo.name = 'Negalite'
patchinfo.ramdisk = 'jflte/TouchWiz/TouchWiz.def'
patchinfo.autopatchers = [StandardPatcher,
'jflte/ROMs/TouchWiz/negalite.dualboot.patch']
class DontWipeData(BasePatcher):
def __init__(self, **kwargs):
super(DontWipeData, self).__init__(**kwargs)
def patch(self, directory, file_info, bootimages=None):
updater_script = 'META-INF/com/google/android/updater-script'
lines = fileio.all_lines(os.path.join(directory, updater_script))
i = 0
while i < len(lines):
if re.search('run_program.*/tmp/wipedata.sh', lines[i]):
del lines[i]
StandardPatcher.insert_format_data(i, lines)
break
i += 1
示例6: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.patchinfo import PatchInfo
patchinfo = PatchInfo()
patchinfo.matches = r"^Evil_UnWizzed_v[0-9]+\.zip$"
patchinfo.name = 'Evil UnWizzed'
patchinfo.ramdisk = 'jflte/TouchWiz/TouchWiz.def'
patchinfo.autopatchers = ['jflte/ROMs/TouchWiz/unwizzed.dualboot.patch']
示例7: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.autopatchers.jflte import GoogleEditionPatcher
from multiboot.patchinfo import PatchInfo
patchinfo = PatchInfo()
patchinfo.matches = r"^[a-zA-Z0-9]+BlackBoxGE[0-9]+\.zip$"
patchinfo.name = 'BlackBox Google Edition'
patchinfo.ramdisk = 'jflte/GoogleEdition/GoogleEdition.def'
patchinfo.autopatchers = [StandardPatcher, GoogleEditionPatcher]
示例8: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.patchinfo import PatchInfo
patchinfo = PatchInfo()
patchinfo.matches = r"^ComaDose_V[0-9\.]+_Cossbreeder_[0-9\.]+\.zip"
patchinfo.name = 'ComaDose'
patchinfo.autopatchers = ['jflte/Other/comadose.dualboot.patch']
patchinfo.has_boot_image = False
示例9: PatchInfo
# 需要导入模块: from multiboot.patchinfo import PatchInfo [as 别名]
# 或者: from multiboot.patchinfo.PatchInfo import autopatchers [as 别名]
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo
patchinfo = PatchInfo()
patchinfo.matches = r"^FoxHound_.*\.zip$"
patchinfo.name = 'FoxHound'
patchinfo.ramdisk = 'jflte/TouchWiz/TouchWiz.def'
patchinfo.autopatchers = [StandardPatcher,
'jflte/ROMs/TouchWiz/foxhound.dualboot.patch']