News: 1691987352

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Honey, can you shrink the plugin? Mozilla allows desktop extensions on Firefox for Android

(2023/08/14)


Mozilla has teased an upcoming plan to allow plugins developed for its desktop browser to run on its Android app.

"In the coming months Mozilla will launch support for an open ecosystem of extensions on Firefox for Android on addons.mozilla.org (AMO)," [1]wrote Scott DeVaney, staff editorial manager for Firefox add-ons at Mozilla.

"We'll announce a definite launch date in early September, but it's safe to expect a roll-out before the year's end," he added.

[2]

Firefox for Android already support a handful of extensions but, as Devaney wrote, Mozilla has "focused our efforts on strengthening core Firefox for Android functionality and understanding the unique needs of mobile browser users."

[3]

[4]

That work’s done and Mozilla now believes it's ready to support an open extension ecosystem on Firefox for Android.

"We anticipate considerable user demand for more extensions on Firefox for Android,: DeVaney wrote, before suggesting "why not start optimizing your desktop extension for mobile use right away?"

[5]

Developers keen to do so will need to take note of the recent introduction of multi-process support in Firefox for Android Nightly builds, an addition that means extensions are no longer hosted in the same process as Firefox's user interface.

[6]Arc: A radical fresh take on the web browser

[7]Maker of Chrome extension with 300,000+ users tells of constant pressure to sell out

[8]India launches contest to build homegrown web browser

[9]Alarm raised over Mozilla VPN: Wonky authorization check lets users cause havoc

"This is a key consideration since Android is prone to shutting down resource-intensive processes, such as extensions," DeVaney wrote. "To mitigate the risk of unexpected extension termination, we've introduced event page architecture to be non-persistent and more resilient to process termination. Thus we strongly encourage developers to transition from persistent backgrounds to non-persistent Event pages to improve their extension's stability."

Doing so will require the following work:

Update your manifest.json background key and add "persistent": false .

Ensure listeners are registered synchronously at the top-level.

Record global state in the storage API, for example storage.session .

Change timers to alarms.

Switch from using [10]extension.getBackgroundPage for calling a function from the background page, to extension messaging or [11]runtime.getBackgroundPage .

With that to-do list ticked off, extensions should be ready for Firefox on Android. DeVaney has promised developers will soon be offered "additional guides, resources and … community events to support your transition to a managed multi-process environment like Android."

A customizable mobile browser may have appeal. Firefox on Android needs that, as statcounter rates its market share as 0.5 percent of the market – well behind Chrome (64.8 percent), Apple's Safari (24.8 percent), Samsung's browser (4.3 percent), Opera's 1.94 percent market share, the Alibaba-connected UC browser's 1.8 percent share, and even the Android native browser's 0.65 percent of the market.

The GSM Association estimates that as of 2022 the world had 5.4 billion unique mobile subscribers and that 76 percent of connections were made using smartphones. Statcounter rates Android's market share at 70.1 percent. Do the math: Firefox on Android may have 14.5 million users – no mean feat, but well behind the billions who use other mobile browsers.

Can an open plugin ecosystem grow adoption of Firefox on Android? Safari already allows extensions in its mobile browser, and workarounds make it possible for Chrome, so it wouldn't be a huge differentiator.

[12]

Mozilla clearly thinks the effort is worth making. As is often the case, whether developers reach the same conclusion about good uses of their time will determine if Mozilla's Android browser becomes more widely used. ®

Get our [13]Tech Resources



[1] https://blog.mozilla.org/addons/2023/08/10/prepare-your-firefox-desktop-extension-for-the-upcoming-android-release/

[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2ZNn7UusgD62FgKj@g2JPLAAAAkU&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZNn7UusgD62FgKj@g2JPLAAAAkU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZNn7UusgD62FgKj@g2JPLAAAAkU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44ZNn7UusgD62FgKj@g2JPLAAAAkU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[6] https://www.theregister.com/2023/07/31/arc_a_radical_new_browser/

[7] https://www.theregister.com/2023/08/11/chrome_extension_developer_pressure/

[8] https://www.theregister.com/2023/08/10/indian_web_browser_development_challenge/

[9] https://www.theregister.com/2023/08/04/mozilla_vpn_linux_flaw/

[10] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extension/getBackgroundPage

[11] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/getBackgroundPage

[12] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33ZNn7UusgD62FgKj@g2JPLAAAAkU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[13] https://whitepapers.theregister.com/



Firefox for Android already support a handful of extensions

heyrick

When the extension system changed, the supported extensions on Firefox went from hundreds to about a dozen. It's been embarrassingly bad for too long, so this is welcome news.

Surprising mobile browser stats

Alan W. Rateliff, II

I am surprised to see Opera ranking so high. Other than not being able to force it to play videos when not in focus, it is a rather powerful mobile browser. I expected Firefox to have a larger share than Opera, though not nearly as large as Chrome considering how it is wedged into Android base loads.

Mozilla.is irrelevant on Android

fnusnu

The reason Opera is doing so much better than Firefox is blindingly obvious to everyone apart from the Firefox developers: Opera supports zoom and reflow.

about:config

Alumoi

FIRST bring it back and THEN go for the add-ons.

After all, ublock and noscript are there already.

That's going to be a mother of a security risk

Anonymous Coward

So, install Firefox and then add extra externally sourced executable code [1]which could have very dodgy extras .

Sure, that will be totally safe *cough*. I hope there's at least a degree of sandboxing involved.

[1] https://www.theregister.com/2023/08/11/chrome_extension_developer_pressure/

Re: That's going to be a mother of a security risk

karlkarl

Native messaging is fairly rare in plugins (and the manifest specifically asks for this).

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging

Plugins are Javascript and in the same sandbox that executes in every single page you visit. So unless you turn off Javascript, I assume you trust it?

That said... Firefox, Chrome and Android itself is built upon "dodgy extras". Welcome to open-source; you can only audit so much.

Do I know something they don't?

lvm

I've been using extensions on Firefox (well, Fennec, but they are the same) for android for years. Ublock origin and Darkreader are the two things which makes browsing bearable.

Recursive traversal of loopback mount points