-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[BUG] android:localeConfig in Manifest #2756
Comments
Since no apk. Is the extent of this test I add a new <?xml version="1.0" encoding="utf-8"?>
<locale-config>
<locale android:name="ca" />
<locale android:name="da" />
<locale android:name="fa" />
....
</locale-config> ? |
I just hit this issue with YouTube 17.05.38 https://www.apkmirror.com/apk/google-inc/youtube/youtube-17-05-38-release/youtube-17-05-38-android-apk-download/, all you have to do is decompile and recompile and it will refuse to build because of that file |
in Manifest: android:localeConfig="@xml/locales_config" res/values/public.xml res/xml/locales_config.xml ....the locales_config.xml file is used exclusively in the base.apk of bundles (apkmirror .apkm), Example: Web Video Cast Apk as Single File: |
I think I fixed this by adding
But now I get an |
Sorry folks, still not replicating this.
|
@iBotPeaches the locales_config.xml file is used exclusively in the base.apk of bundles (apkmirror .apkm), |
Okay thanks, now I replicate.
Assigning bug. |
I have encounter a same problem with this app .... Its a split and problem with base.apk ...
For now , It can be fixed by following the steps below.... Will be really happy if this issue solves in next update 😃 |
This is working. |
update internal framework to API 33 (Tiramisu Privacy Preview) has solved this problem. No further action needed |
Okay thanks @wortel-za - might see if I can add a test case for this. Otherwise closing. |
@wortel-za can you please write some details about updating internal framework ? |
@Gourov |
@wortel-za Could you provide more thorough instructions, please? I'm trying to use this with Objection but hitting this issue. |
I encountered the same problem with telegram-sms apk.
@wortel-za It is not clear how this can help. |
@sunkrop |
Still have same problem on 2.7.0 |
Can confirm that this is still an open issue on v2.7.0 |
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 <?xml version="1.0" encoding="utf-8"?>
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
<locale android:name="ja" />
<locale android:name="bg" />
<locale android:name="nl" />
<locale android:name="es" /> The build works.
So I think I'll patch Apktool to explicitly look for the |
This is more difficult than I thought for Apktool to handle at the moment. During disassembly we use a pull-parser so we can only extract values and mutate them during extraction. So to do a pure insertion of a missing key - we either have to treat it like we do for the AndroidManifest and trigger a full copy/modify, but that seems hacky. I need to figure out a good method for the ResFileDecoder to detect specify files that have modifications required post disassembly. |
I've got no easy way to automate this at the time, so dropping into backlog. Please add the namespace manually if you encounter this issue. |
these workaround stopped working in the latest version (Apktool 2.9.3). deleting locales_config declaration or adding the namespace only leads to a different kind of error during compilation:
or this error:
|
Information
apktool -version
) -2.6.1 and olderStacktrace/Logcat
The text was updated successfully, but these errors were encountered: