-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(YouTube - Spoof client): Fix background playback issue with lives…
…tream on iOS clients
- Loading branch information
1 parent
f0cefa8
commit 0ef9a65
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ches/youtube/utils/fix/client/fingerprints/BackgroundPlaybackPlayerResponseFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package app.revanced.patches.youtube.utils.fix.client.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
/** | ||
* On iOS clients, this method always returns false in live streams. | ||
* | ||
* This fingerprint seems to break easily because there are many [Opcode] patterns, but it is not. | ||
* This fingerprint has been tested on all versions from YouTube 17.34.36 to YouTube 19.29.42. | ||
*/ | ||
internal object BackgroundPlaybackPlayerResponseFingerprint : MethodFingerprint( | ||
returnType = "Z", | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, | ||
parameters = listOf("Lcom/google/android/libraries/youtube/innertube/model/player/PlayerResponseModel;"), | ||
opcodes = listOf( | ||
Opcode.CONST_4, | ||
Opcode.IF_EQZ, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.IF_EQZ, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.INVOKE_STATIC, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_EQZ, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT, | ||
Opcode.CONST_4, | ||
Opcode.IF_EQZ, | ||
Opcode.INVOKE_INTERFACE, | ||
Opcode.MOVE_RESULT_OBJECT, | ||
Opcode.INVOKE_VIRTUAL, | ||
Opcode.MOVE_RESULT, | ||
Opcode.IF_NEZ, | ||
Opcode.GOTO, | ||
Opcode.RETURN, | ||
null, // Opcode.CONST_4 or Opcode.MOVE | ||
Opcode.RETURN, | ||
), | ||
) |