NOTE:
My objective is achieved in this message.

--------------------------------------------------------------------------------

Le 13/08/2018 à 14:37, Alexandre Lissy a écrit :

That should work, though, make sure you have enough space on the device sdcard0, as this will copy full device partitions.
Yes, thank you for the reminder.

Le 13/08/2018 à 14:57, Eduardo Trápani a écrit :
I would also avoid copying 'boot' and specially 'firmware'.
I noted.

--------------------------------------------------------------------------------

After I had performed the steps “Backup Procedure” and “Backup Download”, I flashed the file “system.img” to the other device, but it failed—I replaced the numbers with the word “NUMBER” in the following quotation:
fastboot flash system system.img
target reported max download size of NUMBER bytes
Invalid sparse file format at header magi
erasing 'system'...
OKAY [  NUMBER]
sending sparse 'system' 1/2 (NUMBER KB)...
OKAY [ NUMBER]
writing 'system' 1/2...
FAILED (remote: Unknown chunk type)
finished. total time: NUMBER
Then I executed the command “fastboot reboot”. The device is bricked.
I tried again and flashed the files “persist.img”, “boot.img” and “firmware.img”:
→ still failed and bricked.
I tried some then all commands with “sudo” outside the shell of “adb”:
→ still failed and bricked.

Then, I saw “backup and restore” from the available ClockworkMod recovery image booted by the command “sudo fastboot boot custom/recovery.img”—which is a command he mentioned, so I tried this option. Here are the steps I performed:
1) I started the device to backup into the bootloader.
2) I executed the previously mentioned command “sudo fastboot boot custom/recovery.img”. 3) After the device had displayed a list of choices, I selected “backup and restore”, then “backup to /external_sd”. → it is mentioned the backup of “boot image”, “recovery image”, “system”, “data”, “.android_secure” if existing, and “cache” 4) After the last disappeared list of choices had been reappeared—which means the backup is finished, I selected “+++++Go Back+++++”, then “reboot system now”. 5) The device displayed “Root access possibly lost. Fix? THIS CAN NOT BE UNDONE”, I chose the default selection “No”. After the device had rebooted, I requested it to power off. 6) I pulled the external SD card out to put it into the other device, then I started the device into the bootloader.
7) I performed the step “2)”.
8) After the device had displayed a list of choices, I selected “backup and restore”, then “restore from /external_sd”.
9) I selected the date to which I started the backup, then “Yes”.
→ the restoration of “cache” failed, so, before the step “3)” of my new try, I selected “wipe cache partition”, and the restoration of “cache” succeeded 10) After the last disappeared list of choices had been reappeared—which means the restoration is finished, I selected “+++++Go Back+++++”, then “reboot system now”. I performed the step “5)” to finish.

For information, here is the “recovery filesystem table” from the file “clockworkmod/backup/NUMBER/recovery.log” written into the external SD card:
0 /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system 0
1 /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache 0
2 /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata 0
3 /external_sd vfat /dev/block/mmcblk1p1 0
4 /boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot 0
5 /recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery 0
6 /custpack ext4 /dev/block/platform/msm_sdcc.1/by-name/custpack 0
7 /misc emmc /dev/block/platform/msm_sdcc.1/by-name/misc 0
8 /tmp ramdisk ramdisk 0

It seems all the preferences and application data had been restored, which achieved my objective.

--------------------------------------------------------------------------------

I checked if the files “persist.img” and “custpack.img” contained preferences and application data (for example I added a Firefox bookmark, rebooted the device, performed the steps to backup the “persist” and “custpack” partitions through “adb”, removed the Firefox bookmark, rebooted the device into the bootloader to flash these two files). It seems it is not the case.

About the main mentioned error I encountered when I tried to backup and restore through “adb”, I searched a little without finding a real solution. I preferred to stop since the “backup and restore” of the available ClockworkMod recovery image works.

--------------------------------------------------------------------------------

Backup and restore through the bootloader is very probably the best option to properly backup and restore a device since the operating system contained in it is not started as opposed to backup through “adb”.


Thank you for your messages!

_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to