Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android support? #1084

Closed
albell opened this issue Dec 15, 2016 · 25 comments
Closed

Android support? #1084

albell opened this issue Dec 15, 2016 · 25 comments
Labels
Android Firefox question Further information is requested

Comments

@albell
Copy link

albell commented Dec 15, 2016

Hi guys,

So, I was psyched to get the EFF email about the PB 2.0 release. But, I've got a Android phone. I've visited the PB install page in Firefox, Chrome, and Opera, and PB doesn't seem to be supported in any Android browser. W...... T....... F........ Am I missing something?

I love EFF. I want to see this project to succeed, beyond all of our wildest imaginations. But I have to scratch my head at the allocation of resources here. Mobile usage is approaching double that of desktop. We'll cross that line soon if we haven't already:

http://marketingland.com/digital-growth-now-coming-mobile-usage-comscore-171505

Is developing for desktop just easier? Why was a desktop release developed and released first? Mobile first, please!

I will donate hard cash towards a crowdfunding campaign for an Android release that has defined thresholds and deliverable dates. I'm sure I'm not alone. Tell me where to go.

@pde
Copy link
Contributor

pde commented Dec 15, 2016

One way you can try Privacy Badger on Android is via the WARP browser which includes a port of Privacy Badger 1.x (we'll also work with Qualcomm to get that up to 2.x)

@ccoenen
Copy link

ccoenen commented Dec 15, 2016

related to EFForg/privacybadgerfirefox-legacy#271 which is marked "wontfix", but apparently just because it's the legacy repository. :-) So there's hope!

@jawz101
Copy link
Contributor

jawz101 commented Dec 16, 2016

@jawz101
Copy link
Contributor

jawz101 commented Dec 16, 2016

... Note it was only made available on Android just a week ago. There's no user interface so I can't really tell if it's doing anything. The only thing I notice is on a rooted phone is this file

file:///data/data/org.mozilla.firefox/files/mozilla/(profile name).default/browser-extension-data/jid1-MnnxcxisBPnSXQ%40jetpack/storage.js

But the file doesn't look like it's logging anything as the desktop version does. It just has this after a few days of browsing. On the desktop this would be full of logged sites:

{"snitch_map":{},"action_map":{},"cookieblock_list":{},"supercookie_domains":{},"dnt_hashes":{},"settings_map":{}}

@albell
Copy link
Author

albell commented Dec 16, 2016

@jawz101 thanks. So it's... totally busted?

When I visit the project home page in Firefox 51 for Android this is what I see:

privacy-badger-site-12-15-2016-on-firefox51-android

This just after your big launch announcement. There's.... a lot of opportunity being left on the table here. Negative first impressions can be hard to reverse. Does this project have full-time maintainers? If not, how can users like myself help fund the hiring of them? Privacy can be a business, too, just like advertising.

@albell
Copy link
Author

albell commented Dec 16, 2016

P.S. I just downloaded WARP. It's cool niche product for the determined user, but the design/marketing is painfully amateur. It's hard to see this becoming a mainstream product with a global impact. I'd love to see a clearer path towards mass adoption on mobile.

@jawz101
Copy link
Contributor

jawz101 commented Dec 16, 2016

Well, I just go straight to the Firefox AMO page. Also, I don't even know if Firefox for Android is indeed e10s yet. When I go to about:support it still says multiprocess is disabled by add-ons. Now I think half of the problem is Mozilla still hasn't rolled e10s out to the mobile Firefox.

@cooperq
Copy link
Contributor

cooperq commented Dec 16, 2016

Hi all,
Lead developer here. The big blocker with android support is that mobile firefox still doesn't support web extensions. So if you want to see privacy badger on android go let mozilla know!

@jawz101
Copy link
Contributor

jawz101 commented Dec 16, 2016

@cooperq check my post above. I can actually find Privacy Badger on the AMO mobile site while on my Android phone, install it, just doesn't do anything

https://addons.mozilla.org/en-US/android/addon/privacy-badger17/

@albell
Copy link
Author

albell commented Dec 20, 2016

@cooperq Thanks for the response. I'm new to WebExtensions, but I'm looking at:

https://blog.mozilla.org/addons/2016/04/29/webextensions-in-firefox-48/

which says:

With the release of Firefox 48 we are announcing Android support for WebExtensions. WebExtensions add-ons can now be installed and run on Android, just like any other add-on. However, because Firefox for Android makes use of a native user interface, anything that involves user interface interaction is currently unsupported (similar to existing extensions on Android).

So is the lack of UI support the holdup? Is there a way to end-run around this, so that some version of PB2 can run on Fennec for the year 2017, before full support arrives?

@mcomella
Copy link

mcomella commented Apr 8, 2017

I briefly looked into this.

A list of implemented Web Extension features on Android can be found on MDN. For the back-end, I didn't check which ones are necessary for Privacy Badger to work.

For UI, the only currently implemented user-initiated UI element is pageAction. This is intended to be used for interactions on specific pages (e.g. if the page can be opened in an Android app, a button will appear in the toolbar to open that app) and, imo, wouldn't be a good fit for Privacy Badger. I think we'd want something more like the NativeWindow.menu API, which would put a menu item in the 3-dot menu. When this item is clicked, I imagine a new tab would open (or the content is overlaid on the current tab) and the user would see the same content as the Privacy Badger overlay on desktop.

The browserAction API is expected to add a menu item on Firefox for Android, but it's not implemented yet. Bug 1330159 is tracking this work and there is a WIP in one of its dependencies so I'd guess we might be seeing the necessary UI APIs earliest in Firefox 56 (release is 52 right now, Nightly is 55).

@ghostwords
Copy link
Member

ghostwords commented May 21, 2017

Cool, I'll be sure to consult how uBlock did the UI on Android when I get to working on our port.

The reason I haven't jumped on porting Privacy Badger to Firefox on Android is we still have some major bugs and performance issues on the desktop. For example, I'm currently working on fixing a tracking mis-attribution bug (Badger incorrectly attributes tracking to non-tracking domains) that seems responsible for a good chunk of our broken site backlog.

I hear you are frustrated and I am sorry about that, but try to see things from my perspective. Having working tests is essential to keeping a project like this (tiny team, open source) going effectively in the future. There is much to do besides implementing Badger on Firefox for Android, a platform with a pretty small market share.

If you'd like to see a certain feature get implemented, you could make a case for making that feature higher priority. You could report how your experience using Privacy Badger on Firefox for Android went. I know there is no UI, but it sounds like you installed and used it for a while (thanks to an addons.mozilla.org bug). Did you notice a difference in your browsing? Was it good? Bad? Or did it not work at all?

@strugee
Copy link

strugee commented May 22, 2017

@jawz101 another really great way to contribute would be to write an Android UI yourself. Or find someone who's willing to.

@jawz101
Copy link
Contributor

jawz101 commented May 22, 2017

@ghostwords @strugee
I know I was grouchy so I appreciate the feedback. If I had the skillset I would be all over helping but certain forms of programming are foreign to me. I do SQL all day but this sort of esoteric programming... well, I respect the work you do. Especially given Firefox seems to be in a constant state of development and poor documentation.

As for the FFox for Android add-on- right now it looks like it simply doesn't write anything to the storage.js file found in
/data/data/org.mozilla.firefox/files/mozilla//browser-extension-data\[email protected]

The file gets created on app install but nothing is logged as I browse.

@strugee
Copy link

strugee commented Jun 6, 2017

Hey @ShapeShifter499! Please don't add +1 comments, as they don't contribute anything to the discussion and just generate more email for the maintainers (and those who are subscribed to this issue) to go through. Instead, you can support issues by using GitHub's reactions feature (smiley icon at the top-right of each comment).

@ShapeShifter499
Copy link

Did something change recently? Going to the official Privacy Badger site at EFF on Firefox for Android no longer displays that it's not compatible.

@ghostwords
Copy link
Member

Yep, there were some fixes made to the website. Visiting on Android should suggest a couple of existing privacy tools for Android, but that may not yet be working.

@lemnis
Copy link
Contributor

lemnis commented Jul 16, 2017

I was interested in the current state of WebExtensions within Android and checked if it was possible to make this plugin work with reasonable ease. Unfortanelly it still has some "small" issues.

  • browserAction is recently added (v55, current beta), but it doesn't have support for all functions yet.
    • All functions within this API should be checked first before used
    • The pop-up doesn't work yet, so it must be faked
  • The options page is not accessible within the add-ons manager, but the add-ons manager can integrate an option UI. My quick fix is to make another options UI that redirects to the real options page.

Unfortanelly if you want to make this extension work within android right now, you will break it for other browsers and the current UI of the plugin doesn't help either.

I did make a fork (with no extra comments 😑 ) for everyone who is interested. https://github.com/lemnis/privacybadger

@ghostwords
Copy link
Member

ghostwords commented Jul 16, 2017

Very cool, @lemnis, thank you for your work!

Which parts of your WIP Android fork are incompatible with existing browsers?

When you say Badger's current UI is problematic for Android, what are the problems?

@lemnis
Copy link
Contributor

lemnis commented Jul 19, 2017

#1516 Added a pull request because we can add Android support without breaking it for other browsers. As result, I had to remove 1 feature compared to my previous commit/post.

Full detail:

  • The UI that I mentioned was mostly the overflow: hidden that was set and prevented scrolling, see full detail on bc231ec

    • Still you can't give back control to privacy badger within the popup, the button isn't visible. I haven't looked into this specific issue
  • You can't access the settings through the addon page, this was possible in my previous commit with a detour. While FF android doesn't support options_ui.open_in_tab, the extension should switch to options_ui (optionsv2). Because Firefox will never support options_page and

    Older versions of Chrome will only recognize options_page, and only open in tabs. Chrome 40 and onwards prefer to use the options_ui field if it's specified. (optionsv2)

    but a proper transition will involve a new UI for the options page, because all options will be loaded inside a popup in the 'extension manage page'

  • While bugzilla 137033 isn't resolved, the popup must be opened with a workaround (Added support for firefox on android #1516 background.js + popup.js)

Tested in Firefox for Android 56.0a1 (2017-07-18), should work from 55+. Did check chrome and firefox desktop, didn't see anything unexpected.

@ghostwords
Copy link
Member

Status update: Privacy Badger is available for Firefox on Android as Beta software:

screenshot from 2018-01-03 11 38 42

@ccoenen
Copy link

ccoenen commented Jan 3, 2018

Runs on my phone, I'll report back in case anything is nor working as expected.

@aschrijver
Copy link

I just installed the bèta.. worked perfectly for a little while.

But now there is no longer menu item for Privacy Badger where I can see the trackers and such.
I can still reach the settings via the Add-ons menu, but that's about it.

Android Samsung S7, and Firefox 57.0.4

@aschrijver
Copy link

ok, a full phone restart brings back the menu entry :)

@ghostwords
Copy link
Member

Resolving for now, as there aren't any clear followups at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Firefox question Further information is requested
Projects
None yet
Development

No branches or pull requests