Android M – Systemless Unroot, OTA and re-Root

Since Google is now pushing monthly security updates, it becomes a regular procedure for me to temporarily un-root my phone to get OTA updates.
This post introduces the steps of how to unroot Android M (6.0 or above), get OTA update and then re-root it.

[Update] Let’s take Nexus6p as example to OTA from angler-MHC19I to angler-MHC19Q.



  • Factory image of MHC19I
  • TWRP (e.g.
  • SuperSU (2.60 or above, e.g. 2.68)



  1. Extract MHC19I’s factory image to get boot.img and recovery.img
    tar -xf angler-mhc19i-factory-8c31db3f.tgz angler-mhc19i/
    cd angler-mhc19i
    unzip boot.img recovery.img
  2. Flash stock boot and recovery
    adb reboot bootloader
    fastboot flash boot boot.img
    fastboot flash recovery recovery.img

Now the phone is un-rooted and we get the stock Android.

OTA or Sideload

If you got OTA update from Google, just run OTA, Android does the OTA automatically.

If you did not get OTA update, you have the option to use adb sideload to manually flash the OTA package.

  1. Get the OTA package;
  2. Go to stock recovery, in recovery screen, press and hold the Power key and the Volume up key for a few seconds, and then let go of the Volume up key, but keep pressing Power.
  3. In stock recovery, run below command to do the OTA upgrade:
    adb sideload

After OTA, we’re now on MHC19Q (April 2016 release).

Root again

  1. Flash TWRP
    adb reboot bootloader
    fastboot flash recovery twrp-3.0.0-1-angler.img
  2. Flash SuperSU
    • Press the Volumn and Power key to enter Recovery
    • In TWRP, flash
  3. Wipe cache/dalvik
  4. Reboot to system.

Now the phone is rooted again systemlessly.
Enjoy the new version 😉