cshorler / hal-flash

A libhal stub library forwarding to UDisks specifically to satisfy the libflashplayer.so / libadobecp requirements
Other
56 stars 9 forks source link

Doesn''t work on flash 24.0r0 #26

Open beew opened 7 years ago

beew commented 7 years ago

Hi, just tested this on the adobe test page and the video never loaded. OS is Ubuntu 16.04 64 bit. Firefox 50.10. Flash version 24.0r0 installed by the usual way via flashplugin-installer. Thanks.

chadmiller commented 7 years ago

Ubuntu users should be using the adobe-flashplugin package.

On Dec 20, 2016 7:00 AM, "beew" notifications@github.com wrote:

Hi, just tested this on the adobe test page and the video never loaded. OS is Ubuntu 16.04 64 bit. Firefox 50.10. Flash version 24.0r0 installed by the usual way via flashplugin-installer. Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cshorler/hal-flash/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/AARkDjnwtsPdQf54TjxyDGNEgmjrnvTvks5rJ8NagaJpZM4LRwu9 .

beew commented 7 years ago

Hi, removed flashplugin-installer and installed adobe-flashplugin. It shows the same version of flash 24.0r0 and the test site still doesn't work.

ferdnyc commented 7 years ago

I can confirm, this fix is no longer effective with Flash 24.

I'm on Fedora, but downgrading to flash-player-11.2.202.644-2.118.1.x86_64.rpm (an old version of the binary distribution that openSUSE still has around (even though they probably shouldn't) and installing /usr/lib64/libhal.so.1.0.0 from this repo causes http://drmtest2.adobe.com:8080/Content/anonymous.f4v to play successfully in the Sample Video Player.

After installing flash-plugin-24.0.0.186-release.x86_64.rpm from the Adobe repository, however, the SVP hangs forever on "Loading Flash Access license", the same as if hal-flash was not installed.

cshorler commented 7 years ago

confirmed - with flash 24 the libhal no longer appears to be loaded.

Given this was always effectively a defect (relying on an ancient libhal), perhaps the Adobe devs are moving towards fixing the Flash player. I'd be curious to know if this behaviour is uniform for all platforms for version 24 of the player.

I note libudev is loaded below, but I also remember Firefox does that for other reasons - so it's possibly of no significance. tbc.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/flash-plugin/libflashplayer.so 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing. Detaching after fork from child process 10303. [New Thread 0x7fa87847d700 (LWP 10306)] [New Thread 0x7fa877c7c700 (LWP 10307)]

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/libcurl.so.4 /usr/lib64/libidn.so.11 /usr/lib64/libssh2.so.1 /lib64/libssl.so.1.0.0 /lib64/libcrypto.so.1.0.0 /usr/lib64/libgssapi_krb5.so.2 /usr/lib64/liblber-2.4.so.2 /usr/lib64/libldap-2.4.so.2 /usr/lib64/libkrb5.so.3 /usr/lib64/libk5crypto.so.3 /lib64/libcom_err.so.2 /usr/lib64/libkrb5support.so.0 /usr/lib64/libsasl2.so.3 /lib64/libkeyutils.so.1 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/libsoftokn3.so /usr/lib64/libsqlite3.so.0 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/libnssdbm3.so 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /lib64/libfreeblpriv3.so 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/libvdpau.so.1 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/vdpau/libvdpau_r600.so.1 /usr/lib64/libdrm_nouveau.so.2 /usr/lib64/libdrm_radeon.so.1 /usr/lib64/libdrm_amdgpu.so.1 /usr/lib64/libelf.so.1 /usr/lib64/libLLVMAMDGPUCodeGen.so.3.8 /usr/lib64/libLLVMipo.so.3.8 /usr/lib64/libLLVMAMDGPUDesc.so.3.8 /usr/lib64/libLLVMAMDGPUInfo.so.3.8 /usr/lib64/libLLVMX86Disassembler.so.3.8 /usr/lib64/libLLVMX86CodeGen.so.3.8 /usr/lib64/libLLVMScalarOpts.so.3.8 /usr/lib64/libLLVMX86Desc.so.3.8 /usr/lib64/libLLVMMCDisassembler.so.3.8 /usr/lib64/libLLVMX86Info.so.3.8 /usr/lib64/libLLVMMCJIT.so.3.8 /usr/lib64/libLLVMExecutionEngine.so.3.8 /usr/lib64/libLLVMTarget.so.3.8 /usr/lib64/libLLVMAnalysis.so.3.8 /usr/lib64/libLLVMRuntimeDyld.so.3.8 /usr/lib64/libLLVMBitReader.so.3.8 ---Type to continue, or q to quit--- /usr/lib64/libLLVMMC.so.3.8 /usr/lib64/libLLVMCore.so.3.8 /usr/lib64/libLLVMSupport.so.3.8 /usr/lib64/../lib64/libLLVMAMDGPUAsmPrinter.so.3.8 /usr/lib64/../lib64/libLLVMAMDGPUUtils.so.3.8 /usr/lib64/../lib64/libLLVMAsmPrinter.so.3.8 /usr/lib64/../lib64/libLLVMCodeGen.so.3.8 /usr/lib64/../lib64/libLLVMSelectionDAG.so.3.8 /usr/lib64/../lib64/libLLVMTransformUtils.so.3.8 /usr/lib64/../lib64/libLLVMIRReader.so.3.8 /usr/lib64/../lib64/libLLVMInstCombine.so.3.8 /usr/lib64/../lib64/libLLVMLinker.so.3.8 /usr/lib64/../lib64/libLLVMObject.so.3.8 /usr/lib64/../lib64/libLLVMProfileData.so.3.8 /usr/lib64/../lib64/libLLVMVectorize.so.3.8 /usr/lib64/../lib64/libLLVMX86AsmPrinter.so.3.8 /usr/lib64/../lib64/libLLVMX86Utils.so.3.8 /lib64/libtinfo.so.5 /usr/lib64/../lib64/../lib64/libLLVMMCParser.so.3.8 /usr/lib64/../lib64/../lib64/libLLVMBitWriter.so.3.8 /usr/lib64/../lib64/../lib64/libLLVMInstrumentation.so.3.8 /usr/lib64/../lib64/../lib64/libLLVMAsmParser.so.3.8 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing.

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/libudev.so.1 /lib64/libcap.so.2 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing. [New Thread 0x7fa86ccde700 (LWP 10310)]

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/libtxc_dxtn.so 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing. [New Thread 0x7fa86bc9f700 (LWP 10312)]

Thread 1 "plugin-containe" hit Catchpoint 2 Inferior loaded /usr/lib64/gtk-2.0/2.10.0/immodules/im-cedilla.so 0x00007fa88db68450 in _dl_debug_state () from /lib64/ld-linux-x86-64.so.2 (gdb) Continuing.

ferdnyc commented 7 years ago

It sounds like Adobe is working on externalizing their DRM — Mozilla's DRM support page notes,

Firefox on Windows supports HTML5 playback of DRM-controlled video and audio through the Adobe Primetime CDM. This CDM implements a DRM system called Adobe Primetime, which was previously available via the Adobe Flash plugin. Beginning in version 47, Firefox desktop also supports the Google Widevine CDM.

However, I have the Widevine CDM installed and activated in Firefox, so if Adobe are using external DRM they aren't doing it right. Or they're depending solely on Adobe Primetime, which is of course not available on Linux.

ferdnyc commented 7 years ago

Aha. *wamp,wamp* From the Flash-on-Linux-again beta announcement in August:

Because this change is primarily a security initiative, some features (like GPU 3D acceleration and premium video DRM) will not be fully implemented.

If you require this functionality, we recommend that you use the PPAPI version of Flash Player. That said, we believe that the new NPAPI build represents a significant step forward in functionality, stability, and security and look forward to hearing your feedback.

cshorler commented 7 years ago

I didn't think the PPAPI flash player supported drm protected playback on Linux

ferdnyc commented 7 years ago

Near as I can tell that's true, except on Chrome OS. (With some discussion of extracting and using the ChromeOS pepper flash plugin on Linux.) I guess whoever wrote that either wasn't aware, or was referring to features other than DRM.

