brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.9k stars 2.34k forks source link

[Android] Add extension support to Brave Core Android #4493

Open bbondy opened 5 years ago

bbondy commented 5 years ago

This is a placeholder for adding extension support for Android. This was already in progress by @AlexeyBarabash

See also another browser that completed it already: https://github.com/kiwibrowser/src

ghost commented 5 years ago

Reference: #4117

bbondy commented 5 years ago

@thepcwiz101 the current repo is indeed https://github.com/brave/browser-android-tabs/ This is a new initiative to start to create android builds from this repo though. So he wasn't wrong at the time.

ghost commented 5 years ago

@bbondy oh ok.

szaimen commented 5 years ago

Any update on this?

hjyoung1 commented 5 years ago

Any updates on this?

ghost commented 5 years ago

The feature is non-essential. It may take up to a year to implement or it may not be implemented at all.

ghost commented 5 years ago

Report i made to google regarding extensions on android. https://bugs.chromium.org/p/chromium/issues/detail?id=1000168#c3

Pluripotentt commented 5 years ago

Brave Android needs extension to work, otherwise the ETH 2 way wallet (Metamask fork) can't work on android.

srirambv commented 4 years ago

Multiple +1's from #7606

+1 from @Raul1198 via #9151

ghost commented 4 years ago

9312

alagga commented 4 years ago

Any news on this? It was planned for Juni for the nightly wasn't it? :)

broadstairs commented 4 years ago

Just to add that despite my liking of the Brave browser on the desktop the Android version without extensions is impossible for me to use on Android. As others have already said Kiwi has extensions but without a sync capability it is also not worth running. So please actually make this happen I'm sure this will only be good for Brave.

bsclifton commented 4 years ago

@SergeyZhukovsky has looked at this and got it working- but the number of patches it takes is quite large. I believe it's something we'll have to tackle with multiple people (easy to get behind when Chromium upgrades happen). For now, I believe the effort is on hold

cc: @SergeyZhukovsky @bbondy for additional comments 😄 Maybe we can update the roadmap?

srirambv commented 4 years ago

+1 from @LifeIsStrange via #11577

tathastu871 commented 4 years ago

Kiwi browwser android has extension support and is based on chrome and is open source. Code avaiilable from its git repo. see if its source code can be combined with brave code to get extension and translate support for brave browser

bbondy commented 4 years ago

@SergeyZhukovsky has applied the patches and rebased them to a recent Chromium version, but the problem is that on each rebase on top of Chromium there are hundreds of patch files to rebase again, which takes weeks extra. And on the last bump that we did, from 1 major version to another, it added another 50 patches.

I believe that Kiwi browser last I checked was very behind on Chromium. Staying on top of Chromium versions, and being able to update them as close to Chrome as possible is needed especially for reasons of security. That doesn't mean it'll be impossible to ever do this, but we have to weigh the opportunity cost vs other things and ensure that we don't put Chromium upgrades at risk.

Arcitec commented 4 years ago

Would Chromium accept upstreaming most/all of the Kiwi "extension support" patches, so that the per-project patchset for Brave and other browsers becomes either smaller or nonexistent? Could be hidden behind a compiler flag if they want it to be off by default.

bbondy commented 4 years ago

Would Chromium accept upstreaming most/all of the Kiwi "extension support" patches, so that the per-project patchset for Brave and other browsers becomes either smaller or nonexistent? Could be hidden behind a compiler flag if they want it to be off by default.

I tried and they said in general no, but that they would accept patches that fix certain compile time guards to be around extensions being enabled vs android. Unfortunately that wouldn't help very much with the number of patches.

Arcitec commented 4 years ago

@bbondy That's really unfortunate. I wonder why they are against optional mobile extension support.

This discussion seems to be related to merging the Android extension checks you talk about:

https://bugs.chromium.org/p/chromium/issues/detail?id=1074710

srirambv commented 3 years ago

+1 from @sheikh-azharuddin via #14222

srirambv commented 3 years ago

+1 from @WriterDad via #14301

cbwee commented 3 years ago

I also need extension support on Android for 2 extensions, uBlock Origin, and Violentmonkey, currently I can only use them in Kiwi Browser, Yandex Browser and Firefox on Android.

dlenkes commented 3 years ago

