Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[com.instagram.barcelona] Failed to encode patched APK file #134

Open
aleclarson opened this issue Jul 16, 2023 · 3 comments
Open

[com.instagram.barcelona] Failed to encode patched APK file #134

aleclarson opened this issue Jul 16, 2023 · 3 comments

Comments

@aleclarson
Copy link

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/brut_util_Jar_114139953841027883445031710942778052214.tmp, p, --forced-package-id, 127, --min-sdk-version, 28, --target-sdk-version, 33, --version-code, 493450267, --version-name, 291.0.0.31.111, --no-version-vectors, -F, /var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/APKTOOL12104384423043456691.tmp, -e, /var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/APKTOOL303456030424436580.tmp, -0, arsc, -I, <tmp_dir>/framework/1.apk, -S, <tmp_dir>/decode/res, -M, <tmp_dir>/decode/AndroidManifest.xml]

Logs

❯ apk-mitm base.apk

  ╭ apk-mitm v1.2.1
  ├ apktool v2.6.1
  ╰ uber-apk-signer v1.2.1
  
  Using temporary directory:
  /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4

  ✔ 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 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/styles.xml:4711: error: Resource entry InThreadComposerTextArea already has bag item android:textColorHint.
W: <tmp_dir>/decode/res/values/styles.xml:4710: Originally defined here.
W: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/brut_util_Jar_114139953841027883445031710942778052214.tmp, p, --forced-package-id, 127, --min-sdk-version, 28, --target-sdk-version, 33, --version-code, 493450267, --version-name, 291.0.0.31.111, --no-version-vectors, -F, /var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/APKTOOL12104384423043456691.tmp, -e, /var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/APKTOOL303456030424436580.tmp, -0, arsc, -I, <tmp_dir>/framework/1.apk, -S, <tmp_dir>/decode/res, -M, <tmp_dir>/decode/AndroidManifest.xml]

encoding-aapt2.failed.log

I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes7 folder into classes7.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes6 folder into classes6.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes8 folder into classes8.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes4 folder into classes4.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes5 folder into classes5.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-h640dp/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-h640dp/layouts.xml: error: file failed to compile.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-land/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-land/layouts.xml:4: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-land/layouts.xml:5: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-land/layouts.xml: error: file failed to compile.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-sw600dp/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-sw600dp/layouts.xml:4: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values-sw600dp/layouts.xml: error: file failed to compile.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:3: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:4: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:5: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:6: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:7: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:8: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:9: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:10: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:11: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:12: error: invalid value for type 'layout'. Expected a reference.
W: /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res/values/layouts.xml:13: error: invalid value for type 'layout'. Expected a reference.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/brut_util_Jar_16581312801682274652650306484792113954.tmp, compile, --dir, /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/res, --legacy, -o, /private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/apk-mitm-1898a7840b92834ddafbdb40ca48f4c4/decode/build/resources.zip]

@lpcs007
Copy link

lpcs007 commented Sep 17, 2023

did you solve the issue?

@ErrorxCode
Copy link

Same issue

@marioeivissa
Copy link

same issue,any help please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants