On Tue, Jul 2, 2019 at 7:55 PM Himanshu Mistri <[email protected]>
wrote:

> We have our System application (.apk) installed on the device with system
> signature. Now we want to use WebView of android for loading HTML pages on
> UI. When we try to use WebView on our application, It does not allow and
> showing below the crash log.
>
> Caused by: java.lang.UnsupportedOperationException: For security reasons,
> WebView is not allowed in privileged processes
>
> For Solution of this issue, we might do the following by removing
> following code checking from
> https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/webkit/WebViewFactory.java
>  :
>
> IF we remove the following checking
>
> final int uid = android.os.Process.myUid();
> if (uid == android.os.Process.ROOT_UID || uid == android.os.Process.SYSTEM_UID
> || uid == android.os.Process.PHONE_UID || uid == android.os.Process.NFC_UID
> || uid == android.os.Process.BLUETOOTH_UID)
> { throw new UnsupportedOperationException( "For security reasons, WebView
> is not allowed in privileged processes");
> }
>
Code is there for specific reason as mentioned. If at all you want to use
webview then just remove
uid == android.os.Process.SYSTEM_UID check.

> But doing this case raise security concern which never wants to allow So
> can anyone suggest a more feasible solution to un WebView on system app.
>
> --
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-porting
>
> ---
> You received this message because you are subscribed to the Google Groups
> "android-porting" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/eec89286-e5d9-483a-8a20-2fa0bc3040e8%40googlegroups.com
> <https://groups.google.com/d/msgid/android-porting/eec89286-e5d9-483a-8a20-2fa0bc3040e8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Regards,
satish patel

-- 
-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CAEFWKbu%3Dnhw4aQz0S%2B_Hyyi_Fnn8mEXhFptt-L4eG0E-6X_8RA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to