How to repair webview replace fail
How to repair device after WebView replace failed
If the WebView replace failed on your device then you have to follow these steps:
- Open a command prompt on your PC, and connect to your device via ADB. (https://developer.android.com/studio/command-line/adb/)
- Once you are connected, use the ‘adb shell’ command to access the terminal on your device.
- First, type ‘su’ to have super user privileges.
- Then move to the webview application folder (‘cd /system/app’).
- Here check if there is a folder called webview (‘ls -l’).
- If you find the webview folder then remove it (‘rm -rf webview’). Now the webview is permanently deleted from the device.
- Download the latest webview application from here: https://www.bromite.org/
- Exit from the shell with the ‘exit’ command (sometimes you have to use it twice to exit fully), and install the downloaded webview application with adb (‘adb install
’). - Open the shell again (2. And 3. step), and find the installed application’s folder (‘cd /data/app/’), and if the install was successful then the com.android.webview folder will be there.
- Remount the device’s system partition with the ‘mount -o rw,remount /system’ command (If your device’s Android version is 9.0 or higher then use this command: ‘mount -o rw,remount /’)
- Go to the /system/app folder and move the installed webview application from the /data/app folder to the /system/app folder (‘mv /data/app/
/system/app ’) - Rename the folder to webview (with the ‘mv <old directory name (which you have just moved here in the previous step)> webview’ and set its owner and group to root, and its permission to 755 (‘chown -R root:root webview/’, ‘chmod -R 755 webview/’)
- Move into the webview folder with the ‘cd webview’ command, and rename the .apk file to apk (‘mv
webview.apk ’ ) and set its permissions to 644. (‘chmod 644 webview.apk’) - Reboot your device.
- After the reboot clear the application data. (Settings -> Apps ->
-> Clear data)
If all the steps are done correctly then if you start the application it will start normally.