[TUT] Full U8800 backup with Linux howto

Search This thread

bonowax

Member
Nov 8, 2011
24
25
I hope this information is useful to you. It allowed me to restore my phone, after flashing the 2.3.5BETA from Huawei, effectively reverting the process. If you follow these procedures, you do so at your own risk. A typo in the needed commands may render your phone useless, so if you feel uneasy DON'T DO IT! That being said, on with the show.


Rationale: The U8800's memory is accessible as a mass storage device, when the phone is powered up in pink screen mode. This device holds the boot sector, partitions, operating system and user data. As such, it can be treated as any other block device and can be imaged to a file, through a bit-by-bit copy. The inverse is also possible and thus constitutes a valid backup/restore method.

Motives: Some weeks ago, I imaged my U8800 having in mind that spending time flashing ROMs, recovery and boot images could at some point go wrong and brick the device. Having a full dump of the device, done while it was in good working condition, would give me a chance of disaster recovery.

Requirements: Linux box and familiarization with Linux. I use Slackware 13.37 x86_64, but any flavour of Linux should do.


1 - Enter pink-screen mode by pressing power + vol up + vol down;

2 - Connect the USB cable. I recommend using the USB ports on the back of your PC (irrelevant if it's a laptop) as some PC cases have inadequate wiring to the front ports and will only allow slow data transfer. I've done it all while logged in as root, and not running X. If you're running X and HALD (automount of CD's and USB sticks, etc), you should unmount whatever units get automaticaly mounted when you plug the U8800 in. Avoid X if possible;

3 - Run 'dmesg' to ensure your U8800 was correctly detected. last output on screen should look like this:

[ 4444.026295] usb 1-2: New USB device found, idVendor=12d1, idProduct=1035
[ 4444.026300] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[ 4444.026304] usb 1-2: Product: Qualcomm CDMA Technologies MSM
[ 4444.026308] usb 1-2: Manufacturer: Qualcomm, Incorporated
[ 4444.029209] usb 1-2: selecting invalid altsetting 1
[ 4444.029265] scsi4 : usb-storage 1-2:1.20
[ 4445.031474] scsi 4:0:0:0: Direct-Access Qualcomm MMC Storage 2.31 PQ: 0 ANSI: 2
[ 4445.031755] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 4445.034576] sd 4:0:0:0: [sdb] 7733248 512-byte logical blocks: (3.95 GB/3.68 GiB)
[ 4445.035947] sd 4:0:0:0: [sdb] Write Protect is off
[ 4445.035952] sd 4:0:0:0: [sdb] Mode Sense: 0f 0e 00 00
[ 4445.035956] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4445.042568] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4445.053569] sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14 >
[ 4445.059328] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 4445.059335] sd 4:0:0:0: [sdb] Attached SCSI removable disk"

"sdb" is the device name alocated to the U8800. It can be "sdc", "sdd", "sde". Depends on the number of block devices (hard disks, USB sticks, card readers, etc) already present on your system.

4 - If your U8800 is showing up in "dmesg"' output, you are ready to create the image file, by typing "dd if=/dev/sdb of=u8800.img bs=512". Remeber: this example assumes the device name to be "sdb", yours may be different. If all goes well, you'll end up with the "u8800.img" file in the current directory. This is a 4GB transfer so it will take some time and there will be no progress indicator whatsoever. Final output should look like:

3959420000 bytes (3866621 KB) copied, [ time spent], [KB/s] ( These figures vary according to your transfer speed )

If the transfer fails, the output will show how many bytes were transfered along with the indication that there was an error; should it indicate an error, retry from the beginning, using a different USB port.

The resulting u8800.img file can be ziped, gziped, bziped, rared, whatever to reduce it's size to around 600 MB.

4A - This concludes the backup part;

5 - Having hold of the u8800.img file, you can restore it back to your U8800. Connecting and finding the device name of your mobile through the output of "dmesg" is the same as for backup and is described in (1), (2) and (3). To restore it, and assuming the img file resides in the current directory, type "dd if=u8800.img of=/dev/sdb bs=512". Don't forget to decompress the file in case you ziped it. Again, your device name may be other than "sdb".

Since writing to flash memory is a slower process than reading it, this operation will take longer than performing the backup. As an example, mine took around 45 minutes to complete, while other user reported 25 minutes for the same operation.

BEWARE: There's no way to perform a sanity check of the img file you're dumping back! Those commands will hapilly flash an Excel spreadsheet to your mobile's memory if you give it as a parameter to the "dd" command!


Final words

I used this method to revert to a pre 2.3.5BETA state. Huawei's update wrote a new bootloader, which is something not included in CWM backups and restores. Furthermore: CWM restores showed up errors about mountpoints. Ignoring these errors and performing a factory reset would allow FROYO to boot up and run, but my carrier's costumizations, which reside in the same volume as boot.img, and restore.img, were ignored afterwards. I didn't want this to be used as an argument by the carrier to consider my warranty void, should I need it...

Cheers
 
Last edited:

bonowax

Member
Nov 8, 2011
24
25
First of all, thanks for your tut, it's very helpfull for those who have linux

I have a question

The u8800.img contains all partition data?

Thanks in advance, regards


Yes. You can mount the image through /dev/loop and run fdisk on it to see the partition table.

There are windows tools to accomplish the same tasks of byte-copying to a file and vice-versa, but I haven't used them, since it was straight-forward with Linux.

Cheers
 

sport_billy

Member
Jun 23, 2009
41
12
Thank you very much for this tutorial.

But what about us who have not made this backup when we had the original froyo and flashed the original 2.3.5?
I have several CWM backups but none of them works(it keeps booting in recovery mode or not booting at all),unless i restore to factory data which is useless.

Can you or someone else please upload a clean froyo backup so we can flash it and go back to our 2.2 backups via CWM?
 

sewa2k

Senior Member
Jan 29, 2011
221
40
35
Villa Alemana
Yes. You can mount the image through /dev/loop and run fdisk on it to see the partition table.

There are windows tools to accomplish the same tasks of byte-copying to a file and vice-versa, but I haven't used them, since it was straight-forward with Linux.

Cheers

Thanks m8, i'll do it tonight, so i can start to porting roms to U8800-51
 

Blefish

Senior Member
Aug 19, 2011
1,036
2,941
Wow nice. I was waiting for something like this. I ran "sudo -i" before the process and it's copying right now. This is good for recovering the phone in case of soft brick.
 

m!xal!s

Member
Dec 4, 2011
30
17
That was a great tutorial! Thank you!

I did it on an Atom netbook last night, booting Linux from a USB thumb drive.
I saved the image on an external USB ntfs HDD, that it had to first be mounted, of course. I had to to this because the internal disk is an 8GB SSD with no room for a 4GB image file.

The imaging process took about 25 minutes on this machine, with all 3 USB 2.0 ports occupied (Boot USB drive, u8800, external USB drive). Transfer speed was about 2.7 MB/s.

Right now I'm trying to compress it with 7zip (maximum) and at 65% progress it has a 45% compression ratio (output/total). (The phone has many apps installed (1GB) and also I have the ndrive folder on the internal memory as a backup in case there is a problem with the ext SD.)
So I suggest you, to do the backup on an empty phone if possible, if you want the smallest size for your image.

Regards.
 

bonowax

Member
Nov 8, 2011
24
25
Thank you very much for this tutorial.

But what about us who have not made this backup when we had the original froyo and flashed the original 2.3.5?
I have several CWM backups but none of them works(it keeps booting in recovery mode or not booting at all),unless i restore to factory data which is useless.

Can you or someone else please upload a clean froyo backup so we can flash it and go back to our 2.2 backups via CWM?

It should be possible to dump and restore only the first two partitions, in which case it would make a much smaller up/download. This would restore the previous bootloader and allow CWM to operate normally ( or at least I hope so ).
I'll look into it.

EDIT: I dumped primary partitions 1, 2 and 3 to a image file which is around 140 MB after ziped. This could be enough to restore the old bootloader. "Could" is the keyword here, as it assumes the partition scheme is the same in every U8800.
 
Last edited:
  • Like
Reactions: sport_billy

sport_billy

Member
Jun 23, 2009
41
12
bonowax can you please upload it so we can give it a try?
I am having bootloops even with the new beta v2 they released today.
So your solution is the only way to revert back to 2.2 .
 

sport_billy

Member
Jun 23, 2009
41
12
Yes but if i restore my CWM backup after flashing via the classic method it keeps rebooting in recovery mode.
So it is useless and it also means that it is not completely the same as before.
Some people mentioned having issues after flashing 2.2 with the classic method .
I want to try the method mentioned here.
 

