News

How to prepare your rooted Android for official OTA updates

OTA-main

With Android L rolling out in the autumn, here are top tips for preparing your hacked phone for the OTA upgrade.

When you root and hack your phone, you deviate from the device manufacturer’s intended software setup, and in doing so, you invariably compromise your ability to install the OTA (over the air) updates that manufacturers push to keep devices bang up to date. Whether you physically break installation of the updates (perhaps with a custom recovery) or not, installing OTAs on a modified device is fraught with danger and generally not recommended.

As your device is not in the state that the manufacturer intended, trying to install could leave you with a non-booting system. For this reason, some manufacturers will even prevent updates being downloaded if they detect that your system has been modified for your own protection.

Thankfully, modifying your device is rarely a point of no return – on most devices you can revert to a state where OTA updates will apply, or in a worst case scenario you’ll be able to get your device to a point where, should something go catastrophically wrong when you try to update, you can revert back to where you started without losing any data.

The exact process varies depending on the manufacturer of your device and also slightly on the extent to which you have modified your system. We’re here to show the typical steps you need to carry out to get your device updated.

  1. OTA_Step1

    OTA compatible?

    Whether you can apply a manufacturer’s latest OTA and still keep your data intact depends on whether the ROM you are using is based on the stock ROM. If it is – and if it uses the standard security signatures – then you shouldn’t have to wipe. Non-stock based custom ROMs require you to wipe your data.

  2. OTA Step2

    Create a backup

    First, you need to make a backup. If you have a custom recovery, you can use this to create a Nandroid backup. Ensure you pull the backup completely off the device after. A tool such as Titanium Backup will let you restore your app data even if the system signatures have changed.

  3. OTA Step3

    Keep root

    When you apply a manufacturer OTA, it is common to lose root. This happens because manufacturers actively check and remove it, but also because some OTAs completely wipe the system partition and re-flash. It’s a good idea to check the forums to confirm whether other users retained it.

  4. OTA-Step4

    Revert back

    OTA updates perform a check of the system before they install. If the checksums don’t match (eg on a modified ROM), the update won’t install. For this reason, you need to flash at least your boot and system partitions to the stock versions using recovery, fastboot or a manufacturer tool.

  5. OTA Step5

    Stock recovery

    The process of applying the OTA update itself is carried out by the recovery image. Most hacked devices have a custom recovery installed, which will almost always prevent the OTA installing. To fix this, locate a stock recovery image for your device and flash it using dd, fastboot or a manufacturer tool.

  6. OTA Step 6

    Relock bootloader

    Some devices will not apply OTA updates if the bootloader is unlocked. This is another mechanism to try and prevent users bricking their devices. Most manufacturers let you relock the bootloader. On HTC devices with the S-OFF bit, it is also possible to use a dd command to set the bootloader to the factory state.

  7. OTA Step 7

    Remove flag

    In the same way that the OTA update may detect an unlocked bootloader, on some devices a tamper flag may be set that indicates system files have been modified. This can prevent OTA updates being downloaded. Again, if S-OFF is set, the tamper flag can be removed with a dd command.

  8. OTA step 8

    Apply to OTA

    When you’ve reverted to custom system and recovery images and relocked the bootloader if required, you’re finally ready to apply the manufacturer’s OTA update. When doing so, keep a close eye on the progress screen – particularly in recovery – to look for any issues.

  9. OTA Step 9

    Restore to backup

    Hopefully your device will boot up with no issues. Sometimes, however, a wipe can be required to get the system running again, in which case you’ll need to restore your backup. If using Nandroid and a re-flashed recovery, ensure you only restore the /data partition to avoid overwriting the OTA changes.

  10. OTA Step 10

    Future proof

    To make it easier to apply OTAs in the future, it’s a good idea to take a backup so that next time an OTA drops, you can revert the partitions back to the stock state. You could also upload the backup (minus your /data partition) to a forum such as XDA Developers to make it easier for your fellow users.

×