I was using LG Nexus 5X with Lineage OS 14.1 for a long time. I wanted to switch to stock Oreo ROM to see how it is.

I made a backup of the following items (Lineage OS 14.1) using TWRP:

  • Boot
  • System Image
  • Data
  • System
  • Vendor
  • Vendor Image

and copied them to my PC. After that I downloaded:

8.1.0 (OPM7.181205.001, Dec 2018)

which is a factory image from Google website and executed "flash-all.bat" to install the stock ROM on the phone. The stock ROM worked good. Afterwards I wanted to restore Lineage OS from my backup. So I installed TWRP "twrp-3.2.3-0-bullhead.img", wiped the phone and restored all the items listed above.

After everything was completed, I rebooted the phone and there was a boot loop at Lineage OS logo. I downloaded an older factory image:

7.1.2 (N2G48C, Aug 2017)

and installed it with "flash-all.bat". It worked, the phone booted. Then again I installed TWRP "twrp-3.2.3-0-bullhead.img", wiped everything and restored all the items from Lineage OS. After it was done the device wouldn't boot. Boot loop at Lineage OS logo again. I tried with older TWRP "twrp-3.2.2-0-bullhead.img" but nothing has changed.

Is there any way I can restore the old Lineage OS 14.1 from the backup I made? I'm not an expert, I follow guides on the web, if you have any comments or questions please state them clearly. If you have an idea how to fix the boot loop, please write your thoughts with steps which I could follow.

Many thanks.

  • A few things I noticed right off the bat. You backed up the system and system.img. Same issue with vendor and vendor.img There is no need to do both and can cause issue. The device will signature check blocks of data on the system partition during boot at the block level. The usage of dm-verity prevents TWRP from being able to successfully restore a normal system backup. To avoid dm-verity bring down the hammer TWRP introduced the system.img which is a close enough to bit perfect that dm-verity does abort the boot process. Those two things are enough to cause your bootloop. – Bo Lawson Jan 24 '19 at 2:57
  • @BoLawson: I have a similar issue: I installed Lineage OS 15.1, used it, created a backup, using it a bit more, and then I wanted to go back to the TWRP backup I had created. But as with the OP that results in a boot loop. Unfortunately I don't understand what you're trying to say with regards to dm-verity, is there anything that can be done apart from a fresh install of the whole system? – FriendFX Sep 12 '19 at 4:08
  • For more information on dm-verity and what it means for TWRP backups, have a look at the article What should I back up in TWRP – FriendFX Sep 12 '19 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.