• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python patchinfo.PatchInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.log_to_postgres函数代码示例发布时间:2022-05-27
下一篇:
Python fileinfo.FileInfo类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap