How to create full sector based Raw image backup of Atrix's 16GB disk? (NOT Nandroid)

Be-Mine

Senior Member
May 8, 2012
75
12
0
I have this Atrix now for a few days and want to examine it. It is one of my favourite devices since it was released years ago.

I will start to tamper with it, and try custom Roms etc. But first of all i want to make a full backup of the device, so i can probably recover it fast and without hassle in the future. I also use Huawei Ideos X5 and i have full Raw backups of its 4GB emmc (2GB part is used as an internal SD originally). I backup and restore these images with the basic free program "Roadkil's Disk Image" in Windows.

As we all know, to use this program or similar disk backup programs, we have to reach the phone's whole disk (called emmc or internal card, i guess). In Ideos X5 the procedure is as follows;
1) Make sure the bootloader is unlocked.
2) Open the phone to reach the "pink screen" by pressing VolUP+VolDOWN+POWER buttons at the same time.
3) When you see the pink screen connect the phone to the PC via USB.
4) The disk is reachable now, use a sector based backup program such as "Roadkil's Disk Image" (sometimes called Forensic Copy).

OK, it's a brief explanation but clear enough, i guess. Now i want to do the same thing in Atrix, since i unlocked the bootloader and installed CM7.2 to it, 6-7 months ago, while my relative was using it.

I connect the phone to the PC in Fastboot and RSD modes, but i can't reach the disk itself. The adb and fastboot commands work, the connection is successful, but neither Windows, nor Linux Mint sees the 16GB disk. So, full Raw backup seems impossible in this manner!

I searched the Atrix forum widely, but couldn't find a solution. There are threads of making Nandroid backups or partition based backups with a different approach which i didn't try yet. For example:
"[INFO] Backup the pds partition of your Atrix!"
Link: http://forum.xda-developers.com/showthread.php?t=1138220

I can learn and apply this commandline method but 4GB Fat32 file limit will probably be the base problem. Taking the backup directly to the NTFS HDD on PC can be a solution but, has anyone tried it?

It seems that, important partitions are backed up using ADB /shell commands. But i believe that full disk backups may be the best way to recover a phone in some situations. I know that backing up the whole disk including also the 10,7 GB internal SD part is useless, time and space consuming. But recovering the phone totally to a previous state is sometimes fatally important or advantageous. ie:
* Recover the phone when the IMEI is gone somehow,
* Recover the phone when the partitions are resized
* Recover the phone when partition table is corrupted or partitions are lost
* Move between your installed Roms without worrying about all the procedure, wipes, resizes, bla bla...
* ......

Anyway, here comes my main question:
Is it possible to reach the 16GB disk of Atrix from PC? If so, how?

Thanks in advance.
 

palmbeach05

Senior Member
Oct 12, 2012
4,293
1,799
243
I have this Atrix now for a few days and want to examine it. It is one of my favourite devices since it was released years ago.

I will start to tamper with it, and try custom Roms etc. But first of all i want to make a full backup of the device, so i can probably recover it fast and without hassle in the future. I also use Huawei Ideos X5 and i have full Raw backups of its 4GB emmc (2GB part is used as an internal SD originally). I backup and restore these images with the basic free program "Roadkil's Disk Image" in Windows.

As we all know, to use this program or similar disk backup programs, we have to reach the phone's whole disk (called emmc or internal card, i guess). In Ideos X5 the procedure is as follows;
1) Make sure the bootloader is unlocked.
2) Open the phone to reach the "pink screen" by pressing VolUP+VolDOWN+POWER buttons at the same time.
3) When you see the pink screen connect the phone to the PC via USB.
4) The disk is reachable now, use a sector based backup program such as "Roadkil's Disk Image" (sometimes called Forensic Copy).

OK, it's a brief explanation but clear enough, i guess. Now i want to do the same thing in Atrix, since i unlocked the bootloader and installed CM7.2 to it, 6-7 months ago, while my relative was using it.

I connect the phone to the PC in Fastboot and RSD modes, but i can't reach the disk itself. The adb and fastboot commands work, the connection is successful, but neither Windows, nor Linux Mint sees the 16GB disk. So, full Raw backup seems impossible in this manner!