bonowax

Member
Nov 8, 2011
24
25
bonowax can you please upload it so we can give it a try?
I am having bootloops even with the new beta v2 they released today.
So your solution is the only way to revert back to 2.2 .

Unfortunately there is the IMEI issue. I don't know where it is stored, and dumping from phone to phone might not be a good idea, unless we're talking about two devices you can actually get a hold of AND you do a full backup of both devices prior to any experiments...
 

sensimilla

Member
Sep 5, 2008
47
6
London
Many, many thanks for posting this tutorial.

I ended up with a unformatted 4GB drive after trying to revert genokolar's custom partition script due to boot loops with the 2.3 beta. Luckily I had done a backup via this method so I was able to restore it successfully.

Be warned that it takes a long time to restore the full 4GB, well over an hour on my phone. I had almost given by the time it had finished.

I would definitely recommend this to anyone who wants to try any custom roms or messing around with scripts. I just wish I'd done it when my phone was completely stock.
 

Blefish

Senior Member
Aug 19, 2011
1,036
2,941
I started the phone in bootloader mode and WOW, my Ubuntu crashes. It gives some kernel message and the display is completely messed up. It worked before, but it made my computer not shut down properly. Any help is appreciated.
 

Commsman

Member
Jun 13, 2009
22
3
I started the phone in bootloader mode and WOW, my Ubuntu crashes. It gives some kernel message and the display is completely messed up. It worked before, but it made my computer not shut down properly. Any help is appreciated.

I was not able to use Ubuntu 11 - it auto mounted all the partitions and like you crashed when trying to dismount them.
I have tried every way to stop this auto mount behaviour - looking in all the forums I could find, but nothing worked, so yesterday I grabbed LinuxLive USB creator, http://www.linuxliveusb.com/ and used it to create a live Puppy Linux on my usb stick, it runs sweetly on my laptop (booting from the USB drive not running it using the vbox option inside Windows).

It immediately recognises all the U8800 partitions but does not automount them.
I ran the dd command after navigating in terminal to a spare folder on my laptop hard drive (after mounting the laptop hard drive with Puppy's useful mounter app), and now I have a u8800.img on my laptop hard drive! Perfect!

Oh - and of course once again - EVERY time I have used pink screen mode on my U8800 with the latest Stock Beta 2 Gingerbread, it re-boots ok but the SD card is gone. Booting into recovery mode and wiping the Dalvik cache is the way to solve this - it is now completely predictable and after doing this I am back to a really great phone - faster, cooler, great camera and video, BBC iPlayer etc.
 
Last edited:
  • Like
Reactions: Blefish

matteof93

Senior Member
Aug 26, 2011
660
248
Bagnolo Piemonte, ITA
will this method work also on u8800pro?

Isn't it the same of going to the pink screen, open the image directory and do a backup of all files in it?

BTW, the problem is that we need to go to the pink screen to restore the phone, right?

Inviato dal mio u8800pro usando Tapatalk
 

Blefish

Senior Member
Aug 19, 2011
1,036
2,941
will this method work also on u8800pro?

Isn't it the same of going to the pink screen, open the image directory and do a backup of all files in it?

BTW, the problem is that we need to go to the pink screen to restore the phone, right?

Inviato dal mio u8800pro usando Tapatalk

Simply copying the image is not enough, full copy (dd) backups system, cache, even IMEI, if I am not mistaken.
Easiest way is of course copying when in pink screen, but with some hacking it should be possible in Android aswell.

Sent from my U8800 using Tapatalk
 

matteof93

Senior Member
Aug 26, 2011
660
248
Bagnolo Piemonte, ITA
Simply copying the image is not enough, full copy (dd) backups system, cache, even IMEI, if I am not mistaken.
Easiest way is of course copying when in pink screen, but with some hacking it should be possible in Android aswell.

Sent from my U8800 using Tapatalk
but we already have a way to downgrade from 2.3.5 to 2.2.2 on u8800pro using update.app and update_g.app ;)
 

ksatta

Senior Member
Mar 8, 2011
298
77
Sieppijärvi
but we already have a way to downgrade from 2.3.5 to 2.2.2 on u8800pro using update.app and update_g.app ;)

