當前位置: 首頁>>代碼示例>>Python>>正文


Python PatchInfo.autopatchers方法代碼示例

本文整理匯總了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
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:32,代碼來源:imperium.py

示例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]
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:11,代碼來源:shostock.py

示例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
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:16,代碼來源:xposed.py

示例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]
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:12,代碼來源:cyanogenmod.py

示例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
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:33,代碼來源:negalite.py

示例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']
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:10,代碼來源:unwizzed.py

示例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]
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:12,代碼來源:blackbox-ge.py

示例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
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:10,代碼來源:comadose.py

示例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']
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:12,代碼來源:foxhound.py


注:本文中的multiboot.patchinfo.PatchInfo.autopatchers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。