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

No resource found that matches the given name 'com.google.firebase.crashlytics'. #141

Open madhur opened 9 months ago

madhur commented 9 months ago

I get this error while running the command on our production app

 ╭ apk-mitm v1.2.1
  ├ apktool v2.6.1
  ╰ uber-apk-signer v1.2.1

  Using temporary directory:
  /tmp/apk-mitm-2076b143bde3a3725abe87d8c8a99187

  ✔ 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.6.1
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/arrays.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'com.google.firebase.crashlytics'.
W: 
W: <tmp_dir>/decode/res/values/arrays.xml:74: error: Error retrieving parent for item: No resource found that matches the given name 'com.google.firebase.crashlytics'.
W: 
W: <tmp_dir>/decode/res/values/arrays.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'com.google.firebase.crashlytics'.
W: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_98653136179635650242247275418745822200.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 32, --version-code, 203, --version-name, 102.22, --no-version-vectors, -F, /tmp/APKTOOL1074001456581748833.tmp, -e, /tmp/APKTOOL12774613478445367539.tmp, -0, arsc, -I, <tmp_dir>/framework/1.apk, -S, <tmp_dir>/decode/res, -M, <tmp_dir>/decode/AndroidManifest.xml]

  The full logs of all commands are available here:
  /tmp/apk-mitm-2076b143bde3a3725abe87d8c8a99187/logs
bes-internal commented 8 months ago

need to update apktool

apk-mitm --apktool ./apktool29.jar base.apk
madhur commented 8 months ago

Still failing with below error

 apk-mitm --apktool /home/madhur/Downloads/apktool_2.9.0.jar 194.apk                                                                                                                                                                                  [☸ kubernetes-admin@kubernetes (cattle-system)]

  ╭ apk-mitm v1.2.1
  ├ apktool custom version
  ╰ uber-apk-signer v1.2.1

  Using temporary directory:
  /tmp/apk-mitm-a0d1da8f398bad9b2a9b2fff1bdd372d

  ✔ 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.0
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/AndroidManifest.xml:417: error: '@2114125825' is incompatible with attribute theme (attr) reference.
W: <tmp_dir>/decode/AndroidManifest.xml:428: error: '@2114191360' is incompatible with attribute resource (attr) reference.
W: error: failed processing manifest.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_154113526135116043891471479309820994250.tmp, link, -o, /tmp/APKTOOL11258510793209454534.tmp, --package-id, 127, --min-sdk-version, 21, --target-sdk-version, 32, --version-code, 194, --version-name, 11100.51, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, --allow-reserved-package-id, --no-compile-sdk-metadata, -e, /tmp/APKTOOL8896499163010198044.tmp, -0, arsc, -I, <tmp_dir>/framework/1.apk, --manifest, <tmp_dir>/decode/AndroidManifest.xml, <tmp_dir>/decode/build/resources.zip]

  The full logs of all commands are available here:
  /tmp/apk-mitm-a0d1da8f398bad9b2a9b2fff1bdd372d/logs