I made a nandroid backup with TWRP 3.0.2 on Sony Xperia M4 Aqua. When I tried to restore it, TWRP reported error 255 while restoring system partition. Upon closer examination, I realized that the size of backup is actually larger than available space on system partition. Available space after formatting is 2432MB, while backup size is 2483MB - 51MB larger.

As I understand, nandroid backup is actually a TAR archive of all files in a single partition, so I can't imagine a scenario under which this is possible. Partitions certainly weren't resized in the mean time. And I am certain the partition wasn't even close to full, because I already uninstalled many system apps using Link2SD. TWRP bug comes to mind, but while parsing the backup archive, I can't spot anything that doesn't belong there. Any ideas how this could happen? Could this be something Sony-specific?

EDIT: If someone finds themselves in similar situation, I found a workaround. I located some non-essential files inside the archive and deleted them using IZArc utility in Windows. I then copied the archive back to phone and this time restore went through. The mystery still remains, how could TAR create an archive larger than the original.

  • 1
    TWRP backups aren't just TAR archives. – Grimoire Apr 3 '17 at 22:02
  • @DeathMaskSalesman TWRP backups are TAR archives. I can find no difference between a TWRP backup and a set of splitted TAR archives. – iBug Apr 4 '17 at 4:32
  • @iBug So you were able to extract them via tar? – Grimoire Apr 4 '17 at 13:37
  • @DeathMaskSalesman They are definitely extractable by tar. In fact, instead of doing a restore from recovery, you can go to terminal and untar backup files from file system root. It works for data partition, but not for system partition, at least not on this particular phone. – Nikša Baldun Apr 4 '17 at 13:47
  • @NikšaBaldun This I did ignore. If I ask such a question, would any of you answer it? – Grimoire Apr 4 '17 at 13:49

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.