[GUIDE] How to make a nandroid backup directly to your computer without using sdcard

Search This thread

mai77

Senior Member
Nov 16, 2011
1,429
580
brw------- root root 254, 15 2012-11-18 12:35 dm-15
brw-rw---- root root 7, 15 2012-11-18 12:35 loop15
brw------- root root 254, 14 2012-11-18 12:35 dm-14
brw-rw---- root root 7, 14 2012-11-18 12:35 loop14
brw------- root root 254, 13 2012-11-18 12:35 dm-13
brw-rw---- root root 7, 13 2012-11-18 12:35 loop13
brw------- root root 254, 12 2012-11-18 12:35 dm-12
brw-rw---- root root 7, 12 2012-11-18 12:35 loop12
brw------- root root 254, 11 2012-11-18 12:35 dm-11
brw-rw---- root root 7, 11 2012-11-18 12:35 loop11
brw------- root root 254, 10 2012-11-18 12:35 dm-10
brw-rw---- root root 7, 10 2012-11-18 12:35 loop10
brw------- root root 254, 9 2012-11-18 12:35 dm-9
brw-rw---- root root 7, 9 2012-11-18 12:35 loop9
brw------- root root 254, 8 2012-11-18 12:35 dm-8
brw-rw---- root root 7, 8 2012-11-18 12:35 loop8
brw------- root root 254, 7 2012-11-18 12:35 dm-7
brw------- root root 254, 5 2012-11-18 12:35 dm-5
brw------- root root 254, 4 2012-11-18 12:35 dm-4
brw------- root root 254, 3 2012-11-18 12:35 dm-3
brw------- root root 254, 2 2012-11-18 12:35 dm-2
brw------- root root 254, 1 2012-11-18 12:35 dm-1
brw------- root root 254, 0 2012-11-18 12:34 dm-0
drwxr-xr-x root root 2012-11-18 12:34 vold
brw------- root root 138, 15 2012-11-18 12:34 stl15
brw------- root root 138, 14 2012-11-18 12:34 stl14
brw------- root root 138, 13 2012-11-18 12:34 stl13
brw------- root root 138, 12 2012-11-18 12:34 stl12
brw------- root root 138, 11 2012-11-18 12:34 stl11
brw------- root root 138, 10 2012-11-18 12:34 stl10
brw------- root root 138, 9 2012-11-18 12:34 stl9
brw------- root root 138, 8 2012-11-18 12:34 stl8
brw------- root root 138, 7 2012-11-18 12:34 stl7
brw------- root root 138, 6 2012-11-18 12:34 stl6
brw------- root root 138, 5 2012-11-18 12:34 stl5
brw------- root root 138, 4 2012-11-18 12:34 stl4
brw------- root root 138, 3 2012-11-18 12:34 stl3
brw------- root root 138, 2 2012-11-18 12:34 stl2
brw------- root root 138, 1 2012-11-18 12:34 stl1
brw------- root root 137, 15 2012-11-18 12:34 bml15
brw------- root root 137, 14 2012-11-18 12:34 bml14
brw------- root root 137, 13 2012-11-18 12:34 bml13
brw------- root root 137, 12 2012-11-18 12:34 bml12
brw------- root root 137, 11 2012-11-18 12:34 bml11
brw------- root root 137, 10 2012-11-18 12:34 bml10
brw------- root root 137, 9 2012-11-18 12:34 bml9
brw------- root root 137, 8 2012-11-18 12:34 bml8
brw------- root root 137, 7 2012-11-18 12:34 bml7
brw------- root root 137, 6 2012-11-18 12:34 bml6
brw------- root root 137, 5 2012-11-18 12:34 bml5
brw------- root root 137, 4 2012-11-18 12:34 bml4
brw------- root root 137, 3 2012-11-18 12:34 bml3
brw------- root root 137, 2 2012-11-18 12:34 bml2
brw------- root root 137, 1 2012-11-18 12:34 bml1
brw------- root root 137, 0 2012-11-18 12:34 bml0!c
brw------- root root 7, 7 2012-11-18 12:34 loop7
brw------- root root 7, 6 2012-11-18 12:34 loop6
brw------- root root 7, 5 2012-11-18 12:34 loop5
brw------- root root 7, 4 2012-11-18 12:34 loop4
brw------- root root 7, 3 2012-11-18 12:34 loop3
brw------- root root 7, 2 2012-11-18 12:34 loop2
brw------- root root 7, 1 2012-11-18 12:34 loop1
brw------- root root 7, 0 2012-11-18 12:34 loop0
brw------- root root 1, 15 2012-11-18 12:34 ram15
brw------- root root 1, 14 2012-11-18 12:34 ram14
brw------- root root 1, 13 2012-11-18 12:34 ram13
brw------- root root 1, 12 2012-11-18 12:34 ram12
brw------- root root 1, 11 2012-11-18 12:34 ram11
brw------- root root 1, 10 2012-11-18 12:34 ram10
brw------- root root 1, 9 2012-11-18 12:34 ram9
brw------- root root 1, 8 2012-11-18 12:34 ram8
brw------- root root 1, 7 2012-11-18 12:34 ram7
brw------- root root 1, 6 2012-11-18 12:34 ram6
brw------- root root 1, 5 2012-11-18 12:34 ram5
brw------- root root 1, 4 2012-11-18 12:34 ram4
brw------- root root 1, 3 2012-11-18 12:34 ram3
brw------- root root 1, 2 2012-11-18 12:34 ram2
brw------- root root 1, 1 2012-11-18 12:34 ram1
brw------- root root 1, 0 2012-11-18 12:34 ram0
brw------- root root 179, 2 2012-11-18 12:34 mmcblk0p2
brw------- root root 179, 1 2012-11-18 12:34 mmcblk0p1
drwxr-xr-x root root 2012-11-18 12:34 platform
brw------- root root 179, 0 2012-11-18 12:34 mmcblk0

I have 2 partns on sdcard, p1 and p2

---------- Post added at 01:04 PM ---------- Previous post was at 12:48 PM ----------

so this shell cmds gave me a 501 MB file which is probably the NAND dump :



adb shell
su
stop
dd if=/dev/block/bml0!c of=/sdcard/bml0c.outfile

## wait 2 minutes to finish

start

## wait 30 sec


tagged SGY thread: http://xdaforums.com/showthread.php?p=34300236

 
Last edited:

scandiun

Senior Member
Jul 12, 2010
1,903
983
You shouldn't be writing the out file in the same block device where you are getting the data from. That's the reason why I send it over the network.

Please run gptfdisk (or gdisk) and parted on the bml0!c raw file to see if has some partitions
 
Last edited:

mai77

Senior Member
Nov 16, 2011
1,429
580
You shouldn't be writing the out file in the same block device where you are getting the data from. That's the reason why I send it over the network.

Please run gptfdisk on the bml0!c raw file to see if has some partitions


mmcblk0p1

and

bml0!c

are indeed different block devs in SGY-phone.

gpt fdisk cannot find either of the four partn tables, just some GUID .

no mbr, no bsd, no apm, no gpt partn table found by GPT fdisk.




D:\valkyrie>gdisk.exe -l bml0c.ddoutfile.dump.SGY.hex
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present

Creating new GPT entries.
Disk bml0c.ddoutfile.dump.SGY.hex: 1026048 sectors, 501.0 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 9737-2844-4823-85
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1026014
Partitions will be aligned on 2048-sector boundaries
Total free space is 1025981 sectors (501.0 MiB)

Number Start (sector) End (sector) Size Code Name
 
Last edited:

scandiun

Senior Member
Jul 12, 2010
1,903
983
Now i hav installed cv and nc and commands run sucessfully, but i get the raw file as just 1kb


First terminal:

WIN7L@WIN7L-PC ~
$ adb forward tcp:5555 tcp:5555
adb shell
WIN7L@WIN7L-PC ~
$ adb shell
$ /system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0
/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0
$

second terminal:

WIN7L@WIN7L-PC ~
$ adb forward tcp:5555 tcp:5555

WIN7L@WIN7L-PC ~
$ cd c:/

WIN7L@WIN7L-PC /cygdrive/c
$ nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
55 B 0:00:00 [10.7kiB/s] [<=> ]

WIN7L@WIN7L-PC

Try running the commands as superuser, you will notice that $ changes to #:

WIN7L@WIN7L-PC ~
$ adb shell
$ su
# /system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0
 
  • Like
Reactions: efrant

scandiun

Senior Member
Jul 12, 2010
1,903
983
mmcblk0p1

and

bml0!c

are indeed different block devs in SGY-phone.

gpt fdisk cannot find either of the four partn tables, just some GUID .

no mbr, no bsd, no apm, no gpt partn table found by GPT fdisk.


gptfdisk (or gdisk) will only detect partition tables and list what they say, not scan for filesystems inside a single partition. For such, try using parted (this example is in linux, with the Nexus 7 16GB):

Code:
$ gdisk -l mmcblk0p3.raw 
GPT fdisk (gdisk) version 0.8.1

Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.
Disk mmcblk0p3.raw: 1331200 sectors, 650.0 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): E977A15F-47FD-43E8-9C35-DAF6381278B5
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1331166
Partitions will be aligned on 2048-sector boundaries
Total free space is 1331133 sectors (650.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
Code:
$ parted mmcblk0p3.raw 
WARNING: You are not superuser.  Watch out for permissions.
GNU Parted 2.3
Using mmcblk0p3.raw
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model:  (file)
Disk mmcblk0p3.raw: 682MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0.00B  682MB  682MB  ext4

If you want to use parted from your phone (with adb shell) first push to your device the ARM version of parted, you can find the blob here:
https://github.com/CyanogenMod/android_bootable_recovery/tree/cm-9.1.0/utilities

Note that parted from linux does not support GPT partitions while parted for android does.
 
Last edited:
  • Like
Reactions: efrant

mai77

Senior Member
Nov 16, 2011
1,429
580
[/CODE]If you want to use parted from your phone (with adb shell) first push to your device the ARM version of parted, you can find the blob here:
https://github.com/CyanogenMod/android_bootable_recovery/tree/cm-9.1.0/utilities

Note that parted from linux does not support GPT partitions while parted for android does.


Luckily for SGY users, the MT 2.0 boot.img (Merruk) kernel already contains a proper parted for the phone, which can read the sdcard partns but not the oneNAND internal partns.
 

mai77

Senior Member
Nov 16, 2011
1,429
580
GNU Parted 2.3
Using mmcblk0p3.raw
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: (file)
Disk mmcblk0p3.raw: 682MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 682MB 682MB ext4
[/CODE]
Note that parted from linux does not support GPT partitions while parted for android does.


label-type must be one of these supported disk labels:

  • loop (raw disk access)
so the galaxy y probably too has a "loop" type partn table

---------- Post added at 09:21 PM ---------- Previous post was at 09:17 PM ----------

Maybe the linux people have some support for the oneNAND stuff. What's the oneNAND exactly, a filesystem, a partition table, anything else?

http://www.linux-mtd.infradead.org/

there is a nice samsung pdf file on it, itz a NAND chip with lots of builtin intelligence and what not.
www.datasheetcatalog.org/datasheets2/16/1697648_1.pdf


if you add the tag at the bottom "oneNAND" it will be helpful.


Linux-based NAND Flash software solution, offering higher performance and cost effectiveness for next-generation mobile phones. Samsung's Linux NAND Flash memory software allows the NAND Flash memory to store code as well as data. By eliminating the need for NOR Flash memory and supporting the Linux operating system with a demand-paging function, Samsung can lower overall costs and reduce space requirements in mobile handhelds.

Samsung's Linux file system, Robust File System (RFS), also offers greater data preservation capabilities in case of power disruption as well as wear-leveling for higher reliability. To address the problem of data loss from corrupted file allocation tables (FAT), Samsung's Linux-based NAND Flash memory solution also supports Transactional FAT for external memory cards. Compared to the conventional JFFS2 and YAFFS open file systems, Samsung's Linux file system enhances the NAND Flash write-speed up ten and four times , respectively.

This Flash memory solution is also available with Samsung's OneNAND (tm) Flash memory, which boasts a faster read speed compared to the conventional NAND Flash. With its advanced multi-tasking function, Linux will further accelerate the adoption of NAND Flash in next-generation mobile phones.

Importantly, as Samsung's new Linux NAND Flash memory software, RFS has completed verification in the Linux kernel 2.4.20-based Montavista Linux environment, Samsung's NAND Flash solution addresses the diverse needs of system developers for advanced performance, high reliability, shortened development time, and reduced costs.
 
Last edited:

scandiun

Senior Member
Jul 12, 2010
1,903
983
Last edited:
  • Like
Reactions: efrant

hunky-d

Senior Member
Jan 26, 2011
55
6
Nome, AK
I've tried this on my SGS i9000 and it was taking several hours (4:43:08). When I finally went to bed it was at about 7.? GB and this morning I see it ended at 7.66GB. So I'm wondering if it quit when the computer went to sleep, and how to tell if it is incomplete. This is how the command ended:
Code:
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
7.66GiB 4:43:08 [ 472kiB/s] [                                                              <=>
so it looks suspiciously unfinished.

I'm on CM10.

If I look under Settings/Storage I see Internal Storage at total 1.46GB with .94GB available.
USB Storage is 5.78GB with 2.08GB available.
I do have an external card I probably should have taken out but hopefully it isn't important.

Gdisk reports the following:
Code:
GPT fdisk (gdisk) version 0.8.5

Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Warning: File size is not a multiple of 512 bytes! Misbehavior is likely!
Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************


Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): p
Disk /home/jim/Downloads/mmcblk0.raw: 16056320 sectors, 7.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 41737B6C-AD73-4060-8D4E-B38B71346B8A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16056286
Partitions will be aligned on 64-sector boundaries
Total free space is 30 sectors (15.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64        12124159   5.8 GiB     0700  Microsoft basic data
   2        12124160        16056319   1.9 GiB     0700  Microsoft basic data
 

scandiun

Senior Member
Jul 12, 2010
1,903
983
I've tried this on my SGS i9000 and it was taking several hours (4:43:08). When I finally went to bed it was at about 7.? GB and this morning I see it ended at 7.66GB. So I'm wondering if it quit when the computer went to sleep, and how to tell if it is incomplete. This is how the command ended:
Code:
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
7.66GiB 4:43:08 [ 472kiB/s] [                                                              <=>
so it looks suspiciously unfinished.

Half a megabyte per second is not normal. Try the ftp method with tethering.
 
  • Like
Reactions: hunky-d

hunky-d

Senior Member
Jan 26, 2011
55
6
Nome, AK
Half a megabyte per second is not normal. Try the ftp method with tethering.

Many thanks and glad to hear that was not normal. I'm not sure why my USB transfer rates are so slow on this linux box... have to investigate that.

Will try to ftp route. cheers, Jim

---------- Post added at 11:14 AM ---------- Previous post was at 10:26 AM ----------

One bit of confusion I have is this block system. I don't really know what they are. Here's my list of them:

mmcblk0 mmcblk0p2 mmcblk1p1 mtdblock1 mtdblock3 mtdblock5
mmcblk0p1 mmcblk1 mtdblock0 mtdblock2 mtdblock4 mtdblock6

so you'll see I don't have the mmblk0p12 as in your example. What do you think I should use in this case?

thanks, Jim
 

scandiun

Senior Member
Jul 12, 2010
1,903
983
Many thanks and glad to hear that was not normal. I'm not sure why my USB transfer rates are so slow on this linux box... have to investigate that.

Will try to ftp route. cheers, Jim

---------- Post added at 11:14 AM ---------- Previous post was at 10:26 AM ----------

One bit of confusion I have is this block system. I don't really know what they are. Here's my list of them:

mmcblk0 mmcblk0p2 mmcblk1p1 mtdblock1 mtdblock3 mtdblock5
mmcblk0p1 mmcblk1 mtdblock0 mtdblock2 mtdblock4 mtdblock6

so you'll see I don't have the mmblk0p12 as in your example. What do you think I should use in this case?

thanks, Jim

Post the output of this command, to see the mount points:
Code:
adb shell ls -lR /dev/block
 

hunky-d

Senior Member
Jan 26, 2011
55
6
Nome, AK
Post the output of this command, to see the mount points:
Code:
adb shell ls -lR /dev/block

Code:
# ls -lR /dev/block                                                                                                     
                                                                                                                                        
/dev/block:                                                                                                                             
lrwxrwxrwx root     root              2012-12-17 18:51 bml12 -> /radio/modem.bin                                                          
brw------- root     root     254,   0 2012-12-17 18:51 dm-0                                                                               
brw------- root     root     254,   1 2012-12-17 18:51 dm-1                                                                                  
brw------- root     root     254,   2 2012-12-17 18:52 dm-2                                                                                  
brw------- root     root       7,   0 2012-12-17 18:51 loop0                                                                                   
brw------- root     root       7,   1 2012-12-17 18:51 loop1                                                                                    
brw------- root     root       7,   2 2012-12-17 18:51 loop2                                                                                    
brw------- root     root       7,   3 2012-12-17 18:51 loop3                                                                                     
brw------- root     root       7,   4 2012-12-17 18:51 loop4
brw------- root     root       7,   5 2012-12-17 18:51 loop5
brw------- root     root       7,   6 2012-12-17 18:51 loop6
brw------- root     root       7,   7 2012-12-17 18:51 loop7
brw------- root     root     179,   0 2012-12-17 18:51 mmcblk0
brw------- root     root     179,   1 2012-12-17 18:51 mmcblk0p1
brw------- root     root     179,   2 2012-12-17 18:51 mmcblk0p2
brw------- root     root     179,   8 2012-12-17 18:51 mmcblk1
brw------- root     root     179,   9 2012-12-17 18:51 mmcblk1p1
brw------- root     root      31,   0 2012-12-17 18:51 mtdblock0
brw------- root     root      31,   1 2012-12-17 18:51 mtdblock1
brw------- root     root      31,   2 2012-12-17 18:51 mtdblock2
brw------- root     root      31,   3 2012-12-17 18:51 mtdblock3
brw------- root     root      31,   4 2012-12-17 18:51 mtdblock4
brw-rw---- radio    radio     31,   5 2012-12-17 18:51 mtdblock5
brw------- root     root      31,   6 2012-12-17 18:51 mtdblock6
drwxr-xr-x root     root              2012-12-17 18:51 platform
brw------- root     root       1,   0 2012-12-17 18:51 ram0
brw------- root     root       1,   1 2012-12-17 18:51 ram1
brw------- root     root       1,  10 2012-12-17 18:51 ram10
brw------- root     root       1,  11 2012-12-17 18:51 ram11
brw------- root     root       1,  12 2012-12-17 18:51 ram12
brw------- root     root       1,  13 2012-12-17 18:51 ram13
brw------- root     root       1,  14 2012-12-17 18:51 ram14
brw------- root     root       1,  15 2012-12-17 18:51 ram15
brw------- root     root       1,   2 2012-12-17 18:51 ram2
brw------- root     root       1,   3 2012-12-17 18:51 ram3
brw------- root     root       1,   4 2012-12-17 18:51 ram4
brw------- root     root       1,   5 2012-12-17 18:51 ram5
brw------- root     root       1,   6 2012-12-17 18:51 ram6
brw------- root     root       1,   7 2012-12-17 18:51 ram7
brw------- root     root       1,   8 2012-12-17 18:51 ram8
brw------- root     root       1,   9 2012-12-17 18:51 ram9
drwx------ root     root              2012-12-17 18:51 vold
brw------- root     root     253,   0 2012-12-17 18:51 zram0

/dev/block/platform:
drwxr-xr-x root     root              2012-12-17 18:51 s3c-sdhci.0
drwxr-xr-x root     root              2012-12-17 18:51 s3c-sdhci.2
drwxr-xr-x root     root              2012-12-17 18:51 s5pc110-onenand

/dev/block/platform/s3c-sdhci.0:
drwxr-xr-x root     root              2012-12-17 18:51 by-num
lrwxrwxrwx root     root              2012-12-17 18:51 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx root     root              2012-12-17 18:51 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2012-12-17 18:51 mmcblk0p2 -> /dev/block/mmcblk0p2

/dev/block/platform/s3c-sdhci.0/by-num:
lrwxrwxrwx root     root              2012-12-17 18:51 p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              2012-12-17 18:51 p2 -> /dev/block/mmcblk0p2

/dev/block/platform/s3c-sdhci.2:
drwxr-xr-x root     root              2012-12-17 18:51 by-num
lrwxrwxrwx root     root              2012-12-17 18:51 mmcblk1 -> /dev/block/mmcblk1
lrwxrwxrwx root     root              2012-12-17 18:51 mmcblk1p1 -> /dev/block/mmcblk1p1

/dev/block/platform/s3c-sdhci.2/by-num:
lrwxrwxrwx root     root              2012-12-17 18:51 p1 -> /dev/block/mmcblk1p1

/dev/block/platform/s5pc110-onenand:
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock0 -> /dev/block/mtdblock0
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock1 -> /dev/block/mtdblock1
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock2 -> /dev/block/mtdblock2
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock3 -> /dev/block/mtdblock3
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock4 -> /dev/block/mtdblock4
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock5 -> /dev/block/mtdblock5
lrwxrwxrwx root     root              2012-12-17 18:51 mtdblock6 -> /dev/block/mtdblock6

/dev/block/vold:
brw------- root     root     179,   0 2012-12-17 18:51 179:0
brw------- root     root     179,   1 2012-12-17 18:53 179:1
brw------- root     root     179,   2 2012-12-17 18:51 179:2
brw------- root     root     179,   8 2012-12-17 18:51 179:8
brw------- root     root     179,   9 2012-12-17 18:51 179:9
 

hunky-d

Senior Member
Jan 26, 2011
55
6
Nome, AK
No luck, try
Code:
adb shell mount

Here ya go and thanks for looking at this - appreciated!

Code:
# mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mtdblock3 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock5 /radio yaffs2 rw,relatime 0 0
/dev/block/mtdblock2 /datadata yaffs2 rw,relatime 0 0
/dev/lvpool/system /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/lvpool/userdata /data ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/block/mtdblock4 /efs yaffs2 rw,relatime 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/dm-2 /mnt/asec/umito.android.chordfinder-1 ext4 ro,dirsync,nosuid,nodev,noatime,barrier=1 0 0
/dev/block/vold/179:9 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
 

scandiun

Senior Member
Jul 12, 2010
1,903
983
It looks like your user data might be in
Code:
/dev/lvpool/userdata

But I can't confirm you that all your phone's memory is in one block in mmcblk0 like it is in some devices. To see where lvpool redirects (if does) you can try

Code:
adb shell ls -lR /dev/lvpool/

Take a look at this developers thread, they are talking about the Samsung Galaxy S I9000 specifically:
[ROM - JB][4.1.2][07/12] C-RoM Mix v9.0.!!! [Stable & Fast | Linaro ToolChain]
 

hunky-d

Senior Member
Jan 26, 2011
55
6
Nome, AK
It looks like your user data might be in
Code:
/dev/lvpool/userdata

But I can't confirm you that all your phone's memory is in one block in mmcblk0 like it is in some devices. To see where lvpool redirects (if does) you can try

Code:
adb shell ls -lR /dev/lvpool/

Take a look at this developers thread, they are talking about the Samsung Galaxy S I9000 specifically:
[ROM - JB][4.1.2][07/12] C-RoM Mix v9.0.!!! [Stable & Fast | Linaro ToolChain]

I can ask over in one of the phone's forums.. since it has been repartitioned by CM10. But for now here's the answer to your command:

Code:
$ adb shell ls -lR /dev/lvpool/

/dev/lvpool/:
lrwxrwxrwx root     root              2012-12-17 18:51 system -> /dev/mapper/lvpool-system
lrwxrwxrwx root     root              2012-12-17 18:51 userdata -> /dev/mapper/lvpool-userdata
 

scandiun

Senior Member
Jul 12, 2010
1,903
983
I can ask over in one of the phone's forums.. since it has been repartitioned by CM10. But for now here's the answer to your command:

Code:
$ adb shell ls -lR /dev/lvpool/

/dev/lvpool/:
lrwxrwxrwx root     root              2012-12-17 18:51 system -> /dev/mapper/lvpool-system
lrwxrwxrwx root     root              2012-12-17 18:51 userdata -> /dev/mapper/lvpool-userdata

Well, is quite a mess. Better ask in the specific GT-I9000 forum, maybe cyanogen uses a different schematic from samsung's.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 91
    INFORMATION

    This guide is intended to make a full backup of your android phone (the entire memory block with all partitions) or a single partition (including sdcards, etc) directly to your computer, in either
    • Block level (with dd): for single partitions or whole memory block (all partitions in one piece). The backup always has the same size which is the size of the partition.
    • File level (with tar): only for individual partitions. This only includes files and folders, so occupies much less space, depending on how much filled is the partition.
    It can be done with the phone powered on or from ClockWorkMod Recovery (from both ADB works, while in Fastboot doesn't so won't apply). Unless specified the commands meant to be used from Windows. For Linux and Unix is similar.


    REQUIREMENTS

    • Rooted Android Phone
    • Busybox installed on your phone
    • If you are using Linux / OS X you have native tools, for Windows download Cygwin, and install with it netcat, pv and util-linux. Get them from Cygwin's setup.exe
    • ADB installed.
    • Make sure adb.exe is in your windows' path. See here and here, or use Path Manager.
    • Android phone with USB Debugging enabled, and the proper drivers installed on Windows so the phone is recognized. Typing 'adb devices' on a terminal should show your device.


    PARTITION IDENTIFICATION
    You now have to identify the partition or block device that you want to backup. For a single partition you can use either tar or dd, while for the entire memory block you can only use dd.
    For example, on Galaxy Nexus you have the list of partitions here and for Galaxy S2 here.
    Usually on android, the entire block containing all partitions is located at /dev/block/mmcblk0 and the data partitions is a subpartition of it. You can push parted with GPT support to your device and see all information on a partition or block.

    Whole phone memory -> /dev/block/mmcblk0 (may vary, in some phones this is the sdcard)
    Subpartitions -> depends on each device. Usually at /dev/block/platform/dw_mmc/by-name/ there are listed by name linking to the real device.



    Back up of the whole memory block (via adb)
    Connect the phone in ADB mode and unlock the screen.
    Open one Cygwin Terminal and enter (replace mmcblk0 if needed):
    Code:
    adb forward tcp:5555 tcp:5555
    adb shell
    su
    /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
    You will see the cursor blinking at the left. Now the phone is waiting to send the block over the network.

    Open another Cygwin terminal and type:
    Code:
    adb forward tcp:5555 tcp:5555
    cd /path/to/store/the/backup
    nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
    You will see how the image size is growing until it finishes. Now you have the whole phone backed up in raw format. You can see the contents of the GPT partition with gptfdisk tool, available for windows, linux and such. See official website and sourceforge to get it. You can do it the same from ClockWorkMod Recovery but you have to mount first the /system partition since the busybox included with clockworkmod does not come with netcat and you have to use the one from the system partition.
    With further linux tools you could edit or extract single partitions from the whole block.

    You can use adb via wifi as well with applications like WiFi ADB.


    Back up of the whole memory block (via wifi)

    Original post: [Q] Nandroid directly to computer w/o sdcard

    We need to install a FTP server on the computer or the other device, configure a user with a password if we want to, and set some port. It uses by default 21 but this example uses 40. We must set a home dir for the user with write permissions.

    Usually is a good idea to put myfifo in /cache not in /data because we may overwrite sensitive data in case we want to use that raw image for data recovery.

    Open one Cygwin terminal
    Code:
    adb shell
    su
    mkfifo /cache/myfifo
    ftpput -v -u user -p pass -P 40 COMPUTER_IP block.raw /cache/myfifo

    Open another Cygwin terminal
    Code:
    adb shell
    su
    dd if=/dev/block/mmcblk0p12 of=/cache/myfifo

    Tips:
    - Fifos only can be made on linux native filesystems, for example on a FAT partition is not possible.
    - Reading from a partition does not modify it.

    Now check on Filezilla Server the speed


    Back up of the whole memory block (USB tethering, Wifi tethering)
    To use tethering you have to disconnect the computer from all networks and connect it only to the phone with the type of connection you want.
    Once you connect it, you can view the IP of the computer and the IP of the phone from connection properties. The ip is the computer ip and the gateway is the phone's ip.
    • Wifi Tethering: Computer <---Wifi---> Phone <---3G---> Internet
    • USB Tethering:
      • Computer <---USB---> Phone <---Wifi---> Internet
      • Conputer <---USB---> Phone <---3G---> Internet
    This is exactly the same as via wifi, except that the transfer speed is much higher because the computer and the phone are directly connected, instead of using a router as a gateway. In this case, the gateway is the phone. USB tethering has the highest transfer rate.


    Back up of a single partition (raw = every bit of the partition)
    It is exactly the same as the the previous but replacing mmcblk0 by the corresponding partition. You can use in this particular case several software to read the partition from windows, depending on partition filesystem: DiskInternals Linux Reader, Ext2Read, Ext2 File System Driver for Windows, Ext4Explore, plugin for Total Commander and ImDisk Virtual Disk Driver. You can also use recovery software on individual partitions like Recuva in combination with VHD Tool or command line tools included with operating systems.


    Back up of a single partition (tar = only files and folders)
    In this case, you need the partition mounted. To see the list of mounted partitions type on Cygwin Terminal
    Code:
    adb shell mount
    Now you need to know where is mounted the partition you want to backup, for example the firmware is mounted on /system, which is the ROM.
    In this case you will have to open three terminals, because of android limitations:

    Open one Cygwin terminal and create a fifo, in /cache, for example, and redirect the tar there
    Code:
    adb forward tcp:5555 tcp:5555
    adb shell
    su
    /system/xbin/busybox mkfifo /cache/myfifo
    /system/xbin/busybox tar -cvf /cache/myfifo /system
    We have to do it this way because redirecting the tar to stdout (with - ) is broken on android and will corrupt the tar file.

    Open a second Cygwin terminal and type:
    Code:
    adb forward tcp:5555 tcp:5555
    adb shell
    su
    /system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox cat /cache/myfifo

    Open a third Cygwin terminal and type:
    Code:
    adb forward tcp:5555 tcp:5555
    cd /path/to/store/the/backup
    nc 127.0.0.1 5555 | pv -i 0.5 > system.tar

    You can browse the tar file with Winrar, Total Commander, PeaZip and almost any compression tool. Note that you shouldn't extract files or edit it since the tar format saves the permission and owner data for each file, that is lost when extracted to FAT / NTFS partitions and you will mess things when restoring.

    LINKS
    On newer android versions (Im on 7.2) data folder has a folder media which is link to sdcard and one ends up backing up entire sd card. I had a 64gb backup which wasn't necessary

    In order to avoid skipping the media folder i had to do some trial and error because busybox tar command is not completely the same as GNU tar.

    Would appreciate if you can mention it in the mail guide to use the following command to backup /data folder without copying sdcard files

    In first terminal
    tar cv --exclude data/media/0 -f /cache/myfifo /data

    in 3rd terminal
    nc 127.0.0.1 5555 | pv -i 0.5 > data.tar

    no change in second terminal

    Cheers
    15
    Greatly appreciate this!

    For me, a long-time UNIX and Linux administrator, this little guide was a breath of fresh air. Scandiun, *Thank You* for putting it together. It makes perfect sense to me -- just treat the phone as the linux machine it is. I'm becoming convinced that most of the more recent "developers" hanging around the android community have never used a linux machine before -- they don't seem to know what's going on, they go way out of their way to write overkill tools to do things clumsily that can already be done cleanly and quickly from the command line, and then they wrap those tools in so much mystery, black magic, and script-kiddie terminology that I can't figure out what they do either, and I certainly don't trust them doing things to my phone.

    For example, I've got a new Galaxy S3, and just wasted a whole day digging around on xda, reviewing all of the "kewl rooting mods" until I got sick of it. Why the *heck* are people flashing entire partitions just to install a setuid /system/xbin/su on these devices? The rooting method I wound up using was dirt simple -- just find an rc exploit and use it to install an 'su' binary, by typing a few commands via adb. I used a variation of the exploit mentioned in http://seclists.org/fulldisclosure/2012/Aug/171, and elaborated in http://xdaforums.com/showthread.php?t=1790104, http://xdaforums.com/showthread.php?t=1792342, http://galaxys3root.com/galaxy-s3-root/how-to-root-u-s-canadian-dual-core-galaxy-s3-on-mac-osx/, and http://xdaforums.com/showthread.php?t=1827518. If you are a UNIX person, you'll recognize what's going on with that exploit and be able to come up with something that suits your own needs. If you aren't a UNIX person, then you'll be completely lost. Sorta like this guide.

    For anyone who doesn't yet know what adb is, or who's never used standard UNIX/Linux tools like dd, netcat, gparted, or busybox, I agree that this guide is not only not going to help you, but may actually aid you in shooting yourself in the foot with extreme efficiency. But please don't criticize or nag the OP in return for helpful advice freely given. You won't learn much about UNIX tools on an Android-related web site in any case. I recommend starting with a Linux systems administration book -- the Nemeth series is always good. But if you do take that route, you need to expect to take time to learn the basics.
    10
    Listen, I appreciate the guide, and it being basically the only one which popped up in google results, I can't gripe too much, but... you really, really need to make it more clear.

    The point of a guide is to help a large group of people with varying degrees of knowledge (and if it's a guide targeted at a specific group of people, i.e tech savvy, then it needs to be indicated as such).

    With that working definition in place, it follows that you should be as specific as possible; think of *everything*. By doing so, you not only avoid headaches for the people reading the guide, but for yourself as well since you don't have to reply to comments which might've otherwise been avoided.

    I would post a question, but I'll probably have figured this out (with a good 1+ hours of searching no doubt) before anyone responds.

    Here are some examples of what could be more specific:
    "ADB installed." - what is ADB? Where's the link? It's not reasonable to assume people use these tools on a regular basis or remember them.
    "You can push parted with GPT support to your device and see all information on a partition or block." - okay, so we know what it does but not how to install it or use it.
    "ADB mode" - is this important? What is it? Not sure because it was glossed over.

    These are just some examples. It's not the most horrendous trespass ever committed, but definitely annoying. Just spell it out from one step to the next, it works far better than topics with subheadings and unintuitive concepts being assumed as general knowledge on the behalf of noobs like me.

    Edit: I'm just going to take everything off my SD card, use nandroid, and then copy the nandroid backup to computer as well. Please improve the guide, thanks.
    6
    Umm...how to restore back from computer?

    Sent from MARVEL
    3
    I am a little new to this, I have installed Android sdk and i am able to see my device by using "adb devices" , i have also installed Cygwin, now i want to backup whole phone memory block so i tried executing the first line on cygin "adb forward tcp:5555 tcp:5555" i get an error saying -bash: adb :command not found.

    I am sorry if i am missing any thing, please guide me, and also what do you mean by "download Cygwin, and install with it netcat, pv and util-linux"

    Thanx a ton !!

    You've done almost everything! But you skipped the section "make sure adb is in your path"

    Probably you have adb.exe in the path

    Code:
    C:\Program Files (x86)\android-sdk\platform-tools\adb.exe

    So you have to just add it to the Cygwin's path (would be better if you had added it earlier to the windows' path and cygwin will import it automatically but it is ok)

    Code:
    export PATH="/cygdrive/c/Program Files (x86)/android-sdk/platform-tools":$PATH

    Remember to backup the path previously if you want.

    Code:
    echo $PATH > mypathbackup.txt