FORUMS
Remove All Ads from XDA

[GUIDE] Making Dump Files Out of Android Device Partitions

981 posts
Thanks Meter: 3,381
 
By majdinj, Senior Member on 19th September 2013, 03:18 AM
Post Reply Email Thread
18th April 2017, 06:11 AM |#281  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by IGGYVIP

I mean.. in twrp/cwm recovery if you find one.. do a full backup..
If not possible and you have already backed up the non working system to .img to your pc to ensure you can flash back and boot phone in case some security errors u need comand prompt again and

Code:
adb shell
su
dd if=/sdcard/Download/system.img of=/dev/block/mmcblk0p30
reboot recovery
If there is a chance it works great if not use backed up img to restore and refer to my post with file compare to replace few missing items..

read below first !

YES, thanks so much this worked. I ran the commands and it started then phone was stuck at bootloop. I removed battery after about 5 minutes and it booted up. THANKS SO MUCH. This has been driving me nuts the last few weeks. Now to try on more phones.
 
 
7th May 2017, 12:48 PM |#282  
Member
Thanks Meter: 3
 
More
Listing partitions names and mount points
Hi All,
I got this error: /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/: Permission denied

Any advices would be very appreciated how to get rid of this.
regards,
8th May 2017, 05:36 AM |#283  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by UlixesTNT

I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.

Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.

I've not clearly understood what "secure boot" means. Any guide or wiki?

Thanks!

---------- Post added at 06:56 PM ---------- Previous post was at 06:55 PM ----------

I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.

Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.

I've not clearly understood what "secure boot" means. Any guide or wiki?

Thanks!



Dude, you mentioned that the phone was not rooted? So, I assume that you never install any custom recovery images? So even if u extract "recovery.img" , it will be either the factory state recovery or nothing at all. So flashing it doesn't really help though. Unless u u install a custom rom on your phone. Then, if you flash it the recovery will be back to stock.

The secure boot thing is to do with knox. Please google for Knox and read about it.
8th May 2017, 10:04 AM |#284  
Senior Member
Flag Praia
Thanks Meter: 365
 
More
Quote:
Originally Posted by DoctStrange

Dude, you mentioned that the phone was not rooted? So, I assume that you never install any custom recovery images? So even if u extract "recovery.img" , it will be either the factory state recovery or nothing at all. So flashing it doesn't really help though. Unless u u install a custom rom on your phone. Then, if you flash it the recovery will be back to stock.

The secure boot thing is to do with knox. Please google for Knox and read about it.

By the way, you don't have to be rooted to install a custom recovery, if the bootloader is unlocked. You can flash a custom recovery directly to the phone (typical MTK or Samsung) and use the custom recovery to root it later.

Sent from my Nexus 7 using XDA Free mobile app
9th May 2017, 09:42 AM |#285  
Junior Member
Thanks Meter: 0
 
More
Jtag Dump
great post!
the dumped file could be used for "easy jtag" or "riff" box or no?
i have a hard bricked huawei honor 4x model: CHE-TL00H and i need preloader and bootloader to write on EMMC and bring it back to life
thanks
20th May 2017, 08:15 PM |#286  
Mnemonic_Blast's Avatar
Junior Member
Thanks Meter: 1
 
Donate to Me
More
Lg g vista partition table
vs880 24

was the prepaid version, flashed a retail rom (23A) on it.

Code:
via adb
shell@x10:/ $ su
root@x10:/ # ls -al /dev/block/platform/msm_sdcc.1/by-name
lrwxrwxrwx root     root              1970-01-04 04:34 DDR -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              1970-01-04 04:34 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              1970-01-04 04:34 abootb -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              1970-01-04 04:34 boot -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              1970-01-04 04:34 cache -> /dev/block/mmcblk0p33
lrwxrwxrwx root     root              1970-01-04 04:34 drm -> /dev/block/mmcblk0p24
lrwxrwxrwx root     root              1970-01-04 04:34 eksst -> /dev/block/mmcblk0p31
lrwxrwxrwx root     root              1970-01-04 04:34 encrypt -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              1970-01-04 04:34 eri -> /dev/block/mmcblk0p30
lrwxrwxrwx root     root              1970-01-04 04:34 factory -> /dev/block/mmcblk0p26
lrwxrwxrwx root     root              1970-01-04 04:34 fota -> /dev/block/mmcblk0p28
lrwxrwxrwx root     root              1970-01-04 04:34 fsc -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              1970-01-04 04:34 fsg -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              1970-01-04 04:34 grow -> /dev/block/mmcblk0p35
lrwxrwxrwx root     root              1970-01-04 04:34 laf -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              1970-01-04 04:34 misc -> /dev/block/mmcblk0p13
lrwxrwxrwx root     root              1970-01-04 04:34 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              1970-01-04 04:34 modemst1 -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              1970-01-04 04:34 modemst2 -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              1970-01-04 04:34 operatorlogging -> /dev/block/mmcblk0p27
lrwxrwxrwx root     root              1970-01-04 04:34 pad -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              1970-01-04 04:34 persist -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              1970-01-04 04:34 rct -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              1970-01-04 04:34 recovery -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              1970-01-04 04:34 rpm -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              1970-01-04 04:34 rpmb -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              1970-01-04 04:34 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              1970-01-04 04:34 sbl1b -> /dev/block/mmcblk0p29
lrwxrwxrwx root     root              1970-01-04 04:34 sdi -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              1970-01-04 04:34 sns -> /dev/block/mmcblk0p25
lrwxrwxrwx root     root              1970-01-04 04:34 system -> /dev/block/mmcblk0p32
lrwxrwxrwx root     root              1970-01-04 04:34 tz -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              1970-01-04 04:34 tzb -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              1970-01-04 04:34 userdata -> /dev/block/mmcblk0p34
root@x10:/ #

_______________________________________________________________________________________
Whats loaded as the root directory, very dynamic, script to actually set emmc size


root@x10:/ # ls
acct
cache
charger
config
d
data
default.prop
dev
eri
etc
file_contexts
firmware
fstab.x10
init
init.class_main.sh
init.environ.rc
init.lge.cmm.usb.sh
init.lge.diag.rc
init.lge.early.rc
init.lge.fs.rc
init.lge.log.rc
init.lge.modem_log.rc
init.lge.power.rc
init.lge.rc
init.lge.svelte.rc
init.lge.usb.post-fs-data.s
init.lge.usb.rc
init.lge.usb.sh
init.lge.usb_over.sh
init.lge.vzw.usb.sh
init.lge.wifi.rc
init.mdm.sh
init.qcom.class_core.sh
init.qcom.early_boot.sh
init.qcom.factory.sh
init.qcom.rc
init.qcom.sh
init.qcom.ssr.sh
init.qcom.syspart_fixup.sh
init.rc
init.recovery.x10.rc
init.target.rc
init.trace.rc
init.usb.rc
init.x10.rc
init.x10_core.rc
init.x10_product.rc
init.zetaw.bt_vendor.rc
init.zetaw.sensor.sh
init.zetaw_core.rc
init.zygote32.rc
lgdms.fota.rc
lgdms.fota_update.rc
mnt
persist
persist-lg
pkg
proc
property_contexts
res
root
sbin
sdcard
seapp_contexts
selinux_version
sepolicy
service_contexts
set_emmc_size.sh
smpl_boot
sns
storage
sys
system
tmp-mksh
tombstones
ueventd.rc
ueventd.x10.rc
vendor
vzw


________________________________________________________________________________________________________________

root@x10:/ # cat /proc/partitions
major minor  #blocks  name

 253        0     347260 zram0
 179        0    7634944 mmcblk0
 179        1      65536 mmcblk0p1
 179        2       1024 mmcblk0p2
 179        3        512 mmcblk0p3
 179        4        512 mmcblk0p4
 179        5        512 mmcblk0p5
 179        6       2048 mmcblk0p6
 179        7        512 mmcblk0p7
 179        8        512 mmcblk0p8
 179        9       2048 mmcblk0p9
 179       10       2048 mmcblk0p10
 179       11       3072 mmcblk0p11
 179       12       3072 mmcblk0p12
 179       13      16384 mmcblk0p13
 179       14      32768 mmcblk0p14
 179       15      22528 mmcblk0p15
 179       16      22528 mmcblk0p16
 179       17      22528 mmcblk0p17
 179       18       3072 mmcblk0p18
 179       19        512 mmcblk0p19
 179       20        512 mmcblk0p20
 179       21        512 mmcblk0p21
 179       22        512 mmcblk0p22
 179       23        512 mmcblk0p23
 179       24       8192 mmcblk0p24
 179       25       8192 mmcblk0p25
 179       26      20480 mmcblk0p26
 179       27      16384 mmcblk0p27
 179       28      32768 mmcblk0p28
 179       29       1024 mmcblk0p29
 179       30       8192 mmcblk0p30
 179       31        512 mmcblk0p31
 259        0    2097152 mmcblk0p32
 259        1     921600 mmcblk0p33
 259        2    4235776 mmcblk0p34
 259        3      32751 mmcblk0p35
 179       32       4096 mmcblk0rpmb

________________________________________________________________________________________________________________

root@x10:/ # df
Filesystem                 Size         Used         Free    Blksize
/dev                    678.24M       84.00K      678.16M       4096
/sys/fs/cgroup          678.24M       12.00K      678.23M       4096
/mnt/asec               678.24M        0.00K      678.24M       4096
/mnt/obb                678.24M        0.00K      678.24M       4096
/system                   1.97G        1.91G       56.34M       4096
/data                     3.97G        2.20G        1.77G       4096
/cache                  884.61M       14.41M      870.20M       4096
/persist                 31.46M        4.04M       27.42M       4096
/firmware                63.95M       55.62M        8.33M      16384
/sns                      7.83M        4.04M        3.80M       4096
/persist-lg               7.83M        4.43M        3.41M       4096
/eri                      7.83M        4.02M        3.82M       4096
/vzw/quality             15.71M        4.01M       11.70M       4096
/mnt/shell/emulated       3.97G        2.20G        1.77G       4096
/storage/emulated/legacy: No such file or directory
/storage/emulated       686.05M        0.00K      686.05M       4096
/storage/emulated/0       3.97G        2.20G        1.77G       4096
/storage/emulated/0/Android/obb      3.97G        2.20G        1.77G       4096

___________________________________________________________________________________

1|root@x10:/ # cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=694520k,nr_inodes=112828,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,size=694520k,nr_inodes=112828,mode=750,gid=1000 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,size=694520k,nr_inodes=112828,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,size=694520k,nr_inodes=112828,mode=755,gid=1000 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=1000,errors=continue,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/bootdevice/by-name/sns /sns ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=continue,data=ordered 0 0
/dev/block/bootdevice/by-name/drm /persist-lg ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,errors=continue,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/eri /eri ext4 rw,seclabel,nodev,relatime,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/operatorlogging /vzw/quality ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
tmpfs /storage/emulated tmpfs rw,seclabel,nosuid,nodev,relatime,mode=050,gid=1028 0 0
/dev/fuse /storage/emulated/0 fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0/Android/obb fuse rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
root@x10:/ #

________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

root@x10:/dev/block # fdisk mmcblk0
Found valid GPT with protective MBR; using GPT


Command (m for help): ←[6nroot@x10:/dev/block # blkid
/dev/block/zram0: TYPE="swap"
/dev/block/mmcblk0p1: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat"
/dev/block/mmcblk0p14: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p24: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p25: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p27: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p30: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p32: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p33: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p34: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
root@x10:/dev/block #
18th June 2017, 09:32 PM |#287  
Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by Wuby986

For data i strongly recomand to use zip instead of dd.
dd will include in the image also the empty bits which in this case are a lot tipically

Sent from my SM-G935F using Tapatalk

What do you mean by use zip instead of dd ?
19th June 2017, 10:23 AM |#288  
Senior Member
Flag Praia
Thanks Meter: 365
 
More
Quote:
Originally Posted by Andrzej_Andrzej

What do you mean by use zip instead of dd ?

I think what he meant was that you should zip the data image that you extract with the dd command. The raw image has a lot of blank space. So if you zip it, you'll end up with a much smaller file.

Sent from my Nexus 7 using XDA Free mobile app
The Following User Says Thank You to CVAngelo For This Useful Post: [ View ] Gift CVAngelo Ad-Free
19th June 2017, 11:03 AM |#289  
Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by CVAngelo

I think what he meant was that you should zip the data image that you extract with the dd command. The raw image has a lot of blank space. So if you zip it, you'll end up with a much smaller file.

Sent from my Nexus 7 using XDA Free mobile app

Hi, thank you for your reply, I was wondering why can't he just write: use dd and then zip a file.
Clear and simple.
28th June 2017, 08:26 PM |#290  
kwest12's Avatar
Senior Member
Thanks Meter: 156
 
More
Hi there, I'm trying to pull root directories like /system and /data without any luck. My purpose it to have them on my PC as a backup, and be able to browse them to pull out apps and pieces of data as necessary if it ever becomes necessary.

Device: Nexus 6P (North American version)
ROM: Stock 6.0.1 Rooted, using Wugfresh Nexus Root Toolkit and SuperSU
PC OS: Windows 7 PC (64 bit)

Adb is working properly and I can easily pull non-root directories like "/sdcard" and so on. I'd like to be able to backup the entire root directory ("/") or at least the child directories (like "/system" and "/data", etc.) Unfortunately, when I try
Code:
adb pull -p "/system" "C:\somewhere"
it skips a bunch of files, so I need to come up with a better method.

I've tried
Code:
adb root
and it tells me it's already running in root mode.

I try
Code:
adb remount
and it does this properly, but doesn't change the effects of all the commands I've tried.

When I run
Code:
adb shell
it enters shell and gives me # by default, so seemingly it is giving me su permission by default?

*** Oddly, when I enter "su" while in shell, it tells me "/sbin/sh: su: not found" which seems odd to me. I think it's possibly that SuperSU is installed as systemless root, or there's something else screwy here, so I guess I'm not sure how to proceed. Still, if that were case, why would adb already be running as root, and why would shell automatically give me the #?



Anyway, I stumble onto this guide, and I did the Method 2 and it spit out the mount points. Here's the output for the line that contains "system"
Code:
lrwxrwxrwx   1  root      root          21 Jul 20  1971  system -> /dev/block/mmblk0p43
Does this mean I should use the follow?:
Code:
adb shell
dd if=/dev/block/mmcblk0p43 of=/sdcard/system.img
As I said, I want it to be browseable on Windows, so if I do that, pull the file from the sdcard to my PC, and then download LinuxReader, will that allow me to pull the files out into a normal Windows file (which presumably would allow me to push individual files back to a phone over adb if I ever needed to?)

Thanks!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes