A few years back, I came across an article that detailed how to go about getting Xfinity Stream to work on Linux, with instructions on how to do it on Debian-based distributions. Earlier this year, I switched my operating system over to Fedora (currently running Fedora Rawhide), and as a result, I needed a way to accomplish this on a Fedora-based system.
In order to accomplish this, you’ll need a few things installed on your system:
sudo dnf install mock
First, you’ll want to make a directory to store the files you’ll be downloading, then navigate to that directory.
user@localhost:~$ mkdir temp_directory && cd temp_directory
Then, you’ll download the source rpm for glibc, and install the source rpm to your local rpmbuild folder.
user@localhost:~$ dnf download --source glibc
# in the case of Fedora Rawhide, I pulled this from https://koji.fedoraproject.org/koji/buildinfo?buildID=2575089. For fedora 39, 40, or 41, the version string may be different
user@localhost:~$ rpm -i glibc-2.40.9000-13.fc42.src.rpm
Next, you’ll want to open up the spec file in a text editor, and edit the following variables / lines:
%global baserelease
Patch26: glibc-xfinity-stream.patch
After this, you’ll likely want to add something to the changelog.
* Sat Oct 26 2024 Alan Neilan <email here> - 2.40.9000-13.1
- Add in patch that disables GLIBC_ABI_DT_RELR Check
- Allows xfinity stream to work w/ ChromeOS UA
Then, you’ll want to create the patch file in question in $HOME/rpmbuild/SOURCES/
.
--- glibc-master-old/elf/dl-version.c
+++ glibc-master/elf/dl-version.c
@@ -362,7 +362,7 @@
/* When there is a DT_VERNEED entry with libc.so on DT_NEEDED, issue
an error if there is a DT_RELR entry without GLIBC_ABI_DT_RELR
dependency. */
- if (dyn != NULL
+ if (0 && dyn != NULL
&& map->l_info[DT_NEEDED] != NULL
&& map->l_info[DT_RELR] != NULL
&& __glibc_unlikely (!map->l_dt_relr_ref))
Finally, you’ll want to generate the newer source rpm to build from with the following command:
# if you're using a different version of fedora, you'll want to substitute it for the version here
user@localhost:~/rpmbuild$ mock -r /etc/mock/fedora-rawhide-x86_64.cfg --buildsrpm --spec SPECS/glibc.spec --sources SOURCES/
This will generate a source rpm file (src.rpm) in the following path (though the version number may be different based on which version of fedora you’re building this for):
/var/lib/mock/fedora-rawhide-x86_64/result/
You’ll want to copy this to your temporary directory, then build it against both 32-bit (i386/i686) and 64-bit (x86_64) architectures. It’s worth noting that it will take quite a bit of time to compile for both architectures. On my own system (Intel i5-8265U), it takes about an hour and change for each architecture to compile (for a combined time of ~2h10m).
user@localhost:~$ cp /var/lib/mock/fedora-rawhide-x86_64/result/glibc-2.40.9000-13.1.fc42.src.rpm ~/temp_directory/
# 64-bit (x86_64)
user@localhost:~$ mock -r /etc/mock/fedora-rawhide-x86_64.cfg temp_directory/glibc-2.40.9000-13.1.fc42.src.rpm
# 32-bit (i686/i386)
user@localhost:~$ mock -r /etc/mock/fedora-rawhide-i386.cfg temp_directory/glibc-2.40.9000-13.1.fc42.src.rpm
After the packages are finished compiling, you’ll want to copy both sets of packages to a directory.
user@localhost:~$ cp /var/lib/mock/fedora-rawhide-{i686,x86_64}/result/*.rpm ~/temp_directory/
Then, you’ll want to install the newer versions of the packages.
user@localhost:~$ cd temp_directory
user@localhost:~$ sudo dnf upgrade ./*.rpm
At this point you’ll want to restart your computer, which will allow the newer version of glibc to take effect.
user@localhost:~$ sudo systemctl reboot
Once your computer is back up and running, you’ll want to fetch a Chrome OS system image. You’ll want to grab one from the atlas codename, as that’s the one I used for this. Once it’s downloaded, you’ll need to unpack the zip file like so.
user@localhost:~/Downloads$ unzip chromeos_16002.60.0_atlas_recovery_stable-channel_mp-v6.bin.zip
Archive: chromeos_16002.60.0_atlas_recovery_stable-channel_mp-v6.bin.zip
inflating: chromeos_16002.60.0_atlas_recovery_stable-channel_mp-v6.bin
After it’s unpacked, you’ll want to use the included Gnome disk utility to mount the disk image
After attaching the system image (in this case chromeos_16002.60.0_atlas_recovery_stable-channel_mp-v6.bin
), a few partitions on that system image will be mounted automatically.
Notice the partition labeled “Root-A”, that partition will be mounted at the path /run/media/$username/ROOT-A/
. You’re goint to want to copy the following file opt/google/chrome/WidevineCdm/_platform_specific/cros_x64/libwidevinecdm.so
from that mount point, to either of the following locations depending on which browser you’re going to be using to watch Xfinity Stream.
$HOME/.mozilla/firefox/${whatever your firefox profile name is}/gmp-widevinecdm/${whatever version it ends up being (currently 4.10.2830.0)}/
libwidevinecdm.so
before replacing it with the one from the Chrome OS system image/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/
The next steps involve getting Xfinity Stream to think you’re on a Chrome OS device.
about:config
general.useragent.override
Mozilla/5.0 (X11; CrOS x86_64 10066.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.37
more tools
network conditions
use browser default
under user agent.Chrome - Chrome OS
as the user agentThese steps should work, so long as Xfinity/Comcast doesn’t try and institute any changes to the backend that locks out Chrome OS users. Hope this helps.