After years of using brave, today I am to delete it. I waited for so long for the translation support, but nothing. Extensions are a great pain point too. After a few days with Kiwi, I decided to make it my primary browser and say goodbye to Brave. I am mentioning it knowing that loosing 1 user does not matter, but ignoring and too slowly acting on feedback will cost you on the long run.

LifeIsStrange commented 3 years ago

I no longer use brave for this reason too

Madis0 commented 3 years ago

Kiwi has extensions because they use a really old codebase for that. It is just not sustainable for Brave and other modern browsers to implement extensions just yet without having to redo a big part of the browser every time it updates. Case in point: Ungoogled Chromium also tried this and now discontinued it.

sheikh-azharuddin commented 3 years ago

Kiwi has extensions because they use a really old codebase for that. It is just not sustainable for Brave and other modern browsers to implement extensions just yet without having to redo a big part of the browser every time it updates. Case in point: Ungoogled Chromium also tried this and now discontinued it.

I completely disagree ...kiwi is running on chromium v88 Yandex already has extension support and running on same version as kiwi..probably they are copying the code as kiwi is open source

szaimen commented 3 years ago

..kiwi is running on chromium v88

No, it is not. Open kiwi://version and you will see that the source branch is Chromium 77 + Kiwi backported fixes. It just shows Chromium 88.0 to websites for compatibility reasons.

cbwee commented 3 years ago

The latest version of Yandex Android has Chromium 87, and still supports Chrome extensions.

Asatas commented 3 years ago

The latest version of Yandex Android has Chromium 87, and still supports Chrome extensions.

Thanks! For mobile I'm switching to Yandex rn.

divad42 commented 3 years ago

https://git.droidware.info/wchen342/ungoogled-chromium-android

Ungoogled Chromium has extension support for Chromium 88. It's what I'm using until Brave gets extensions.

kimkha commented 3 years ago

I'm no expert in this, but I saw the patch to chromium source code to make extensions work: https://github.com/wchen342/chromium-android-extension

Have anyone ever tried that?

Pointing8422 commented 3 years ago

It could be so cool if Brave Team worked with UC dev when he was developing extensions support. He said if he has support and contributions on the proyect he maybe could return to this.

sheikh-azharuddin commented 3 years ago

I doubt if brave team even read our comments

AlexeyBarabash commented 3 years ago

I doubt if brave team even read our comments

Oh, we do :)

bridiver commented 3 years ago

@NotNotMarshall I have deleted your comments. Abusive comments will not be tolerated and they are a violation of Github's term of service. If you persist in making these types of comments we will report the content to Github and block your account.

srirambv commented 3 years ago

+1 from @shockergit via #15411

We are asking for more than 2 years when will you merge the extension feature from kiwi

bridiver commented 3 years ago

I'm no expert in this, but I saw the patch to chromium source code to make extensions work: https://github.com/wchen342/chromium-android-extension

Have anyone ever tried that?

@kimkha we actually hired @wchen342, but it's not as simple as just applying a bunch of patches because that is very difficult to maintain and we have to balance priorities. We have made several efforts to come up with a more maintainable solution, but so far it has proved to be difficult. Probably a good first step would be an upstream patch to fix all the incorrect android OS guards which should actually be enable_extensions guards.

wchen342 commented 3 years ago

I'm currently working on some other Android related issues. If the extension support is going to start being implemented then I need to discuss with @SergeyZhukovsky to find out a feasible solution first, and then decide what to do. Purely patch-based approach is clearly a no-go which is proven by UC-Android.

bbondy commented 3 years ago

The Chrome team said they'd accept patches for the incorrect guards which should be enable_extensions guards btw.

bbondy commented 3 years ago

Not everyone in this topic knows as much software as you do. Can you be clear and precise instead of the uncomplicated? When exactly will the Android Brave browser support add-ons? Or can you give an estimated time?

We have no current commitment to ship add-on support but we continue to be interested in it and we'd like to support it. In this thread we'll continue to discuss ways to get us closer to it. So there is no date exactly or even vaguely right at this moment that I can share.

We do use Github for technical communication.
https://community.brave.com/ might be a better resource for higher level discussions of things if you want to avoid the technical discussion talk which Github is meant for. Happy to clarify things in Github though too any time! (Just please don't be offended by the technical discussion itself, thanks)

shockergit commented 3 years ago

