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

feat: duplicates scanning for fingerprints #74

Open
ghost opened this issue Jul 26, 2022 · 1 comment
Open

feat: duplicates scanning for fingerprints #74

ghost opened this issue Jul 26, 2022 · 1 comment
Labels
Feature request Requesting a new feature that's not implemented yet

Comments

@ghost
Copy link

ghost commented Jul 26, 2022

🐞 Issue

Currently fingerprints resolve to the first thing found that matches.
This can be unsafe, for example if a fingerprint matches multiple places -> wrong stuff is getting patched -> app crashes at runtime.

❗ Solution

Patcher should have the ability to make sure fingerprints are unique and only find exactly one specific thing.

❓ Motivation

Make sure fingerprints find one thing and warn devs in case something is not unique anymore.

⚠ Additional context

Initial discussion because of fingerprints "safety":
ReVanced/revanced-patches#239


Performance + CLI

For performance reasons the duplicates checking should be disabled by default (when patching known to work versions).

The CLI should not scan for duplicates for patching supported versions.
However when --experimental flag is enabled it could make use of duplicate checking.

@ghost ghost added the Feature request Requesting a new feature that's not implemented yet label Jul 26, 2022
@LisoUseInAIKyrios
Copy link
Contributor

This behavior could also be applied to patches with no version constrain, since it's possible for newly released app targets to have multiple matches.

All existing apps with no version constraint have only a few patches and the extra time to patch will likely be under a few seconds. The performance penalty won't be noticable to the end user and it better guarantees patching is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Requesting a new feature that's not implemented yet
Projects
None yet
Development

No branches or pull requests

1 participant