shroudedcode / apk-mitm

🤖 A CLI application that automatically prepares Android APK files for HTTPS inspection
https://npm.im/apk-mitm
MIT License
3.6k stars 337 forks source link

error: xml parser error: not well-formed (invalid token). #160

Closed umrashrf closed 1 month ago

umrashrf commented 2 months ago
$ apk-mitm myapp.apk

  ╭ apk-mitm v1.3.0
  ├ apktool v2.9.3
  ╰ uber-apk-signer v1.3.0

  Using temporary directory:
  /tmp/apk-mitm-1bfb3a7a2d51e7203463833ba3d634cb

  ✔ Checking prerequisities
  ✔ Decoding APK file
  ✔ Applying patches
  ❯ Encoding patched APK file
    ↓ Encoding using AAPT2 [skipped]
      → Failed, falling back to AAPT...
    ✖ Encoding using AAPT [fallback]
      → I: Building resources...
    Signing patched APK file

   Failed!  An error occurred:

I: Using Apktool 2.9.3
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: <tmp_dir>/decode/res/values-ar-rSA/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-ar-rSA/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-ar/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-ar/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-bg/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-bg/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-bn-rBD/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-bn-rBD/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-bn/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-bn/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-ca-rES/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-ca-rES/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-cs/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-cs/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-da/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-da/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-de/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-de/strings.xml: error: file failed to compile.
W: <tmp_dir>/decode/res/values-el/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: <tmp_dir>/decode/res/values-el/strings.xml: error: file failed to compile.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_7440351161326729974693599868025020535.tmp, compile, --dir, <tmp_dir>/decode/res, --legacy, -o, <tmp_dir>/decode/build/resources.zip]

  The full logs of all commands are available here:
  /tmp/apk-mitm-1bfb3a7a2d51e7203463833ba3d634cb/logs
umrashrf commented 1 month ago

Closing for #133