Compare commits

..

6 Commits

Author SHA1 Message Date
semantic-release-bot
1aa056d53f chore(release): 2.162.0-dev.2 [skip ci]
# [2.162.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.162.0-dev.1...v2.162.0-dev.2) (2023-02-11)

### Bug Fixes

* **youtube/general-ads:** use better description for switch ([95be457](95be457590))
2023-02-11 15:29:54 +00:00
oSumAtrIX
95be457590 fix(youtube/general-ads): use better description for switch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-11 16:28:10 +01:00
semantic-release-bot
42bd205e30 chore(release): 2.162.0-dev.1 [skip ci]
# [2.162.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.161.1...v2.162.0-dev.1) (2023-02-11)

### Features

* **yuka:** `unlock-premium` patch ([#1608](https://github.com/revanced/revanced-patches/issues/1608)) ([daa7e52](daa7e5270c))
2023-02-11 00:46:53 +00:00
nik2143
daa7e5270c feat(yuka): unlock-premium patch (#1608)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-11 01:44:47 +01:00
semantic-release-bot
9d0e8c18f0 chore(release): 2.161.1 [skip ci]
## [2.161.1](https://github.com/revanced/revanced-patches/compare/v2.161.0...v2.161.1) (2023-02-11)

### Bug Fixes

* **youtube/minimized-playback:** disable when playing shorts ([36bfe60](36bfe60850))
2023-02-11 00:36:39 +00:00
oSumAtrIX
6fef48141c chore: merge branch dev to main (#1607) 2023-02-11 01:34:49 +01:00
9 changed files with 112 additions and 5 deletions

View File

@@ -1,3 +1,24 @@
# [2.162.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.162.0-dev.1...v2.162.0-dev.2) (2023-02-11)
### Bug Fixes
* **youtube/general-ads:** use better description for switch ([d33f959](https://github.com/revanced/revanced-patches/commit/d33f9597529d63014dd42fc6fe1e84b76831e0f3))
# [2.162.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.161.1...v2.162.0-dev.1) (2023-02-11)
### Features
* **yuka:** `unlock-premium` patch ([#1608](https://github.com/revanced/revanced-patches/issues/1608)) ([71e1594](https://github.com/revanced/revanced-patches/commit/71e15945c1b4019eaa2ff214b4efbfc6b1a67376))
## [2.161.1](https://github.com/revanced/revanced-patches/compare/v2.161.0...v2.161.1) (2023-02-11)
### Bug Fixes
* **youtube/minimized-playback:** disable when playing shorts ([cd48030](https://github.com/revanced/revanced-patches/commit/cd48030cada3666d0159ad25711c20045a8a70c7))
## [2.161.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.161.0...v2.161.1-dev.1) (2023-02-11)

View File

@@ -254,6 +254,14 @@ The official Patch bundle provided by ReVanced and the community.
| `remove-broadcasts-restriction` | Enables starting/stopping NetGuard via broadcasts. | all |
</details>
### [📦 `io.yuka.android`](https://play.google.com/store/apps/details?id=io.yuka.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-premium` | Unlocks premium features. | all |
</details>
### [📦 `com.teslacoilsw.launcher`](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher)
<details>

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.161.1-dev.1
version = 2.162.0-dev.2

File diff suppressed because one or more lines are too long

View File

@@ -89,10 +89,10 @@ class GeneralAdsResourcePatch : ResourcePatch {
),
SwitchPreference(
"revanced_adremover_view_products",
StringResource("revanced_adremover_view_products_title", "Hide pill to view products"),
StringResource("revanced_adremover_view_products_title", "Hide banner to view products"),
true,
StringResource("revanced_adremover_view_products_summary_on", "Pill is hidden"),
StringResource("revanced_adremover_view_products_summary_off", "Pill is shown")
StringResource("revanced_adremover_view_products_summary_on", "Banner is hidden"),
StringResource("revanced_adremover_view_products_summary_off", "Banner is shown")
),
SwitchPreference(
"revanced_adremover_movie",

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.yuka.misc.unlockpremium.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("io.yuka.android")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class UnlockPremiumCompatibility

View File

@@ -0,0 +1,15 @@
package app.revanced.patches.yuka.misc.unlockpremium.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object IsPremiumFingerprint : MethodFingerprint(
returnType = "Z",
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
opcodes = listOf(
Opcode.IGET_BOOLEAN,
Opcode.RETURN,
)
)

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.yuka.misc.unlockpremium.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object YukaUserConstructorFingerprint : MethodFingerprint(
returnType = "V",
access = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
strings = listOf(
"premiumProvider"
)
)

View File

@@ -0,0 +1,41 @@
package app.revanced.patches.yuka.misc.unlockpremium.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.addInstructions
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.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.yuka.misc.unlockpremium.annotations.UnlockPremiumCompatibility
import app.revanced.patches.yuka.misc.unlockpremium.fingerprints.IsPremiumFingerprint
import app.revanced.patches.yuka.misc.unlockpremium.fingerprints.YukaUserConstructorFingerprint
@Patch
@Name("unlock-premium")
@Description("Unlocks premium features.")
@UnlockPremiumCompatibility
@Version("0.0.1")
class UnlockPremiunPatch : BytecodePatch(
listOf(
YukaUserConstructorFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
IsPremiumFingerprint.resolve(context,YukaUserConstructorFingerprint.result!!.classDef)
val method = IsPremiumFingerprint.result!!.mutableMethod
method.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}