Closed Bug 935676 Opened 11 years ago Closed 11 years ago

Flash doesn't work on 4.4 KitKat

Categories

(Firefox for Android Graveyard :: Plugins, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox26 wontfix, firefox27+ verified, firefox28+ verified, firefox29+ verified, firefox30 verified, firefox31 verified, firefox32 verified, relnote-firefox 26+)

VERIFIED FIXED
Firefox 29
Tracking Status
firefox26 --- wontfix
firefox27 + verified
firefox28 + verified
firefox29 + verified
firefox30 --- verified
firefox31 --- verified
firefox32 --- verified
relnote-firefox --- 26+

People

(Reporter: snorp, Assigned: snorp)

References

Details

(Keywords: feature)

Attachments

(5 files, 4 obsolete files)

At least on my 2012 Nexus 7 flashed to KitKat, Flash doesn't work and does not appear in about:plugins.
Kevin, does this work on 4.4 with the real bits?
Confirmed on N5. Worth a relnote as we are noted for our Flash Player support.
relnote-firefox: --- → ?
Hardware: x86 → ARM
Jet do you have any Adobe contacts that would know if critical APIs have been removed from Android 4.4 that Flash uses?
Flags: needinfo?(bugs)
Dolphin does not work with Flash either.
We can't dlopen the Flash plugin library on KitKat, and here's the reason: dlopen failed: cannot locate symbol "_ZN7android10VectorImpl19reservedVectorImpl6Ev" referenced by "libflashplayer.so"... Game over, Flash is dead on KitKat.
Uh that symbol is just a stub....so maybe we could fix this....sigh
Or we could just load with RTLD_LAZY since it's probably not going to call this?
Somehow RTLD_LAZY didn't help. Maybe it's a noop on Android? We fallback from the gecko linker to the Android one for Flash.
Hmmm. It looks like we will have some trouble getting a stub in. AFAICT (from here: https://github.com/android/platform_bionic/blob/master/linker/linker.cpp#L488) the linker tries to resolve symbols in the following order: 1) If we don't have DT_SYMBOLIC, look in the main executable. That would be the zygote, I guess, which is not helpful. 2) The local object (so libflashplayer.so in this case) 3) If built with -Bsymbolic, look in the main executable 4) From LD_PRELOADS. This would be great, except I'm pretty sure that list is parsed way before we are up and running. 5) Lastly, from any needed libraries Unless I'm missing something, the only way to work around this would be to modify the Flash binaries (or recompile from source obviously).
Oh, I also confirmed that RTLD_LAZY is in fact noop. I'm going to send flowers to glibc.
(In reply to Kevin Brosnan [:kbrosnan] from comment #3) > Jet do you have any Adobe contacts that would know if critical APIs have > been removed from Android 4.4 that Flash uses? snorp has already determined that that is the case.
Flags: needinfo?(bugs)
This should add enough support for text relocations to get going but there are glitches: - This doesn't handle flushing cpu cache after text relocations, so this is likely to fail on tegra processors. I think most non-tegras should be fine. - This doesn't change write permissions after processing the relocations, so this is really a bad hack. - Our linker has the same limitation as bionic's as in it doesn't look elsewhere than in the dependencies. However, we can easily add hooks in http://hg.mozilla.org/mozilla-central/file/7b014f0f3b03/mozglue/linker/CustomElf.cpp#l289 . I do plan to make things nicer in the future, probably by making the linker lookup symbols in mozglue when it looks in libc, but that would require deeper testing, and I think we can leave with a couple more hooks in CustomElf::GetSymbolPtrInDeps in the meantime.
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
I gave this a shot, but it still bails because we have DF_TEXTREL in DT_FLAGS.
Forgot about DT_TEXTREL
Attachment #832663 - Attachment is obsolete: true
Not sure what I did, but "Shockwave Flash 111r115" loads fine for me in Nightly on CyanogenMod the cm-11.0 built a few days ago.
Sorry, that should be "Shockwave Flash 11.1 r115"--that's what it says in about:plugins.
Flash 11.1.115.81 CM11 Galaxy S3 Firefox stable and Firefox beta Works For Me
I would not be surprised to find that Cyanogen or other custom ROMs reverted the change that broke Flash. Please limit discussion of this bug to OEM ROMs.
Flash seems to work fine with "modified" libflashplayer.so using Dolphin Browser (with JetPack). And although it does appear as a plugin in about:plugins in Firefox. It still doesn't render the flash content. Here's the post on XDA: http://forum.xda-developers.com/showthread.php?t=2548001 Direct link to modified flash apk: https://docs.google.com/file/d/0B1qjrD8ZER9ITmlVNW1EVWM5YlE/edit?pli=1
Also, it gets to CreatePlugin method in nsNPAPIPlugin but returns here: if (!pluginLib->HasRequiredFunctions()) { NS_WARNING("Not all necessary functions exposed by plugin, it will not load."); return NS_ERROR_FAILURE; }
And one more thing in modified libflashplayer.so: _ZN7android10VectorImpl19reservedVectorImpl6Ev (is replaced with) _ZNK7android10VectorImpl8capacityEv I think we should be able to get it working on Firefox now as it seems to work fine on "WebKit" (JetPack).
Putting this in the Known Issues for FF26.0
Flash works on firefox for android. but I also reversing flash player apk. then flash works on firefox and also dolphin jetpack. here's my modified flash apk link. https://drive.google.com/file/d/0B2bTyXoO581lYUhQU3pGRmQ4VUE/edit?usp=sharing Maybe am I late?
Nice works perfectly with the above apk. Appreciate it!
Mike, I can load Flash on 4.4 now with your hack and this patch.
Attachment #8355639 - Flags: review?(mh+mozilla)
If there is something that we can do here in the next little while, we should seriously consider it for 27
Comment on attachment 8355639 [details] [diff] [review] Stub out missing Flash symbols on Android Review of attachment 8355639 [details] [diff] [review]: ----------------------------------------------------------------- ::: mozglue/linker/CustomElf.cpp @@ +766,5 @@ > symptr = GetSymbolPtrInDeps(strtab.GetStringAt(sym.st_name)); > > if (symptr == nullptr) { > + const char *missing_name = strtab.GetStringAt(sym.st_name); > + if (ShouldStubMissing(missing_name)) { This is the wrong place to do this. Just do it in GetSymbolPtrInDeps, although i'm kind of reluctant to add such specific hacks. I'd rather add the symbols as stubs into libmozglue, and have the linker pick them from there, but that's more involved so let's say i'm okay with the hardcoded string checks for now.
Attachment #8355639 - Flags: review?(mh+mozilla) → review-
Attached patch Stub out missing Flash symbols (obsolete) — Splinter Review
Attachment #8355639 - Attachment is obsolete: true
Attachment #8356588 - Flags: review?(mh+mozilla)
Attached patch Stub out missing Flash symbols (obsolete) — Splinter Review
Attachment #8356588 - Attachment is obsolete: true
Attachment #8356588 - Flags: review?(mh+mozilla)
Attachment #8356589 - Flags: review?(mh+mozilla)
Comment on attachment 8356589 [details] [diff] [review] Stub out missing Flash symbols Review of attachment 8356589 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/plugins/base/nsPluginHost.cpp @@ +2633,5 @@ > mCachedPlugins = tag; > } > > +// On Android we always want to try to load a plugin again (Flash). Bug 935676. > +#ifndef MOZ_WIDGET_ANDROID Actually, why is that needed? (Note for when landing: please land the mozglue/linker part separately, it makes cherry-picking easier to keep the github project up-to-date) ::: mozglue/linker/CustomElf.cpp @@ +365,5 @@ > + if (strncmp(symbol, > + MISSING_FLASH_SYMNAME_START, > + sizeof(MISSING_FLASH_SYMNAME_START) - 1) == 0) { > + return FunctionPtr(__flash_stub); > + } I'd rather see this done before symbol resolution in the dependent libraries, like the other hooks, because whatever long term solution will be in place, that's likely to be what it will end up doing. Hopefully, this wouldn't break flash on < 4.4. Also, the stub is pretty generic, it doesn't need to have flash in its name.
Attachment #8356589 - Flags: review?(mh+mozilla) → feedback-
(In reply to Mike Hommey [:glandium] from comment #30) > Comment on attachment 8356589 [details] [diff] [review] > Stub out missing Flash symbols > > Review of attachment 8356589 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/plugins/base/nsPluginHost.cpp > @@ +2633,5 @@ > > mCachedPlugins = tag; > > } > > > > +// On Android we always want to try to load a plugin again (Flash). Bug 935676. > > +#ifndef MOZ_WIDGET_ANDROID > > Actually, why is that needed? Because if a prior version of Firefox tried and failed to load the Flash plugin, it would go into the invalid list and never be tried again (unless it was updated or something). > > (Note for when landing: please land the mozglue/linker part separately, it > makes cherry-picking easier to keep the github project up-to-date) Yeah, I'll split that part off and get separate review. > > ::: mozglue/linker/CustomElf.cpp > @@ +365,5 @@ > > + if (strncmp(symbol, > > + MISSING_FLASH_SYMNAME_START, > > + sizeof(MISSING_FLASH_SYMNAME_START) - 1) == 0) { > > + return FunctionPtr(__flash_stub); > > + } > > I'd rather see this done before symbol resolution in the dependent > libraries, like the other hooks, because whatever long term solution will be > in place, that's likely to be what it will end up doing. Hopefully, this > wouldn't break flash on < 4.4. > > Also, the stub is pretty generic, it doesn't need to have flash in its name. Fair enough, fixed.
Assignee: mh+mozilla → snorp
Attachment #8356589 - Attachment is obsolete: true
Attachment #8357169 - Flags: review?(mh+mozilla)
Comment on attachment 8357169 [details] [diff] [review] Stub out missing Flash symbols Review of attachment 8357169 [details] [diff] [review]: ----------------------------------------------------------------- Last nits ::: mozglue/linker/CustomElf.cpp @@ +282,5 @@ > reinterpret_cast<const void *>(this), GetPath(), symbol, ptr); > return ptr; > } > > +#define MISSING_FLASH_SYMNAME_START "_ZN7android10VectorImpl19reservedVectorImpl" Place that near the strncmp. @@ +287,5 @@ > + > +static void > +__void_stub(void) > +{ > +} Enclose in namespace {} /* anonymous namespace */ and remove static (you may just want to put in one of the existing ones).
Attachment #8357169 - Flags: review?(mh+mozilla) → review+
Attachment #8357175 - Flags: review?(joshmoz) → review+
Flags: needinfo?(fennec)
Keywords: verifyme
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Comment on attachment 8358404 [details] [diff] [review] Stub out missing Flash symbols [Approval Request Comment] Bug caused by (feature/regressing bug #): KitKat release User impact if declined: Flash doesn't work on KitKat Testing completed (on m-c, etc.): m-c for a few days Risk to taking this patch (and alternatives if risky): Low String or IDL/UUID changes made by this patch: None
Attachment #8358404 - Flags: approval-mozilla-beta?
Attachment #8358404 - Flags: approval-mozilla-aurora?
Attachment #8358404 - Flags: approval-mozilla-beta?
Attachment #8358404 - Flags: approval-mozilla-beta+
Attachment #8358404 - Flags: approval-mozilla-aurora?
Attachment #8358404 - Flags: approval-mozilla-aurora+
I tested using Google Nexus 7 (Android 4.4.2). The flash content stats to play but after a few seconds firefox stops responding (check the screen capture). Tested on desktop version of youtube and http://people.mozilla.org/~mwargers/tests/flash/
Flags: needinfo?(fennec)
(In reply to flaviu.cos from comment #40) > I tested using Google Nexus 7 (Android 4.4.2). > The flash content stats to play but after a few seconds firefox stops > responding (check the screen capture). > Tested on desktop version of youtube and > http://people.mozilla.org/~mwargers/tests/flash/ We're tracking the hang in bug 957694. That said, I can definitely reproduce with your test.
How do I install firefox with this fix included? Is it in the nightly build yet?
(In reply to Pykler from comment #43) > How do I install firefox with this fix included? Is it in the nightly build > yet? Yes, it's in Nightly, and I think Aurora. It will be in the next beta and also Firefox 27.
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #44) > (In reply to Pykler from comment #43) > > How do I install firefox with this fix included? Is it in the nightly build > > yet? > > Yes, it's in Nightly, and I think Aurora. It will be in the next beta and > also Firefox 27. Does not seem to be working for me on Nexus 5 ... do I need to install the "hacked flash" or the standard flash player from adobe?
Yeah also not working on Nexus 7 2013 Rooted running Kitkat 4.4. Tried Nightly and Aurora.
Nexus 7 2013 4.4 with Firefox Beta and standard flash is working for me.
Hmm not sure what is causing the problem then. Flash works in dolphin and boat browser for me just not firefox currently.
(In reply to toquinto253 from comment #46) > Yeah also not working on Nexus 7 2013 Rooted running Kitkat 4.4. Tried > Nightly and Aurora. Are you running a factory image of Android 4.4 or Cyanogenmod or another ROM?
(In reply to Aaron Train [:aaronmt] from comment #49) > (In reply to toquinto253 from comment #46) > > Yeah also not working on Nexus 7 2013 Rooted running Kitkat 4.4. Tried > > Nightly and Aurora. > > Are you running a factory image of Android 4.4 or Cyanogenmod or another ROM? Also, double check that you're running Flash Player 11.1 for Android 4.0 (11.1.115.81) from http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html#main_Archived_versions
Works for me on aurora, with the stock flash (not the hacked version used by dolphin). Wondering how do I check if the change went to beta, and then to mainline? I could not find a decent changelog that had this change listed.
Running latest Clean Rom which isn't the problem because i can play flash in Boat browser and dolphin no problem and yeah I'm running the latest stock flash player.
(In reply to Pykler from comment #51) > Works for me on aurora, with the stock flash (not the hacked version used by > dolphin). Wondering how do I check if the change went to beta, and then to > mainline? I could not find a decent changelog that had this change listed. The latest update on Google Play for Firefox Beta contains the set of patches in this bug. Firefox 27 will be released within the week of the 4th of February.
Any reason why https://www.mozilla.org/en-US/mobile/27.0/releasenotes/ still mentions this as a bug, if it was fixed and made it to the release?
(In reply to Artem Russakovskii from comment #54) > Any reason why https://www.mozilla.org/en-US/mobile/27.0/releasenotes/ still > mentions this as a bug, if it was fixed and made it to the release? Re ^
Flags: needinfo?(lsblakk)
Keywords: feature
(In reply to Aaron Train [:aaronmt] from comment #55) > (In reply to Artem Russakovskii from comment #54) > > Any reason why https://www.mozilla.org/en-US/mobile/27.0/releasenotes/ still > > mentions this as a bug, if it was fixed and made it to the release? > > Re ^ I updated the notes ~15min back, it looks good now.
Flags: needinfo?(lsblakk)
Flash content is disabled for Tegra devices running KitKat and higher by bug 957694. The flash content is flickering on Google Nexus 5 (Android 4.4.2). Tested on desktop version of youtube. Should I reopen this bug considering that flash does not work properly?
(In reply to flaviu.cos from comment #57) > Flash content is disabled for Tegra devices running KitKat and higher by bug > 957694. > > The flash content is flickering on Google Nexus 5 (Android 4.4.2). > Tested on desktop version of youtube. > > Should I reopen this bug considering that flash does not work properly? No, please open a new bug.
bug 970941 created for the flickering issue.
Marking the bug as verified considering the following: - Works as specified most of the devices with Android 4.4 Kitkat; - Bug 957694 is filled for the Tegra devices running KitKat; - Bug 970941 is filled for the flickering issue on Nexus 5;
Blocks: 1080342
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: