[GUIDE]How to install Bromite SystemWebView without Magisk (Android 12+ included)

Search This thread

arovlad

Member
Aug 30, 2022
23
12
This has not been tested on any other version other than Android 12.1. If you have issues please report them here or open an issue on GitHub.

I just upgraded to LineageOS 19 from 18.1 and as usual I want to apply my own modifications on top of it but the NanoDroid script that I previously used doesn't seem to work on 19. I couldn't find an answer neither on r/LineageOS, r/fossdroid or even XDA so I wrote a way to install Bromite SystemWebView in a way that's a lot more elegant and doesn't need Magisk or root.

Method 1 (preferred):
  1. Download the flashable package and install it in recovery mode either by placing it on the SD card or by sideloading, then reboot:
    Bash:
    adb sideload BromiteSystemWebViewOverlay.zip
  2. Download the latest Bromite SystemWebView release and install it as you would a regular app.
  3. Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.
Method 2 (legacy):
  1. Enable Rooted debugging by navigating to Settings > Developer options > Rooted debugging.
  2. Connect your phone to your PC and type
    Bash:
    adb root
  3. Mount the vendor folder:
    Bash:
    adb shell mount -o rw,remount /vendor
  4. Copy the package downloaded from here to the overlay directory:
    Bash:
    adb push treble-overlay-bromite-webview.apk /vendor/overlay
  5. Mount the system as read-write:
    Bash:
    adb shell mount -o rw,remount /
  6. Copy the OTA survival script to the appropriate location:
    Bash:
    adb push 99-bromite-webview.sh /system/addon.d
  7. Make the script executable:
    Bash:
    adb shell chmod 755 /system/addon.d/99-bromite-webview.sh
  8. Reboot the device:
    Bash:
    adb reboot
  9. Download the latest Bromite SystemWebView release and install it as you would a regular app.
  10. Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.

For a more in-depth explanation check the GitHub repository.
 
Last edited:

arovlad

Member
Aug 30, 2022
23
12
It is worth mentioning that after installing Bromite SystemWebView, developers will not provide any support when their banking applications are not functioning properly. Proven in practice.
I never encountered a mobile banking app that uses WebView (at least for the main functionality), but your mention is most welcome.
 

TheShanMan

Senior Member
Oct 29, 2013
137
25
I've been debloating and degoogling and old HTC 10 running android 8. I've been wanting to get bromite installed because chrome is installed as the webview. I'm rooted, but unfortunately the webview manager magisk module fails to install.

I just found this thread and would love to give this approach a try.

I have the /system/addon.d directory. I have /vendor but not /vendor/overlay. I have /mnt but not /mnt/system. The scripts I have in /system/addon.d (fdroid and minmicrog) only reference the system app and priv-app directories so no help there, unless those locations are fallback options. Can your instructions be adjusted for android 8?

I also have a rooted microg LOS 19 moto g7 that's served as a reference with my debloating/degoogling effort. I looked at the contents of /vendor/overlay there and found that all but one of the apk's in there had "vendor" in the name, so I searched recursively from / on my HTC and didn't find any apk's with "vendor" in the name. Do you have any other ideas on how I might identify the equivalent directory on my HTC?
 

arovlad

Member
Aug 30, 2022
23
12
I have /vendor but not /vendor/overlay.
Then try looking into /system/product/overlay.

I have /mnt but not /mnt/system.
Your path will be /mnt/system only if you mount the root from recovery mode.

all but one of the apk's in there had "vendor" in the name
The name doesn't matter, you can call the apks anything and they will still work.

Can you attach the output of the following command?
Bash:
adb shell cmd overlay list
 

TheShanMan

Senior Member
Oct 29, 2013
137
25
Then try looking into /system/product/overlay.
I don't have a /system/product directory. Here are the contents of my /system directory:
Code:
addon.d
app
bin
build.prop
compatibility_matrix.xml
customize
etc
fake-libs
fake-libs64
fonts
framework
lib
lib64
lost+found
manifest.xml
media
priv-app
tts
usr
vendor
xbin

And since "vendor" is part of the discussion, here are the contents of my /system/vendor directory:
Code:
app
bin
compatibility_matrix.xml
etc
firmware
framework
lib
lib64
manifest.xml
media
radio
rfs
ueventd.rc

Can you attach the output of the following command?
Bash:
adb shell cmd overlay list
The output from that command is nothing.

I'm happy to try as much as you'd like, including experimentation (I've gotten very used to nandroid backups and restores while degoogling and debloating :ROFLMAO:). Thanks for the help!
 

TheShanMan

Senior Member
Oct 29, 2013
137
25
Yeah I've seen that. It's a bit complicated, which is why I was hoping to either do it via the magisk manager module or via these steps. Ultimately if all else fails, I may give that a try. Hoping @arovlad will have the magic touch here, but I totally understand if there's no desire to invest time figuring out how to do this on an old device and android version.
 

arovlad

Member
Aug 30, 2022
23
12
I totally understand if there's no desire to invest time figuring out how to do this on an old device and android version.
I am all for supporting old hardware. The thing is I actually thought every device running Project Treble (TL;DR Android 8 and above) use overlays of some kind.

I have the following ideas:

Do steps 1-3 as explained above and then make a folder called overlay inside the vendor partition:
Bash:
adb shell mkdir -m 755 /vendor/overlay
Do step 4 and then run the following command:
Bash:
adb shell cmd overlay enable com.arovlad.bromite.webview.overlay

The output from that command is nothing.
Does it output nothing or does it output cmd: Can't find service: overlay? If the service cannot be found then the device may not be Treble-enabled. Please check if it is.

If it is try running:
Bash:
adb shell cmd overlay dump
and paste the output here.

Thanks for the help!
Thank you for your patience and investing time in this.

Edit: added link for Treble support
 
Last edited:

TheShanMan

Senior Member
Oct 29, 2013
137
25
It outputted nothing, and the treble check app says it's not enabled. Does that mean I'm out of luck or is there anything else to try? Thanks!
 

arovlad

Member
Aug 30, 2022
23
12
It outputted nothing

You mean the first command, the second, or both? Please use quotes accordingly so I can know what you're referring to.

the treble check app says it's not enabled. Does that mean I'm out of luck...?

You may be. You mentioned earlier that the Magisk module fails to install and that may be because your ROM is not Treble-enabled.

is there anything else to try?

Have you tried creating the overlay folder manually and then enabling it via ADB as I wrote above?
 

TheShanMan

Senior Member
Oct 29, 2013
137
25
Sorry, when I said it outputted nothing, it was in response to your question about the command "adb shell cmd overlay list". I tried creating the overlay folder and enabling it. The enable command gave no output so I don't know if it worked or not. I tried rebooting and then checking the webview setting in dev options, but it's still not there.

I'm guessing you assumed I would also then do steps 6 and 7. Is that right? If so, I'll have to try creating a magisk module to put the script in that location and hope it runs. I can't touch the actual system partition because doing so causes VoLTE to stop working on my phone, so I'm doing all my debloating/degoogling through magisk modules. I don't mind giving this a try, but since my phone isn't treble enabled, I'd like to verify that you think I ought to before I spend the time creating a magisk module for it.

Appreciate the help!
 

arovlad

Member
Aug 30, 2022
23
12
The enable command gave no output so I don't know if it worked or not. I tried rebooting and then checking the webview setting in dev options, but it's still not there.
Run the following command:
Bash:
adb shell dumpsys webviewupdate
and if it outputs org.bromite.webview is NOT installed then it works.
I'm guessing you assumed I would also then do steps 6 and 7. Is that right?
If your phone is old and doesn't receive official updates anymore, there's no need for addon.d, so no.

May I have the contents of the / (root) folder? Is there any partition called oem or odm? If so, what do they contain?
 

TheShanMan

Senior Member
Oct 29, 2013
137
25
I'm a little confused by you saying it works if it says "NOT installed", but no, it doesn't say anything about bromite. Here's the output:
Current WebView Update Service state Fallback logic enabled: true Current WebView package (name, version): (com.google.android.webview, 62.0.3202.84) Minimum WebView version code: 320208452 Number of relros started: 2 Number of relros finished: 2 WebView package dirty: false Any WebView package installed: true Preferred WebView package (name, version): (com.google.android.webview, 62.0.3202.84) WebView packages: Valid package com.android.chrome (versionName: 62.0.3202.84, versionCode: 320208452, targetSdkVersion: 27) is NOT installed/enabled for all users Valid package com.google.android.webview (versionName: 62.0.3202.84, versionCode: 320208400, targetSdkVersion: 27) is installed/enabled for all users

And the contents of / are:
acct bt_firmware bugreports cache carrier charger config cota crashdump.d cwkeys d data default.prop dev devlog dsp etc fataldevlog file_contexts.bin firmware fstab.qcom init init.environ.rc init.hosd.cradio.rc init.hosd.htc_pme.rc init.hosd.usb.configfs.rc init.hosd.usb.rc init.hosd_fusion.usb.rc init.htc.storage.exfat.rc init.htc.storage.mocana.rc init.rc init.recovery.common.rc init.recovery.htc_pme.rc init.usb.configfs.rc init.usb.rc init.zygote32.rc init.zygote64_32.rc mnt nonplat_file_contexts nonplat_hwservice_contexts nonplat_property_contexts nonplat_seapp_contexts nonplat_service_contexts oem persist plat_file_contexts plat_hwservice_contexts plat_property_contexts plat_seapp_contexts plat_service_contexts preload proc res root sbin sdcard sdcard2 sepolicy storage sys system tombstones ueventd.htc_pme.rc ueventd.rc vendor vndservice_contexts vzw vzwqualitylogger

/oem is empty.
 

arovlad

Member
Aug 30, 2022
23
12
I'm a little confused by you saying it works if it says "NOT installed"
Yeah, it's a little confusing, but if the overlay was successfully installed it should output NOT installed.

but no, it doesn't say anything about bromite. Here's the output:
Then it doesn't work.

Then try putting the overlay package inside, enable it (even if there is no output, just in case) and reboot the phone.

If it doesn't work, then you are out of luck as far as I know and your only option is to patch framework-res.apk manually.

Edit: clarification
 

TheShanMan

Senior Member
Oct 29, 2013
137
25
Not only did that not work, but the /oem directory got wiped out after booting up. It must get populated by something during boot. Thank you very much for putting in this much effort to figure out how to make this work in my case. I wish I could've reported victory, but maybe I'll get it figured out via framework-res. I've tried one approach with that unsuccessfully so far (which hung during boot). I'll try more things and hopefully get it figured out! Best of luck with your project and thanks for offering it to people!
 

arovlad

Member
Aug 30, 2022
23
12
  • Like
Reactions: TheShanMan

amanajosh

New member
Oct 12, 2022
2
0
Hi. Thank you for that step by step process of installing Bromite Webview.

I am a little confused about the 'vendor' part. What does that mean and why is it there? And as a consequence of that, I do not understand steps 6 & 7 beyond adb 'push' or 'shell'.

Any help is massively appreciated!
 

bre75

Senior Member
Jun 30, 2017
85
7
This has not been tested on any other version other than Android 12.1. If you have issues please report them here or open an issue on GitHub.

I just upgraded to LineageOS 19 from 18.1 and as usual I want to apply my own modifications on top of it but the NanoDroid script that I previously used doesn't seem to work on 19. I couldn't find an answer neither on r/LineageOS, r/fossdroid or even XDA so I wrote a way to install Bromite SystemWebView in a way that's a lot more elegant and doesn't need Magisk or root.

Prerequisites:
  • adb
  • Rooted debugging or a custom recovery
Installation guide:
  1. Enable Rooted debugging by navigating to Settings > Developer options > Rooted debugging.
  2. Connect your phone to your PC and type
    Bash:
    adb root
  3. Mount the vendor folder:
    Bash:
    adb shell mount -o rw,remount /vendor
  4. Copy the package downloaded from here to the overlay directory:
    Bash:
    adb push treble-overlay-bromite-webview.apk /vendor/overlay
  5. Mount the system as read-write:
    Bash:
    adb shell mount -o rw,remount /
  6. Copy the OTA survival script to the appropriate location:
    Bash:
    adb push 99-bromite-webview.sh /system/addon.d
  7. Make the script executable:
    Bash:
    adb shell chmod 755 /system/addon.d/99-bromite-webview.sh
  8. Reboot the device:
    Bash:
    adb reboot
  9. Download the latest Bromite SystemWebView release and install it as you would a regular app.
  10. Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.
For custom recoveries: skip the first two steps, enable ADB from recovery mode and follow steps 3-10 replacing /vendor/overlay with /mnt/system/vendor/overlay and /system/addon.d with /system/system/addon.d.

For a more in-depth explanation check the GitHub repository.

Hi, @arovlad thanks for this workaround. I'm running the exactly same LOS version than you on a OP6. But at step 5 i'm getting the following error : /dev/root is read-only any idea what can i do ? Thx for your help !
 

arovlad

Member
Aug 30, 2022
23
12
I am a little confused about the 'vendor' part. What does that mean and why is it there?

Starting Android Oreo, the vendor partition is a separate partition containing proprietary manufacturer code not part of AOSP. This separation ensures that the Android system can be updated without recompiling the device-specific software. The vendor partition is typically overlayed over the system partition, making it easy to apply tweaks and modifications without actually touching the system. These modifications are typically named systemless.

Did you install Bromite WebView successfully?

at step 5 i'm getting the following error : /dev/root is read-only any idea what can i do ?

Try the following command instead of step 5 and see if works for you:

Bash:
adb remount
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    After some consideration, I decided to also include Mulch WebView in addition to the one offered by Bromite. The installation now also defaults to /system/product/overlay as it doesn't require the device to be Treble-enabled and installing it to the vendor partition doesn't seem to bring any benefits anymore with SafetyNet being replaced by Play Integrity.

    You can download the new version from the GitHub releases page.

    Please be aware that by using Mulch SystemWebView you will be running some proprietary/non-free code.
  • 5
    Would be great if this overlay supported other webview providers like Mulch.

    @arovlad - Can you add Mulch's signature to your webview packages XML file? https://gitlab.com/divested-mobile/...64/Patches/Common/config_webview_packages.xml
    You can use this for mulch https://github.com/A4Alpha/mulch-webview-overlay
    4
    This has not been tested on any other version other than Android 12.1. If you have issues please report them here or open an issue on GitHub.

    I just upgraded to LineageOS 19 from 18.1 and as usual I want to apply my own modifications on top of it but the NanoDroid script that I previously used doesn't seem to work on 19. I couldn't find an answer neither on r/LineageOS, r/fossdroid or even XDA so I wrote a way to install Bromite SystemWebView in a way that's a lot more elegant and doesn't need Magisk or root.

    Method 1 (preferred):
    1. Download the flashable package and install it in recovery mode either by placing it on the SD card or by sideloading, then reboot:
      Bash:
      adb sideload BromiteSystemWebViewOverlay.zip
    2. Download the latest Bromite SystemWebView release and install it as you would a regular app.
    3. Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.
    Method 2 (legacy):
    1. Enable Rooted debugging by navigating to Settings > Developer options > Rooted debugging.
    2. Connect your phone to your PC and type
      Bash:
      adb root
    3. Mount the vendor folder:
      Bash:
      adb shell mount -o rw,remount /vendor
    4. Copy the package downloaded from here to the overlay directory:
      Bash:
      adb push treble-overlay-bromite-webview.apk /vendor/overlay
    5. Mount the system as read-write:
      Bash:
      adb shell mount -o rw,remount /
    6. Copy the OTA survival script to the appropriate location:
      Bash:
      adb push 99-bromite-webview.sh /system/addon.d
    7. Make the script executable:
      Bash:
      adb shell chmod 755 /system/addon.d/99-bromite-webview.sh
    8. Reboot the device:
      Bash:
      adb reboot
    9. Download the latest Bromite SystemWebView release and install it as you would a regular app.
    10. Navigate to Settings > Developer options > WebView implementation and select Bromite SystemWebView.

    For a more in-depth explanation check the GitHub repository.
    2
    Mulch webview overlay via magisk module working great on my Poco F3 with Crdroid 8/Android 12
    Thanks a lot
    2
    Just tested and wanted to say that your Mulch Webview Overlay works great on Android 9 as well! I tested with the Magisk module. The big gotcha is these overlays currently require that your OS supports Project Treble, which isn't available on some custom roms and phones. arovlad is looking to remove the treble requirement, so hopefully that will make installation easier: https://forum.xda-developers.com/t/...isk-android-12-included.4486569/post-88083043

    If your phone doesn't support Project Treble, then the closest thing to use is an Xposed / LSposed module called AnyWebView. Unfortunately, AnyWebView doesn't support Mulch yet, but there is a pull request: https://github.com/neoblackxt/AnyWebView/pull/6.
    1
    It is worth mentioning that after installing Bromite SystemWebView, developers will not provide any support when their banking applications are not functioning properly. Proven in practice.