Unofficial 20.45.32
This commit is contained in:
parent
03ce5711de
commit
88352d8774
6 changed files with 61 additions and 35 deletions
|
|
@ -1660,6 +1660,7 @@ public final class app/revanced/patches/youtube/misc/playservice/VersionCheckPat
|
||||||
public static final fun is_20_37_or_greater ()Z
|
public static final fun is_20_37_or_greater ()Z
|
||||||
public static final fun is_20_39_or_greater ()Z
|
public static final fun is_20_39_or_greater ()Z
|
||||||
public static final fun is_20_41_or_greater ()Z
|
public static final fun is_20_41_or_greater ()Z
|
||||||
|
public static final fun is_20_45_or_greater ()Z
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class app/revanced/patches/youtube/misc/privacy/SanitizeSharingLinksPatchKt {
|
public final class app/revanced/patches/youtube/misc/privacy/SanitizeSharingLinksPatchKt {
|
||||||
|
|
|
||||||
|
|
@ -10,20 +10,6 @@ import app.revanced.patches.shared.misc.mapping.resourceLiteral
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal val legacyRenderBottomNavigationBarParentFingerprint by fingerprint {
|
|
||||||
parameters(
|
|
||||||
"I",
|
|
||||||
"I",
|
|
||||||
"L",
|
|
||||||
"L",
|
|
||||||
"J",
|
|
||||||
"L",
|
|
||||||
)
|
|
||||||
instructions(
|
|
||||||
string("aa")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
internal val shortsBottomBarContainerFingerprint by fingerprint {
|
internal val shortsBottomBarContainerFingerprint by fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
returns("V")
|
returns("V")
|
||||||
|
|
@ -36,28 +22,49 @@ internal val shortsBottomBarContainerFingerprint by fingerprint {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19.41 to 20.44.
|
||||||
|
*/
|
||||||
internal val renderBottomNavigationBarFingerprint by fingerprint {
|
internal val renderBottomNavigationBarFingerprint by fingerprint {
|
||||||
returns("V")
|
returns("V")
|
||||||
parameters("Ljava/lang/String;")
|
parameters("Ljava/lang/String;")
|
||||||
opcodes(
|
instructions(
|
||||||
Opcode.IGET_OBJECT,
|
opcode(Opcode.IGET_OBJECT, maxAfter = 0),
|
||||||
Opcode.MONITOR_ENTER,
|
opcode(Opcode.MONITOR_ENTER, maxAfter = 0),
|
||||||
Opcode.IGET_OBJECT,
|
opcode(Opcode.IGET_OBJECT, maxAfter = 0),
|
||||||
Opcode.IF_EQZ,
|
opcode(Opcode.IF_EQZ, maxAfter = 0),
|
||||||
Opcode.INVOKE_INTERFACE,
|
opcode(Opcode.INVOKE_INTERFACE, maxAfter = 0),
|
||||||
Opcode.MONITOR_EXIT,
|
|
||||||
Opcode.RETURN_VOID,
|
opcode(Opcode.MONITOR_EXIT),
|
||||||
Opcode.MOVE_EXCEPTION,
|
opcode(Opcode.RETURN_VOID, maxAfter = 0),
|
||||||
Opcode.MONITOR_EXIT,
|
opcode(Opcode.MOVE_EXCEPTION, maxAfter = 0),
|
||||||
Opcode.THROW,
|
opcode(Opcode.MONITOR_EXIT, maxAfter = 0),
|
||||||
|
opcode(Opcode.THROW, maxAfter = 0),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identical to [legacyRenderBottomNavigationBarParentFingerprint]
|
* Less than 19.41.
|
||||||
|
*/
|
||||||
|
internal val legacyRenderBottomNavigationBarLegacyParentFingerprint by fingerprint {
|
||||||
|
parameters(
|
||||||
|
"I",
|
||||||
|
"I",
|
||||||
|
"L",
|
||||||
|
"L",
|
||||||
|
"J",
|
||||||
|
"L",
|
||||||
|
)
|
||||||
|
instructions(
|
||||||
|
string("aa")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Identical to [legacyRenderBottomNavigationBarLegacyParentFingerprint]
|
||||||
* except this has an extra parameter.
|
* except this has an extra parameter.
|
||||||
*/
|
*/
|
||||||
internal val renderBottomNavigationBarParentFingerprint by fingerprint {
|
internal val renderBottomNavigationBarLegacy1941ParentFingerprint by fingerprint {
|
||||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
parameters(
|
parameters(
|
||||||
"I",
|
"I",
|
||||||
|
|
@ -73,6 +80,19 @@ internal val renderBottomNavigationBarParentFingerprint by fingerprint {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal val renderBottomNavigationBarParentFingerprint by fingerprint {
|
||||||
|
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||||
|
returns("[Ljava/lang/Class;")
|
||||||
|
parameters(
|
||||||
|
"Ljava/lang/Class;",
|
||||||
|
"Ljava/lang/Object;",
|
||||||
|
"I"
|
||||||
|
)
|
||||||
|
instructions(
|
||||||
|
string("RPCAC")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
internal val setPivotBarVisibilityFingerprint by fingerprint {
|
internal val setPivotBarVisibilityFingerprint by fingerprint {
|
||||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||||
returns("V")
|
returns("V")
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import app.revanced.patches.youtube.misc.navigation.navigationBarHookPatch
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_19_41_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_19_41_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_20_07_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_20_07_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.is_20_22_or_greater
|
import app.revanced.patches.youtube.misc.playservice.is_20_22_or_greater
|
||||||
|
import app.revanced.patches.youtube.misc.playservice.is_20_45_or_greater
|
||||||
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
import app.revanced.patches.youtube.misc.playservice.versionCheckPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
@ -27,7 +28,6 @@ import app.revanced.util.findElementByAttributeValueOrThrow
|
||||||
import app.revanced.util.forEachLiteralValueInstruction
|
import app.revanced.util.forEachLiteralValueInstruction
|
||||||
import app.revanced.util.getReference
|
import app.revanced.util.getReference
|
||||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||||
import app.revanced.util.indexOfFirstLiteralInstruction
|
|
||||||
import app.revanced.util.removeFromParent
|
import app.revanced.util.removeFromParent
|
||||||
import app.revanced.util.returnLate
|
import app.revanced.util.returnLate
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
@ -224,11 +224,13 @@ val hideShortsComponentsPatch = bytecodePatch(
|
||||||
|
|
||||||
// Hook to hide the shared navigation bar when the Shorts player is opened.
|
// Hook to hide the shared navigation bar when the Shorts player is opened.
|
||||||
renderBottomNavigationBarFingerprint.match(
|
renderBottomNavigationBarFingerprint.match(
|
||||||
if (is_19_41_or_greater) {
|
(if (is_20_45_or_greater) {
|
||||||
renderBottomNavigationBarParentFingerprint
|
renderBottomNavigationBarParentFingerprint
|
||||||
|
} else if (is_19_41_or_greater) {
|
||||||
|
renderBottomNavigationBarLegacy1941ParentFingerprint
|
||||||
} else {
|
} else {
|
||||||
legacyRenderBottomNavigationBarParentFingerprint
|
legacyRenderBottomNavigationBarLegacyParentFingerprint
|
||||||
}.originalClassDef,
|
}).originalClassDef
|
||||||
).method.addInstruction(
|
).method.addInstruction(
|
||||||
0,
|
0,
|
||||||
"invoke-static { p1 }, $FILTER_CLASS_DESCRIPTOR->hideNavigationBar(Ljava/lang/String;)V",
|
"invoke-static { p1 }, $FILTER_CLASS_DESCRIPTOR->hideNavigationBar(Ljava/lang/String;)V",
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
package app.revanced.patches.youtube.layout.panels.popup
|
package app.revanced.patches.youtube.layout.panels.popup
|
||||||
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import app.revanced.patcher.fingerprint
|
import app.revanced.patcher.fingerprint
|
||||||
|
|
||||||
internal val engagementPanelControllerFingerprint by fingerprint {
|
internal val engagementPanelControllerFingerprint by fingerprint {
|
||||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
|
||||||
returns("L")
|
returns("L")
|
||||||
strings(
|
strings(
|
||||||
"EngagementPanelController: cannot show EngagementPanel before EngagementPanelController.init() has been called.",
|
"EngagementPanelController: cannot show EngagementPanel before EngagementPanelController.init() has been called.",
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||||
|
|
||||||
|
private const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/youtube/patches/DisablePlayerPopupPanelsPatch;"
|
||||||
|
|
||||||
val playerPopupPanelsPatch = bytecodePatch(
|
val playerPopupPanelsPatch = bytecodePatch(
|
||||||
name = "Disable player popup panels",
|
name = "Disable player popup panels",
|
||||||
description = "Adds an option to disable panels (such as live chat) from opening automatically.",
|
description = "Adds an option to disable panels (such as live chat) from opening automatically.",
|
||||||
|
|
@ -37,7 +39,7 @@ val playerPopupPanelsPatch = bytecodePatch(
|
||||||
engagementPanelControllerFingerprint.method.addInstructionsWithLabels(
|
engagementPanelControllerFingerprint.method.addInstructionsWithLabels(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static { }, Lapp/revanced/extension/youtube/patches/DisablePlayerPopupPanelsPatch;->disablePlayerPopupPanels()Z
|
invoke-static { }, $EXTENSION_CLASS_DESCRIPTOR->disablePlayerPopupPanels()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
if-eqz v0, :player_popup_panels
|
if-eqz v0, :player_popup_panels
|
||||||
if-eqz p4, :player_popup_panels
|
if-eqz p4, :player_popup_panels
|
||||||
|
|
@ -45,7 +47,7 @@ val playerPopupPanelsPatch = bytecodePatch(
|
||||||
return-object v0
|
return-object v0
|
||||||
:player_popup_panels
|
:player_popup_panels
|
||||||
nop
|
nop
|
||||||
""",
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,8 @@ var is_20_39_or_greater : Boolean by Delegates.notNull()
|
||||||
private set
|
private set
|
||||||
var is_20_41_or_greater : Boolean by Delegates.notNull()
|
var is_20_41_or_greater : Boolean by Delegates.notNull()
|
||||||
private set
|
private set
|
||||||
|
var is_20_45_or_greater : Boolean by Delegates.notNull()
|
||||||
|
private set
|
||||||
|
|
||||||
val versionCheckPatch = resourcePatch(
|
val versionCheckPatch = resourcePatch(
|
||||||
description = "Uses the Play Store service version to find the major/minor version of the YouTube target app.",
|
description = "Uses the Play Store service version to find the major/minor version of the YouTube target app.",
|
||||||
|
|
@ -139,5 +141,6 @@ val versionCheckPatch = resourcePatch(
|
||||||
is_20_37_or_greater = 253805000 <= playStoreServicesVersion
|
is_20_37_or_greater = 253805000 <= playStoreServicesVersion
|
||||||
is_20_39_or_greater = 253980000 <= playStoreServicesVersion
|
is_20_39_or_greater = 253980000 <= playStoreServicesVersion
|
||||||
is_20_41_or_greater = 254205000 <= playStoreServicesVersion
|
is_20_41_or_greater = 254205000 <= playStoreServicesVersion
|
||||||
|
is_20_45_or_greater = 254605000 <= playStoreServicesVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue