Skip to content

Commit

Permalink
Fix AXML parser to handle obfuscated attribute names
Browse files Browse the repository at this point in the history
This adds an additional check if the attribute namespace belongs to
Android namespace, and if so we try to decode using attribute decoder.

Fixes iBotPeaches#1576.
  • Loading branch information
brianairb authored and iBotPeaches committed Nov 14, 2019
1 parent 31f25bc commit 31a23ba
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,12 @@ public String getAttributeName(int index) {

// 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
if (value.length() != 0) {
if (value.length() != 0 && !android_ns.equals(getAttributeNamespace(index))) {
return value;
} else {
try {
value = mAttrDecoder.decodeManifestAttr(getAttributeNameResource(index));
} catch (AndrolibException e) {
value = "";
}
return value;
}
Expand Down

0 comments on commit 31a23ba

Please sign in to comment.