I write here but I don't know if it's a problem with apktool.
I am decompiling an apk and in the resources there are the following files:
.//res/drawable-v21/$avd_show_password__2.xml
.//res/drawable-v21/$avd_show_password__1.xml
.//res/drawable-v21/$avd_show_password__0.xml
.//res/drawable-v21/$avd_hide_password__2.xml
.//res/drawable-v21/$avd_hide_password__0.xml
The problem is that I then use the decompiled resources in another project but this character is invalid '$' and block project's mergeDebugResources (i use this tool: https://forum.xda-developers.com/android/software/tool-dexpatcher-modify-android-dex-apk-t3060854/page22)
Is it normal for apktool to generate these resources?
thanks!
attached you find the source file
Amazfit 2.4.0.DEV.apk.zip
Is it normal for apktool to generate these resources?
Apktool is only generating what is in the application. If a resource name has a $, apktool will decode it as such.
@iBotPeaches thanks for reply!
do you have any idea how it is possible that they have inserted a resource with such a name?
I see this is similar like #1776, I know 1776 issue mention it's sing aapt2 but I am seeing similar issue with aapt as well.
[WIP] With the tool (DexPatcher) which was mentioned by @edotassi, I was not yet able to run gradle with aapt2. I have latest apktool.jar with fix/workaround put by @iBotPeaches in this commit https://github.com/iBotPeaches/platform_frameworks_base/commit/ad643be8174e740124b4bc59e4cc1e70541f6a4e. I will update if I make progress with dexpatcher + aapt2
@vkadam read this: https://forum.xda-developers.com/showpost.php?p=76529130&postcount=221
➜ Bug1796 apktool b Amazfit\ 2.4.0.DEV
I: Using Apktool 2.3.2-ca25a2-SNAPSHOT
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...
I: Copying libs... (/lib)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
➜ Bug1796
I couldn't replicate this with aapt1. These resources are not normal, but they aren't wrong either. Other applications use whatever characters are possible to generate resources.
@iBotPeaches I have used apktool with --use-aapt it raised as what issuer said. on v2.3.4.
please see here: https://github.com/DexPatcher/dexpatcher-gradle/issues/22
Most helpful comment
Apktool is only generating what is in the application. If a resource name has a
$, apktool will decode it as such.