1
0
Fork 0
mirror of https://github.com/Radiquum/anixart-patcher.git synced 2025-09-05 10:45:32 +05:00

feat: add disable beta banner patch

This commit is contained in:
Kentai Radiquum 2025-08-31 21:48:59 +05:00
parent 4ec18d7dd4
commit 8498cace94
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
4 changed files with 84 additions and 19 deletions

21
main.py
View file

@ -7,7 +7,14 @@ from config import log, console
from time import time
import math
import argparse
parser = argparse.ArgumentParser(prog='anixart patcher')
parser.add_argument("--no-decompile", action='store_true')
parser.add_argument("--no-compile", action='store_true')
if __name__ == "__main__":
args = parser.parse_args()
check_and_download_all_tools()
check_java_version()
@ -15,11 +22,15 @@ if __name__ == "__main__":
if not apks:
log.fatal(f"apks folder is empty")
exit(1)
apk = select_apk(apks)
if not apk:
log.info('cancelled')
exit(0)
start_time = time()
decompile_apk(apk)
if not args.no_decompile:
decompile_apk(apk)
patches = get_patches()
patches = select_patches(patches)
@ -35,8 +46,10 @@ if __name__ == "__main__":
console.print(f"{status['name']}: ✘", style="bold red")
statuses_err.append(status["name"])
compile_apk(f"{apk.removesuffix(".apk")}-patched.apk")
sign_apk(f"{apk.removesuffix(".apk")}-patched.apk")
if not args.no_compile:
compile_apk(f"{apk.removesuffix(".apk")}-patched.apk")
sign_apk(f"{apk.removesuffix(".apk")}-patched.apk")
end_time = time()
log.info("Finished")