قالب وردپرس درنا توس
Home / Tips and Tricks / How to Apply OTA Updates to Your Rooted Pixel 2 or 2 XL «Android :: Gadget Hacks

How to Apply OTA Updates to Your Rooted Pixel 2 or 2 XL «Android :: Gadget Hacks

So you have your Pixel 2 or 2 XL rooted and everything seems to work fine. However, a month passes and you receive a notification to install the monthly security update. Like clockwork, Google has published OTA security patches for a period of time each month, but there's a new problem for you here – as a rooted user, you can not apply the fix correctly.

I do not know Vital details can throw root novices and even experienced pixel owners back to the root scene anyway. It's critical to keep up with security updates, especially with all the malicious malware and exploits that have run rampant lately. In the following sections, we will discuss more detailed details about how to troubleshoot this update issue for root users.

The A / B Partition

Google launched the first Pixel Smartphone in 201

6 with a new feature called seamless updates. This allows an OTA update to be installed on a secondary partition while keeping the active partition intact (your current session). This makes it easier to update on the user side because the two partitions change places after a system reboot. For the new update method to work as intended, Google had to introduce another system partition in a new concept called the A / B partition.

To easily understand how seamless updates work with an A / B partition. Image via Gadget Hacks

This posed a challenge to the root scene in the earlier days since the recovery and boot partitions were merged due to the new layout, but has since been given great support Developers throughout the community. It is important to note that the seamless system updates and the A / B partition are no longer exclusive to the Pixel phones. We can assume that these new features will now be included in many more Android devices and in the future. If you want to know how the A / B partition works on newer devices like Pixel Smartphones, you can read Google's official statement.

The Solution for Root Users

While introducing the A / B partition is great for people who run stocks without root access, what about the root users like yourself? In the old days, you had to find the factory pictures from the manufacturer of the phone and flash the system back to the original stock firmware. This was a bit overwhelming for many, mainly because it essentially means that you need to clear the user data partition – nobody likes to do a factory reset and start it from scratch each time. But the layout of the A / B partition has helped mitigate this problem.

The solution? We need to harness the power of TWRP and use the ADB sideload feature in a recovery environment. If you load an Sideloading OTA update using this method, your device can apply the update exactly as a standard device can, but guess what? You keep all your data the same – no longer having to start each month! Let's look at how we can achieve this once and for all with the following simple steps.

Step 1: Choose the right cable

Go ahead and make sure your phone is connected to your computer via USB port before continuing. If you are lucky enough to have a native USB Type-C port on your computer, you can use it; Otherwise, you must use or purchase a USB Type-C to USB-A Cable to continue with this basic guide. Because you want to update your rooted device with an OTA file, you probably already have the cable you need.

An example of a USB-C to USB-A cable. Stephen Perkins's picture

Step 2: Download the OTA file

There's no other way – you still need to manually download the OTA image file. You can find the latest and most recent list of OTA images for the Pixel devices on Google's official firmware page:

For this guide, search for the device code name either Taimen (Pixel 2 XL) or Zander (Pixel 2). Scroll down to find the latest monthly security update that you want to install, and then click the download link next to it. Be sure to save this file to your computer.

Step 3: Download the Platform Tools

The A / B partition changes how root works When it comes to flashing files, this is a mandatory step for the OTA update to be applied correctly to your system. If you try to flash the OTA without the platform tools, you could cause yourself a boot loop. To avoid all these issues, download the latest SDK Platform Tools package from Google:

The official download page for the SDK platform tools. Image via Google

From this guide, 28.0.1 (September 2018) will be the most recent platform tool version we would like to use for the Pixel devices. Most root users will probably download the Windows version, but choose the platform that matches your current system.

Step 4: Move Files

Once you have downloaded the platform tools from step 3, proceed to Extract this file to any location of your choice. To keep things simple, we recommend extracting them to your desktop.

You then want to pick up the OTA file you downloaded in step 2 and drag that file to your newly extracted platform-tools folder on the desktop. To make things even easier, go ahead and rename this zip file to "ota" only (or "ota.zip" if file extensions are set on your computer).

An example of what your Platform Tools folder might look like. Image via Stephen Perkins

Renaming the ZIP file later makes it easier to initiate the sideload command in TWRP. You also do not need to worry about extracting the OTA file because the ADB sideload command reads it unchanged.

Step 5: Prepare ADB & Fastboot

If you are using Windows, [] install the ADB and Fastboot drivers, if you have not already done so (probably you did, when you first rooted your phone). Then, on your phone, turn on the hidden Developer Options menu and make sure that USB Debugging is turned on.

Step 6: Update TWRP

It is important that you get the latest version of TWRP Many issues in the past with the Pixel 2 devices in particular. That was again because of the A / B partition – it has just reached the point where everything is working properly now.

Before the last update, if you had enabled the fingerprint security feature, you had to disable it each time you want to boot into recovery mode. It was far from ideal to remove the security features each time, but this has been fixed since version 3.2.3-1 and beyond. It is always advisable to update TWRP as much as possible to avoid future conflicts when flashing files, especially on newer devices.

To update TWRP, access the latest ZIP file for Pixel 2 or Pixel 2 XL then just flash the file in Recovery. Want to know more about installing or updating TWRP? We have you covered!

Step 7: Open a Command Prompt in the Correct Folder

After TWRP has been updated, you must open a command prompt or a terminal window for the platform-tools folder. This varies depending on the operating system of your computer.

Windows Users :

Press the Windows key on your keyboard, type "cmd" and press Enter. Go back to your platform tools folder on the desktop. Copy the location of the folder by clicking the bar in the current window that indicates which folder you are in. Go back to your terminal and type "cd" followed by a space

Mac user :

Press Command + Space on your keyboard at the same time, type "Terminal" and press Enter. Go back to your platform tools folder on the desktop, then click "File" and choose "Get Info." Copy everything from the "Where:" area and then return to your terminal. Type "cd" followed by a space, paste the file path you just received, and press Enter.

Linux users :

Without complicating the Linux platform platform-tools folder on the desktop and right-clicking on an empty area of ​​the window. Now you need to select the option "Open in Terminal" so that the local files in this folder can communicate with the terminal.

Step 8: Boot in Recovery

Now that your terminal points to the terminal folder we need, go ahead and enter the following command:

windows user :

  adb reboot recovery 

Mac and Linux users :

  ./ adb reboot recovery 

Note : Because ADB / fastboot commands may not be installed system-wide, For Mac and Linux users, adding "./" manually before entering any of these commands in the future is critical. This will ensure that you start the files without problems in the local folder.

If everything is alright, your device responds by switching to the recovery environment. If security features such as Pixel Imprint are set up on your device, a message will appear asking you to enter your password. Go ahead and enter the password or PIN you use to unlock your device when you first start your system and tap Enter. If you are on the latest version of TWRP, your data will be successfully decrypted so that you can proceed.

Note : There still seems to be a bug in TWRP with the screen off timer on the Pixel 2 devices. For added security, turn off the screen timeout option to keep it enabled during installation. It may occasionally turn off completely and prevent it from being turned back on, resulting in a failed update or a half-walled device. To do this, start in the main TWRP menu, tap on "Settings" and then on the icon in the middle with the brightness symbol. Disable the only box available in this section and get started!

Step 10: Re-root (optional)

Because the new A / B partition integrates tighter core system files The way updates work now, you'll be back in the stock kernel right now will lose root access and you will be able to access stock recovery again. Feel free to install everything you want from this point of view that fits in with your personal device usage.

If you need a refresher on these extras, please visit the following guides:

That sounds like a lot of work at the beginning of this adventure, but it's also pretty easy to use and to wait once everything is set up. A new understanding of how all these things work will help you a lot in the root scene. Just think – now that preparations are complete, things should go smoothly from here. The next time you want to install an OTA update, all you have to do is download the file and start TWRP's ADB sideload command. Nice and easy. Enjoy your monthly OTA updates without ever losing your data!

Title image and screenshots of Stephen Perkins / Gadget Hacks

Source link