Compare commits

..

19 Commits

Author SHA1 Message Date
semantic-release-bot
a9308d46e2 chore(release): 2.191.0-dev.2 [skip ci]
# [2.191.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.1...v2.191.0-dev.2) (2023-09-11)

### Bug Fixes

* Use consistent toggle description ([#2983](https://github.com/ReVanced/revanced-patches/issues/2983)) ([9470694](9470694cd4))
2023-09-11 23:39:48 +00:00
KobeW50
9470694cd4 fix: Use consistent toggle description (#2983) 2023-09-12 01:36:20 +02:00
semantic-release-bot
06503e9527 chore(release): 2.191.0-dev.1 [skip ci]
# [2.191.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.4...v2.191.0-dev.1) (2023-09-11)

### Features

* **Tumblr:** Add `Disable dashboard ads` patch ([#2979](https://github.com/ReVanced/revanced-patches/issues/2979)) ([c322a9b](c322a9b7aa))
2023-09-11 17:34:07 +00:00
Temm
c322a9b7aa feat(Tumblr): Add Disable dashboard ads patch (#2979)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-09-11 19:31:24 +02:00
xehpuk
d18c6cfc3a build: use supported API to get working directory (#2976) 2023-09-11 11:54:06 +02:00
semantic-release-bot
6c8d545c6e chore(release): 2.190.1-dev.4 [skip ci]
## [2.190.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.3...v2.190.1-dev.4) (2023-09-07)

### Bug Fixes

* **YouTube - Custom filter:** Use new lines between components instead of commas ([#2952](https://github.com/ReVanced/revanced-patches/issues/2952)) ([6b3bde3](6b3bde3bda))
2023-09-07 20:14:34 +00:00
LisoUseInAIKyrios
6b3bde3bda fix(YouTube - Custom filter): Use new lines between components instead of commas (#2952)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-09-08 00:10:57 +04:00
semantic-release-bot
a6e032d447 chore(release): 2.190.1-dev.3 [skip ci]
## [2.190.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.2...v2.190.1-dev.3) (2023-09-07)

### Bug Fixes

* **Infinity for Reddit - Spoof client:** Constrain patch to last working versions ([#2944](https://github.com/ReVanced/revanced-patches/issues/2944)) ([728d49d](728d49ddb5))
2023-09-07 20:05:09 +00:00
nullptr
728d49ddb5 fix(Infinity for Reddit - Spoof client): Constrain patch to last working versions (#2944) 2023-09-07 22:01:15 +02:00
semantic-release-bot
4dc9a7f6e1 chore(release): 2.190.1-dev.2 [skip ci]
## [2.190.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.1...v2.190.1-dev.2) (2023-09-07)

### Bug Fixes

* **YouTube - Hide layout components:** Always hide redundant 'player audio track' button ([#2951](https://github.com/ReVanced/revanced-patches/issues/2951)) ([1f96838](1f9683849f))
2023-09-07 06:44:01 +00:00
LisoUseInAIKyrios
1f9683849f fix(YouTube - Hide layout components): Always hide redundant 'player audio track' button (#2951) 2023-09-07 10:41:24 +04:00
semantic-release-bot
4f7506ba21 chore(release): 2.190.1-dev.1 [skip ci]
## [2.190.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.190.0...v2.190.1-dev.1) (2023-09-03)

### Bug Fixes

* **Twitch - Audio ads:** Support missing version `16.1.0` ([#2928](https://github.com/ReVanced/revanced-patches/issues/2928)) ([c0163c1](c0163c122c))
2023-09-03 19:18:07 +00:00
Benjamin
c0163c122c fix(Twitch - Audio ads): Support missing version 16.1.0 (#2928) 2023-09-03 21:14:53 +02:00
semantic-release-bot
b0875a168d chore(release): 2.190.0 [skip ci]
# [2.190.0](https://github.com/ReVanced/revanced-patches/compare/v2.189.0...v2.190.0) (2023-09-03)

### Bug Fixes

* **Infinity for Reddit - Spoof client:** Support latest version ([3d93a9d](3d93a9d851))

### Features

* **Photomath:** Support latest version ([8bcbd84](8bcbd8443d))
* **Twitch:** Support version `16.1.0` ([#2923](https://github.com/ReVanced/revanced-patches/issues/2923)) ([a478db3](a478db3cca))
2023-09-03 03:43:39 +00:00
oSumAtrIX
bb3a32a407 chore: merge branch dev to main (#2893) 2023-09-03 05:40:57 +02:00
semantic-release-bot
f27af6fdfa chore(release): 2.190.0-dev.3 [skip ci]
# [2.190.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.190.0-dev.2...v2.190.0-dev.3) (2023-09-02)

### Features

* **Twitch:** Support version `16.1.0` ([#2923](https://github.com/ReVanced/revanced-patches/issues/2923)) ([a478db3](a478db3cca))
2023-09-02 19:13:41 +00:00
Benjamin
a478db3cca feat(Twitch): Support version 16.1.0 (#2923) 2023-09-02 21:09:41 +02:00
semantic-release-bot
dc6fa70d6f chore(release): 2.190.0-dev.2 [skip ci]
# [2.190.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.190.0-dev.1...v2.190.0-dev.2) (2023-08-28)

### Bug Fixes

* **Infinity for Reddit - Spoof client:** Support latest version ([3d93a9d](3d93a9d851))
2023-08-28 18:23:24 +00:00
oSumAtrIX
3d93a9d851 fix(Infinity for Reddit - Spoof client): Support latest version 2023-08-28 20:20:04 +02:00
16 changed files with 148 additions and 35 deletions

View File

@@ -1,3 +1,72 @@
# [2.191.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.1...v2.191.0-dev.2) (2023-09-11)
### Bug Fixes
* Use consistent toggle description ([#2983](https://github.com/ReVanced/revanced-patches/issues/2983)) ([ceaa512](https://github.com/ReVanced/revanced-patches/commit/ceaa512f317fdd95dca37e425b389494a9b2e226))
# [2.191.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.4...v2.191.0-dev.1) (2023-09-11)
### Features
* **Tumblr:** Add `Disable dashboard ads` patch ([#2979](https://github.com/ReVanced/revanced-patches/issues/2979)) ([07c267a](https://github.com/ReVanced/revanced-patches/commit/07c267ad20afa1415d2dba31f0830d2dd5a34654))
## [2.190.1-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.3...v2.190.1-dev.4) (2023-09-07)
### Bug Fixes
* **YouTube - Custom filter:** Use new lines between components instead of commas ([#2952](https://github.com/ReVanced/revanced-patches/issues/2952)) ([ecb2e32](https://github.com/ReVanced/revanced-patches/commit/ecb2e32b1e296590d150bdd3f8bea2665b19a84d))
## [2.190.1-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.2...v2.190.1-dev.3) (2023-09-07)
### Bug Fixes
* **Infinity for Reddit - Spoof client:** Constrain patch to last working versions ([#2944](https://github.com/ReVanced/revanced-patches/issues/2944)) ([ee975de](https://github.com/ReVanced/revanced-patches/commit/ee975dea846c77af0efe608e647075f4055af320))
## [2.190.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.190.1-dev.1...v2.190.1-dev.2) (2023-09-07)
### Bug Fixes
* **YouTube - Hide layout components:** Always hide redundant 'player audio track' button ([#2951](https://github.com/ReVanced/revanced-patches/issues/2951)) ([ca632bd](https://github.com/ReVanced/revanced-patches/commit/ca632bd2cc74f0ce5ccb948e902445de3ab893cf))
## [2.190.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.190.0...v2.190.1-dev.1) (2023-09-03)
### Bug Fixes
* **Twitch - Audio ads:** Support missing version `16.1.0` ([#2928](https://github.com/ReVanced/revanced-patches/issues/2928)) ([688d8fa](https://github.com/ReVanced/revanced-patches/commit/688d8fa7e86862e03d8336af5f6cb207c4b72593))
# [2.190.0](https://github.com/ReVanced/revanced-patches/compare/v2.189.0...v2.190.0) (2023-09-03)
### Bug Fixes
* **Infinity for Reddit - Spoof client:** Support latest version ([8a5311b](https://github.com/ReVanced/revanced-patches/commit/8a5311b1e645ca2aab1e416d647cf52bf0be6e7f))
### Features
* **Photomath:** Support latest version ([5a2cad0](https://github.com/ReVanced/revanced-patches/commit/5a2cad077f03880ee1417c5cfd448bbdea4c07e2))
* **Twitch:** Support version `16.1.0` ([#2923](https://github.com/ReVanced/revanced-patches/issues/2923)) ([d9834a9](https://github.com/ReVanced/revanced-patches/commit/d9834a9abb43390af4cb33f5dd5a0e2d3b7060e2))
# [2.190.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.190.0-dev.2...v2.190.0-dev.3) (2023-09-02)
### Features
* **Twitch:** Support version `16.1.0` ([#2923](https://github.com/ReVanced/revanced-patches/issues/2923)) ([d9834a9](https://github.com/ReVanced/revanced-patches/commit/d9834a9abb43390af4cb33f5dd5a0e2d3b7060e2))
# [2.190.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.190.0-dev.1...v2.190.0-dev.2) (2023-08-28)
### Bug Fixes
* **Infinity for Reddit - Spoof client:** Support latest version ([8a5311b](https://github.com/ReVanced/revanced-patches/commit/8a5311b1e645ca2aab1e416d647cf52bf0be6e7f))
# [2.190.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.189.0...v2.190.0-dev.1) (2023-08-28)

View File

@@ -50,7 +50,7 @@ tasks {
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
val d8 = "${androidHome}/build-tools/33.0.1/d8"
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
val work = File("${buildDir}/libs")
val work = layout.buildDirectory.dir("libs").get().asFile
exec {
workingDir = work

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.190.0-dev.1
version = 2.191.0-dev.2

File diff suppressed because one or more lines are too long

View File

@@ -1,12 +1,17 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method
abstract class AbstractClientIdFingerprint(classTypeSuffix: String, methodName: String) : MethodFingerprint(
strings = listOf("NOe2iKrPPzwscA"),
customFingerprint = custom@{ methodDef, classDef ->
if (!classDef.type.endsWith(classTypeSuffix)) return@custom false
methodDef.name == methodName
}
)
/**
* Fingerprint for a method that has the client id hardcoded in it.
* The first string in the fingerprint is the client id.
*
* @param customFingerprint A custom fingerprint.
* @param additionalStrings Additional strings to add to the fingerprint.
*/
abstract class AbstractClientIdFingerprint(
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null,
vararg additionalStrings: String
) : MethodFingerprint(strings = listOf("NOe2iKrPPzwscA", *additionalStrings), customFingerprint = customFingerprint)

View File

@@ -1,6 +1,3 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
object GetHttpBasicAuthHeaderFingerprint : AbstractClientIdFingerprint(
"APIUtils;",
"getHttpBasicAuthHeader"
)
object GetHttpBasicAuthHeaderFingerprint : AbstractClientIdFingerprint(additionalStrings = arrayOf("Authorization"))

View File

@@ -1,6 +1,5 @@
package app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints
object LoginActivityOnCreateFingerprint : AbstractClientIdFingerprint(
"LoginActivity;",
"onCreate"
)
object LoginActivityOnCreateFingerprint : AbstractClientIdFingerprint(custom@{ methodDef, classDef ->
methodDef.name == "onCreate" && classDef.type.endsWith("LoginActivity;")
})

View File

@@ -17,7 +17,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Description("Spoofs the client in order to allow logging in. " +
"The OAuth application type has to be \"Installed app\" " +
"and the redirect URI has to be set to \"infinity://localhost\".")
@Compatibility([Package("ml.docilealligator.infinityforreddit")])
@Compatibility([Package("ml.docilealligator.infinityforreddit", arrayOf("5.4.0", "5.4.1", "5.4.2", "6.0.1", "6.0.2", "6.0.4", "6.0.6", "6.1.1"))])
class SpoofClientPatch : AbstractSpoofClientPatch(
"infinity://localhost",
Options,
@@ -25,6 +25,7 @@ class SpoofClientPatch : AbstractSpoofClientPatch(
) {
override fun List<MethodFingerprintResult>.patchClientId(context: BytecodeContext) {
forEach {
// First is index of the clientId string.
val clientIdIndex = it.scanResult.stringsScanResult!!.matches.first().index
it.mutableMethod.apply {
val oAuthClientIdRegister = getInstruction<OneRegisterInstruction>(clientIdIndex).registerA
@@ -38,4 +39,4 @@ class SpoofClientPatch : AbstractSpoofClientPatch(
}
companion object Options : AbstractSpoofClientPatch.Options.SpoofClientOptionsContainer()
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.patches.tumblr.ads.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
// The Tumblr app sends a request to /v2/timeline/dashboard which replies with an array of elements
// to show in the user dashboard. These element have different type ids (post, title, carousel, etc.)
// The standard dashboard Ad has the id client_side_ad_waterfall, and this string has to be in the code
// to handle ads and provide their appearance.
// If we just replace this string in the tumblr code with anything else, it will fail to recognize the
// dashboard object type and just skip it. This is a bit weird, but it shouldn't break
// unless they change the api (unlikely) or explicitly Change the tumblr code to prevent this.
object AdWaterfallFingerprint : MethodFingerprint(strings = listOf("client_side_ad_waterfall"))

View File

@@ -0,0 +1,34 @@
package app.revanced.patches.tumblr.ads.patch
import app.revanced.extensions.exception
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.tumblr.ads.fingerprints.AdWaterfallFingerprint
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@Name("Disable dashboard ads")
@Description("Disables ads in the dashboard.")
@Compatibility([Package("com.tumblr")])
class DisableDashboardAds : BytecodePatch(
listOf(AdWaterfallFingerprint)
) {
override fun execute(context: BytecodeContext) = AdWaterfallFingerprint.result?.let {
it.scanResult.stringsScanResult!!.matches.forEach { match ->
// We just replace all occurrences of "client_side_ad_waterfall" with anything else
// so the app fails to handle ads in the timeline elements array and just skips them.
// See AdWaterfallFingerprint for more info.
val stringRegister = it.mutableMethod.getInstruction<OneRegisterInstruction>(match.index).registerA
it.mutableMethod.replaceInstruction(
match.index, "const-string v$stringRegister, \"dummy\""
)
}
} ?: throw AdWaterfallFingerprint.exception
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.audio.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1", "16.1.0"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AudioAdsCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.embedded.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1", "16.1.0"))])
@Target(AnnotationTarget.CLASS)
internal annotation class EmbeddedAdsCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.ad.video.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1", "16.1.0"))])
@Target(AnnotationTarget.CLASS)
internal annotation class VideoAdsCompatibility

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.chat.antidelete.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1", "16.1.0"))])
@Target(AnnotationTarget.CLASS)
internal annotation class ShowDeletedMessagesCompatibility

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.twitch.chat.autoclaim.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1", "16.1.0"))])
@Target(AnnotationTarget.CLASS)
internal annotation class AutoClaimChannelPointsCompatibility

View File

@@ -11,6 +11,7 @@ import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.settings.preference.impl.InputType
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.shared.settings.preference.impl.TextPreference
@@ -54,7 +55,7 @@ class HideLayoutComponentsPatch : BytecodePatch(
"revanced_hide_expandable_chip",
StringResource(
"revanced_hide_expandable_chip_title",
"Hide the expandable chip under videos"
"Hide expandable chip under videos"
),
StringResource(
"revanced_hide_expandable_chip_summary_on",
@@ -185,12 +186,6 @@ class HideLayoutComponentsPatch : BytecodePatch(
StringResource("revanced_hide_image_shelf_summary_on", "Image shelf is hidden"),
StringResource("revanced_hide_image_shelf_summary_off", "Image shelf is shown")
),
SwitchPreference(
"revanced_hide_audio_track_button",
StringResource("revanced_hide_audio_track_button_title", "Hide audio track button"),
StringResource("revanced_hide_audio_track_button_on", "Audio track button is hidden"),
StringResource("revanced_hide_audio_track_button_off", "Audio track button is shown")
),
SwitchPreference(
"revanced_hide_latest_posts_ads",
StringResource("revanced_hide_latest_posts_ads_title", "Hide latest posts"),
@@ -240,8 +235,9 @@ class HideLayoutComponentsPatch : BytecodePatch(
StringResource("revanced_custom_filter_strings_title", "Custom filter"),
StringResource(
"revanced_custom_filter_strings_summary",
"Filter components by their name separated by a comma"
)
"List of components to filter separated by new line"
),
inputType = InputType.TEXT_MULTI_LINE
)
)
)