Alex313031 / Thorium-Android

Thorium builds for Android (arm64 and arm32).
https://thorium.rocks/
BSD 3-Clause "New" or "Revised" License
479 stars 9 forks source link

`SystemWebView_arm64.apk` has the wrong package ID #54

Open brian6932 opened 4 months ago

brian6932 commented 4 months ago

Problem It's set to com.android.webview instead of the usual com.throium.webview, this makes it so that you can't install it without getting conflicts.

Noticed on M123.0.6312.133-M124.0.6367.218

rd-su commented 3 months ago

We still have this issue with the new release...

Can this be fixed? Thanks!

marcdw1289 commented 3 months ago

Having the old com.android.webview package name works out for me. That is what is supported by custom ROMs (at least in the past, not sure about modern Android). Do modern ROMs support alternative webview package names out of the box?

I recently setup an old Oreo ROM on a Nexus 7 flo. Swapped out the webview for Thorium's and all is good. No need for Magisk modules or overlays. Can use Obtainium to keep it updated.

I'm all for keeping com.android.webview. 😏

brian6932 commented 3 months ago

@marcdw1289 com.android.webview can only work if your ROM installs the native webview outside of /system, which most don't do, your ROM makes it easier to remove. Unless you delete the app in /system, it'd be a bit of a pain to do it normally. It's better to use something like https://github.com/neoblackxt/AnyWebView and just swap it out in your settings menu. It's not normal or standard to use the same package ID as the default webview, it causes a ton of problems for most people.

marcdw1289 commented 3 months ago

@brian6932 Back in the day when Bromite's webview used `com.android.webview' I used a flashable installer (from nanolx) to replace the original webview. Then I would keep it updated via the Bromite F-Droid repo. After the package name change that was no more. Note that I was multibooting Nougat and Oreo ROMs. None running Magisk as I was not necessarily a fan of it. Preferred SuperSU or Lineage su.

On the devices with later Android I would use a Magisk or LSposed module to use Mulch webview.

However, on any device that had TWRP or derivative I could just manually place the overlay apk in a location like /vendor/overlay/ and have Mulch webview on all ROMs. From Nougat to A11 (I do not and never will run A12+). So for Thorium webview on AospExtended (Android 8 Oreo) I just replaced the webview in /system/ and all was good (this was after a fresh install, otherwise a dalvik wipe would hove been in order). Easy peasy if one has TWRP or similar. Nowadays folks use the very limited and lame LineageOS-style recovery. I forget, does it even have a dalvik wipe? Necessary when swapping out items that might have different signatures. Anyway, last night I updated the webview using Obtanium.

Speaking just for myself on my setups, I would rather be able to swap out the webview than use a Magisk or LSposed module.

That all said I understand what you're saying. Any problems probably come from the fact that Thorium webview has a different signature than the included com.android.webview(?).

brian6932 commented 3 months ago

I used a flashable installer (from nanolx) to replace the original webview. Then I would keep it updated via the Bromite F-Droid repo.

This isn't a thing you should have to do, it makes it hard to revert to your ROM's stock webview, which in most cases (if AOSP based) is preferable to the 3rd party webviews anyway (especially performance wise, as a lot of them disable JIT, and do other stupid stuff for the sake of ""security""). And no making backups isn't a ""solution"" to something that shouldn't be necessary in the first place.

(I do not and never will run A12+).

This single-handedly invalidates your point, as you become an unsupported user. If you like Windows 8.1, 8, 7, Vista, or XP, you can still use them, but don't expect support or safety, they have long passed EOL.

Speaking just for myself on my setups, I would rather be able to swap out the webview than use a Magisk or LSposed module.

The modules allow you to swap to any webview, without reboots even...

redphx commented 1 month ago

I also vote for having com.throium.webview as package name instead of com.android.webview.

image

My app has a built-in feature that allows selecting which WebView implementation to use in the app (no root needed). I switched to Thorium WebView and it worked great. But since newer builds use com.android.webview as package name, Thorium WebView can't be used on some devices (conflicted with System WebView).

If possible please switch back the package name, or have new builds with com.throium.webview as package name.

Thanks for your consideration.

rd-su commented 3 days ago

Still not fixed with today release...

rd-su commented 5 hours ago

@Alex313031 ,can you check this?

Thanks!