We don't want to remove that check:- uid == android.os.Process.SYSTEM_UID As it will raise Security concerns, We are looking into a solution which is security safe.
On Thursday, 4 July 2019 04:12:19 UTC+5:30, Satish Patel wrote: > > > > On Tue, Jul 2, 2019 at 7:55 PM Himanshu Mistri <mistrih...@gmail.com > <javascript:>> 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: android...@googlegroups.com <javascript:> >> 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 android...@googlegroups.com <javascript:>. >> 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: android-porting+unsubscr...@googlegroups.com 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 android-porting+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-porting/91b4d45b-552f-4a93-aedf-6cc5a653802c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.