-
-
Notifications
You must be signed in to change notification settings - Fork 441
feat(Cricbuzz): Add Hide ads
patch
#4998
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
base: dev
Are you sure you want to change the base?
feat(Cricbuzz): Add Hide ads
patch
#4998
Conversation
patches/src/main/kotlin/app/revanced/patches/cricbuzz/Fingerprints.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/cricbuzz/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/cricbuzz/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/cricbuzz/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch and fingerprint file should be moved to an "ads" package
Disable ads
patch
patches/src/main/kotlin/app/revanced/patches/cricbuzz/Fingerprints.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/cricbuzz/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/cricbuzz/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/cricbuzz/ads/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
Disable ads
patchHide ads
patch
patches/src/main/kotlin/app/revanced/patches/cricbuzz/ads/DisableAdsPatch.kt
Outdated
Show resolved
Hide resolved
|
||
@Suppress("unused") | ||
val disableAdsPatch = bytecodePatch ( | ||
"Hide ads", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Hide ads", | |
name = "Hide ads", |
val disableAdsPatch = bytecodePatch ( | ||
"Hide ads", | ||
) { | ||
compatibleWith("com.cricbuzz.android" ("6.23.02")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compatibleWith("com.cricbuzz.android" ("6.23.02")) | |
compatibleWith("com.cricbuzz.android"("6.23.02")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everywhere else in the patches repo uses no space. If this is changed it should be changed everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the suggestion is to remove the space, not add it
|
||
internal val userStateSwitchFingerprint = fingerprint { | ||
strings("key.user.state", "NA") | ||
opcodes(Opcode.SPARSE_SWITCH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the strings enough or is this Opcode needed?
|
||
execute { | ||
userStateSwitchFingerprint.method.apply { | ||
val opcodeIndex = indexOfFirstInstructionOrThrow(Opcode.MOVE_RESULT_OBJECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name these variables in a way that we know what these instructions do. For example:
- What is this return we are moving-result-object to?
- What is stored in the register we are getting?
val insertIndex = opcodeIndex + 1 | ||
|
||
addInstructions( | ||
insertIndex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val insertIndex = opcodeIndex + 1 | |
addInstructions( | |
insertIndex, | |
addInstruction( | |
opcodeIndex + 1, |
Add patch to disable ads on cricbuzz app