win32ss / supermium

Chromium fork for Windows XP/2003 and up
https://win32subsystem.live/supermium/
BSD 3-Clause "New" or "Revised" License
2.47k stars 85 forks source link

widevinecdm 4.10.2830.0 on windows 7 #937

Closed y08wilm closed 1 month ago

jimjonesbased69 commented 1 month ago

Firefox ESR 115 is not end-of-life. It has been extended until march 2025 and may be extended again, dependent on userbase population i'd assume.

jimjonesbased69 commented 1 month ago

Your patch is actually not necessary, Widevine 4.10.2830.0 is already bundled and functional with Firefox ESR 115.

XakerTwo commented 1 month ago

+1 for your attempt and efforts, buuut cuz you just replace chrome.exe with your patcher, i have few little remarks 1.1 will it works if i open url from shell while watching some DRM-secured content? code on screenshort has no any checks, try-catches, etc. 1.2 any external chrome.exe calling will results disk activity. 1.3.1 UserData folder is configurable but you assume it always in %localAppData% 1.3.2 same for Supermium install location. 1.- for your luck you not state it works on WinXP otherwise %localAppData% give you a slap 1.4 foreach? accessing zero item is not in fashion? 1.5 what if there is no any folder?

not ideal nor best example ```cs //note that inlining is not best practice but i like it //it's just shitty safety-wrapper example, other do yourself, even tests try { // you need to determine it, System.Diagnostics can help with it // external patching mostly useless when broser already runned (1.2) if (isBrowserRunned) return; // 1.3.1 // ?. ?? string wvcPath = Array.Find(args, (one_arg) => one_arg.StartsWith("--user-data-dir=")); wvcPath = (wvcPath == null? Environment.ExpandEnvironmentVariables(@"%LOCALAPPDATA%\Supermium\User Data\WidevineCdm\") : wvcPath.Substring(16).Trim('"') + @"\WidevineCdm\"); DirectoryInfo[] di = null; // ternary? also can be entirely removed to simply fall into finally block on absence of any part of path if (Directory.Exists(wvcPath) && (di = (new DirectoryInfo(wvcPath)).GetDirectories()).Length > 0) Console.WriteLine(wvcPath += di[0].Name); else Console.WriteLine(wvcPath += "4.10.2710.0");// can be replaced with return; or other version as you need (1.5) //your stuff here } catch {} finally { //run browser here, https://stackoverflow.com/questions/6041332 (1.3.2) } ```

and btw + i hate cannon-guning for flys, it can be done with simple bat/cmd file, that can be targeted by shortcut you regulary use to start the browser. .NET as heavy as ass for such simple action - file replacement

Vangelis66 commented 1 month ago

Widevine 4.10.2830.0 is already bundled and functional with Firefox ESR 115.

