Information
- Apktool Version (
apktool -version
) -2.6.1 and older
- Operating System (Mac, Linux, Windows) - Mac
- APK From? (Playstore, ROM, Other) - Playstore
Stacktrace/Logcat
Include stacktrace here
W: /xxx/BookmarkFolder_v5.0.5_129/res/xml/locales_config.xml:3: error: unbound prefix.
W: /xxx/BookmarkFolder_v5.0.5_129/res/xml/locales_config.xml: error: file failed to compile.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/sm/q39kpprx0175hypt_zz76qb00000gn/T/brut_util_Jar_70428711240655456118660710679018899199.tmp, compile, --dir, /xxx/BookmarkFolder_v5.0.5_129/res, --legacy, -o, /xxx/BookmarkFolder_v5.0.5_129/build/resources.zip]
### Steps to Reproduce
1. `apktool -advance b -d -p /Applications/Tools/TelefonApps/MyApkTool.app/Contents/Resources/framework/ --use-aapt2 '/xxx/BookmarkFolder_v5.0.5_129/'
### Frameworks
If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files
(`.apks` that live in `/system/framework` or `/system/priv-app`)
### APK
If this APK can be freely shared, please upload/attach a link to it.
BookmarkFolder_v5.0.5_129.apk
### Questions to ask before submission
1. Have you tried `apktool d`, `apktool b` without changing anything? yes
2. If you are trying to install a modified apk, did you resign it? not possible
3. Are you using the latest apktool version? yes tried also older versions
Error file : /xxx/BookmarkFolder_v5.0.5_129/res/xml/locales_config.xml
W: /xxx/BookmarkFolder_v5.0.5_129/res/xml/locales_config.xml:3: error: unbound prefix.
<?xml version="1.0" encoding="utf-8"?>
<locale-config>
<locale android:name="ca" />
<locale android:name="da" />
<locale android:name="fa" />
....
</locale-config>
I have encounter a same problem with this app … https://play.google.com/store/apps/details?id=org.hostedgames.zexsh
Its a split and problem with base.apk …
For now , It can be fixed by following the steps below… delete file
\res\xml\locales_config.xml
open file\res\values\public.xml
and delete line<public type="xml" name="locales_config" id="0x7f110003" />
open fileAndroidManifest.xml
and delete declarationandroid:localeConfig="@xml/locales_config"
Will be really happy if this issue solves in next update 😃
update internal framework to API 33 (Tiramisu Privacy Preview) has solved this problem. No further action needed
@sunkrop the lastest build is apktool-2.6.2-63a8d09-SNAPSHOT-small.jar NOT 2.6.1 How to Build
Sorry for delay on this. I took a look.
The original error is this:
Which is basically because there are no namespaces, so it can’t properly resolve these properties. Oddly though this namespace isn’t found so Apktool isn’t doing anything wrong.
So if we add the namespace
The build works.
So I think I’ll patch Apktool to explicitly look for the
locale-config
XML tag and add the namespace during disassembly. My guess is this is a bug in Android in generating this file, as if you manually create it per: https://developer.android.com/guide/topics/resources/app-languages you add the namespace.in Manifest:
android:localeConfig=“@xml/locales_config”
res/values/public.xml
<public type="xml" name="locales_config" id="0x7f16000b" />res/xml/locales_config.xml
<?xml version="1.0" encoding="utf-8"?> <locale-config> <locale android:name="ja" /> <locale android:name="bg" /> .... </locale-config>the locales_config.xml file is used exclusively in the base.apk of bundles (apkmirror .apkm), the apk as a single apk does not contain this file. the specification android:localeConfig=“@xml/locales_config” in the manifest is also only in the base.apk of a bundle.
Example: Web Video Cast
Apk as Bundle:
https://www.apkmirror.com/apk/instantbits-inc/web-video-cast-browser-to-tv-chromecastdlna/web-video-cast-browser-to-tv-chromecastdlna-5-5-5b2-release/web-video-cast-browser-to-tv-5-5-5b2-android-apk-download/
Apk as Single File:
https://www.apkmirror.com/apk/instantbits-inc/web-video-cast-browser-to-tv-chromecastdlna/web-video-cast-browser-to-tv-chromecastdlna-5-5-5b2-release/web-video-cast-browser-to-tv-5-5-5b2-2-android-apk-download/