apk-mitm icon indicating copy to clipboard operation
apk-mitm copied to clipboard

locales_config.xml:3: error: Error parsing XML: unbound prefix

Open anki-code opened this issue 3 years ago • 5 comments

Hi! I've got the error:

I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.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: /tmp/apk-mitm-b447b9303a25bf6b3ef7bc6223531604/base-apk/decode/res/xml/locales_config.xml:3: error: unbound pre
fix.
W: /tmp/apk-mitm-b447b9303a25bf6b3ef7bc6223531604/base-apk/decode/res/xml/locales_config.xml: error: file failed t
o compile.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_16
4211268516868455704548094665375130847.tmp, compile, --dir, /tmp/apk-mitm-b447b9303a25bf6b3ef7bc6223531604/base-apk
/decode/res, --legacy, -o, /tmp/apk-mitm-b447b9303a25bf6b3ef7bc6223531604/base-apk/decode/build/resources.zip]

How I can fix this?

Thanks!

anki-code avatar Feb 17 '22 21:02 anki-code

Looks like this is a specific bug in apk-tool & APK bundles: https://github.com/iBotPeaches/Apktool/issues/2756

moikeygraham avatar Mar 09 '22 12:03 moikeygraham

Does anyone know how to bypass this issue manually?

haocse avatar Mar 29 '22 13:03 haocse

try this, https://github.com/shroudedcode/apk-mitm/issues/93#issuecomment-1164733021

PratikBodawala avatar Jun 23 '22 18:06 PratikBodawala

#93 (comment)

This was a good start. I also had to remove the locales_config entry from decode/res/values/public.xml, and I deleted decode/res/xml/locales_config.xml just in case.

spiffytech avatar Sep 06 '22 18:09 spiffytech

Use the latest version of apktool

I suggest you download the latest version of apktool and set the correct JAR path, e.g.:

apk-mitm myfile.xapk --apktool /home/[...]/apktool_2.8.1.jar       # Linux
apk-mitm myfile.xapk --apktool C:\Users\[...]\apktool_2.8.1.jar    # Windows

Please note: the path must be absolute, not relative.

Lazza avatar Sep 07 '23 15:09 Lazza