mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 13:57:46 +01:00
Fix AXML parser to handle obfuscated attribute names
This adds an additional check if the attribute namespace belongs to Android namespace, and if so we try to decode using attribute decoder. Fixes #1576.
This commit is contained in:
parent
31f25bc561
commit
31a23ba493
@ -339,13 +339,12 @@ public class AXmlResourceParser implements XmlResourceParser {
|
|||||||
|
|
||||||
// some attributes will return "", we must rely on the resource_id and refer to the frameworks
|
// some attributes will return "", we must rely on the resource_id and refer to the frameworks
|
||||||
// to match the resource id to the name. ex: 0x101021C = versionName
|
// to match the resource id to the name. ex: 0x101021C = versionName
|
||||||
if (value.length() != 0) {
|
if (value.length() != 0 && !android_ns.equals(getAttributeNamespace(index))) {
|
||||||
return value;
|
return value;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
value = mAttrDecoder.decodeManifestAttr(getAttributeNameResource(index));
|
value = mAttrDecoder.decodeManifestAttr(getAttributeNameResource(index));
|
||||||
} catch (AndrolibException e) {
|
} catch (AndrolibException e) {
|
||||||
value = "";
|
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user