From b6f80bbee0241a20d790cc406b573943d4ec50e8 Mon Sep 17 00:00:00 2001 From: ave Date: Sun, 22 Aug 2021 19:41:58 +0300 Subject: [PATCH] ctcci: Get xmlpatch command from config --- resources/scripts/ctcci/ctcci.py | 2 +- resources/scripts/ctcci/ctcconfig.example.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/scripts/ctcci/ctcci.py b/resources/scripts/ctcci/ctcci.py index 124d2ae..6feb7ae 100755 --- a/resources/scripts/ctcci/ctcci.py +++ b/resources/scripts/ctcci/ctcci.py @@ -21,7 +21,7 @@ def xmlpatch(patch_file, workdir, patch_name=""): print(f"Applying {patch_file}") - subprocess.run(f"java -cp /opt/ctc/tools/xml-patch.jar com.github.dnault.xmlpatch.BatchPatcher --patch {patch_file} --srcdir {workdir}", + subprocess.run(f"{XML_PATCH_BIN} com.github.dnault.xmlpatch.BatchPatcher --patch {patch_file} --srcdir {workdir}", shell=True, check=True, cwd=workdir) def patch(patch_file, workdir, patch_name=""): diff --git a/resources/scripts/ctcci/ctcconfig.example.py b/resources/scripts/ctcci/ctcconfig.example.py index 095f888..45be563 100644 --- a/resources/scripts/ctcci/ctcconfig.example.py +++ b/resources/scripts/ctcci/ctcconfig.example.py @@ -2,6 +2,7 @@ import os APKTOOL_BIN = "java -jar /opt/ctc/tools/apktool.jar" DEX2JAR_BIN = "java -jar /opt/ctc/tools/dex2jar.jar" +XML_PATCH_BIN = "java -cp /opt/ctc/tools/xml-patch.jar" # APKs must be placed under $DISTOK_FOLDER/android/$PACKAGE_ID-$VERSION_NUMBER.apk # Example: /home/ave/distok/android/com.discord-909.apk