resource id for webview

57 views
Skip to first unread message

杜士雄

unread,
Jun 17, 2017, 5:55:32 AM6/17/17
to Chromium-discuss
   As i know, the package id of resource id of webview in R.java is 7f ,and the package id in resources.arsc is 0x02
   so where is the place to change 7f to 02, how can i change 0x02 to other value? tks

Torne (Richard Coles)

unread,
Jun 19, 2017, 10:37:17 AM6/19/17
to dusx...@gmail.com, Chromium-discuss
WebView's package ID is neither 0x7f or 0x02 - it's assigned dynamically at the time it's loaded into the application and may be any value from 0x01-0x7e depending on what other assets have been loaded into the current application context. WebView's R class is modified at load time to point to the correct package ID by https://cs.chromium.org/chromium/src/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java?rcl=8c3e27ae5382bfd11d83c38176fd4a5169566e77&l=501

On Sat, 17 Jun 2017 at 05:55 杜士雄 <dusx...@gmail.com> wrote:
   As i know, the package id of resource id of webview in R.java is 7f ,and the package id in resources.arsc is 0x02
   so where is the place to change 7f to 02, how can i change 0x02 to other value? tks

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

杜士雄

unread,
Jun 20, 2017, 10:47:01 PM6/20/17
to Chromium-discuss, dusx...@gmail.com
Tks for reply,
My app is like this:
I compiled the webview as a standlone apk by my self, when i use aapt d resources xxx.apk,the package id of the resource id was 0x02, so i want to know where was the value set at compile time,
how can i change it.

杜士雄

unread,
Jun 20, 2017, 10:54:06 PM6/20/17
to Chromium-discuss, dusx...@gmail.com
And i did not install it,but load it with DexClassLoader as a file.

在 2017年6月21日星期三 UTC+8上午10:47:01,杜士雄写道:

杜士雄

unread,
Jun 20, 2017, 11:51:27 PM6/20/17
to Chromium-discuss, dusx...@gmail.com
And i debug the rewriter, the package id on diff tel is diffrent, does this mean the package id of webview was set by system and runtime?

在 2017年6月21日星期三 UTC+8上午10:54:06,杜士雄写道:
Reply all
Reply to author
Forward
0 new messages