A4Alpha / mulch-webview-overlay

Easily install the security-hardened Mulch SystemWebView from DivestOS
The Unlicense
49 stars 9 forks source link

This method apperently doesn't work anymore #3

Open NeverSm1le opened 11 months ago

NeverSm1le commented 11 months ago

I have used both method (magisk and just the overlay zip) on 2 different devices, both run Android 13 QPR3. I contact rom developers and they doesn't change anything. It indeed worked on QPR2 so I guess Google do something that change the overlay in QPR3. Another module relies on overlay (open-webview) also doesn't work.

lss4 commented 9 months ago

It appears with newer Android 13 the overlay needs to be installed to /system/product/overlay instead of /system/vendor/overlay. Altered the build script to package the overlay to the new path and it worked -- Mulch Webview is now selectable.

lss4 commented 9 months ago

Here is an example change I made to the build script to create a package that'll install the overlay to the new path. The generated Magisk module also works with KernelSU.

I'm not sure about the compatibility with older Android versions when using /product/overlay instead of /vendor/overlay, so I'm tracking this change in a separate branch in my fork at the moment.

akasaka99 commented 9 months ago

Hi, I would like to try your updated version on /e/OS based LOS 20 (A13) using the custom recovery method and I see you made the changes to your script about a week ago but v0.1 is from March 17. Where your changes included in v0.1 ? Thanks

lss4 commented 9 months ago

I'm tracking this change on a separate branch in my own fork, as I do not know if this breaks Android 12 and earlier support. If older Android versions (preferably from 10 and onwards) can still work this way I could consider making a PR.

I only changed the build.sh script. You can just cherry-pick my commit into your existing workspace and create working packages, or fork my A13 branch.

lss4 commented 9 months ago

Hi, I would like to try your updated version on /e/OS based LOS 20 (A13) using the custom recovery method and I see you made the changes to your script about a week ago but v0.1 is from March 17. Where your changes included in v0.1 ? Thanks

Hmmm... if you're using custom recovery method instead of Magisk/KSU then I'm afraid I need to make some changes to update-binary. As I'm not modifying /system directly (by using the Magisk/KSU module)... I neglected it.

EDIT: The addon.d script is fine. It already covered the /product/overlay scenario.

lss4 commented 9 months ago

I've just added some more changes in my A13 branch.

Will now produce two different variants of packages, one for /vendor/overlay which will continue to work with older Android versions, and the other for /product/overlay which is needed by Android 13 and onwards.

Testing needed for non-Magisk/KSU packages as I'm not sure if changes to update-binary might have broken anything.

akasaka99 commented 9 months ago

I really like your rootless overlay approach, as you wrote in your notes it's indeed clean and elegant. I personally try to avoid Magisk if I can, eventhough it does wonders... at some risk.

  1. I just checked and I realise I also have a LOS A10 phone which I see has been a last updated with version 108.xxxx (never paid attention to it before as I assumed it would update somehow ...) probably since bromite stopped so I downloaded your v0.1 version from March 17 release.

  2. Sorry, where is your A13 branch ?

lss4 commented 9 months ago
2. Sorry, where is your `A13` branch ?

Here it is.

With my latest changes, there will be two sets of generated packages: vendor and product, indicating where the overlay would be installed.

I can't test the recovery packages for you, as I don't want to make changes to /system. The Magisk module can be used with KernelSU as well.

NeverSm1le commented 9 months ago
2. Sorry, where is your `A13` branch ?

Here it is.

With my latest changes, there will be two sets of generated packages: vendor and product, indicating where the overlay would be installed.

I can't test the recovery packages for you, as I don't want to make changes to /system. The Magisk module can be used with KernelSU as well.

As far as I'm understand, running build.sh will generate the necessary modules right? I'm a newbie at linux

akasaka99 commented 9 months ago

Ok needs to be installed manually. Won't go there as if there's an issue not sure will be able to revert to previous stage, so will leave it there. Thanks anyway!

lss4 commented 8 months ago

As far as I'm understand, running build.sh will generate the necessary modules right? I'm a newbie at linux

Yes, that's all you need. If the script finishes without issues, collect the modules in the build folder.

Ok needs to be installed manually. Won't go there as if there's an issue not sure will be able to revert to previous stage, so will leave it there. Thanks anyway!

I don't think it would cause too much harm, as it involves only a single file that would be the overlay. The problem is, you'll definitely have to rely on the module (Magisk/KSU), if your system partitions cannot be made r/w.

If you install it from recovery (such as Lineage's) you need to do so via adb sideload similar to how you'd install Magisk, GApps and such.

If your device happens to have a usable TWRP you may flash the zip directly from there after putting it into your phone storage.

I haven't changed the README file yet. The only difference from the original instructions would be to choose the one with product or with vendor depending on your Android version.

foxjaw commented 7 months ago

@lss4 Can you release this again for A13 ?

lss4 commented 7 months ago

@lss4 Can you release this again for A13 ?

Done.

Note that I cannot test MulchSystemWebViewOverlay as I'm using Magisk/KernelSU and I don't intend to modify /system on my device directly.

As usual, be sure to make backups in case something goes wrong.

foxjaw commented 7 months ago

Installed successfully

~ $ su -c cmd overlay list | grep mulch
[x] com.alpha.mulch.webview.overlay

But I don't see webview in dev options

Screenshot_20231120_201444

Why do you think so ?

Screenshot_20231120_201420

lss4 commented 7 months ago

Installed successfully

~ $ su -c cmd overlay list | grep mulch
[x] com.alpha.mulch.webview.overlay

But I don't see webview in dev options

Why do you think so ?

Which variant are you using?

On the other hand... I tried your command on my own device but I don't see the entry... hmmm...

Maybe it's because I'm on KernelSU?

EDIT: You should refer to the output of this command.

adb shell dumpsys webviewupdate

See if it has a line mentioning about us.spotco.mulch_wv.

foxjaw commented 7 months ago
~ $ su -c cmd overlay list | grep mulch
[x] com.alpha.mulch.webview.overlay
~ $ su -c cmd package list packages | grep mulch
package:us.spotco.mulch_wv
package:com.alpha.mulch.webview.overlay
~ $ su -c /bin/dumpsys webviewupdate
Current WebView Update Service state
  Multiprocess enabled: true
  Current WebView package (name, version): (com.android.webview, 113.0.5672.136)
  Minimum targetSdkVersion: 33
  Minimum WebView version code: 567263603
  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.android.webview, 113.0.5672.136)
  WebView packages:
    com.google.android.webview is NOT installed.
    com.google.android.webview.beta is NOT installed.
    com.google.android.webview.dev is NOT installed.
    com.google.android.webview.canary is NOT installed.
    com.google.android.webview.debug is NOT installed.
    Valid package com.android.webview (versionName: 113.0.5672.136, versionCode: 567263603, targetSdkVersion: 34) is  installed/enabled for all users
    org.bromite.webview is NOT installed.
~ $

Webview source: https://divestos.org/apks/official/fdroid/repo?appId=us.spotco.mulch_wv Overlay source: https://github.com/lss4/mulch-webview-overlay/releases/download/test-release1/MulchSystemWebViewMagisk-product.zip
Build: treble_arm64_bvN-userdebug 14 UP1A.231105.003 eng.ponces.20231108.174048 release-keys

I donno what's missing here.

lss4 commented 7 months ago

org.bromite.webview is NOT installed.

I think you've installed a Bromite WebView overlay before, which took priority over Mulch overlay so it cannot work.

Disable any other WebView overlay module you've installed, and see if it makes any difference.

foxjaw commented 7 months ago

Bromite I used 6 months before. It didn't exist now. I don't even know how it is showing there.
It's obsolete.

~ $ su -c cmd overlay list | grep bromite
~ $ su -c cmd package list packages | grep bromite
lss4 commented 7 months ago

Bromite I used 6 months before. It didn't exist now. I don't even know how it is showing there. It's obsolete.

~ $ su -c cmd overlay list | grep bromite
~ $ su -c cmd package list packages | grep bromite

The commands you're using are not reliable. On my device Mulch overlay is installed and usable, but it's not shown in # cmd overlay list. You need to check all your modules and see if you have any overlay that alters the webview package list.

lss4 commented 7 months ago

An update on this.

If you're using phh-based GSI this built-in overlay which included Bromite support back then may have conflicted with this, and probably explained why you have a Bromite entry in the list of WebViews.

I'll be downloading and inspecting the GSI build you mentioned to see if this applies. It's been a while since I used new GSIs and I kinda forgot about it.

EDIT: Confirmed. I've filed an issue there.

A possible workaround would be to override (replace) the existing overlay (/system/product/overlay/treble-overlay-highpriomisc.apk) with this one by using the same filename.

foxjaw commented 7 months ago

Tq. Works now.
Also, the above commands I use, are very reliable. Check your termux setup once.

lss4 commented 7 months ago

I've made a second experimental release, which raised the overlay's priority to 9999 from 1.

Should be enough to make it take effect in GSIs.

soulspark666 commented 7 months ago

I've made a second experimental release, which raised the overlay's priority to 9999 from 1.

Should be enough to make it take effect in GSIs.

This works for me on a Custom ROM without any issues.

meequrox commented 4 months ago

Can confirm @lss4's test-release2 works even on A14 (with Magisk).

cairobraga commented 1 month ago

Can confirm @lss4's test-release2 works even on A14 (with Magisk).

Can also confirm it works on /e/OS 2.1 (A13), as a Magisk module.