Not everyone in this topic knows as much software as you do. Can you be clear and precise instead of the uncomplicated? When exactly will the Android Brave browser support add-ons? Or can you give an estimated time?

We have no current commitment to ship add-on support but we continue to be interested in it and we'd like to support it. In this thread we'll continue to discuss ways to get us closer to it. So there is no date exactly or even vaguely right at this moment that I can share.

We do use Github for technical communication. https://community.brave.com/ might be a better resource for higher level discussions of things if you want to avoid the technical discussion talk which Github is meant for. Happy to clarify things in Github though too any time! (Just please don't be offended by the technical discussion itself, thanks)

I have a suggestion why dont you guys just give support for only the most used extensions like, Ublock Orgin, Privacy badger, Https everywhere, NoScript, Cookiebro, Dark reader, Save to html etc.. just the way android firefox is doing.

bbondy commented 3 years ago

ya when we get support it'll be on a subset of the APIs at once so we'll have to enable extensions incrementally

bbondy commented 3 years ago

@bbondy Thank you for answering us. I have a last question, can I enable the add-on feature of the brave browser myself? With this https://github.com/wchen342/chromium-android-extension method, at least until official support arrives

Not without a lot of work and applying code patches and building yourself that change every time Chromium upgrades. I think that's not feasible for you to do right now.

shockergit commented 3 years ago

@bbondy Thank you for answering us. I have a last question, can I enable the add-on feature of the brave browser myself? With this https://github.com/wchen342/chromium-android-extension method, at least until official support arrives

Not without a lot of work and applying code patches and building yourself that change every time Chromium upgrades. I think that's not feasible for you to do right now.

I have one more suggestion what about the way samsung internet does by giving support to extension by installing it as a separate android app.

srirambv commented 3 years ago

+1 from @Rohit-codeboy via #16521

srirambv commented 3 years ago

+1 from @Nihal247 #17487

bridiver commented 3 years ago

If kiwi has updated to latest chromium we'll take another look and see if it looks maintainable. Saying that code is auto-rebased and actually being able to keep up-to-date with chromium releases on the same schedule is not the same thing. We work very hard to minimize patching and we still have a team working two major chromium releases ahead to keep up with changes.

lazymonkey2 commented 3 years ago

I have just tried kiwi on my phone: installed ublock origin and it works correctly. it seems faster than brave with it's adblocking enabled. I'd like to keep using brave but ignoring kiwi is getting harder.

about patching the chrome codebase I have found on reddit this comment from kiwi developer:

"True, basically the new strategy is to not remove code, but instead go all around if #if 0 and #endif and bind code at the very edge of functions (start or beginning) trying to change minimum things (like if Kiwi was a plugin to Chrome) It's absolutely horrible in terms of logic ("show toolbar", "ahem, actually no, don't show toolbar"), but in terms of maintenance it's fantastic (I've conducted at least 20 rebase already). I hope it'll pay off long-term yes :)"

maybe brave developers could try using the same approach.

bridiver commented 3 years ago

We take substantially more care than that with patching and also avoid it whenever possible by either subclassing and/or using the preprocessor to change class or method names. Even with all the care we take to avoid and minimize them, maintaining patches is not a trivial task.

On Aug 31, 2021, at 1:37 AM, Tortino @.***> wrote:

 I have just tried kiwi on my phone: installed ublock origin and it works correctly. it seems faster than brave with it's adblocking enabled. I'd like to keep using brave but ignoring kiwi is getting harder.

about patching the chrome codebase I have found on reddit this comment from kiwi developer:

"True, basically the new strategy is to not remove code, but instead go all around if #if 0 and #endif and bind code at the very edge of functions (start or beginning) trying to change minimum things (like if Kiwi was a plugin to Chrome) It's absolutely horrible in terms of logic ("show toolbar", "ahem, actually no, don't show toolbar"), but in terms of maintenance it's fantastic (I've conducted at least 20 rebase already). I hope it'll pay off long-term yes :)"

maybe brave developers could try using the same approach.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

ChaosBlades commented 3 years ago

Now can we either lock this issue to contributors only or us users restrain ourselves from simply responding with complains and immature jabs so that all of our email boxes can not be filled with useless notifications and still get updates on actual developments on this issue?

I have been on the internet for far too long to actually believe people can restrain themselves but always enjoy being proven wrong.