Обновление структуры проекта, использование pydantic для конфигураций, улучшение отчёта о патчах
Build mod / build (push) Successful in 6m39s

This commit is contained in:
2025-10-01 23:07:37 +03:00
parent 5ba590cc31
commit fbc8b3e017
25 changed files with 406 additions and 315 deletions
+11 -3
View File
@@ -10,6 +10,10 @@ priority = 0
# imports
import textwrap
from tqdm import tqdm
from typing import Dict, Any
from utils.config import PatchConfig
from utils.smali_parser import (
find_smali_method_end,
find_smali_method_start,
@@ -18,13 +22,17 @@ from utils.smali_parser import (
)
#Config
class Config(PatchConfig): ...
# Patch
def apply(config) -> bool:
replacement = textwrap.dedent("""\
def apply(config: Config, base: Dict[str, Any]) -> bool:
replacement = [f'\t{line}\n' for line in textwrap.dedent("""\
.locals 0
const/4 p0, 0x1
return p0
""").splitlines()
""").splitlines()]
path = "./decompiled/smali_classes2/com/swiftsoft/anixartd/Prefs.smali"
lines = get_smali_lines(path)