Skip to content
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

Fix duplicated attribute problem #6

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Fix duplicated attribute problem #6

merged 1 commit into from
Aug 26, 2022

Conversation

nonnonstop
Copy link
Contributor

If the key of an attribute is specified as a resource ID, the attribute may be added (duplicated) rather than overwritten by an existing attribute.

  1. Download this AndroidManifest.xml

  2. Run ManifestEditor to edit android:appComponentFactory.

     java -jar ManifestEditor-1.0.2.jar -f -aa android-appComponentFactory:ThisIsUpdatedValue AndroidManifest.xml
    
  3. View the generated xml with a AXML viewer such as JADX.
    There are two attributes with the same names.
    duplicatedattribute

This PR fixes this problem by checking the name of the attribute not only as a string but also as a resource ID in ModifyAttributeVisitor.

@WindySha WindySha merged commit aff5123 into WindySha:master Aug 26, 2022
@nonnonstop
Copy link
Contributor Author

Thank you for merging so quickly!
I'm looking forward to v1.0.3. 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants