Restore Google Pixel Devices to Stock Firmware and Lock Bootloader
Though Google’s devices have failed to achieve as much height in selling as Samsung but Google Nexus has earned good name as third party developer support. Of course, this is the reason about the update of Oreo 8.1 on Google Nexus 5.Google Pixel devices are not so much different in this regard. Of course, with such a strong community behind them, the Google Pixel devices have a number of ROMs and other mods. Some of Mods probably get ported to other devices much later. Consequently, If you’ve ever done things such as installing mods and custom ROMs, you would come to know things can always go wrong. Of course, you may have created a backup before, but what if you did not or could not? Well, here’s how you can Restore Google Pixel Devices to Stock Firmware and Lock Bootloader.
Requirements To Restore Google Pixel Devices to Stock Firmware and Lock Bootloader
- First of all you require an unlocked Google Pixel device. Of course, You probably, already have an unlocked device because how else could you have screwed it up really.
- Now you require the appropriate stock factory image for your Google Pixel device.
- Of course, you require Google SDK Platform tools.
- Now you have to Make sure you have made backup of your complete internal storage, messages, contacts, and other necessary data pre-hand. The process will require formatting your device. However, this can be prevented if you prefer.
- Consequently, If you’re using a Windows PC, you will also need to install the latest Google USB drivers.
Downloads to Restore Google Pixel Devices to Stock Firmware and Lock Bootloader
- SDK Platform-Tools –Extract the downloaded archive and you should get a folder named platform-tools.
- Official factory images from Google developer website
Restore Google Pixel devices to stock firmware (flash-all script)
- First of all download the correct factory image for your Google Pixel device from the link provided above.
- Now extract the zip file and you should have a folder containing another zip file and a few image files.
- Hence, if you wish to prevent your device from being wiped clean, right-click on the flash-allfile and open it with a text editor of your choice (flash-all.bat for Windows, flash-all.sh for Linux).
Now find the line that reads fastboot -w update image-walleye-[version].zipand remove -w. The -w is the wipe user data switch. Thus, removing it prevents the user data from being wiped during the process. Close the file but make sure you save the changes.
5. Therefore, move all the files in the extracted folder now into the previously extracted platform-tools folder. 6.Now turn off your device and boot it into the Bootloader Mode. To do so, press and hold the Volume Down + Power buttons until you see a screen as shown below.
7. Once you get your flagship in the bootloader mode, connect your Google Pixel device to the computer using a USB cable. 8. Therefore, you launch the ADB interface by launching a command prompt or terminal window inside the platform-tools folder.
Sections for Firmware A. On Windows, you can do this by entering cmd in the address bar while inside the platform-tools folder. B. On Linux, depending on your file manager, the process can differ. A general way would be to right-click on the platform-tools folder and select Open with (Open in another application) and then selecting your Terminal app. 9. Hence, you simply use the command given below to flash the stock firmware on your Google Pixel device using the flash-all script provided in the firmware files.
- For Windows:
- For Linux/OSX:
- Of course, this will start the process, and you may see your device reboot multiple times. Press a key when you’re prompted to do so after the flashing process is complete.
How to Restore Pixel Devices to Stock Firmware (manual flashing)
Now you have another way that you can prevent your device from being wiped is by manually flashing all the required images. Of course, this is a more tiresome process but if the flash-all script doesn’t work for you due to some sort of black magic, this can come in handy.
- First of all the factory image can contain a series of nested archive files. For instance, the factory image for the Google Pixel (codenamed ‘walleye’) contains another zip archive inside the original zip file. There is, in fact, no need to extract this zip file.
- Now, simply move all the extracted files, including the image zip file, into the platform-tools folder.
- After that Open a command prompt or terminal window inside the platform-tools folder as described in the previous method.
- Now execute the following commands one by one. In case you have any trouble following, you can open the flash-all script file using a text editor. These are the very same commands that you will find in the flash-all script file. Do note that if you use fastboot -w flash update <image zip file name>.zip instead of fastboot flash update <image zip file name>.zip you’ll end up wiping all your data.
fastboot flash bootloader <bootloader image file name>.img
Now, fastboot reboot-bootloader
fastboot flash radio <radio image file name>.img
Again, fastboot reboot-bootloader
fastboot flash update <image zip file name>.zip
- If you’ve flashed all of the above, reboot your device using this command:
The first boot after a restore can take a few minutes.
How to lock the bootloader
- Now to lock bootloader again, reboot the device into bootloader mode as mentioned previously.
- Therefore, you connect the device to your PC and execute the following command in a command prompt or terminal window opened inside the platform-tools folder.
fastboot flashing lock
- At last Use the volume keys on your phone to highlight Yeswhen prompted and select it with the power button.