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 superuser 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/
- Install the downloaded webview application with adb (‘adb install <path of your downloaded apk>’).
- Find the installed application’s folder. (It is usually in the /data/app folder).
- 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/<your webview> /system/app’)
- Rename the folder to webview (with the ‘mv <old directory name> 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 <old apk name> webview.apk’ ) and set its permissions to 644. (‘chmod 644 webview.apk’)
- Reboot your device.
If all the steps are done correctly then if you start the application it will start normally.