I searched the Atrix forum widely, but couldn't find a solution. There are threads of making Nandroid backups or partition based backups with a different approach which i didn't try yet. For example:
"[INFO] Backup the pds partition of your Atrix!"
Link: http://forum.xda-developers.com/showthread.php?t=1138220

I can learn and apply this commandline method but 4GB Fat32 file limit will probably be the base problem. Taking the backup directly to the NTFS HDD on PC can be a solution but, has anyone tried it?

It seems that, important partitions are backed up using ADB /shell commands. But i believe that full disk backups may be the best way to recover a phone in some situations. I know that backing up the whole disk including also the 10,7 GB internal SD part is useless, time and space consuming. But recovering the phone totally to a previous state is sometimes fatally important or advantageous. ie:
* Recover the phone when the IMEI is gone somehow,
* Recover the phone when the partitions are resized
* Recover the phone when partition table is corrupted or partitions are lost
* Move between your installed Roms without worrying about all the procedure, wipes, resizes, bla bla...
* ......

Anyway, here comes my main question:
Is it possible to reach the 16GB disk of Atrix from PC? If so, how?

Thanks in advance.
System + data (internal storage) is your 16GB. You'll backup system and your internal storage to get what you're looking for. And to the best of my knoledge, sbf'ing will do the rest. IMEI may be somewhere else, not sure. Afaik we don't have a tool to edit some advanced stuff like the latest qualcomm devices do.

Sent from my ATRIX HD using XDA Free mobile app
 

Be-Mine

Senior Member
May 8, 2012
75
12
0
Sector by sector Raw image backup and restore options in Android devices!

I guess i couldn't explain the issue clearly.

The 16GB Atrix disk that i meant, is the main memory block which is exactly 15.914.762.240 bytes in total. This memory consists of 3 primary and 14 logical partitions. Some of these can be considered as the /recovery, /boot, /pds, /cdrom, /osh, /system, /cache, /data, /emmc(~11GB internal SD).... etc. partitions:



From what i've learned from the below links;
[DEV][REF] El Grande Partition Table Reference
[GUIDE] Making Dump Files Out of Android Device Partitions
[GUIDE] How to make a nandroid backup directly to your computer without using sdcard
these partitions can be backed-up and restored within terminal emulator or ADB, with the help of the so-called "dd method" (which i will research more)!

Backup of the whole 16GB memory block is also possible regarding to these links, but restore of this whole block image seems impossible, which is the main problem!

Now, let me explain the weird situation on my ancient Huawei Ideos X5 phone. If i connect the Ideos X5 to the PC with the "pink screen" (by pressing VolUP+VolDOWN+POWER buttons), the phone's whole 4GB memory block is reachable. Eventually i can do whatever i want with the phone, because the memory block is seen as a USB disk to the Windows,Linux,etc:



Here are the possibilities that i can do (and already did) with the Huawei Ideos X5:
1) Intelligent sector copy of the recognized partitions.
Only data blocks are backed up and restored on ext2/ext3/ext4,Fat32 partitions, so the backup files are small. But the other unknown partitions can't be backed up with this method.
2) Forensic copy of the partitions.
Sector by sector Raw copy is made, so the backup file is exactly the same as the partition size. All known and unknown partitions can be backed up and restored with this method.
3) Forensic copy of the whole disk (full memory block)
The whole memory block is copied (raw backup) and restored. The image file size is exactly the same as the disk size (But can be zipped afterwards to reduce the size.)


I checked the forum widely, now i understand that the "pink screen" property is unique to the Ideos X5! Most of the devices (if not all) seem to NOT support this option. The whole memory block is NOT reachable within the Windows, Linux, etc. It's only available with ADB or within the device from the terminal emulator.

As a result, i won't be able to make full Raw image backups and restores of the whole disk of Atrix, which also seems impossible on the other devices.

If we find a method to reach the memory blocks of the devices as a USB HDD within OSes (just like in Ideos X5), then we will be able to do full backup and restores which is important in some situations as i described before. (But we may brick the devices easier also :D)

But i believe that full disk backups may be the best way to recover a phone in some situations. I know that backing up the whole disk including also the 10,7 GB internal SD part is useless, time and space consuming. But recovering the phone totally to a previous state is sometimes fatally important or advantageous. ie:
* Recover the phone when the IMEI is gone somehow,
* Recover the phone when the partitions are resized
* Recover the phone when partition table is corrupted or partitions are lost
* Move between your (previously) installed Roms without worrying about all the procedures, wipes, resizes, bla bla...
* ......
Please share your opinions.
 

palmbeach05

Senior Member
Oct 12, 2012
4,293
1,799
243
I guess i couldn't explain the issue clearly.

The 16GB Atrix disk that i meant, is the main memory block which is exactly 15.914.762.240 bytes in total. This memory consists of 3 primary and 14 logical partitions. Some of these can be considered as the /recovery, /boot, /pds, /cdrom, /osh, /system, /cache, /data, /emmc(~11GB internal SD).... etc. partitions:



From what i've learned from the below links;
[DEV][REF] El Grande Partition Table Reference
[GUIDE] Making Dump Files Out of Android Device Partitions
[GUIDE] How to make a nandroid backup directly to your computer without using sdcard
these partitions can be backed-up and restored within terminal emulator or ADB, with the help of the so-called "dd method" (which i will research more)!

Backup of the whole 16GB memory block is also possible regarding to these links, but restore of this whole block image seems impossible, which is the main problem!

Now, let me explain the weird situation on my ancient Huawei Ideos X5 phone. If i connect the Ideos X5 to the PC with the "pink screen" (by pressing VolUP+VolDOWN+POWER buttons), the phone's whole 4GB memory block is reachable. Eventually i can do whatever i want with the phone, because the memory block is seen as a USB disk to the Windows,Linux,etc:



Here are the possibilities that i can do (and already did) with the Huawei Ideos X5:
1) Intelligent sector copy of the recognized partitions.
Only data blocks are backed up and restored on ext2/ext3/ext4,Fat32 partitions, so the backup files are small. But the other unknown partitions can't be backed up with this method.
2) Forensic copy of the partitions.
Sector by sector Raw copy is made, so the backup file is exactly the same as the partition size. All known and unknown partitions can be backed up and restored with this method.
3) Forensic copy of the whole disk (full memory block)
The whole memory block is copied (raw backup) and restored. The image file size is exactly the same as the disk size (But can be zipped afterwards to reduce the size.)


I checked the forum widely, now i understand that the "pink screen" property is unique to the Ideos X5! Most of the devices (if not all) seem to NOT support this option. The whole memory block is NOT reachable within the Windows, Linux, etc. It's only available with ADB or within the device from the terminal emulator.

As a result, i won't be able to make full Raw image backups and restores of the whole disk of Atrix, which also seems impossible on the other devices.

If we find a method to reach the memory blocks of the devices as a USB HDD within OSes (just like in Ideos X5), then we will be able to do full backup and restores which is important in some situations as i described before. (But we may brick the devices easier also :D)



Please share your opinions.
Ok, i'm getting the drift of what you are trying to do now. For that, there is a thread regarding dual booting. I'll dig that up and give you the link. For that, we dd'd via adb in recovery. I'll need to dig into my files for a bit more specifics, but hang tight and i'll get you the info i know

Sent from my ATRIX HD using XDA Free mobile app
 

Be-Mine

Senior Member
May 8, 2012
75
12
0
Ok, i'm getting the drift of what you are trying to do now. For that, there is a thread regarding dual booting. I'll dig that up and give you the link. For that, we dd'd via adb in recovery. I'll need to dig into my files for a bit more specifics, but hang tight and i'll get you the info i know

Sent from my ATRIX HD using XDA Free mobile app
Actually, my ultimate goal is not a multi-boot. I triple-boot in my PC but i was never eager of this in Android devices. If i had very large memory blocks (32GB,64GB) in my devices, i would try it already. But i think multi-booting may negatively effect the storage partitions on Ideos X5 and Atrix (especially the /system, /cache, /data partitions ?)

Anyway, i will check that link and informations based on dual booting Atrix, comparing CM7 vs CM10 easily on Atrix can be very interesting. :D

But my main concern is reaching the whole memory blocks of the devices within windows/linux directly as a USB-HDD, probably with the help of a hack or a patch.

Thanks for all :good:
 

palmbeach05

Senior Member
Oct 12, 2012
4,293
1,799
243
Actually, my ultimate goal is not a multi-boot. I triple-boot in my PC but i was never eager of this in Android devices. If i had very large memory blocks (32GB,64GB) in my devices, i would try it already. But i think multi-booting may negatively effect the storage partitions on Ideos X5 and Atrix (especially the /system, /cache, /data partitions ?)

Anyway, i will check that link and informations based on dual booting Atrix, comparing CM7 vs CM10 easily on Atrix can be very interesting. :D

But my main concern is reaching the whole memory blocks of the devices within windows/linux directly as a USB-HDD, probably with the help of a hack or a patch.

Thanks for all :good:
Well the dual boot mentioning ties into the dd method.

This might be more up the alley of your main concern http://www.paragon-drivers.com/extfs-windows/

On a side note, dual booting on this device can be done on a 16GB sd card, but for space reasons (compensation for space lost to do dual boot), a 32GB is a bit more recommended for this, plus it adds a bit more memory in the process.
 

Be-Mine

Senior Member
May 8, 2012
75
12
0
Well the dual boot mentioning ties into the dd method.

This might be more up the alley of your main concern http://www.paragon-drivers.com/extfs-windows/

On a side note, dual booting on this device can be done on a 16GB sd card, but for space reasons (compensation for space lost to do dual boot), a 32GB is a bit more recommended for this, plus it adds a bit more memory in the process.
If only my issue was that simple, but unfortunately not. :D

The link you gave is of a basic software to work with linux file systems from Windows. I can already achieve this when needed, using similar software like Explore2fs, Ext2explore, etc.

But the case is very different. The whole memory block (disk) of the devices are not accessible as a USB disk within OSes (both Linux and windows, and also MacOS most probably) natively. The full disk is only accessible from ADB, or the phone itself. So native disk softwares can't be used, especially for full backup and restore purposes.

From what i understood from my researchs, "dd method" seems the Linux alternative to make sector based backups and restores. But even dd can't be used to restore the memory block. Because, to restore, we have to access the disk when the phone is not used , AFAIK.

That's why Huawei Ideos X5 "pink screen" option seems very rare, extreme and useful. Please take a look at the links i gave in my previous posts, you'll get what i mean.

Anyway, dual-booting Atrix is still another interesting issue to research for me. :)
 

PolesApart

Senior Member
Nov 20, 2012
303
724
0
Rio do Sul, SC
AFAIK you can't directly map the raw Atrix eMMC to a block device on Atrix, at least not via USB, using standard tools. And you definitely wouldn't want to do this in write mode (The tegra2 on Atrix has a strict boot protocol. It's so strict that IIRC it even requires an encrypted/digitally signed boot loader which resides on the beginning of the drive. AFAIK you can't even mess with partition table).

I guess you could use a custom recovery mod for doing that if all you want is to read the eMMC as a block. The linux kernel has a mass storage gadget which can expose a block device as an usb drive. You'd need to point /dev/block/mmcblk0 to it and voila (see for instance http://www.linux-usb.org/gadget/file_storage.html). Old android uses it for mounting your storage areas when you plug it to a host usb. Newer uses other methods as you need exclusive device access for safely writing to the storage partitions.

And as you can't have read-write partitions mounted while you're playing with the same block device, and AFAIK a recovery is fine with read only mounts, contrary to a normal android boot, you could go with it. But check that e.g. /data is mounted ro, some recoveries mount it rw by default.

I think there's a way to use adb in recovery, if you can get a root console via adb then you may be able to use a standard recovery to command the usb mass storage gadget without need to customize a recovery.

Btw, I think the usb gadget only exposes the device in read-write mode, so there's nothing preventing you or some application of attempting to write to the device, and this would probably be a bad idea. So watch out if you want to do that, people got hurt for doing less hacking :silly:
 
Last edited:
  • Like
Reactions: Be-Mine

Be-Mine

Senior Member
May 8, 2012
75
12
0
@PolesApart

Thanks, you encourage me to research deeper. :D

But, as you already mentioned, this kind of backup/restore seems very tricky. I would check other sources and try to find a way to achieve, but i lost my ambition regarding that i have no backup phones. And i don't have time and experience to struggle with such dangerous issues.

I'm still using this Atrix as a main phone. I hope to get a Z5 Compact soon. Maybe i can go on seeking info and tests when this Atrix becomes totally idle afterwards. :laugh:

Thanks for your interest and the informations. :good: