1
0
Fork 0
mirror of https://github.com/Radiquum/anixart-patcher.git synced 2025-09-08 12:13:51 +05:00

feat: add settings menu items patch

This commit is contained in:
Kentai Radiquum 2025-09-04 10:24:36 +05:00
parent 1e84f31eb0
commit 9e06ed8c9f
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
5 changed files with 187 additions and 18 deletions

20
main.py
View file

@ -1,7 +1,13 @@
from scripts.download_tools import check_and_download_all_tools
from scripts.select_apk import get_apks, select_apk
from scripts.select_patches import apply_patches, get_patches, select_patches
from scripts.utils import check_java_version, compile_apk, decompile_apk, sign_apk, init_patch
from scripts.utils import (
check_java_version,
compile_apk,
decompile_apk,
sign_apk,
init_patch,
)
from config import args, config, log, console
from time import time
@ -10,9 +16,19 @@ import yaml
def patch():
app_version: str = None
app_build: str = None
with open(
f"{config['folders']['decompiled']}/apktool.yml", "r", encoding="utf-8"
) as f:
data = yaml.load(f.read(), Loader=yaml.Loader)
app_version = data.get("versionInfo").get("versionName", "None")
app_build = data.get("versionInfo").get("versionCode", 0)
patches = get_patches()
patches = select_patches(patches)
statuses = apply_patches(patches)
statuses = apply_patches(patches, app_version, int(app_build))
statuses_ok = []
statuses_err = []