Skip to content

Commit

Permalink
feat(YouTube): Support versions 18.48.39, 18.49.37 and 19.01.34 (
Browse files Browse the repository at this point in the history
…ReVanced#2551)

Co-authored-by: LisoUseInAIKyrios <[email protected]>
  • Loading branch information
oSumAtrIX and LisoUseInAIKyrios authored Jan 16, 2024
1 parent 57908db commit a938e73
Show file tree
Hide file tree
Showing 71 changed files with 362 additions and 260 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube",
[
"com.google.android.youtube", [
"18.32.39",
"18.37.36",
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube",
[
"18.32.39",
"18.37.36",
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"com.google.android.youtube", [
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ import app.revanced.patches.youtube.video.information.VideoInformationPatch
],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube",
[
"18.32.39",
"18.37.36",
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"com.google.android.youtube", [
"18.48.39",
"18.49.37",
"19.01.34"
]
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
[
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
[
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package app.revanced.patches.youtube.interaction.swipecontrols

import app.revanced.util.transformMethods
import app.revanced.util.traverseClassHierarchy
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
Expand All @@ -10,7 +8,9 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMu
import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.SwipeControlsHostActivityFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
import app.revanced.patches.youtube.shared.fingerprints.WatchWhileActivityFingerprint
import app.revanced.patches.youtube.shared.fingerprints.MainActivityFingerprint
import app.revanced.util.transformMethods
import app.revanced.util.traverseClassHierarchy
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.immutable.ImmutableMethod

Expand All @@ -31,28 +31,30 @@ import com.android.tools.smali.dexlib2.immutable.ImmutableMethod
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
)
@Suppress("unused")
object SwipeControlsBytecodePatch : BytecodePatch(
setOf(
WatchWhileActivityFingerprint,
MainActivityFingerprint,
SwipeControlsHostActivityFingerprint
)
) {
override fun execute(context: BytecodeContext) {
val wrapperClass = SwipeControlsHostActivityFingerprint.result!!.mutableClass
val targetClass = WatchWhileActivityFingerprint.result!!.mutableClass
val targetClass = MainActivityFingerprint.result!!.mutableClass

// inject the wrapper class from integrations into the class hierarchy of WatchWhileActivity
// Inject the wrapper class from integrations into the class hierarchy of MainActivity.
wrapperClass.setSuperClass(targetClass.superclass)
targetClass.setSuperClass(wrapperClass.type)

// ensure all classes and methods in the hierarchy are non-final, so we can override them in integrations
// Ensure all classes and methods in the hierarchy are non-final, so we can override them in integrations.
context.traverseClassHierarchy(targetClass) {
accessFlags = accessFlags and AccessFlags.FINAL.value.inv()
transformMethods {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ import com.android.tools.smali.dexlib2.iface.reference.MethodReference
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ import com.android.tools.smali.dexlib2.Opcode
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction3rc
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction21c
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
"18.38.44",
"18.43.45",
"18.44.41",
"18.45.41",
"18.45.43"
"18.45.43",
"18.48.39",
"18.49.37",
"19.01.34"
]
)
]
Expand Down
Loading

0 comments on commit a938e73

Please sign in to comment.