How to Install OTA update with TWRP on Zenfone 2

Ideally, to install a OTA update on your Asus Zenfone 2, you need to be on a stock system firmware with stock recovery and no root. However, many of us like to keep our devices rooted for Xposed framework and other useful/fun stuff root access allows on Android.

So what do you do when you have a OTA update to install for your Zenfone 2, but you can’t install it because your device is rooted. Well, there are is a quick workaround. And it is a bit lengthy process to follow.

Installing Zenfone 2 OTA update with TWRP recovery

Below is a preface of what we’ll be doing to make your rooted Zenfone 2 (with TWRP) compatible with the OTA update zip.

Preface:

  • Unroot your Zenfone 2
  • Uninstall Xposed framework
  • Edit OTA update zip to make it compatible with TWRP recovery
  • Flashing OTA update using TWRP
Step 1: Download/Save the OTA update

If you downloaded the OTA update from the update notification, you can find the OTA update under /cache directory with “dlpkg” file name. Copy the dlpkg file to your device storage and rename it to update.zip.

OR you can just download the OTA update zip from various forums on the internet where Zenfone 2 is discussed like xda and Asus’s official forums.

Step 2: Unroot your Zenfone 2

The first thing you need to do to install OTA update is to unroot your Zenfone 2. For this, open SuperSU app » select Settings tab » and then select “Full unroot” to permanently unroot the device and remove all traces of it from system.

Step 3: Uninstall Xposed framework

If you’ve Xposed installed on your Zenfone 2, you need to completely uninstall it to install the OTA update.

Download the Xposed Uninstaller x86 zip file and flash it from TWRP recovery to safely uninstall Xposed.

Note: For updated Xposed uninstaller, go to the official xposed thread and download the xposed-uninstaller-xxx-x86.zip file.

Step 4: Modify OTA update zip

Now you need to modify the updater script on the OTA update zip to make it compatible with TWRP.

First, unzip/extract the OTA update zip file that you saved/downloaded in Step 1. From the extracted files and folders go to META-INF/com/google/android/ directory and open updater-script file from there.

Tip: If you’re editing the file on PC, we recommend using Notepad++, or if you’re on mobile use either DroidEdit or Turbo Editor.

Once you’ve updater-script opened, remove the following lines from the file (2nd to 5th):

getprop("ro.build.fingerprint") == "asus/WW_Z00A/Z00A:5.0/LRX21V/2.20.40.90_20150903_4959_user:user/release-keys" ||
 getprop("ro.build.fingerprint") == "asus/WW_Z00A/Z00A:5.0/LRX21V/2.20.40.97_20150917_1572_user:user/release-keys" ||
 abort("Package expects build fingerprint of asus/WW_Z00A/Z00A:5.0/LRX21V/2.20.40.90_20150903_4959_user:user/release-keys or asus/WW_Z00A/Z00A:5.0/LRX21V/2.20.40.97_20150917_1572_user:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
getprop("ro.product.device") == "Z00A" || abort("This package is for \"Z00A\" devices; this is a \"" + getprop("ro.product.device") + "\".");

After making the changes, your updater-script file should begin with this code.

mount("ext4", "EMMC", "/dev/block/by-name/system", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
ui_print("Verifying current system...");

Once you’re sure you made changes correctly, save the updater-script file and repackage the all extracted files and folders into a new update.zip file.

Step 5: Flash the modified OTA update zip via TWRP

Finally after unrooting, removing Xposed and modifying OTA zip, you can now install the OTA update with TWRP recovery.

Just boot into TWRP and flash the OTA update zip like you’d flash any other zip using the recovery.

Hope you find the instructions above helpful.

Thanks AL_IRAQI for the original guide at xda.

Posted by
Shivam Malani

Shivam is our resident designer and web developer who also enjoys writing. He loves to meditate, drive on the freeways and hunt for snipers during his Call Of Duty playtime. Email: shivam@theandroidsoul.com

15 Comments

  1. Doesn’t work with the latest OTA update UL-Z00A-WW-2.20.40.139. File is different and also removing the first lines did’nt work. Were you able to apply the latest udate?

    1. Just delete 5th and 6th lines!!

    2. Thanks, it works!

  2. Doesn’t work with the latest OTA update UL-Z00A-WW-2.20.40.139. File is different and also removing the first lines did’nt work. Were you able to apply the latest udate?

    1. Just delete 5th and 6th lines!!

      1. Thanks, it works!

  3. Hi, tnx for this 🙂
    I don’t get it…
    My first 5 lines look like this:

    (!less_than_int(1454401163, getprop(“ro.build.date.utc”))) || abort(“Can’t install this package (二 2月 2 16:19:23 CST 2016) over newer build (” + getprop(“ro.build.date”) + “).”);
    ui_print(“Device image SKU:”);
    ui_print(getprop(“ro.build.asus.sku”));
    ui_print(“OTA image SKU: WW”);
    assert(getprop(“ro.build.asus.sku”) == “WW”);

  4. Hi, tnx for this 🙂
    I don’t get it…
    My first 5 lines look like this:

    (!less_than_int(1454401163, getprop(“ro.build.date.utc”))) || abort(“Can’t install this package (二 2月 2 16:19:23 CST 2016) over newer build (” + getprop(“ro.build.date”) + “).”);
    ui_print(“Device image SKU:”);
    ui_print(getprop(“ro.build.asus.sku”));
    ui_print(“OTA image SKU: WW”);
    assert(getprop(“ro.build.asus.sku”) == “WW”);

  5. […] the file downloaded, all I did was follow the getprop and setprop removal instructions from here: https://nerdschalk.com/install-ota-up…wrp-zenfone-2/ […]

  6. […] the file downloaded, all I did was follow the getprop and setprop removal instructions from here: https://nerdschalk.com/install-ota-up…wrp-zenfone-2/ (function(d,s,id){var […]

  7. […] […]

  8. Doesn’t work with the latest OTA update UL-Z00A-WW-2.21.40.61File is different and also removing the first lines did’nt work. Were you able to apply the latest udate?

  9. Doesn’t work with the latest OTA update UL-Z00A-WW-2.21.40.61File is different and also removing the first lines did’nt work. Were you able to apply the latest udate?

  10. Doesn’t work with the latest OTA update UL-Z00A-WW-2.21.40.61File is different and also removing the first lines did’nt work. Were you able to apply the latest udate?

  11. Doesn’t work with the latest OTA update UL-Z00A-WW-2.21.40.61File is different and also removing the first lines did’nt work. Were you able to apply the latest udate?

Comments are closed.