Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(YouTube - Spoof client): Restore livestream audio only playback with iOS spoofing #3504

Conversation

LisoUseInAIKyrios
Copy link
Contributor

@LisoUseInAIKyrios LisoUseInAIKyrios commented Aug 4, 2024

Fixes background audio only playback of livestreams when spoofing to iOS

Integration changes

… fixed. HDR is sometimes available if device supports AV1 hardware decoding.
@0xrxL
Copy link

0xrxL commented Aug 4, 2024

So in theory, once the history bug will be finally fixed, TestSuite spoof will be removed?

@LisoUseInAIKyrios
Copy link
Contributor Author

I assume you mean Android VR since TestSuite is already removed.

It might be useful to have one other spoof if iOS goes down suddenly.

@LisoUseInAIKyrios
Copy link
Contributor Author

The fingerprints here need some adjusting, as this doesn't work on all old versions.

@inotia00
Copy link

inotia00 commented Aug 4, 2024

The fingerprints here need some adjusting, as this doesn't work on all old versions.

See the fingerprint in this commit
(it's the same as 'PlayerResponseModelAudioOnlyPlaybackFingerprint' in this PR)

The fix also requires a 'BackgroundPlaybackPatch'
(See this comments)

@0xrxL
Copy link

0xrxL commented Aug 4, 2024

The fingerprints here need some adjusting, as this doesn't work on all old versions.

You can resolve it by find these two strings:

  • Failed to start foreground priority player Service due to Android S+ restrictions.
  • About to stop background service while in a pending state.

on the same class you'll find a synchronized method, that contain a reference to the targeted boolean method to patch.

@LisoUseInAIKyrios
Copy link
Contributor Author

The patched method has been moved many times. The opcodes works and is simpler than using multiple fingerprints to resolve a calling method and then walking to the target.

@LisoUseInAIKyrios
Copy link
Contributor Author

The fix also requires a 'BackgroundPlaybackPatch'

Is background playback patch really needed? With a premium account and excluding background playback patch, livestream audio only background play is working for me. And if a user without premium excludeds background play then playback won't work outside the app so it's not a concern there.

@inotia00
Copy link

inotia00 commented Aug 4, 2024

The fix also requires a 'BackgroundPlaybackPatch'

Is background playback patch really needed? With a premium account and excluding background playback patch, livestream audio only background play is working for me. And if a user without premium excludeds background play then playback won't work outside the app so it's not a concern there.

The current PR always enables background playback if the Spoof client setting is turned on, even if the Remove background playback restrictions patch is excluded (even for non-Premium accounts)

The unintended behavior I'm talking about is:

  1. Exclude Remove background playback restrictions patch, and include GmsCore support patch
  2. Spoof client patch always enables background playback
  3. In non-Premium accounts, if the Remove background playback restrictions patch is not included, background playback settings are not added, so there is no way to turn off background playback

So I thought it would be appropriate to add the Remove background playback restrictions patch as a dependency

@LisoUseInAIKyrios
Copy link
Contributor Author

Ok I see that background play is partially enabled by this PR. Background play of audio is forced, but background video does not work (for non premium accounts). So yeah the simplest is to add background playback patch as a dependency.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fix(YouTube - Spoof client): Allow livestream audio only background playback with iOS spoofing fix(YouTube - Spoof client): Allow livestream audio only playback with iOS spoofing Aug 4, 2024
@oSumAtrIX oSumAtrIX changed the title fix(YouTube - Spoof client): Allow livestream audio only playback with iOS spoofing fix(YouTube - Spoof client): Restore livestream audio only playback with iOS spoofing Aug 4, 2024
@oSumAtrIX oSumAtrIX merged commit 90d3288 into ReVanced:dev Aug 4, 2024
2 checks passed
@LisoUseInAIKyrios LisoUseInAIKyrios deleted the fix/spoof_client_background_livestream branch August 4, 2024 19:40
revanced-bot pushed a commit that referenced this pull request Aug 4, 2024
# [4.12.0-dev.16](v4.12.0-dev.15...v4.12.0-dev.16) (2024-08-04)

### Bug Fixes

* **YouTube - Spoof client:** Restore livestream audio only playback with iOS spoofing ([#3504](#3504)) ([90d3288](90d3288))
revanced-bot pushed a commit that referenced this pull request Aug 6, 2024
# [4.12.0](v4.11.0...v4.12.0) (2024-08-06)

### Bug Fixes

* **Google Photos - GmsCore support:** Fix by checking first if a method exists before trying to patch it ([acf38ca](acf38ca))
* **Instagram - Hide ads:**  Restore compatibility with latest version by fixing fingerprint ([#3455](#3455)) ([4505fa4](4505fa4))
* **Messenger - Disable switching emoji to sticker:** Constrain to last working version `439.0.0.29.119` ([6207c31](6207c31))
* **SoundCloud - Enable offline sync:** Stop crashing by reversing order of patching instructions from last to first to retain indices ([63b6ced](63b6ced))
* **YouTube - Bypass image region restrictions:** Move setting to `Misc` menu ([094ae59](094ae59))
* **YouTube - Client Spoof:** Restore missing high qualities by spoofing the iOS client user agent ([#3468](#3468)) ([0e6ae5f](0e6ae5f))
* **YouTube - Hide keyword content:** Do not hide flyout menu ([687c9f7](687c9f7))
* **YouTube - SponsorBlock:** Correctly show minute timestamp when creating a new segment ([d74c366](d74c366))
* **YouTube - SponsorBlock:** Improve create segment manual seek accuracy ([#3491](#3491)) ([1544981](1544981))
* **YouTube - Spoof client:** Fix tracking history on brand accounts ([#3480](#3480)) ([69c1f16](69c1f16))
* **YouTube - Spoof client:** Restore livestream audio only playback with iOS spoofing ([#3504](#3504)) ([90d3288](90d3288))

### Features

* Add `Hide mock location` patch ([#3417](#3417)) ([5f81b40](5f81b40))
* Add `Spoof build info` patch ([e7829b4](e7829b4))
* **Boost for Reddit:** Add `Disable ads` patch ([#3474](#3474)) ([b292c20](b292c20))
* **CandyLink:** Remove non-functional `Unlock pro` patch ([7ae9f8f](7ae9f8f))
* **Expense Manager:** Remove non-functional `Unlock pro` patch ([ebbcac7](ebbcac7))
* **Google News:** Add `Enable CustomTabs` and `GmsCore support` patch ([#3111](#3111)) ([ad59096](ad59096))
* **Google Photos:** Add `GmsCore support` patch ([#3414](#3414)) ([24528e0](24528e0))
* **Instagram:** Remove unnecessary `Hide timeline ads` patch ([5e1d001](5e1d001))
* **SoundCloud:** Add `Enable offline sync` patch ([#3407](#3407)) ([4de86c6](4de86c6))
* **SwissID:** Add `Remove Google Play Integrity Integrity check` patch ([#3478](#3478)) ([60492ae](60492ae))
* **YouTube - Description components:** Add `Hide 'Key concepts' section` option ([#3495](#3495)) ([d75b645](d75b645))
* **YouTube:** Add `Bypass image region restrictions` patch ([#3442](#3442)) ([765fab2](765fab2))
@ProTechnomancy

This comment was marked as off-topic.

@LisoUseInAIKyrios

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants