Stuck on LOS boot screen after restoring backup

I have two FP2s, and I would like to copy the contents of the first to the second. The first is under LOS 17.1, rooted through Magisk, and the second under FPOOS, though freshly reset, and rooted through the developer options. Both have latest build.
What I tried:

  1. Backup phone 1 through TWRP on SD card
  2. Put SD card in second phone
  3. Flash TWRP on the second phone
  4. Backup second phone through TWRP
  5. Copy the backup of the first phone in the folder of the second phone (otherwise TWRP doesn’t find the backup)
  6. Wipe System, Data, Dalvik and Cache
  7. Restore the backup of the first phone
  8. Wipe Dalvik again (I’m not sure this is needed)
  9. Flash Magisk
  10. Reboot phone

And there I’m stuck on the LOS boot screen.

Further information

TWRP version for both phones: 3.3.1-1
I tried different variations of what I said above (Not flashing Magisk, not wiping Dalvik, etc…), same result each time.
Restoring the backup of FPOOS works without any problem.

Has anybody an idea? Did I do something wrong?
I did a few searches, but I found nothing interesting.

Wiping deletes all files, but may leave an existing folder structure intact.
You could try formatting the partitions instead of only wiping them.
For the data partition, there’s a convenient “Format Data” button in TWRP, for the rest please refer to “Addendum - How to format any other partition than Data” at the end of this lengthy guide here … 🇬🇧 🇩🇪 ✏ Installing the Fairphone 2 from scratch in case of failure / Komplette Neuinstallation des Fairphone 2 im Fehlerfall.

1 Like

Since LineageOS 17.1, a full backup of LOS actually only provides a backup of your data. It won’t restore the system. @oli.sax’s good advice: Newly install LOS through TWRP, then (without booting in between!) restore the data part of your LOS backup. Now boot into system.

2 Likes
Old answer: restoring FPOOS data into LOS

Try to understand what you’re doing so you understand what’s failing.

You’re doing a NANDroid backup, which is a collection of the NAND backups for each Android partition. A NAND backup is a raw backup, or an image, of the filesystem residing in a partition. Those partitions include system and boot —those that you would discard for a new OS—, and data. That data image is specific to FPOOS.

Then you’re trying to restore that data image to a fresh Lineage OS 17.1 installation, expecting it to work, despite being two different Android versions and also being signed by two different developers.

Sorry, that’s quite incompatible nowadays, Alex. You need to backup each app with something like OandbackupX (libre) or Titanium Backup (closed source) and then restore those.

Edit: Oops, I think I undestood something wrong. Do you want to CLONE a LOS installation from one device to the other?

Old answer

Thanks for the explanation @Roboe, I am well aware of that, but I think you didn’t understand what I meant :wink:

I wiped everything from the second phone (which was running under FPOOS) and want to copy identically the system, boot and data partitions of the first phone (running LOS 17.1) to the second.

I think @urs_lesse’s explanation is rather what I am looking for.

Exactly :slightly_smiling_face:

1 Like

Is that true for TWRP 3.4.0-0? I think they solved the system mounting point issues (this sounds like the culprit for that behaviour).

2 Likes

Hmmm, interesting, I might want to check if it works better under 3.4.0-0 as I have 3.3.1-1 on both devices.

I’m under the impression that TWRP 3.4 is one of the better releases of TWRP to the date. It fixed most of my problems with various devices. Give it a try and tell us.

Also, if system is well-backed up, then I don’t see any reason to re-flash Magisk.

1 Like

TWRP 3.4.0-0 doesn’t change anything.
As @urs_lesse said, a backup of LOS won’t restore the system correctly. According to my brother, it’s because Lineage needs something to boot that isn’t backed up by a Nandroid backup, and so it gets stuck on the boot screen. @urs_lesse’s solution surely works, but my brother wants to do it in another way. Though we won’t do it this evening, I’ll tell you more tomorrow and keep you updated.

1 Like

Just like Alex, I unfortunately ran into the same issue again recently under 3.4.0-0. :frowning:

2 Likes

So a little update.

@AnotherElk’s proposal didn’t change anything.

Then we tried with my brother the following procedure, which is by the way a very convenient way of backing up the internal storage:

  1. In TWRP file manager, rename /data/media to something else, for example to /data/mediabak
  2. Do a backup
  3. On the other phone, wipe Data, System, Cache, Dalvik and Internal Storage
  4. Restore the backup
    • Don’t reboot!
  5. In TWRP file manager, suppress /data/media
  6. Rename /data/mediabak to /data/media
  7. Reboot

But it had the same result.
So I reinstalled LOS as suggested by @urs_lesse, following @oli.sax’s good advice
I followed nearly the same steps except for the LOS installation.

  1. In TWRP file manager, rename /data/media to something else, for example to /data/mediabak
  2. Do a backup
  3. Wipe System, Data, Cache, Dalvik and Internal Storage
  4. On the other phone, install LOS.
  5. Restore the backup but only the Data partition
    • Don’t reboot!
  6. In TWRP file manager, suppress /data/media
  7. Rename /data/mediabak to /data/media
  8. Reboot

Et voilà, I have LOS running smoothly on the second phone with all the data and the internal storage.
I could perhaps do a wiki about how to back up internal storage with the following steps, for anyone interested, with more detailed instructions and screenshots. What do you think?

3 Likes

I suggest adding a note about making sure the backuo is saved to the SD card, since wiping Internal Storage in the next step is dangerous otherwise.

Is this the only step that changes?

Do the new system have Magisk and other mods installed? I don’t think so, since it’s a fresh installation and, to my knowledge, mutating mods are stored on /system and inmutable ones could reside in /data, but need to be hooked somewhere else (I guess at /boot, but I can’t ensure anything, since I haven’t ever used them to date).

W-e-i-r-d workaround. Documenting it will serve others well, :slight_smile:

1 Like

IIRC yes.

Nope, you have to flash Magisk again (and other mods).

Sure, I will do this when I have time with proper explanations and screenshots. Though I don’t know what could happen if you reboot when I wrote “Don’t reboot!”.
My brother had found the trick on an xda thread.

Edit:

Yes it is, because instead of restoring the system (which is for a reason I don’t know is broken under LOS 17.1), you install it and then restore the data partition.

I think I will do a wiki for devices under any OS, and add a N.B for LOS users about what’s special.

1 Like

Happy to hear you managed to reach your goal at the end :smiley:
Those manip are often a lot of trials and error to get things working :wink:

1 Like

I created the wiki under #twrpstoragebackup and added a NB in the #twrpbackup wiki.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.