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


Python patchinfo.PatchInfo類代碼示例

本文整理匯總了Python中multiboot.patchinfo.PatchInfo的典型用法代碼示例。如果您正苦於以下問題:Python PatchInfo類的具體用法?Python PatchInfo怎麽用?Python PatchInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PatchInfo類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: PatchInfo

from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo

patchinfo = PatchInfo()

patchinfo.matches        = r"^aokp-(full_|mini_)?gapps.+\.zip$"
patchinfo.name           = 'AOKP Google Apps'
patchinfo.autopatchers   = [StandardPatcher]
patchinfo.has_boot_image = False
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:9,代碼來源:gapps-aokp.py

示例2: PatchInfo

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,代碼行數:10,代碼來源:cyanogenmod.py

示例3: PatchInfo

from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo

patchinfo = PatchInfo()

patchinfo.matches        = r'^AEL_GE.+\.zip$'
patchinfo.name           = 'Echoe AEL Google Edition kernel'
patchinfo.ramdisk        = 'jflte/GoogleEdition/GoogleEdition.def'
patchinfo.autopatchers   = [StandardPatcher]
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:9,代碼來源:ael-ge.py

示例4: PatchInfo

from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo

patchinfo = PatchInfo()

patchinfo.matches        = r"^Kernel-Alucard.*AOSP.*\.zip$"
patchinfo.name           = 'Alucard AOSP kernel'
patchinfo.ramdisk        = 'jflte/AOSP/AOSP.def'
patchinfo.autopatchers   = [StandardPatcher]
patchinfo.patched_init   = 'init-kk44'
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:10,代碼來源:alucard-aosp.py

示例5: PatchInfo

from multiboot.autopatchers.base import BasePatcher
from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo
import multiboot.fileio as fileio
import os
import re

patchinfo = PatchInfo()

patchinfo.matches        = r"^Slim_aroma_selectable_gapps.*\.zip$"
patchinfo.name           = 'SlimRoms AROMA Google Apps'
patchinfo.autopatchers   = [StandardPatcher]
patchinfo.has_boot_image = False


class HandleBundledMount(BasePatcher):
    def __init__(self, **kwargs):
        super(HandleBundledMount, 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('/tmp/mount.*/system', lines[i]):
                del lines[i]
                i += StandardPatcher.insert_mount_system(i, lines)

            elif re.search('/tmp/mount.*/cache', lines[i]):
                del lines[i]
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:31,代碼來源:gapps-slim-aroma.py

示例6: PatchInfo

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,代碼行數:31,代碼來源:negalite.py

示例7: PatchInfo

from multiboot.autopatchers.standard import StandardPatcher
from multiboot.autopatchers.jflte import GoogleEditionPatcher
from multiboot.patchinfo import PatchInfo
import os

patchinfo = PatchInfo()

patchinfo.matches        = r"^K[BK]-.*\.zip$"
patchinfo.name           = 'Kangabean/Kangakat'
patchinfo.ramdisk        = 'jflte/GoogleEdition/GoogleEdition.def'

def on_filename_set(patchinfo, filename):
  filename = os.path.split(filename)[1]
  if filename.startswith("KK"):
    patchinfo.autopatchers= [StandardPatcher, GoogleEditionPatcher]
  elif filename.startswith("KB"):
    patchinfo.autopatchers= [StandardPatcher]

patchinfo.on_filename_set = on_filename_set
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:19,代碼來源:kangabeankat.py

示例8: PatchInfo

from multiboot.autopatchers.standard import StandardPatcher
from multiboot.patchinfo import PatchInfo

patchinfo = PatchInfo()

patchinfo.matches        = r"^Helly?(bean|kat)-.*\.zip$"
patchinfo.name           = 'HellyBean/HellyKat'
patchinfo.ramdisk        = 'jflte/AOSP/AOSP.def'
patchinfo.autopatchers   = [StandardPatcher]
patchinfo.device_check   = False
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:10,代碼來源:hellybean.py

示例9: PatchInfo

from multiboot.autopatchers.standard import StandardPatcher
from multiboot.autopatchers.jflte import GoogleEditionPatcher
from multiboot.patchinfo import PatchInfo
import multiboot.fileio as fileio
import os

patchinfo = PatchInfo()

patchinfo.matches        = r"^I9505_-_Official_Google_Edition_.*Jamal2367.*\.zip$"
patchinfo.name           = "jamal2367's Google Edition"

def on_filename_set(patchinfo, filename):
  filename = os.path.split(filename)[1]
  if filename == 'I9505_-_Google_Edition_v6_by_Jamal2367.zip':
    # A bit hackish, but it works
    patchinfo.ramdisk    = 'jflte/AOSP/AOSP.def'
    patchinfo.autopatchers = [StandardPatcher]
  else:
    patchinfo.ramdisk    = 'jflte/GoogleEdition/GoogleEdition.def'
    patchinfo.autopatchers = [StandardPatcher, GoogleEditionPatcher]

patchinfo.on_filename_set = on_filename_set

def matches(filename):
  regex = r"^I9505_-_Official_Google_Edition_.*Jamal2367.*\.zip$"
  return fileio.filename_matches(regex, filename) or \
    filename == 'I9505_-_Google_Edition_v6_by_Jamal2367.zip'

patchinfo.matches        = matches
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:29,代碼來源:ge-jamal2367.py

示例10: PatchInfo

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'^Imperium_.*\.zip$'
patchinfo.name           = 'Imperium'
patchinfo.ramdisk        = 'jflte/TouchWiz/TouchWiz.def'


class ModifiedStandard(BasePatcher):
    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
開發者ID:Kratos1982,項目名稱:DualBootPatcher,代碼行數:31,代碼來源:imperium.py

示例11: PatchInfo

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,代碼行數:14,代碼來源:xposed.py


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