Being pedantic, it's not actually bundled with the browser per se (unlike the case with Google Chrome), but it'll be fetched from Google servers (and placed inside Fx's profile) once the FirefoxESR-115.16.0 user wants to view DRM'd rich media content...

I spent quite a lot of time researching this (as Google Search is being exceptionally secretive :-1: when it comes to Widevine itself :angry: ), but it appears Mozilla have actually patched the browser itself (fx-115.16.0esr on Win7 ONLY) to have the latest WidevineCDM version work there; after perusing Mozilla's Bugzilla (and stumbling on "private" bugs), I eventually found:

https://bugzilla.mozilla.org/show_bug.cgi?id=1918478

and thus:

https://hg.mozilla.org/releases/mozilla-esr115/rev/5c840c90641a

which is echoed in the 115.16.0esr Release Notes:

Fixed Windows 7 incompatibility with the latest Widevine library to retain Encrypted Media Extensions (EME) support, ensuring support for content from video streaming providers.

So, they're probably not using the elusive 4.10.2830.100 variant...

cuz i found that widevinecdm 4.10.2830.100 dlls work on windows 7

@wilm281, you went to lots of trouble producing this, so I don't want to sound ungrateful and/or entitled; but, as pointed above by @XakerTwo, you explicitly assume one has "properly" installed Supermium via its installer, whereas many people, myself included, prefer a "portabilised" solution; e.g., I use one based on X-Launcher :wink: ..

At this time, I'd like to get my hands on this elusive v4.10.2830.100 x86 DLL (that no web search will procure :sob: ), but your latest "application" (archive crpjni.7z) contains an EXE that isn't extractable by tools currently known to me; whereas your first offering, archive 0djy97.7z, contains the dlls in an easily extractable way...

Can you please point me to a source of this DLL or could you or another kind soul here :wink: able to run/extract widevinecdm-4.10.2710.0-win-x86-64.exe (inside crpjni.7z) attach it in a comment in this thread? Thanks in advance! :smile:

Half-Modern commented 1 month ago

Your posts bleed my eyes. You could've learned how to type as well as you did for coding. Seriously, how hard is it to use uppercase and dots at right places?

win32ss commented 1 month ago

Very interesting code on Mozilla's end to patch in GetProcessMitigationPolicy in kernel32, sacrificing GetProcessPreferredUILanguages for that purpose.

I also discovered that Widevine CDM itself does not need to have valid digital signatures as it does function when it has been patched. image

But it would invalidate the VMP signature which Supermium lacks, while Mozilla's method would not as widevinecdm.dll is completely untouched, including in memory.

I have a patcher of my own that can do this task of patching the DLL and it will be released for this purpose.

XakerTwo commented 1 month ago

for whatever reason, host you are using is not accesible for me, so i just have no chance to view it in decompiller :D so all my remarks based only on provided code. it will not just skip patching - it will create _platform_specific folder right in the WidevineCdm dir and dump patch here without any other files, again based on early provided code. Btw - foreach save you from possible IndexOutOfRange exception

if you wish/can you can provide source here as text with cs right after three apostrofs (```cs) or provide just exe but using dropbox, gdrive, etc.

p.s. my reaction to the source of widevinecdm 4.10.2830.100 dlls   :trollface:

XakerTwo commented 1 month ago

sry for delay

weeeell.... generally nothing changed, okay lets see 1.1. :heavy_check_mark: will it works if i open url from shell while watching some DRM-secured content? code on screenshort has no any checks, try-catches, etc. 1.2. :x: any external chrome.exe calling will results disk activity (useless file overwriting) 1.3.1 :x: UserData folder is configurable but you assume it always in %localAppData%. 1.3.2 :x: Same for Supermium install location 1.5 :x: what if there is no any sub-folder? (in WidevineCdm) - patch will be dumped right into ...\WidevineCdm\_platform_specific\...

what's new - nothing important, just tiny remarks 2.1 overhead with other OS - your primary target is Windows, there no need for other OS, but as practice OK 2.2 unoptimal foreach - condition checking on each iteration, can be moved to "post-processing" 2.3 nested `for` loop can be slightly optimized (advanced) as well as completely removed/replaced

1.* see original post it still fully relevant cuz nothing changed (there spoiler with code, also read comments, i slightly update it)

1.3.2 for patcher - see code comments in original post for installer - you can use `System.Windows.Forms.OpenFileDialog` or `Microsoft.Win32.OpenFileDialog` to ask user for `chrome.exe`, when it not found in expected location. Also you may try to check few places in registry - `HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations` - user selected protocol associations. It contains name of the key in `HKEY_CLASSES_ROOT` hive, but first check it, otherwise you may touch IE and then it touch you :rofl: - `HKEY_CLASSES_ROOT\http` - protocol definition, in reality user selection not works for protocols as for extensions, so protocol definition should be overwrote - `HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet` - internet browser apps - `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\` - uninstall info
XakerTwo commented 1 month ago

huh? why did you delete all your messages? especially the messages with widevide dlls - someone may needs them or info about their obtaining! as well as your patcher!

please don't do that in future - don't delete entire issue info

if someone interested what is was here... wilm281 on its own found a simple way to get DRM-secured content work in Supermium under Win7. In short - it required patched `widevinecdm*.dll` that is not so simple to find and obtain. However x86 version can be grabbed from Spotify app and x64 version from Opera 95, but, mostly, in order for the app/browser to download the dlls the authing in some service, providing DRM-secured content, is required. wilm281 also provide his own small tool(with sources) to automatically replace original dlls, under `%localAppData%\Supermium\User Data\WidevineCdm\\_platform_specific\\`, with patched, but to work it should replace `chrome.exe` (that triggered my interest of reliability of this tool). so, below are the links from original posts(thx web.archive; these links is not my re-upload, they are refer to wilm281' uploads) widevinecdm-4.10.2830.100-win-x86.zip https://github.com/user-attachments/files/17270760/widevinecdm-4.10.2830.100-win-x86.zip widevinecdm-4.10.2830.100-win-x64.zip https://github.com/user-attachments/files/17270855/widevinecdm-4.10.2830.100-win-x64.zip wilm281' patcher (latest version, link may be dead) https://files.catbox.moe/crpjni.7z notes: for x64 it uses widevinecdm v4.10.2710.0 from FF; issues mentioned by me still actual web.archive backup with original posts (contains patcher' source code) https://web.archive.org/web/20241008151716/https://github.com/win32ss/supermium/issues/937