From d6f616da7a294a9467b31c6ff50fbb16525d784d Mon Sep 17 00:00:00 2001 From: wowlikon Date: Thu, 11 Sep 2025 14:44:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B2=D1=85=D0=BE=D0=B4=D0=B0=20=D0=BF=D0=BE=20VK=20?= =?UTF-8?q?=D0=B8=20Google=20=D0=B8=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0=D1=82=D1=87=D0=B5=D0=B9?= =?UTF-8?q?=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 11 +++++++++-- patches/change_server.py | 11 ++++++++++- patches/package_name.py | 11 +++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 6638a4d..0bff65d 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "apktool_jar_url": "https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.12.0.jar", "apktool_wrapper_url": "https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool" }, - "new_package_name": "com.wowlikon.anixart", + "new_package_name": "com.wowlikon.anixart2", "server": "https://anixarty.wowlikon.tech/modding", "theme": { "colors": { @@ -30,10 +30,17 @@ "icon": "@drawable/ic_custom_telegram", "icon_space_reserved": "false" }, + { + "title": "Kentai Radiquum", + "description": "Разработчик", + "url": "https://t.me/radiquum", + "icon": "@drawable/ic_custom_telegram", + "icon_space_reserved": "false" + }, { "title": "Мы в Telegram", "description": "Подпишитесь на канал, чтобы быть в курсе последних новостей.", - "url": "https://t.me/wowlikon", + "url": "https://t.me/http_teapod", "icon": "@drawable/ic_custom_telegram", "icon_space_reserved": "false" } diff --git a/patches/change_server.py b/patches/change_server.py index d442675..ac66248 100644 --- a/patches/change_server.py +++ b/patches/change_server.py @@ -9,7 +9,8 @@ import requests def apply(config: dict) -> bool: response = requests.get(config['server']) assert response.status_code == 200, f"Failed to fetch data {response.status_code} {response.text}" - for item in json.loads(response.text)['modifications']: + new_api = json.loads(response.text) + for item in new_api['modifications']: tqdm.write(f"Изменение {item['file']}") filepath = './decompiled/smali_classes2/com/swiftsoft/anixartd/network/api/'+item['file'] with open(filepath, 'r') as f: @@ -18,4 +19,12 @@ def apply(config: dict) -> bool: if content.count(item['src']) == 0: tqdm.write(f"⚠ Не найдено {item['src']}") f.write(content.replace(item['src'], item['dst'])) + + tqdm.write(f"Изменение Github ссылки") + filepath = './decompiled/smali_classes2/com/swiftsoft/anixartd/utils/anixnet/GithubPagesNetFetcher.smali' + with open(filepath, 'r') as f: + content = f.read() + with open(filepath, 'w') as f: + f.write(content.replace('const-string v1, "https://anixhelper.github.io/pages/urls.json"', f'const-string v1, "{new_api["gh"]}"')) + return True diff --git a/patches/package_name.py b/patches/package_name.py index a95ecdc..3167a6c 100644 --- a/patches/package_name.py +++ b/patches/package_name.py @@ -2,6 +2,7 @@ priority = -1 import os +from lxml import etree def rename_dir(src, dst): @@ -86,6 +87,16 @@ def apply(config: dict) -> bool: except: pass + file_path = "./decompiled/res/layout/fragment_sign_in.xml" + parser = etree.XMLParser(remove_blank_text=True) + tree = etree.parse(file_path, parser) + root = tree.getroot() + + last_linear = root.xpath("//LinearLayout/LinearLayout[4]")[0] + last_linear.set(f"{{{config['xml_ns']['android']}}}visibility", "gone") + + tree.write(file_path, pretty_print=True, xml_declaration=True, encoding="utf-8") + return True