lineageos4microg / android_prebuilts_prebuiltapks

57 stars 103 forks source link

Ship Bromite SystemWebView as the webview #40

Closed ghost closed 3 years ago

ghost commented 3 years ago

Since, builds are happening on a monthly basis, the webview doesn't get updated throughout the month. Bromite has its own f-droid repository and as such can be updated directly from f-droid, without any rom updates. Bromite is fully compliant with the f-droid guidelines and isn't in the official repo due to not being able to be built on the f-droid virtual machines.

ghost commented 3 years ago

I think the sole purpose of this project should be to include those MicroG APKs that need signature spoofing. All other modifications should be up to the LineageOS developers. Keep it simple.

ghost commented 3 years ago

This would be great, but they're not going to do it because it uses the same package name as the Chromium Webview that Lineage ships with.

https://github.com/lineageos4microg/docker-lineage-cicd/issues/25

If they (Bromite devs) ever get around to changing the package name, then maybe they'll reconsider.

https://github.com/bromite/bromite/issues/520

In the meantime, you can always fork the repo to include it yourself, and add a script in addon.d to automatically remove the original Chromium Webview when you flash the update zip (just in case, to prevent it from interfering with Bromite Webview.) turns out you can just do LOCAL_OVERRIDES_PACKAGES := webview and it should automatically override default AOSP webview.

ghost commented 3 years ago

Note, though, that you might not actually need this. On Lineage, com.android.webview package name is whitelisted as a webview provider, regardless of signature. So you can delete /system/app/webview/webview.apk, then restart your phone, and it'll let you install Bromite webview as a user app via F-Droid. It doesn't need to be included as a built-in apk to work.

It might still be necessary to remove the original Chromium webview whenever you update the rom, some seem to say that this isn't necessary though. But just in case and to avoid potential issues, I'd remove it just so it can't interfere.

ghost commented 3 years ago

I think the sole purpose of this project should be to include those MicroG APKs that need signature spoofing. All other modifications should be up to the LineageOS developers. Keep it simple.

This project already includes F-Droid which isn't part of the MicroG project. And while Lineage is updated daily, this project is updated once a month and the webview doesn't get updated for the entire time period. Using bromite would allow the user themselves to update the webview through F-Droid. I'll close the issue since it seems to have already been discussed in another repo.

bananer commented 3 years ago

A less controversial solution for more frequent webview updates might be an F-Droid repository with daily/weekly signed builds of chromium-webview.

SebiderSushi commented 3 years ago

Note, though, that you might not actually need this. On Lineage, com.android.webview package name is whitelisted as a webview provider, regardless of signature. So you can delete /system/app/webview/webview.apk, then restart your phone, and it'll let you install Bromite webview as a user app via F-Droid. It doesn't need to be included as a built-in apk to work.

It might still be necessary to remove the original Chromium webview whenever you update the rom, some seem to say that this isn't necessary though. But just in case and to avoid potential issues, I'd remove it just so it can't interfere.

It should be woth noting that this has been fixed lately for supported LineageOS devices:
https://review.lineageos.org/c/LineageOS/android_frameworks_base/+/300878/

Basically the issue was that due this situation unsuspecting users trying to install let's say the Google WebView might accidentaly download & install a malicious APK that could act as a WebView provider on an untampered LineageOS. More about why exactly this is bad here.

The installation flow described by @Ammako still works but you'll have to place the Bromite WebView apk file into the /system/app/ directory for it to become a system app. That is, until the package name of the Bromite WebView gets changed.