neoblackxt/AnyWebView

Bromite

F-i-f opened this issue · 7 comments

F-i-f commented

Would you mind adding the Bromite system WebView to the list?

No. I think it is already added.
About the package name

AnyWebView.java

@neoblackxt Developer of bromite module here

I'd like to know a little more about how this works

@neoblackxt Developer of bromite module here

I'd like to know a little more about how this works

Hi, alexa-v2.
config_webview_packages.xml records which webview can be used.
SystemImpl.SystemImpl() parse that xml file
WebViewUpdater.providerHasValidSignature() check if the webviews' signatures are vaild.

505    private static boolean providerHasValidSignature(WebViewProviderInfo provider,
506            PackageInfo packageInfo, SystemInterface systemInterface) {
507        if (systemInterface.systemIsDebuggable()) {
508            return true;
509        }
510        // If no signature is declared, instead check whether the package is included in the
511        // system.
512        if (provider.signatures == null || provider.signatures.length == 0) {
513            return packageInfo.applicationInfo.isSystemApp();
514        }
515        if (packageInfo.signatures.length != 1) return false;
516
517        // Return whether the package signature matches any of the valid signatures
518        for (Signature signature : provider.signatures) {
519            if (signature.equals(packageInfo.signatures[0])) return true;
520        }
521        return false;
522    }

So I hooked this method and made it always return true.

I checked it doesnt work with bromite on android 6. I took WebViewGoogle module and changed package name (inside the code) of webview to com.android.webview and now it works.

Support for Android 10?
Installed on Android 10, but can't install Bromite Webview says "App cant be installed".

Support for Android 10?
Installed on Android 10, but can't install Bromite Webview says "App cant be installed".

On Android 10 a Webview must Target sdk29. As of yet bromite and upstream chromium only Target sdk28

In addition to that if you already have a package called com.android.webview in your system signature mismatch will occur and it'll refuse to install

Bromite seems to have started using org.bromite.webview for their package name, which I added in #3.