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

Search This thread

arovlad

Member
Aug 30, 2022
18
5
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:
  • Like
Reactions: ze7zez

arovlad

Member
Aug 30, 2022
18
5
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
127
17
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
18
5
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
127
17
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
127
17
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
18
5
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
127
17
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
18
5
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
127
17
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
18
5
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
127
17
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
18
5
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
127
17
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
18
5
  • 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
78
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
18
5
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
    Tried Method 1 but did not work. Method 2 worked without hiccups.

    Used on crDroid 9 android 13 - alioth
    1
    Thanks for the heads-up. Does your device have an A/B partitioning scheme (check by using this app)?
    Yes. It does.
  • 1
    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.
    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.
    1
    Thank you very much for putting in this much effort to figure out how to make this work in my case.
    Don't sweat it! Thank you for your patience and sorry I couldn't find a proper solution.

    I'll try more things and hopefully get it figured out!
    If you actually DO find a way, it would be awesome if you could report back. Maybe it will help others in the same situation. Good luck!
    1
    @arovlad it worked! Thx a lot !
    @arovlad Hi, Yesterday there was an update for LineageOS 19.1 for microG. Which i performed as usual. But after rebooting Bromite SysWebview is not available anymore. It seems the "OTA survival script" didn't worked.
    1
    @arovlad Hi, Yesterday there was an update for LineageOS 19.1 for microG. Which i performed as usual. But after rebooting Bromite SysWebview is not available anymore. It seems the "OTA survival script" didn't worked.

    Yeah, I experienced the same thing with the latest update, although some confirmed that it works indeed. I'll have to look into that.