Well if for example for reason x the partition table gets messed up or anything else, you can restore everything back with dd. If you can get into the pink screen.

Sent from my U8800 using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    I hope this information is useful to you. It allowed me to restore my phone, after flashing the 2.3.5BETA from Huawei, effectively reverting the process. If you follow these procedures, you do so at your own risk. A typo in the needed commands may render your phone useless, so if you feel uneasy DON'T DO IT! That being said, on with the show.


    Rationale: The U8800's memory is accessible as a mass storage device, when the phone is powered up in pink screen mode. This device holds the boot sector, partitions, operating system and user data. As such, it can be treated as any other block device and can be imaged to a file, through a bit-by-bit copy. The inverse is also possible and thus constitutes a valid backup/restore method.

    Motives: Some weeks ago, I imaged my U8800 having in mind that spending time flashing ROMs, recovery and boot images could at some point go wrong and brick the device. Having a full dump of the device, done while it was in good working condition, would give me a chance of disaster recovery.

    Requirements: Linux box and familiarization with Linux. I use Slackware 13.37 x86_64, but any flavour of Linux should do.


    1 - Enter pink-screen mode by pressing power + vol up + vol down;

    2 - Connect the USB cable. I recommend using the USB ports on the back of your PC (irrelevant if it's a laptop) as some PC cases have inadequate wiring to the front ports and will only allow slow data transfer. I've done it all while logged in as root, and not running X. If you're running X and HALD (automount of CD's and USB sticks, etc), you should unmount whatever units get automaticaly mounted when you plug the U8800 in. Avoid X if possible;

    3 - Run 'dmesg' to ensure your U8800 was correctly detected. last output on screen should look like this:

    [ 4444.026295] usb 1-2: New USB device found, idVendor=12d1, idProduct=1035
    [ 4444.026300] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
    [ 4444.026304] usb 1-2: Product: Qualcomm CDMA Technologies MSM
    [ 4444.026308] usb 1-2: Manufacturer: Qualcomm, Incorporated
    [ 4444.029209] usb 1-2: selecting invalid altsetting 1
    [ 4444.029265] scsi4 : usb-storage 1-2:1.20
    [ 4445.031474] scsi 4:0:0:0: Direct-Access Qualcomm MMC Storage 2.31 PQ: 0 ANSI: 2
    [ 4445.031755] sd 4:0:0:0: Attached scsi generic sg2 type 0
    [ 4445.034576] sd 4:0:0:0: [sdb] 7733248 512-byte logical blocks: (3.95 GB/3.68 GiB)
    [ 4445.035947] sd 4:0:0:0: [sdb] Write Protect is off
    [ 4445.035952] sd 4:0:0:0: [sdb] Mode Sense: 0f 0e 00 00
    [ 4445.035956] sd 4:0:0:0: [sdb] Assuming drive cache: write through
    [ 4445.042568] sd 4:0:0:0: [sdb] Assuming drive cache: write through
    [ 4445.053569] sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 sdb7 sdb8 sdb9 sdb10 sdb11 sdb12 sdb13 sdb14 >
    [ 4445.059328] sd 4:0:0:0: [sdb] Assuming drive cache: write through
    [ 4445.059335] sd 4:0:0:0: [sdb] Attached SCSI removable disk"

    "sdb" is the device name alocated to the U8800. It can be "sdc", "sdd", "sde". Depends on the number of block devices (hard disks, USB sticks, card readers, etc) already present on your system.

    4 - If your U8800 is showing up in "dmesg"' output, you are ready to create the image file, by typing "dd if=/dev/sdb of=u8800.img bs=512". Remeber: this example assumes the device name to be "sdb", yours may be different. If all goes well, you'll end up with the "u8800.img" file in the current directory. This is a 4GB transfer so it will take some time and there will be no progress indicator whatsoever. Final output should look like:

    3959420000 bytes (3866621 KB) copied, [ time spent], [KB/s] ( These figures vary according to your transfer speed )

    If the transfer fails, the output will show how many bytes were transfered along with the indication that there was an error; should it indicate an error, retry from the beginning, using a different USB port.

    The resulting u8800.img file can be ziped, gziped, bziped, rared, whatever to reduce it's size to around 600 MB.

    4A - This concludes the backup part;

    5 - Having hold of the u8800.img file, you can restore it back to your U8800. Connecting and finding the device name of your mobile through the output of "dmesg" is the same as for backup and is described in (1), (2) and (3). To restore it, and assuming the img file resides in the current directory, type "dd if=u8800.img of=/dev/sdb bs=512". Don't forget to decompress the file in case you ziped it. Again, your device name may be other than "sdb".

    Since writing to flash memory is a slower process than reading it, this operation will take longer than performing the backup. As an example, mine took around 45 minutes to complete, while other user reported 25 minutes for the same operation.

    BEWARE: There's no way to perform a sanity check of the img file you're dumping back! Those commands will hapilly flash an Excel spreadsheet to your mobile's memory if you give it as a parameter to the "dd" command!


    Final words

    I used this method to revert to a pre 2.3.5BETA state. Huawei's update wrote a new bootloader, which is something not included in CWM backups and restores. Furthermore: CWM restores showed up errors about mountpoints. Ignoring these errors and performing a factory reset would allow FROYO to boot up and run, but my carrier's costumizations, which reside in the same volume as boot.img, and restore.img, were ignored afterwards. I didn't want this to be used as an argument by the carrier to consider my warranty void, should I need it...

    Cheers
    1
    Thank you very much for this tutorial.

    But what about us who have not made this backup when we had the original froyo and flashed the original 2.3.5?
    I have several CWM backups but none of them works(it keeps booting in recovery mode or not booting at all),unless i restore to factory data which is useless.

    Can you or someone else please upload a clean froyo backup so we can flash it and go back to our 2.2 backups via CWM?

    It should be possible to dump and restore only the first two partitions, in which case it would make a much smaller up/download. This would restore the previous bootloader and allow CWM to operate normally ( or at least I hope so ).
    I'll look into it.

    EDIT: I dumped primary partitions 1, 2 and 3 to a image file which is around 140 MB after ziped. This could be enough to restore the old bootloader. "Could" is the keyword here, as it assumes the partition scheme is the same in every U8800.
    1
    I started the phone in bootloader mode and WOW, my Ubuntu crashes. It gives some kernel message and the display is completely messed up. It worked before, but it made my computer not shut down properly. Any help is appreciated.

    I was not able to use Ubuntu 11 - it auto mounted all the partitions and like you crashed when trying to dismount them.
    I have tried every way to stop this auto mount behaviour - looking in all the forums I could find, but nothing worked, so yesterday I grabbed LinuxLive USB creator, http://www.linuxliveusb.com/ and used it to create a live Puppy Linux on my usb stick, it runs sweetly on my laptop (booting from the USB drive not running it using the vbox option inside Windows).

    It immediately recognises all the U8800 partitions but does not automount them.
    I ran the dd command after navigating in terminal to a spare folder on my laptop hard drive (after mounting the laptop hard drive with Puppy's useful mounter app), and now I have a u8800.img on my laptop hard drive! Perfect!

    Oh - and of course once again - EVERY time I have used pink screen mode on my U8800 with the latest Stock Beta 2 Gingerbread, it re-boots ok but the SD card is gone. Booting into recovery mode and wiping the Dalvik cache is the way to solve this - it is now completely predictable and after doing this I am back to a really great phone - faster, cooler, great camera and video, BBC iPlayer etc.
    1
    The image partition aka cust is only a small part, you should follow the tutorial to back up. But to do it you need Linux. I'd recommend a live USB stick, which works without installing.

    CWM backups only make backup of the operating system (Android) so it doesn't backup modem partitions.

    If you cannot do it on Ubuntu for some reason, it's possible inside Android too. Commands differ a bit but you need to have SD card with atleast 4gb free.

    Sent from my U8800

    Oh ****! i just got tired of waiting and flashed 2.3. i backed up with toolbox5irom but is that a proper backup?! I still have the imei. should i revert to 2.2?!

    does anyone have a working 2.2 files to revert?
    1
    Thanks for all!

    I have two final questions:

    The phone has to be rooted to make this backup?

    If I restore my u8800-51 with someone else u8800-51 backup, and then I apply (restore) my clockworkmod backup of u8800-51, will I have the IMEI from the CWM restore?
    Hi

    No you don't need root, as the OS isn't running.

    CWM won't put your IMEI back, it isn't part of the data the CWM backs up (if it was, we wouldn't need to use dd to back up the IMEI..)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone