Skip to content

Add Cromite Android extension support patches to Thorium#1191

Open
abue-ammar wants to merge 6 commits into
Alex313031:mainfrom
abue-ammar:main
Open

Add Cromite Android extension support patches to Thorium#1191
abue-ammar wants to merge 6 commits into
Alex313031:mainfrom
abue-ammar:main

Conversation

@abue-ammar
Copy link
Copy Markdown

Summary

Integrate Cromite's Android extension support into Thorium's patch workflow and documentation.

Changes

  • Added other/enable-extensions-android-thorium.patch adapted from Cromite's experimental Android extension support patch.
  • Added other/enable-extension-incognito-thorium.patch adapted from Cromite's Android incognito extension support patch.
  • Updated setup.sh to copy and apply both new patches during patchThor().
  • Updated docs/PATCHES.md with entries for both newly integrated patches.

Notes

  • The imported patches remain GPL-2.0-or-later as in the original Cromite sources.
  • This integrates the feature as Thorium-applied patches; runtime behavior is controlled by the patch content and Chromium/Thorium build/runtime flags.

Validation

  • bash -n setup.sh
  • bash -n build_android.sh

Copilot AI and others added 2 commits April 5, 2026 09:54
…on-patch

Add Cromite Android extension support patches to Thorium setup
@gz83
Copy link
Copy Markdown
Collaborator

gz83 commented Apr 5, 2026

Thank you for your contribution. Have you compiled and tested it? Also, Cromite's version is higher than Thorium's, so I think it's highly unlikely that Thorium can directly apply this patch.

@gz83 gz83 requested a review from Alex313031 April 5, 2026 10:13
Copy link
Copy Markdown
Collaborator

@gz83 gz83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll set it to -1 for now, until it's fully compiled, tested, and reviewed.

@abue-ammar
Copy link
Copy Markdown
Author

Thank you for your contribution. Have you compiled and tested it? Also, Cromite's version is higher than Thorium's, so I think it's highly unlikely that Thorium can directly apply this patch.

i can confirm it needs chrome v143+. and i haven't compiled it yet because my machine isn't capable

@gz83
Copy link
Copy Markdown
Collaborator

gz83 commented Apr 5, 2026

If it's only available on M143+ versions, then Thorium cannot use it yet.

In addition, Cromite is not the only branch that has introduced extensions support for the Android version of Chromium; as far as I know, there should be other branches that have done so as well.

I think further evaluation is needed before reviewing this patch.

@abue-ammar @Alex313031

@abue-ammar
Copy link
Copy Markdown
Author

If it's only available on M143+ versions, then Thorium cannot use it yet.

In addition, Cromite is not the only branch that has introduced extensions support for the Android version of Chromium; as far as I know, there should be other branches that have done so as well.

I think further evaluation is needed before reviewing this patch.

@abue-ammar @Alex313031

i do not think there is any other branch attatched to it. the patch actually bypass this for android. source: https://www.androidauthority.com/try-new-chrome-for-android-with-extensions-3569268

and if download and extract v143+ you will see chrome desktop android build and the patch is just bypass that as much i have investigated https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=AndroidDesktop_arm64%2F

@gz83
Copy link
Copy Markdown
Collaborator

gz83 commented Apr 5, 2026

The other branches I mentioned have already been mentioned in Alex313031/Thorium-Android#12 (comment). Including cromite, there should be at least 4 branches with extension support.

Alex holds most of the decision-making power in the Thorium project; we need to wait for him to make the final decision on which path to take.

Comment thread docs/PATCHES.md Outdated
- Made by uazo

Experimental Android Extension Support Patch > https://github.com/uazo/cromite/blob/master/build/patches/Experimental-support-for-extensions-on-Android.patch
- Adapted for Thorium from Cromite patch
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original author should also be credited here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Comment thread docs/PATCHES.md Outdated
- Adapted for Thorium from Cromite patch

Enable Extensions in Incognito on Android Patch > https://github.com/uazo/cromite/blob/master/build/patches/Enable-extension-in-incognito.patch
- Adapted for Thorium from Cromite patch
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Date: Thu, 6 Nov 2025 13:21:24 +0000
Subject: Experimental support for extensions on Android

Enable experimental support for extensions in Android.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After quickly reviewing the patch, I believe some code still needs modification, such as cromite->thorium.

Additionally, it's necessary to check whether the compiler likes this patch.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done as well!

Comment thread setup.sh Outdated
cp -v other/win_updater.patch ${CR_SRC_DIR}/ &&
cp -v other/keyboard_shortcuts.patch ${CR_SRC_DIR}/ &&
cp -v other/multi-language-translate.patch ${CR_SRC_DIR}/ &&
cp -v other/enable-extensions-android-thorium.patch ${CR_SRC_DIR}/ &&
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these two patches should only be applied if --android is passed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed put it under copyAndroid() so that when only --android is passed it will be applied

@gz83
Copy link
Copy Markdown
Collaborator

gz83 commented Apr 5, 2026

I think user script support should also be implemented as soon as possible if we continue to push for extension support.

abue-ammar and others added 4 commits April 5, 2026 22:04
Updated author attribution for several patches.
…cation

Fix Android-only patch application and rename Cromite refs in Thorium patch
@abue-ammar
Copy link
Copy Markdown
Author

I think user script support should also be implemented as soon as possible if we continue to push for extension support.

it is possible to add userscript. but for now extension support is very important. i think we should upgrade the chromium version and see how it goes. i think it should be fine since thorium does use some cromite patch.

@Zoran-The-Great
Copy link
Copy Markdown

Alex holds most of the decision-making power in the Thorium project; we need to wait for him to make the final decision on which path to take.

Don't hold your breath. It's already heen 3 years...

@gz83
Copy link
Copy Markdown
Collaborator

gz83 commented Apr 6, 2026

Thank you for editing your PR, even though it was generated using AI.

Additionally, I think we need to try regenerating the patch based on version M138, or wait until Thorium is based on version M144 LTS before continuing this work.

@abue-ammar
Copy link
Copy Markdown
Author

Thank you for editing your PR, even though it was generated using AI.

Additionally, I think we need to try regenerating the patch based on version M138, or wait until Thorium is based on version M144 LTS before continuing this work.

you are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants