[Q] CWM Error restoring /data -- segmentation fault
I started having an issue a number of weeks ago restoring Nandroid backups. I'm using Philz touch 220.127.116.11/6.43.8 at the moment but I just verified that this also happens with stock CWM 18.104.22.168.
I'm using dedupe format for backups, and the problem is that the data.ext4.dup file is being written incorrectly when the backup is made. I hesitate to call it corrupt when the issue is so simple. Lines in the file normally look like:
<f(file)/l(ink)/d(irectory)> <perms> ...lots of fields... <path of real file> <path/SHA of blob>
The problems occurs when somehow a filename ends up split across multiple lines. Here's an example from a backup created with stock CWM:
d 771 10155 10155 1396525795 1402009315 1402009315 ./data/com.google.android.apps.docs/cache
d 700 10155 10155 1399614157 1401086052 1401086052 ./data/com.google.android.apps.docs/cache/diskCache
d 700 10155 10155 1399614158 1401551980 1401551980 ./data/com.google.android.apps.docs/cache/diskCache/fetching
d 700 10155 10155 1401466483 1401466485 1401466485 ./data/com.google.android.apps.docs/cache/diskCache/fetching/accountCache_8
f 600 10155 10155 1401466483 1401466485 1401466485 ./data/com.google.android.apps.docs/cache/diskCache/fetching/accountCache_8/thumbnail-120-120_downloaded_image_ZGFuaWVscy5zaG9zaGFuYUBnbWFpbC5jb20tZGI6Njc1MQ==
_1392334893224.png 52c/b294b55c50cc183e5662d16b3859a4fe5abbb5ba13e6563de83ceffbe3c89 7527
d 700 10155 10155 1401551980 1401552005 1401552005 ./data/com.google.android.apps.docs/cache/diskCache/fetching/accountCache_1
f 600 10155 10155 1401552002 1401552003 1401552003 ./data/com.google.android.apps.docs/cache/diskCache/fetching/accountCache_1/thumbnail-120-120_downloaded_image_ZGFuaWVsczIyMEBnbWFpbC5jb20tZGI6OTg4NA==
_1401551956997.png 769/62323607b25f51cfda2bbcab36527672f473d148d7b48c7618d2e7a398028 5269
f 600 10155 10155 1401552004 1401552005 1401552005 ./data/com.google.android.apps.docs/cache/diskCache/fetching/accountCache_1/previewImage_downloaded_image_ZGFuaWVsczIyMEBnbWFpbC5jb20tZGI6OTg4NA==
_1401551956997.png 725/0ba67d98359696b34934377e041dd415d4d48e3631643f3cc2c6cfc08d8fa 445437
When dedupe goes to restore that, well, somethings clearly not right and it segfaults. I'm not sure why it happens in the first place, though, when I'm pretty sure the files don't have line breaks actually in their names, nor are those lines the longest in the file.
I can get the backup to restore successfully by just deleting those lines (I could probably just delete the line break
, but they're invariably cache files that I don't need anyway), but it's a pain because I need a computer to do it.