FORUMS
Remove All Ads from XDA

[MOD][CM12.1 BETA 3/20150506] Google Android System Webview

495 posts
Thanks Meter: 121
 
By elmkzgirxp, Senior Member on 15th May 2015, 12:10 PM
Post Reply Email Thread
Introduction
Google has updated Android System Webview for Lollipop, but is only exclusive for stock Nexus ROMs. The app is available in Play Store but renders unusable for non-Nexus ROMs. The 'framework-res.apk' contains a string that links the webview to the stock package 'com.android.webview,' and the updated webview uses the package name 'com.google.android.webview.' This mod replaces the link for the Webview from stock to the updated package.

An Xposed module is available but Xposed Framework is in its 'Super Alpha' stage for Android 5.1.1. This mod is for those who don't want to test an unstable build yet.

Instructions
NOTE: Ensure that a backup is available in case things get out of hand.
  1. Download and install Android System Webview from Play Store or replace the stock webview with Delta GApps Webview Addon (flash).
  2. Download the attached file and place it in the device's storage.
  3. Flash the downloaded file through recovery.
  4. Reboot the system.
The Following 2 Users Say Thank You to elmkzgirxp For This Useful Post: [ View ] Gift elmkzgirxp Ad-Free
 
 
15th May 2015, 05:01 PM |#2  
OP Senior Member
Thanks Meter: 121
 
More
DIY Tutorial

If you have other mods installed, you can apply this mod alongside them.

Requirements
Windows Platform
  • A PC
  • Modified framework-res.apk

Instructions
  1. Go to iBotPeaches' Apktool website and follow the installation instructions for Apktool 2.x.
  2. Place the modified framework-res.apk together with the previously downloaded files in the same folder.
  3. Hold 'Ctrl' + 'Shift' and right-click inside the folder and select 'Open command window here'.
  4. Type in:
    Code:
    apktool if framework-res.apk
    This imports the framework, which is what the 'if' stands for.
  5. Type in:
    Code:
    apktool d framework-res.apk -s
    This decodes the apk. The '-s' variable makes it decode only the resources, which saves us more time in decompiling.
  6. Navigate to 'framework-res\res\values'.
  7. Open up strings.xml and find 'config_webViewPackageName'.
  8. Replace 'com.android.webview' with 'com.google.android.webview' and save.
  9. Type in:
    Code:
    apktool b framework-res -c
    This rebuilds the apk, which is what the 'b' stands for. The variable '-c' copies the original AndroidManifest.xml and META-INF folder. These contain the signatures of the apk and are necessary to function properly.
    The recompiled framework-res.apk will be placed in 'framework-res\dist'.
  10. Overwrite the existing framework-res.apk manually or replace the one in the flashable zip with the newly modified framework-res.apk.
The Following User Says Thank You to elmkzgirxp For This Useful Post: [ View ] Gift elmkzgirxp Ad-Free
15th May 2015, 08:39 PM |#3  
Nicklas Van Dam's Avatar
Senior Member
Flag Tangerang
Thanks Meter: 886
 
Donate to Me
More
thanks for your guide bro
will try this soon, but what we know how this work, if we success install this mod?
16th May 2015, 07:08 AM |#4  
OP Senior Member
Thanks Meter: 121
 
More
Quote:
Originally Posted by Nicklas Van Dam

thanks for your guide bro
will try this soon, but what we know how this work, if we success install this mod?

The only way I found out it was working was when I removed/replaced the stock webview, Google apps didn't force close at boot. I haven't thought/found other ways on how to.
16th May 2015, 07:10 AM |#5  
Nicklas Van Dam's Avatar
Senior Member
Flag Tangerang
Thanks Meter: 886
 
Donate to Me
More
Quote:
Originally Posted by elmkzgirxp

The only way I found out it was working was when I removed/replaced the stock webview, Google apps didn't force close at boot. I haven't thought/found other ways on how to.

So I must deleted stock android web view?
16th May 2015, 07:27 AM |#6  
OP Senior Member
Thanks Meter: 121
 
More
Quote:
Originally Posted by Nicklas Van Dam

So I must deleted stock android web view?

It's not necessary as it is guaranteed to work. But if you really wanted to make sure, then you can go ahead and replace/remove the stock webview.
16th May 2015, 07:53 AM |#7  
Nicklas Van Dam's Avatar
Senior Member
Flag Tangerang
Thanks Meter: 886
 
Donate to Me
More
Quote:
Originally Posted by elmkzgirxp

It's not necessary as it is guaranteed to work. But if you really wanted to make sure, then you can go ahead and replace/remove the stock webview.

is this will make bootloop? i used cm and this very fragile for that thing
16th May 2015, 08:03 AM |#8  
OP Senior Member
Thanks Meter: 121
 
More
Quote:
Originally Posted by Nicklas Van Dam

is this will make bootloop? i used cm and this very fragile for that thing

No. You should consider the risk when dealing with these things. Otherwise don't attempt to do such modifications.
16th May 2015, 08:41 AM |#9  
Nicklas Van Dam's Avatar
Senior Member
Flag Tangerang
Thanks Meter: 886
 
Donate to Me
More
Quote:
Originally Posted by elmkzgirxp

No. You should consider the risk when dealing with these things. Otherwise don't attempt to do such modifications.

i'm not consider that -_-, but i'm very lazy to reflash again if this bootloop. ok thanks for suggest
i've do patch to core.jar from lucky patcher. that's why i lazy with that thing -_- . if reflash it take much time to patch it again
1st August 2015, 06:10 PM |#10  
mepsilon2's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 116
 
More
@elmkzgirxp
is there way to check if webview is working??
also there are three files related to webview in aosp ROMs at /system/lib folder
1)libwebviewchromium.so
2)libwebviewchromium_loader.so
3)libwebviewchromium_plat_support.so
do they need replacement as Google webview also has libwebviewchromium.so file
2nd August 2015, 05:14 AM |#11  
OP Senior Member
Thanks Meter: 121
 
More
Quote:
Originally Posted by mepsilon2

@elmkzgirxp
is there way to check if webview is working??
also there are three files related to webview in aosp ROMs at /system/lib folder
1)libwebviewchromium.so
2)libwebviewchromium_loader.so
3)libwebviewchromium_plat_support.so
do they need replacement as Google webview also has libwebviewchromium.so file

The only way I know is that it doesn't return error messages on certain apps in logcat.

If you're talking about AOSP, the three libraries are used by webview.apk, the stock one. If you are using 5.0+, then it's not necessary to remove them, as the libraries in the /system/app folder takes precedence. But if you're using 4.0+, then you have to replace them. Most flashable zips do this work for you, unless you're doing it manually.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes