mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-03 16:23:03 +01:00
chore: merge branch dev
to main
(#1286)
This commit is contained in:
commit
7c56dc7b88
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,3 +1,16 @@
|
||||
# [2.145.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0-dev.1) (2022-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **tiktok/settings:** make compatible with newer versions ([c88740d](https://github.com/revanced/revanced-patches/commit/c88740dc2bf040747d9704d5bed52a7b533c22d6))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **crunchyroll:** remove `enable-downloads` patch ([2ac1546](https://github.com/revanced/revanced-patches/commit/2ac15460f5734fc2c6d2d78d34083a8e6b2f7012))
|
||||
* **youtube-music:** bump compatibility to 5.36.51 ([c4a3099](https://github.com/revanced/revanced-patches/commit/c4a3099c1ca39431fba9beb94cc2b43e260561d9))
|
||||
|
||||
# [2.144.0](https://github.com/revanced/revanced-patches/compare/v2.143.0...v2.144.0) (2022-12-15)
|
||||
|
||||
|
||||
|
32
README.md
32
README.md
@ -63,16 +63,16 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `background-play` | Enables playing music in the background. | 5.34.51 |
|
||||
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.34.51 |
|
||||
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.34.51 |
|
||||
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.34.51 |
|
||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.34.51 |
|
||||
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.34.51 |
|
||||
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.34.51 |
|
||||
| `music-video-ads` | Removes ads in the music player. | 5.34.51 |
|
||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.34.51 |
|
||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.34.51 |
|
||||
| `background-play` | Enables playing music in the background. | 5.36.51 |
|
||||
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.36.51 |
|
||||
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.36.51 |
|
||||
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.36.51 |
|
||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.36.51 |
|
||||
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.36.51 |
|
||||
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.36.51 |
|
||||
| `music-video-ads` | Removes ads in the music player. | 5.36.51 |
|
||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.36.51 |
|
||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.36.51 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill)
|
||||
@ -86,7 +86,7 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `fix-google-login` | Allows logging in with a Google account. | all |
|
||||
| `hide-ads` | Removes ads from TikTok. | all |
|
||||
| `playback-speed` | Enables the playback speed option for all videos. | all |
|
||||
| `settings` | Adds settings for ReVanced to TikTok. | all |
|
||||
| `settings` | Adds ReVanced settings to TikTok. | all |
|
||||
| `show-seekbar` | Shows progress bar for all video. | all |
|
||||
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
|
||||
</details>
|
||||
@ -102,7 +102,7 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `fix-google-login` | Allows logging in with a Google account. | all |
|
||||
| `hide-ads` | Removes ads from TikTok. | all |
|
||||
| `playback-speed` | Enables the playback speed option for all videos. | all |
|
||||
| `settings` | Adds settings for ReVanced to TikTok. | all |
|
||||
| `settings` | Adds ReVanced settings to TikTok. | all |
|
||||
| `show-seekbar` | Shows progress bar for all video. | all |
|
||||
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
|
||||
</details>
|
||||
@ -165,14 +165,6 @@ The official Patch bundle provided by ReVanced and the community.
|
||||
| `disable-ads` | Disables ads in HexEditor. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.crunchyroll.crunchyroid`](https://play.google.com/store/apps/details?id=com.crunchyroll.crunchyroid)
|
||||
<details>
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `enable-downloads` | Enables downloads for Crunchyroll. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `org.citra.citra_emu`](https://play.google.com/store/apps/details?id=org.citra.citra_emu)
|
||||
<details>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.144.0
|
||||
version = 2.145.0-dev.1
|
||||
|
@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.crunchyroll.downloads.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package("com.crunchyroll.crunchyroid")
|
||||
]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class DownloadsCompatibility
|
@ -1,23 +0,0 @@
|
||||
package app.revanced.patches.crunchyroll.downloads.fingerprints
|
||||
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@Name("downloads-fingerprint")
|
||||
@DownloadsCompatibility
|
||||
@Version("0.0.1")
|
||||
object DownloadsFingerprint : MethodFingerprint(
|
||||
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, null,
|
||||
opcodes = listOf(
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.RETURN
|
||||
),
|
||||
strings = listOf("offline_viewing"),
|
||||
)
|
@ -1,37 +0,0 @@
|
||||
package app.revanced.patches.crunchyroll.downloads.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
|
||||
import app.revanced.patches.crunchyroll.downloads.fingerprints.DownloadsFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("enable-downloads")
|
||||
@Description("Enables downloads for Crunchyroll.")
|
||||
@DownloadsCompatibility
|
||||
@Version("0.0.1")
|
||||
class DownloadsPatch : BytecodePatch(
|
||||
listOf(
|
||||
DownloadsFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
with(DownloadsFingerprint.result!!.mutableMethod) {
|
||||
val index = implementation!!.instructions.lastIndex
|
||||
replaceInstruction(
|
||||
index - 1,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
"""
|
||||
)
|
||||
}
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -19,7 +19,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -22,7 +22,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51"
|
||||
"5.34.51",
|
||||
"5.36.51"
|
||||
)
|
||||
)]
|
||||
)
|
||||
|
@ -1,12 +0,0 @@
|
||||
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object AboutOnClickMethodFingerprint : MethodFingerprint(
|
||||
strings = listOf(
|
||||
"//setting/about",
|
||||
"enter_from",
|
||||
"settings_page",
|
||||
"enter_settings_about"
|
||||
)
|
||||
)
|
@ -0,0 +1,39 @@
|
||||
package app.revanced.patches.tiktok.misc.settings.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
@FuzzyPatternScanMethod(4)
|
||||
object AboutViewFingerprint : MethodFingerprint(
|
||||
opcodes = listOf(
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.MOVE,
|
||||
Opcode.INVOKE_DIRECT_RANGE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.CONST_4,
|
||||
Opcode.CONST_STRING,
|
||||
Opcode.INVOKE_DIRECT_RANGE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST,
|
||||
Opcode.SGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
Opcode.IF_EQZ,
|
||||
Opcode.CONST
|
||||
)
|
||||
)
|
@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.tiktok.misc.settings.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@ -7,6 +8,7 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.extensions.instruction
|
||||
import app.revanced.patcher.extensions.replaceInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
@ -15,13 +17,12 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.tiktok.misc.settings.annotations.SettingsCompatibility
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AboutOnClickMethodFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AboutViewFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityOnCreateFingerprint
|
||||
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import org.jf.dexlib2.iface.reference.StringReference
|
||||
import org.jf.dexlib2.iface.reference.TypeReference
|
||||
@ -29,17 +30,19 @@ import org.jf.dexlib2.iface.reference.TypeReference
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class])
|
||||
@Name("settings")
|
||||
@Description("Adds settings for ReVanced to TikTok.")
|
||||
@Description("Adds ReVanced settings to TikTok.")
|
||||
@SettingsCompatibility
|
||||
@Version("0.0.1")
|
||||
class SettingsPatch : BytecodePatch(
|
||||
listOf(
|
||||
AdPersonalizationActivityOnCreateFingerprint,
|
||||
SettingsOnViewCreatedFingerprint,
|
||||
AboutOnClickMethodFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsOnViewCreatedFingerprint.result?.let {
|
||||
AboutViewFingerprint.resolve(context, it.method, it.classDef)
|
||||
}
|
||||
// Patch Settings UI to add 'Revanced Settings'.
|
||||
val targetIndexes = findOptionsOnClickIndex()
|
||||
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
|
||||
@ -72,29 +75,21 @@ class SettingsPatch : BytecodePatch(
|
||||
|
||||
private fun findOptionsOnClickIndex(): IntArray {
|
||||
val results = IntArray(2)
|
||||
var found = 0
|
||||
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
|
||||
for ((index, instruction) in implementation!!.instructions.withIndex()) {
|
||||
SettingsOnViewCreatedFingerprint.result?.apply {
|
||||
for ((index, instruction) in mutableMethod.implementation!!.instructions.withIndex()) {
|
||||
// Old UI settings option to replace to 'Revanced Settings'
|
||||
if (instruction.opcode == Opcode.CONST_STRING) {
|
||||
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
||||
if (string == "copyright_policy") {
|
||||
results[0] = index - 2
|
||||
found++
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// New UI settings option to replace to 'Revanced Settings'
|
||||
if (instruction.opcode == Opcode.NEW_INSTANCE) {
|
||||
val onClickClass = ((instruction as Instruction21c).reference as TypeReference).type
|
||||
if (onClickClass == AboutOnClickMethodFingerprint.result!!.mutableMethod.definingClass) {
|
||||
results[1] = index
|
||||
found++
|
||||
}
|
||||
}
|
||||
if (found > 1) break
|
||||
}
|
||||
}
|
||||
|
||||
// New UI settings option to replace to 'Revanced Settings'
|
||||
results[1] = AboutViewFingerprint.result!!.scanResult.patternScanResult!!.startIndex
|
||||
} ?: throw SettingsOnViewCreatedFingerprint.toErrorResult()
|
||||
return results
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user