On Jan 5, 2017 12:35 PM, "Chris HORLER" notifications@github.com wrote:

I didn't think the PPAPI flash player supported drm protected playback on Linux

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cshorler/hal-flash/issues/26#issuecomment-270705609, or mute the thread https://github.com/notifications/unsubscribe-auth/AAg1pP1rOWuyiF4ooJfvUTrYQgwN9qnUks5rPSnGgaJpZM4LRwu9 .

robert-scheck commented 7 years ago

Confirming, flash-plugin-24.0.0.186-release.x86_64 also breaks with DRM here on CentOS 6.8 (which even ships the "original" hal-0.5.14-14.el6.x86_64), only downgrading to previous flash-plugin-11.2.202.644-release.x86_64 gets DRM related things working again.

ainar-g commented 7 years ago

Any news or workarounds for this? I'm on Ubuntu 16.04 and I don't see a way to downgrade my flash plugin.

cshorler commented 7 years ago

Flash player 25 beta is on Adobe labs web site, but I don't see anything in the release notes indicating this was fixed. I haven't tried it yet - too busy.

ferdnyc commented 7 years ago

From what I've been able to glean there's no possibility of a workaround for this, with the Flash 24 version of the plugin. The DRM functionality is not present in new versions at all, Adobe simply removed it entirely. (Or, "didn't code that part again" when they reimplemented the rest of plugin, whatever... same net effect, it's no longer there.) The only solution for DRM playback is to downgrade to an older version, which most distros will almost certainly not be directly supporting (security concerns, etc.)...

However, it's the Flash plugin... all you really need is any pre-24 libflashplayer.so file tossed into your $HOME/.mozilla/plugins/ directory. There can't not be a way to downgrade, manually. The source of that libflashplayer.so can be anything from an older Ubuntu release's packages, to package files from another distro (like that openSUSE RPM I linked to above), to some random machine with an older version installed that you still happen to have access to. (I would strongly recommend against just finding random libflashplayer.so files laying around the web, though. There are a million stories on the naked Internet, and 90% of them end in a cautionary tale about trojan malware.)

ferdnyc commented 7 years ago

Heh, we crossed streams there @cshorler .

I wouldn't expect any newer versions of the plugin to change anything — Adobe's Flash 24 announcement said that things like DRM "will not be fully implemented" (emphasis mine), making it sound like they have absolutely no intention of fixing this.

ainar-g commented 7 years ago

I see. Seems like I'll still need my Windows dual boot. Thanks @cshorler and @ferdnyc.

ferdnyc commented 7 years ago

Your best bet might be to encourage whatever site is still using DRM-protected Flash to dump it, get with the times, and migrate to HTML5 video! Flash DRM is only needed until everyone finally stops using it, which is a day that cannot possibly come too soon.

bergamote commented 7 years ago

I can confirm that replacing the libflashplayer.so (here it was in /usr/lib/adobe-flashplugin/) by an older one makes Flash DRM protected content playable again. Thanks

ferdnyc commented 7 years ago

With the caveat that Firefox will place Flash into ask-to-activate mode, because as of December all Flash versions up to 23.0.0.207 are blocked (that's basically everything earlier than 24) for security reasons. (Also why distros are unlikely to be offering supported downgrades to pre-24 Flash, despite the loss of DRM functionality.)

thalesmaoa commented 7 years ago

@bergamote Which version are you using? Can you provide a link to download?

bergamote commented 7 years ago

@thalesmaoa ferdnyc posted a link to an old package in the 4th post

@ferdnyc Yep, click-to-activate kicked in after I upgraded Firefox. But that made me realise that almost half the websites I visit try to run flash even tho every feature (audio, video, etc...) works fine if you don't activate it. In the last few months, apart for the DRM streaming service, I only had to allow flash once or twice, for sites that actually needed it to display something.

beew commented 7 years ago

@ferdnyc

Actually flash from ChromeOS does work. It is not to be confused with Chrome desktop on Linux. I just did it.

https://ubuntuforums.org/showthread.php?t=2363550

ferdnyc commented 7 years ago

Good to know, @beew , as I said I'd seen some vague rumblings to that effect scattered around the net. But that freshplayer page looks like a pretty good starting point for anyone wishing to attempt it.

Freakin' Adobe! If they have a DRM-capable PPAPI version of Flash... arrrrgh! I hate corporate developers, or (more accurately) the business managers who call the tune they dance to.

(Oh, one question: Is it actually a current version of Flash 24? Or is this just a different form of the "use an older Flash" solution?)

beew commented 7 years ago

Hi, @ferdnyc It is flash version 25.0.0.171. You can check that by right clicking a flash video or go to http://get.adobe.com/flashplayer/about/ So no it is not the typical "use an older flash" solution. On the other hand the current flash version is 26 so it is not completely up to date either, there is a small lag of flash version in ChromeOS's recovery image, but it is not the same as using unsupported flash from years ago. I doubt that you would encounter a site which refuses to load because flash is out of date.

Pepper flash in ChromeOS does support drm See this thread https://github.com/i-rinat/freshplayerplugin/issues/340

But for some reasons Firefox doesn't report the flash version correctly if installed in this manner (using a ChromeOS recovery image) there are some tricks involved to get it detected by adobe. See my last post on this thread for more details. https://github.com/i-rinat/freshplayerplugin/issues/356 Now it is reported as flash 26 in FF's Addons > Plugins page but it is actually still 25, but adobe is able to pick it up now

ferdnyc commented 7 years ago

Hi, @ferdnyc It is flash version 25.0.0.171. You can check that by right clicking a flash video or go to http://get.adobe.com/flashplayer/about/

Well, I can't, as I don't have it installed. That's why I asked you. 😉

So no it is not the typical "use an older flash" solution. On the other hand the current flash version is 26 so it is not completely up to date either, there is a small lag of flash version in ChromeOS's recovery image, but it is not the same as using unsupported flash from years ago. I doubt that you would encounter a site which refuses to load because flash is out of date.

Yeah, no, that's good to know. It sounds like a workable solution. (And makes me even more frustrated with Adobe, for not including DRM support in the Linux release versions of Flash 24+.)

But for some reasons Firefox doesn't report the flash version correctly if installed in this manner (using a ChromeOS recovery image) there are some tricks involved to get it detected by adobe.

That may simply be a looooong-standing Firefox bug with plugin versioning in general, nothing to do with the source or form of this plugin specifically. I've seen exactly the same thing with different versions of libflashplayer.so, even from Adobe's official packages, where Firefox will show an out-of-date or incorrect version number. (Say, when you install a libflashplayer.so in your home directory that's newer than the one in /usr/{lib,lib64}/mozilla/plugins/ — it'll use the plugin from your home directory, but can still display the (wrong) version number from the system plugin.)

The solution to that problem is to delete $HOME/.mozilla/firefox/<profiledir>/pluginreg.dat, then restart Firefox to make it regenerate the file. That usually gets it sorted out regarding plugin versions. Worth a try.

Although... Adobe not detecting the version properly, that seems more unusual, as you wouldn't expect it to depend on information from Firefox / pluginreg.dat. Or maybe it does, in the Pepper version — perhaps Mozilla tightened up the security on that information being exposed to remote sites from the browser.

beew commented 7 years ago

Hi,

It seems that the flash version issue is related to a known issue of freshplayerplugin https://github.com/i-rinat/freshplayerplugin/blob/master/doc/known-issues.md ("Flash Version is Incorrect") so there is a work around.

Although... Adobe not detecting the version properly, that seems more unusual, as you wouldn't expect it to depend on information from Firefox / pluginreg.dat. Or maybe it does, in the Pepper version — perhaps Mozilla tightened up the security on that information being exposed to remote sites from the browser.

May also be an issue with freshplayerplugin. Remember this is a hack to make pepper flash work in Firefox, so not surprised if there are some glitches.

I have done this on Ubuntu 16.04 and 17.04 on two different machines and works flawlessly. But somehow it doesn't work on Fedora 25 on the same machine (dualboot 17.04) Freshplayerplugin doesn't work with any flash This is X11 session rather than wayland. I compiled fresplayerplugin from source and the builds were successful in all cases.

beew commented 7 years ago

Got it to work on Fedora as well. Turned out SELinux is blocking freshplayerplugin from accessing $HOME where libpepflashplayer.so is. Set SElinux to permissive or disabled would fix it. Also found out freshplayer can be installed via dnf, may need rpmfusion.

To get Firefox to report an up to date version of flash, can install standalone pepper flash from repo (rpmfison) or install Chrome (need to disable or set Selinux to permissive, since Chrome puts pepperflash in $HOME) run Firefox once, then close Firefox. Now create a conf file for freshplayerplugin, edit the pepperflash path to point to ChromeOS flash, then start Firefox, drm will work. The freshplayerplugin source contains a template for the conf file under data.

beew commented 7 years ago

Here are the steps for those who want to try using ChromeOS's flash

To extract flash from ChromOS recovery image. Download this script https://dl.google.com/dl/edgedl/chromeos/recovery/linux_recovery.sh Make it executable, run it as normal user choose a recovery image, ZAKO would work.

The script will run and then complain that there is no usb plugged in. just kill it. Then go to /tmp to find a folder called crosre.tmp or something like that. Open it, copy the .bin file to somewhere in $HOME. This is the recovery image

To mount the recovery image, need to install kpartx.

sudo kpartx -av /path/to/bin/file

It will print out a lot of partitions like

add map loop7p1 (253:0): 0 28672 linear 7:7 2928640
add map loop7p2 (253:1): 0 32768 linear 7:7 20480
add map loop7p3 (253:2): 0 2641920 linear 7:7 286720
add map loop7p4 (253:3): 0 32768 linear 7:7 53248
add map loop7p5 (253:4): 0 4096 linear 7:7 282624
add map loop7p6 (253:5): 0 1 linear 7:7 16448
add map loop7p7 (253:6): 0 1 linear 7:7 16449
add map loop7p8 (253:7): 0 32768 linear 7:7 86016
add map loop7p9 (253:8): 0 1 linear 7:7 16450
add map loop7p10 (253:9): 0 1 linear 7:7 16451
add map loop7p11 (253:10): 0 16384 linear 7:7 64
add map loop7p12 (253:11): 0 32768 linear 7:7 249856

You need the third one (corresponds to "ROOT" shown in file manager To mount it (it doesn't open in file manager)

sudo mount -t ext2 /dev/mapper/loop7p3 -o ro  ~/mnt

where ~/mnt is just a directory I created in my $HOME to mount media

libpepflashplayer.so is in /opt/google/chrome/pepper/

then to unmount

sudo umount ~/mnt

and

sudo kpartx -dv /path/to/bin/file

Now put libpepflashplayer.so somewhere. Run Firefox once with freshplayerplugin installed and with a "normal" copy of pepperflash (either from Chrome browser for Linux or install pepperflash from repo) so that Firefox registers an up to date version of flash. Then close Firefox and create .conf for freshplayerplugin as from the last post.

MatzFan commented 7 years ago

@cshorler the end is in sight: http://www.omgubuntu.co.uk/2017/07/adobe-flash-plugin-dead-2020 :smile:

cshorler commented 7 years ago

On 27 July 2017 23:47:15 BST, Bruce Steedman notifications@github.com wrote:

@cshorler the end is in sight: http://www.omgubuntu.co.uk/2017/07/adobe-flash-plugin-dead-2020 :smile:

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/cshorler/hal-flash/issues/26#issuecomment-318507731

Here's the Adobe press release.

https://blogs.adobe.com/conversations/2017/07/adobe-flash-update.html

It's great news. Maybe they'll give consideration to pushing some code to Gnash for study / porting (who knows if they're in anyway compatible implementations)

ferdnyc commented 7 years ago

Maybe they'll give consideration to pushing some code to Gnash for study / porting

I hope not. Flash needs to die, not just Adobe® Flash☭ With Macromedia™ Technology (© 1995*-2020 Adobe®) but all of it, free implementations included. The thing that sucks about Flash isn't its proprietaryness (though that sucks too) but the ancient and broken technology underpinning it. The right and good and compassionate thing to do is steer everyone towards HTML5 <video> as firmly as possible, not to enable projects like Gnash to keep Flash technology lurching around zombie-like even after death.

The goal should be, come 2020, nothing of the Flash protocols, formats, or APIs remains in use anywhere in the universe. That'll be a day to celebrate!

* – (SERIOUSLY, Nineteen Ninety-frickin'-Five!! It's old and tired, let it rest in peace!)

MatzFan commented 7 years ago

Followed excellent instructions provided by @beew and got DRM content playing again in FF54 on Ubuntu (GNOME) 17.04.

aristocrates commented 7 years ago

I tried following the @beew instructions with the ZAKO image, but DRM is not working for me (firefox 55, gnome, systemd). Note: I didn't actually run linux_recovery.sh, but ran

curl https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf?source=linux_recovery.sh > 
recovery.conf

which fetches a list of recovery image download links that linux_recovery.sh uses to populate the . I believe this is fully equivalent to running linux_recovery.sh, having it download an image and cancelling before writing to a drive.

The SHA1 of the (zip compressed) image used is sha1=17b84e394c698758d464551ca7a0ea4053e539b7 chromeos_9460.60.0_zako_recovery_stable-channel_mp-v3.bin.zip

I have been compiling freshplayerplugin from source, attempting 0.3.3, 0.3.5, 0.3.6, 0.3.7, and the current git snapshot.

As per https://github.com/i-rinat/freshplayerplugin/issues/340, I ran

strings -a libpepflashplayer.so | grep PPB_Flash_DRM

and the output suggests that this version from the ChromeOS image does support DRM:

PPB_Flash_DRM;1.1
PPB_Flash_DRM;1.0

On the adobe test page (http://drmtest2.adobe.com:8080/SVP/SampleVideoPlayer_FP.html using http://drmtest2.adobe.com:8080/Content/anonymous.f4v) the following errors appear if "Show DRM Events" is checked:

license ID = <a base 16 string>
DRMErrorEvent dispatched by DRMManager received on [DATE]
event type = drmError
Error Code = 3321 [I15nFailed]
Sub Error Code = 1107296357
Error Details =
drmUpdateNeeded = false
systemUpdateNeeded = false

In addition, on the command line the following error appears in the terminal I ran firefox from:

[ERROR:flash/platform/pepper/pep_shader_factory.cpp(408)] Compilation failed: 0:1(1): error: syntax error, unexpected $end

The version of flash seems to show up as 26.0.0.102. I have hal-flash installed.

Note: I believe that the ChromeOS pepperflash is being loaded by freshplayerplugin since the flash version is different and the behavior on the test page is different (hangs instead of giving an error) when the following line is excluded from ~/.config/freshwrapper.conf:

pepperflash_path = "/path/to/opt/google/chrome/pepper/libpepflashplayer.so"

For clarification: for those who have this method working, is hal-flash required, or is the ChromeOS pepperflash enough on its own? I have tried this with and without hal-flash installed and the result is the same.

Is there any other configuration of firefox required beside freshplayerplugin and modifying freshwrapper.conf?

Is there a way to download older ChromeOS recovery images to see if those work? In particular does anyone know if an older ZAKO image (with a flash version of 25.* that seems to have worked for some people) download link is still active?

Also, if possible could those who got the ChromeOS method to work check if this still works with current recovery images?

RodrigoDLPontes commented 7 years ago

I don't know if this the appropriate thread for this, but it seems that after some Flash version (26 maybe?), Flash is attempting some sort of individualization that fails and breaks DRM (error 3321).

Could anyone here (perhaps @beew) that has a working version please share their libpepflashplayer.so so that we can also watch DRM content? That would be very helpful!

i-rinat commented 7 years ago

@aristocrates, @RodrigoDLPontes, try Firefox 52 ESR. Does it work there?

rockyoceans commented 7 years ago

I got the train to work! But I still can't get it to work with NBA League Pass.

To get the train to work (the sample DRM video), I downloaded this deb:

http://archive.canonical.com/ubuntu/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.394-0saucy1_amd64.deb

Then I installed with dpkg i. And libhal of course. If that doesn't work for you, maybe try a different version from that site?

beew commented 7 years ago

@RodrigoDLPonte

I think DRM videos still work only that it crashes on Adobe's test site so can't do the test. But other than that the same version of drm enabled flash (Chrome OS flash) works for other sites (I know since I have no other flash installed) on FF56. It crashes on right clicking but there is no issue watching videos. I cannot test other DRM contents since I actually don't use any service that requires DRM. Just do this because I think it is cool.

Adobe test works without issue on Firefox ers. But the catch is that the browser is kind of unstable and it crashes on many sites (no flash) where FF56 works fine and on some sites videos (html5) don't play with the error that content is not available on this device but play on FF56 just fine, at least that is the case on Ubuntu 17.10 with Firefox ers installed form ppa https://launchpad.net/~mozillateam/+archive/ubuntu/ppa You may have better luck with other distros or different versions of Ubuntu or by getting FF-ers from Mozilla.

I will try it on waterfox to see if it works and get back. https://www.waterfoxproject.org

beew commented 7 years ago

@rockyoceans

You are using a very, very old version of flash so it is blocked on many sites for security reasons and it is totally not recommended.

robert-scheck commented 7 years ago

I followed up @aristocrates, however on a CentOS 7.

TL;DR: No DRM even with libpepflashplayer.so from ChromeOS

That's what I did in detail, in case somebody cares or would like to follow up this:

$ cd /tmp
$ wget https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.conf?source=linux_recovery.sh
$ wget https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_9592.96.0_zako_recovery_stable-channel_mp-v3.bin.zip
$ unzip chromeos_9592.96.0_zako_recovery_stable-channel_mp-v3.bin.zip
$ kpartx -a -v chromeos_9592.96.0_zako_recovery_stable-channel_mp-v3.bin
$ mkdir -p /mnt/chromeos/
$ mount -o ro /dev/mapper/loop0p3 /mnt/chromeos
$ file /mnt/chromeos/opt/google/chrome/pepper/libpepflashplayer.so
/mnt/chromeos/opt/google/chrome/pepper/libpepflashplayer.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ccde8c4ae51cceb67a97a514c177a6024ab6460b, stripped
$ 
$ strings -a /mnt/chromeos/opt/google/chrome/pepper/libpepflashplayer.so | grep PPB_Flash_DRM
PPB_Flash_DRM;1.0
PPB_Flash_DRM;1.1
$ 
$ cp -av /mnt/chromeos/opt/google/chrome/pepper /opt/google/chrome/pepper
$ umount /mnt/chromeos/
$ rmdir /mnt/chromeos/
$ kpartx -d -v chromeos_9592.96.0_zako_recovery_stable-channel_mp-v3.bin

Let's try it:

$ chromium-browser --ppapi-flash-path=/opt/google/chrome/pepper/libpepflashplayer.so --ppapi-flash-version=27.0.0.130
[…]
[29:29:1101/202722.356666:ERROR:ppapi_thread.cc(333)] Failed to load Pepper module from /opt/google/chrome/pepper/libpepflashplayer.so (error: /opt/google/chrome/pepper/libpepflashplayer.so: cannot open shared object file: Operation not permitted)

Uhm? File permissions were correct and setting SELinux to permissive did not change anything, but:

$ ldd /opt/google/chrome/pepper/libpepflashplayer.so 
/opt/google/chrome/pepper/libpepflashplayer.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/google/chrome/pepper/libpepflashplayer.so)
    linux-vdso.so.1 =>  (0x00007ffe604be000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fa82c082000)
    librt.so.1 => /lib64/librt.so.1 (0x00007fa82be7a000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa82bb71000)
    libm.so.6 => /lib64/libm.so.6 (0x00007fa82b86f000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa82b659000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa82b43c000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fa82b079000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa82e257000)
$

Okay, yes…CentOS 7 is getting ancient.

$ wget https://kojipkgs.fedoraproject.org/packages/gcc/4.9.0/1.fc21/x86_64/libstdc++-4.9.0-1.fc21.x86_64.rpm
$ mkdir libstdc++
$ cd libstdc++
$ rpm2cpio ../libstdc++-4.9.0-1.fc21.x86_64.rpm | cpio -idm
$ cd ..

Retry:

$ LD_LIBRARY_PATH="/tmp/libstdc++/usr/lib64:$LD_LIBRARY_PATH" chromium-browser --ppapi-flash-path=/opt/google/chrome/pepper/libpepflashplayer.so --ppapi-flash-version=27.0.0.130
[…]
[WARNING:flash/platform/pepper/pep_module.cpp(63)] SANDBOXED
[…]
[5805:5805:1101/200816.320780:ERROR:device_id_fetcher.cc(146)] Empty machine id

Working Flash, but still no DRM. Each DRM-related activity leads to "Empty machine id".

Retry with real Google Chrome:

$ LD_LIBRARY_PATH="/tmp/libstdc++/usr/lib64:$LD_LIBRARY_PATH" google-chrome --ppapi-flash-path=/opt/google/chrome/pepper/libpepflashplayer.so --ppapi-flash-version=27.0.0.130
[…]
[WARNING:flash/platform/pepper/pep_module.cpp(63)] SANDBOXED
[…]
[6611:6611:1101/201428.680644:ERROR:device_id_fetcher.cc(145)] Empty machine id

Still working Flash, but no DRM, so same behaviour. According to the Chromium source code, the "Empty machine id" comes from

https://chromium.googlesource.com/chromium/chromium/+/1029af07a7f398a3eb30865a100118da7bab3b25/chrome/browser/renderer_host/pepper/device_id_fetcher.cc#155

and leads me to ComputeOnUIThread() which leads me to GetMachineIDAsync() which leads me to

https://chromium.googlesource.com/chromium/chromium/+/1029af07a7f398a3eb30865a100118da7bab3b25/chrome/browser/renderer_host/pepper/device_id_fetcher.cc#40

which leads me to: "Not implemented for other platforms." (which is !defined(OS_WIN) && !defined(OS_CHROMEOS)). Thus finally

https://chromium.googlesource.com/chromium/chromium/+/1029af07a7f398a3eb30865a100118da7bab3b25/chrome/browser/renderer_host/pepper/device_id_fetcher.cc#59

takes me back to

https://chromium.googlesource.com/chromium/chromium/+/1029af07a7f398a3eb30865a100118da7bab3b25/chrome/browser/renderer_host/pepper/device_id_fetcher.cc#155

which finally leaves me with: No DRM – even not with libpepflashplayer.so from ChromeOS.

MatzFan commented 6 years ago

Have switched to FF 52 ESR myself. Can confirm others' experiences with FF beyond 54 giving DRM errors, even with latest libpepflashplayer.so from ChromeOS.

beew commented 6 years ago

i-rinat has upgraded freshplayerplugin a few days ago and now chromebook flash is working again. Tested with the latest master of freshplayerplugin and FF57 on the adobe test site. Thanks i-rinat!

pdrsn commented 6 years ago

Got this working on Ubuntu 17.10 after installing flashplugin normally and switching libflashplayer.so in /usr/lib/adobe-flashplugin with an old V11 i found in adobe archives. This got DRM to play in Firefox 52 ESR.

aristocrates commented 6 years ago

For me the steps I outlined earlier actually worked this time with the following recovery image and software versions:

Not only did the adobe test page play properly* (http://drmtest2.adobe.com:8080/SVP/SampleVideoPlayer_FP.html using http://drmtest2.adobe.com:8080/Content/anonymous.f4v) but HBO now (depends on flash with DRM) worked too; I did not install hal-flash, this was just using the recovery image pepper flash.

* Note: To get the adobe test page to work I had to do a bit of fiddling with inspect element and running javascript in the developer terminal because freshplayer plugin did not seem to report the correct flash version (0.0 instead of 29.*, despite providing a manifest.json file as the readme suggested) which caused the site to auto-load a "you haven't installed flash" message, but HBO now worked fine without any fiddling. In any case I had no problems with the flash DRM itself.

Brief summary of the steps:

JL2210 commented 5 years ago

Luckily for us, Chromebrew runs on Chrome OS, so we can just symlink the file to another location :tada:.

Flash used to be the way to go.