mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 09:53:55 +01:00
Compare commits
13 Commits
v2.191.0-d
...
v2.191.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe3a6fd4a4 | ||
|
|
2a340d21d7 | ||
|
|
ce6a9fc1ec | ||
|
|
632b50e1fe | ||
|
|
2957d3791a | ||
|
|
f894561817 | ||
|
|
04bc0f54e3 | ||
|
|
3fc64530c5 | ||
|
|
74df205be5 | ||
|
|
a09797710e | ||
|
|
5f43afcbaf | ||
|
|
a9308d46e2 | ||
|
|
9470694cd4 |
30
CHANGELOG.md
30
CHANGELOG.md
@@ -1,3 +1,33 @@
|
||||
# [2.191.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.4...v2.191.0-dev.5) (2023-09-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **YouTube:** Restore functionality of `Old video quality menu` and `Custom speeds` on tablets ([#2999](https://github.com/ReVanced/revanced-patches/issues/2999)) ([238bed1](https://github.com/ReVanced/revanced-patches/commit/238bed12519ec61a53b1ee72da467830ef252154))
|
||||
|
||||
# [2.191.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.3...v2.191.0-dev.4) (2023-09-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Twitch - Block embedded ads:** Switch from `ttv.lol` to `luminous.dev` ([0fe115e](https://github.com/ReVanced/revanced-patches/commit/0fe115e8f98ccdc86d318090fc92fe77cece1dd8))
|
||||
|
||||
# [2.191.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.191.0-dev.2...v2.191.0-dev.3) (2023-09-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **TU Dortmund:** Add `Show on lockscreen` patch ([#2947](https://github.com/ReVanced/revanced-patches/issues/2947)) ([9a18326](https://github.com/ReVanced/revanced-patches/commit/9a18326aeb68d7518594d0eab326ca845b9bdbdd))
|
||||
* **Tumblr:** Add `Disable blog notification reminder` patch ([29f19b9](https://github.com/ReVanced/revanced-patches/commit/29f19b9378c7e167137f38fa4517ae19382ca4f6))
|
||||
* **Tumblr:** Add `Disable gift message popup` patch ([a4d6b4e](https://github.com/ReVanced/revanced-patches/commit/a4d6b4e5ce6065d932f3895b4996e7dc1e5f7c67))
|
||||
|
||||
# [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)
|
||||
|
||||
|
||||
|
||||
106
CONTRIBUTING.md
Normal file
106
CONTRIBUTING.md
Normal file
@@ -0,0 +1,106 @@
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source
|
||||
width="256px"
|
||||
media="(prefers-color-scheme: dark)"
|
||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||
>
|
||||
<img
|
||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||
>
|
||||
</picture>
|
||||
<br>
|
||||
<a href="https://revanced.app/">
|
||||
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
||||
</a>
|
||||
<a href="https://github.com/revanced">
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="http://revanced.app/discord">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||
</a>
|
||||
<a href="https://reddit.com/r/revancedapp">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||
</a>
|
||||
<a href="https://t.me/app_revanced">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||
</a>
|
||||
<a href="https://twitter.com/revancedapp">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
|
||||
</a>
|
||||
<a href="https://www.youtube.com/@ReVanced">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
Continuing the legacy of Vanced
|
||||
</p>
|
||||
|
||||
# 📙 ReVanced Patches contribution guidelines
|
||||
|
||||
This document describes how to contribute to ReVanced Patches.
|
||||
|
||||
## 📖 Resources to help you get started
|
||||
|
||||
* The [documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs) provides the fundamentals of patches
|
||||
and everything necessary to create your own patch from scratch
|
||||
* [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
|
||||
* [Issues](https://github.com/ReVanced/revanced-patches/issues) are where we keep track of bugs and feature requests
|
||||
|
||||
## 🙏 Submitting a patch request
|
||||
|
||||
Patches can be requested by opening an issue using the
|
||||
[Patch request issue template](https://github.com/ReVanced/revanced-patches/issues/new?assignees=&labels=patch-request&projects=&template=patch-request.yml&title=feat%3A+).
|
||||
|
||||
> **Note**
|
||||
> Requests can be accepted or rejected at the discretion of maintainers of ReVanced Patches.
|
||||
> Good motivation has to be provided for a request to be accepted.
|
||||
|
||||
## 🐞 Submitting a bug report
|
||||
|
||||
If you encounter a bug while using ReVanced Patches, open an issue using the
|
||||
[Bug report issue template](https://github.com/ReVanced/revanced-patches/issues/new?assignees=&labels=bug&projects=&template=bug-issue.yml&title=bug%3A+).
|
||||
|
||||
## 🧑⚖️ Guidelines for requesting or contributing patches
|
||||
|
||||
To maintain a high-quality and ethical collection of patches, the following guidelines for requesting
|
||||
or contributing patches are effective as of September 14, 2023. Any patches present prior to this date
|
||||
are unaffected by this change.
|
||||
|
||||
> **Note**
|
||||
> We generally adhere to the guidelines outlined below. However, we may make exceptions
|
||||
> in specific cases based on our discretion. Pull requests for patches that deviate from the guidelines
|
||||
> will be evaluated individually. While a patch may not align with our general guidelines,
|
||||
> we will consider its acceptance on a case-by-case basis, taking into account its impact on user experience
|
||||
> and ethical considerations. We reserve the right to make exceptions for patches that provide significant value.
|
||||
|
||||
✅ Examples for acceptable patches include:
|
||||
|
||||
* Customizations: Feel free to contribute patches that allow users to personalize their experience
|
||||
* Ad-Blocking: Patches aimed at enhancing user privacy and blocking intrusive advertisements are appreciated
|
||||
* Feature additions: Patches that add new features or change behaviour to the app are welcome
|
||||
|
||||
❌ Examples for unacceptable patches include:
|
||||
|
||||
* Payment circumvention: We do not accept patches that exist solely to bypass payment for the app or any of its features
|
||||
* Malicious patches: Patches that are malicious in nature are not allowed
|
||||
|
||||
|
||||
## 📝 How to contribute
|
||||
|
||||
1. Before contributing, it is recommended to open an issue to discuss your change
|
||||
with the maintainers of ReVanced Patches. This will help you determine whether your change is acceptable
|
||||
and whether it is worth your time to implement it
|
||||
2. Development happens on the `dev` branch. Fork the repository and create your branch from `dev`
|
||||
3. Commit your changes. In case you are contributing a new patch, make sure to follow the conventions for patches
|
||||
described in the [documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs)
|
||||
4. Submit a pull request to the `dev` branch of the repository and reference issues
|
||||
that your pull request closes in the description of your pull request
|
||||
5. Our team will review your pull request and provide feedback. Once your pull request is approved,
|
||||
it will be merged into the `dev` branch and will be included in the next release of ReVanced Patches
|
||||
|
||||
❤️ Thank you for considering contributing to ReVanced Patches,
|
||||
ReVanced
|
||||
92
README.md
92
README.md
@@ -1,3 +1,91 @@
|
||||
## 🧩 ReVanced Patches
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source
|
||||
width="256px"
|
||||
media="(prefers-color-scheme: dark)"
|
||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||
>
|
||||
<img
|
||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||
>
|
||||
</picture>
|
||||
<br>
|
||||
<a href="https://revanced.app/">
|
||||
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
||||
</a>
|
||||
<a href="https://github.com/revanced">
|
||||
<picture>
|
||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||
</picture>
|
||||
</a>
|
||||
<a href="http://revanced.app/discord">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||
</a>
|
||||
<a href="https://reddit.com/r/revancedapp">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||
</a>
|
||||
<a href="https://t.me/app_revanced">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||
</a>
|
||||
<a href="https://twitter.com/revancedapp">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
|
||||
</a>
|
||||
<a href="https://www.youtube.com/@ReVanced">
|
||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||
</a>
|
||||
<br>
|
||||
<br>
|
||||
Continuing the legacy of Vanced
|
||||
</p>
|
||||
|
||||
Patches for ReVanced.
|
||||
|
||||
# 🧩 ReVanced Patches
|
||||
|
||||

|
||||

|
||||
|
||||
This repository contains a collection of ReVanced Patches.
|
||||
|
||||
## ❓ About
|
||||
|
||||
Patches are small modifications to Android apps that allow you to change the behaviour of or add new features,
|
||||
block ads, customize the appearance, and much more.
|
||||
|
||||
## 💪 Features
|
||||
|
||||
Some of the features the patches provide are:
|
||||
|
||||
* 🚫 **Block ads**: Say goodbye to ads
|
||||
* ⭐ **Customize your app**: Personalize the appearance of apps with various layouts and themes
|
||||
* 🪄 **Add new features**: Extend the functionality of apps with lots of new features
|
||||
* ⚙️ **Miscellaneous and general purpose**: Rename packages, enable debugging, disable screen capture restrictions,
|
||||
export activities, etc.
|
||||
* ✨ **And much more!**
|
||||
|
||||
For a full list of all available patches, visit [revanced.app/patches](https://revanced.app/patches).
|
||||
|
||||
## 🚀 How to get started
|
||||
|
||||
You can use [ReVanced CLI](https://github.com/ReVanced/revanced-cli) or [ReVanced Manager](https://github.com/ReVanced/revanced-manager) to use ReVanced Patches.
|
||||
|
||||
## 📚 Everything else
|
||||
|
||||
### 📙 Contributing
|
||||
|
||||
Thank you for considering contributing to ReVanced Patches. You can find the contribution guidelines [here](CONTRIBUTING.md).
|
||||
|
||||
### 📃 Documentation
|
||||
|
||||
The documentation provides the fundamentals of patches and everything necessary to create your own patch from scratch.
|
||||
You can find it [here](https://github.com/ReVanced/revanced-patches/tree/docs/docs).
|
||||
|
||||
### 🛠️ Building
|
||||
|
||||
In order to build ReVanced Patches, you can follow the [ReVanced documentation](https://github.com/ReVanced/revanced-documentation).
|
||||
|
||||
## 📜 Licence
|
||||
|
||||
ReVanced Patches is licensed under the GPLv3 licence. Please see the [licence file](LICENSE) for more information.
|
||||
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify ReVanced patches as long as you track changes/dates in source files.
|
||||
Any modifications to ReVanced Patches must also be made available under the GPL along with build & install instructions.
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
1
assets/revanced-logo/revanced-logo-round.svg
Normal file
1
assets/revanced-logo/revanced-logo-round.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 800 800" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Logo"><g id="Ring"><circle id="Ring-Background" serif:id="Ring Background" cx="400" cy="400" r="400" style="fill:#1b1b1b;"/><path id="Ring1" serif:id="Ring" d="M400,0c220.766,0 400,179.234 400,400c-0,220.766 -179.234,400 -400,400c-220.766,-0 -400,-179.234 -400,-400c0,-220.766 179.234,-400 400,-400Zm-0,36c200.897,-0 364,163.103 364,364c0,200.897 -163.103,364 -364,364c-200.897,0 -364,-163.103 -364,-364c-0,-200.897 163.103,-364 364,-364Z" style="fill:url(#_Linear1);"/></g><g id="Shape"><path id="V-Shape" serif:id="V Shape" d="M538.74,269.872c1.481,-3.382 1.157,-7.283 -0.863,-10.373c-2.021,-3.091 -5.464,-4.954 -9.156,-4.954c-5.148,0 -10.435,0 -14.165,0c-3.1,0 -5.907,1.834 -7.153,4.672c-12.468,28.396 -78.273,178.273 -100.25,228.328c-1.246,2.838 -4.053,4.671 -7.154,4.671c-3.1,0 -5.907,-1.833 -7.153,-4.671c-21.977,-50.055 -87.782,-199.932 -100.25,-228.328c-1.246,-2.838 -4.053,-4.672 -7.153,-4.672c-3.73,0 -9.017,0 -14.164,0c-3.693,0 -7.135,1.863 -9.156,4.954c-2.02,3.09 -2.344,6.991 -0.863,10.373c23.557,53.766 101.872,232.519 117.871,269.034c1.743,3.979 5.674,6.549 10.018,6.549c6.293,-0 15.408,-0 21.701,-0c4.344,-0 8.275,-2.57 10.018,-6.549c15.999,-36.515 94.315,-215.268 117.872,-269.034Z" style="fill:#fff;"/><path id="Diamond" d="M408.119,395.312c-1.675,2.901 -4.77,4.688 -8.119,4.688c-3.349,-0 -6.444,-1.787 -8.119,-4.688c-16.997,-29.44 -56.156,-97.264 -73.153,-126.704c-1.675,-2.901 -1.675,-6.474 0,-9.375c1.675,-2.901 4.77,-4.688 8.119,-4.688c33.995,0 112.311,0 146.306,0c3.349,0 6.444,1.787 8.119,4.688c1.675,2.901 1.675,6.474 -0,9.375c-16.997,29.44 -56.156,97.264 -73.153,126.704Z" style="fill:url(#_Linear2);"/></g></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(4.89859e-14,800,-800,4.89859e-14,400.001,3.31681e-10)"><stop offset="0" style="stop-color:#f04e98;stop-opacity:1"/><stop offset="0.5" style="stop-color:#5f65d4;stop-opacity:1"/><stop offset="1" style="stop-color:#4e98f0;stop-opacity:1"/></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.77155e-14,289.317,-282.535,1.73003e-14,400,254.545)"><stop offset="0" style="stop-color:#f04e98;stop-opacity:1"/><stop offset="0.5" style="stop-color:#5f65d4;stop-opacity:1"/><stop offset="1" style="stop-color:#4e98f0;stop-opacity:1"/></linearGradient></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 2.191.0-dev.1
|
||||
version = 2.191.0-dev.5
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
|
||||
package app.revanced.patches.tudortmund.lockscreen.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object BrightnessFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
accessFlags = AccessFlags.PUBLIC.value,
|
||||
parameters = listOf(),
|
||||
customFingerprint = { method, classDef ->
|
||||
method.name == "run"
|
||||
&& method.definingClass.contains("/ScreenPlugin\$")
|
||||
&& classDef.fields.any { it.type == "Ljava/lang/Float;" }
|
||||
}
|
||||
)
|
||||
@@ -0,0 +1,93 @@
|
||||
package app.revanced.patches.tudortmund.lockscreen.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.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||
import app.revanced.patches.tudortmund.lockscreen.fingerprints.BrightnessFingerprint
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch
|
||||
@Name("Show on lockscreen")
|
||||
@Description("Shows student id and student ticket on lockscreen.")
|
||||
@Compatibility([Package("de.tudortmund.app")])
|
||||
@RequiresIntegrations
|
||||
class ShowOnLockscreenPatch : BytecodePatch(
|
||||
listOf(BrightnessFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
BrightnessFingerprint.result?.mutableMethod?.apply {
|
||||
// Find the instruction where the brightness value is loaded into a register
|
||||
val brightnessInstruction = implementation!!.instructions.firstNotNullOf { instruction ->
|
||||
if (instruction.opcode != Opcode.IGET_OBJECT) return@firstNotNullOf null
|
||||
|
||||
val getInstruction = instruction as Instruction22c
|
||||
val fieldReference = getInstruction.reference as FieldReference
|
||||
|
||||
if (fieldReference.type != "Ljava/lang/Float;") return@firstNotNullOf null
|
||||
|
||||
instruction
|
||||
}
|
||||
|
||||
// Search for the instruction where we get the android.view.Window via the Activity.
|
||||
// Gets the index of that instruction and the register of the Activity.
|
||||
val (windowIndex, activityRegister) = implementation!!.instructions.withIndex()
|
||||
.firstNotNullOf { (index, instruction) ->
|
||||
if (instruction.opcode != Opcode.INVOKE_VIRTUAL)
|
||||
return@firstNotNullOf null
|
||||
|
||||
val invokeInstruction = instruction as Instruction35c
|
||||
val methodRef = invokeInstruction.reference as MethodReference
|
||||
|
||||
if (methodRef.name != "getWindow" || methodRef.returnType != "Landroid/view/Window;")
|
||||
return@firstNotNullOf null
|
||||
|
||||
Pair(index, invokeInstruction.registerC)
|
||||
}
|
||||
|
||||
// The register in which the brightness value is loaded
|
||||
val brightnessRegister = brightnessInstruction.registerA
|
||||
|
||||
// Replaces the getWindow call with our custom one to run the lockscreen code
|
||||
replaceInstruction(
|
||||
windowIndex,
|
||||
"invoke-static { v$activityRegister, v$brightnessRegister }, " +
|
||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->" +
|
||||
"getWindow" +
|
||||
"(Landroidx/appcompat/app/AppCompatActivity;F)" +
|
||||
"Landroid/view/Window;"
|
||||
)
|
||||
|
||||
// Normally, the brightness is loaded into a register after the getWindow call.
|
||||
// In order to pass the brightness value to our custom getWindow implementation,
|
||||
// we need to add the same instructions before the getWindow call.
|
||||
// The Float object is loaded into the brightness register and gets converted to a float.
|
||||
addInstructions(
|
||||
windowIndex,
|
||||
"""
|
||||
invoke-virtual { v$brightnessRegister }, Ljava/lang/Float;->floatValue()F
|
||||
move-result v$brightnessRegister
|
||||
"""
|
||||
)
|
||||
|
||||
addInstruction(windowIndex, brightnessInstruction)
|
||||
|
||||
} ?: throw BrightnessFingerprint.exception
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "Lapp/revanced/tudortmund/lockscreen/ShowOnLockscreenPatch;"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package app.revanced.patches.tumblr.annoyances.notifications.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
// The BlogNotifyCtaDialog asks you if you want to enable notifications for a blog.
|
||||
// It shows whenever you visit a certain blog for the second time and disables itself
|
||||
// if it was shown a total of 3 times (stored in app storage).
|
||||
// This targets the BlogNotifyCtaDialog.isEnabled() method to let it always return false.
|
||||
object IsBlogNotifyEnabledFingerprint : MethodFingerprint(strings = listOf("isEnabled --> ", "blog_notify_enabled"))
|
||||
@@ -0,0 +1,30 @@
|
||||
package app.revanced.patches.tumblr.annoyances.notifications.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.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tumblr.annoyances.notifications.fingerprints.IsBlogNotifyEnabledFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Disable blog notification reminder")
|
||||
@Description("Disables the reminder to enable notifications for blogs you visit.")
|
||||
@Compatibility([Package("com.tumblr")])
|
||||
class DisableBlogNotificationReminderPatch : BytecodePatch(
|
||||
listOf(IsBlogNotifyEnabledFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) =
|
||||
IsBlogNotifyEnabledFingerprint.result?.mutableMethod?.addInstructions(
|
||||
0,
|
||||
"""
|
||||
# Return false for BlogNotifyCtaDialog.isEnabled() method.
|
||||
const/4 v0, 0x0
|
||||
return v0
|
||||
"""
|
||||
) ?: throw IsBlogNotifyEnabledFingerprint.exception
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package app.revanced.patches.tumblr.annoyances.popups.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
// This method is responsible for loading and displaying the visual Layout of the Gift Message Popup.
|
||||
object ShowGiftMessagePopupFingerprint : MethodFingerprint(
|
||||
strings = listOf("activity", "anchorView"),
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("GiftMessagePopup;") }
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
package app.revanced.patches.tumblr.annoyances.popups.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.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tumblr.annoyances.popups.fingerprints.ShowGiftMessagePopupFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("Disable gift message popup")
|
||||
@Description("Disables the popup suggesting to buy TumblrMart items for other people.")
|
||||
@Compatibility([Package("com.tumblr")])
|
||||
class DisableGiftMessagePopupPatch : BytecodePatch(
|
||||
listOf(ShowGiftMessagePopupFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) =
|
||||
ShowGiftMessagePopupFingerprint.result?.mutableMethod?.addInstructions(0, "return-void")
|
||||
?: throw ShowGiftMessagePopupFingerprint.exception
|
||||
}
|
||||
@@ -3,8 +3,8 @@ package app.revanced.patches.twitch.ad.embedded.patch
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
@@ -21,7 +21,7 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
|
||||
@Patch
|
||||
@DependsOn([VideoAdsPatch::class, IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("Block embedded ads")
|
||||
@Description("Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker.")
|
||||
@Description("Blocks embedded stream ads using services like Luminous or PurpleAdBlocker.")
|
||||
@EmbeddedAdsCompatibility
|
||||
class EmbeddedAdsPatch : BytecodePatch(
|
||||
listOf(CreateUsherClientFingerprint)
|
||||
@@ -50,7 +50,7 @@ class EmbeddedAdsPatch : BytecodePatch(
|
||||
"revanced_hls_proxies",
|
||||
listOf(
|
||||
StringResource("revanced_proxy_disabled", "Disabled"),
|
||||
StringResource("revanced_proxy_ttv_lol", "TTV LOL proxy"),
|
||||
StringResource("revanced_proxy_luminous", "Luminous proxy"),
|
||||
StringResource("revanced_proxy_purpleadblock", "PurpleAdBlock proxy"),
|
||||
)
|
||||
),
|
||||
@@ -58,11 +58,11 @@ class EmbeddedAdsPatch : BytecodePatch(
|
||||
"revanced_hls_proxies_values",
|
||||
listOf(
|
||||
StringResource("key_revanced_proxy_disabled", "disabled"),
|
||||
StringResource("key_revanced_proxy_ttv_lol", "ttv-lol"),
|
||||
StringResource("key_revanced_proxy_luminous", "luminous"),
|
||||
StringResource("key_revanced_proxy_purpleadblock", "purpleadblock")
|
||||
)
|
||||
),
|
||||
default = "ttv-lol"
|
||||
default = "luminous"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -55,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",
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookResourcePatch
|
||||
import app.revanced.util.patch.LiteralValueFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
object CreateBottomSheetFingerprint : LiteralValueFingerprint(
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||
parameters = listOf("L"),
|
||||
returnType = "Landroid/widget/LinearLayout;",
|
||||
literal = BottomSheetHookResourcePatch.bottomSheetMargins
|
||||
)
|
||||
@@ -1,39 +0,0 @@
|
||||
package app.revanced.patches.youtube.misc.bottomsheet.hook.patch
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.youtube.misc.bottomsheet.hook.fingerprints.CreateBottomSheetFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@DependsOn([IntegrationsPatch::class, BottomSheetHookResourcePatch::class])
|
||||
class BottomSheetHookPatch : BytecodePatch(
|
||||
listOf(CreateBottomSheetFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
CreateBottomSheetFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val returnLinearLayoutIndex = implementation!!.instructions.lastIndex
|
||||
val linearLayoutRegister = getInstruction<OneRegisterInstruction>(returnLinearLayoutIndex).registerA
|
||||
|
||||
addHook = { classDescriptor ->
|
||||
addInstruction(
|
||||
returnLinearLayoutIndex,
|
||||
"invoke-static { v$linearLayoutRegister }, " +
|
||||
"${classDescriptor}->" +
|
||||
"onFlyoutMenuCreate(Landroid/widget/LinearLayout;)V"
|
||||
)
|
||||
}
|
||||
}
|
||||
} ?: throw CreateBottomSheetFingerprint.exception
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
internal lateinit var addHook: (String) -> Unit
|
||||
private set
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package app.revanced.patches.youtube.misc.bottomsheet.hook.patch
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
|
||||
@DependsOn([ResourceMappingPatch::class])
|
||||
class BottomSheetHookResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
bottomSheetMargins = ResourceMappingPatch.resourceMappings.find { it.name == "bottom_sheet_margins" }?.id
|
||||
?: throw PatchException("Could not find resource")
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
var bottomSheetMargins = -1L
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package app.revanced.patches.youtube.misc.recyclerviewtree.hook.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
object RecyclerViewTreeObserverFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
opcodes = listOf(
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IGET_BOOLEAN,
|
||||
Opcode.IF_NEZ,
|
||||
Opcode.INVOKE_VIRTUAL_RANGE,
|
||||
Opcode.MOVE_RESULT_OBJECT
|
||||
),
|
||||
strings = listOf("LithoRVSLCBinder")
|
||||
)
|
||||
@@ -0,0 +1,37 @@
|
||||
package app.revanced.patches.youtube.misc.recyclerviewtree.hook.patch
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.recyclerviewtree.hook.fingerprints.RecyclerViewTreeObserverFingerprint
|
||||
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
class RecyclerViewTreeHookPatch : BytecodePatch(
|
||||
listOf(RecyclerViewTreeObserverFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
RecyclerViewTreeObserverFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
val insertIndex = it.scanResult.patternScanResult!!.startIndex + 5
|
||||
val recyclerViewParameter = 2
|
||||
|
||||
addHook = { classDescriptor ->
|
||||
addInstruction(
|
||||
insertIndex,
|
||||
"invoke-static/range { p$recyclerViewParameter .. p$recyclerViewParameter }, $classDescriptor->onFlyoutMenuCreate(Landroid/support/v7/widget/RecyclerView;)V"
|
||||
)
|
||||
}
|
||||
}
|
||||
} ?: throw RecyclerViewTreeObserverFingerprint.exception
|
||||
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
internal lateinit var addHook: (String) -> Unit
|
||||
private set
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMut
|
||||
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.TextPreference
|
||||
import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookPatch
|
||||
import app.revanced.patches.youtube.misc.recyclerviewtree.hook.patch.RecyclerViewTreeHookPatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||
@@ -32,7 +32,7 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableField
|
||||
|
||||
@Name("Custom playback speed")
|
||||
@Description("Adds custom playback speed options.")
|
||||
@DependsOn([IntegrationsPatch::class, LithoFilterPatch::class, SettingsPatch::class, BottomSheetHookPatch::class])
|
||||
@DependsOn([IntegrationsPatch::class, LithoFilterPatch::class, SettingsPatch::class, RecyclerViewTreeHookPatch::class])
|
||||
class CustomPlaybackSpeedPatch : BytecodePatch(
|
||||
listOf(
|
||||
SpeedArrayGeneratorFingerprint,
|
||||
@@ -116,20 +116,19 @@ class CustomPlaybackSpeedPatch : BytecodePatch(
|
||||
val limiterMinConstDestination = (limiterMinConst as OneRegisterInstruction).registerA
|
||||
val limiterMaxConstDestination = (limiterMaxConst as OneRegisterInstruction).registerA
|
||||
|
||||
// edit: alternatively this might work by overriding with fixed values such as 0.1x and 10x
|
||||
limiterMethod.replaceInstruction(
|
||||
limiterMinConstIndex,
|
||||
"sget v$limiterMinConstDestination, $INTEGRATIONS_CLASS_DESCRIPTOR->minPlaybackSpeed:F"
|
||||
"const/high16 v$limiterMinConstDestination, 0x0"
|
||||
)
|
||||
limiterMethod.replaceInstruction(
|
||||
limiterMaxConstIndex,
|
||||
"sget v$limiterMaxConstDestination, $INTEGRATIONS_CLASS_DESCRIPTOR->maxPlaybackSpeed:F"
|
||||
"const/high16 v$limiterMaxConstDestination, 0x41200000 # 10.0f"
|
||||
)
|
||||
|
||||
// region Force old video quality menu.
|
||||
// This is necessary, because there is no known way of adding custom playback speeds to the new menu.
|
||||
|
||||
BottomSheetHookPatch.addHook(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
RecyclerViewTreeHookPatch.addHook(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
|
||||
// Required to check if the playback speed menu is currently shown.
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
@@ -8,9 +8,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.youtube.misc.bottomsheet.hook.patch.BottomSheetHookPatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
|
||||
import app.revanced.patches.youtube.misc.recyclerviewtree.hook.patch.RecyclerViewTreeHookPatch
|
||||
import app.revanced.patches.youtube.video.videoqualitymenu.annotations.OldVideoQualityMenuCompatibility
|
||||
import app.revanced.patches.youtube.video.videoqualitymenu.fingerprints.VideoQualityMenuViewInflateFingerprint
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@@ -20,7 +20,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
IntegrationsPatch::class,
|
||||
OldVideoQualityMenuResourcePatch::class,
|
||||
LithoFilterPatch::class,
|
||||
BottomSheetHookPatch::class
|
||||
RecyclerViewTreeHookPatch::class
|
||||
])
|
||||
@Name("Old video quality menu")
|
||||
@Description("Shows the old video quality with the advanced video quality options instead of the new one.")
|
||||
@@ -30,6 +30,7 @@ class OldVideoQualityMenuPatch : BytecodePatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// region Patch for the old type of the video quality menu.
|
||||
// Only used when spoofing to old app version.
|
||||
|
||||
VideoQualityMenuViewInflateFingerprint.result?.let {
|
||||
it.mutableMethod.apply {
|
||||
@@ -49,7 +50,7 @@ class OldVideoQualityMenuPatch : BytecodePatch(
|
||||
|
||||
// region Patch for the new type of the video quality menu.
|
||||
|
||||
BottomSheetHookPatch.addHook(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
RecyclerViewTreeHookPatch.addHook(INTEGRATIONS_CLASS_DESCRIPTOR)
|
||||
|
||||
// Required to check if the video quality menu is currently shown in order to click on the "Advanced" item.
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
Reference in New Issue
Block a user