[GUIDE] Making Dump Files Out of Android Device Partitions

Search This thread

Mailman74

Member
Nov 7, 2011
20
1
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.
 

Andrzej_Andrzej

Senior Member
Apr 1, 2017
94
4
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,
 

DoctStrange

Member
Apr 5, 2017
7
1
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.
 

CVAngelo

Senior Member
Mar 24, 2015
1,014
392
Praia
investincv.blogspot.com
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
 

farzadmaverick

New member
Jan 13, 2014
3
0
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
 

Mnemonic_Blast

New member
May 20, 2017
2
1
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 #
 

Andrzej_Andrzej

Senior Member
Apr 1, 2017
94
4
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.
 

cognitivedissonance

Senior Member
Jan 11, 2012
668
217
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!
 
Last edited:

azigta

Member
Feb 12, 2011
15
8
no available space

I wrote "dd if=/dev/block/mmcblk0p28 of=/sdcard/userdata.img" and it starts dumping the partition, but it's the userdata partition so it's heavy and the internal memory of the phone is not enough, is there a command that can put the dump in the external sdcard ? I have 14gb available there... more than enough.

I deleted some pictures and I want to recover them in windows (I tried recovering them with an app but not a single one came out without being corrupted, so I want to try digging through windows once I have the .img file mounted)
I don't have many hopes but I need to try this...

Thanks
 

msuki

Senior Member
Nov 12, 2015
110
30
Hi, thanks for guide.

if smartphone don't support external MicroSD, so not possible to do dump ROM partition?
 

CVAngelo

Senior Member
Mar 24, 2015
1,014
392
Praia
investincv.blogspot.com
I wrote "dd if=/dev/block/mmcblk0p28 of=/sdcard/userdata.img" and it starts dumping the partition, but it's the userdata partition so it's heavy and the internal memory of the phone is not enough, is there a command that can put the dump in the external sdcard ? I have 14gb available there... more than enough.

I deleted some pictures and I want to recover them in windows (I tried recovering them with an app but not a single one came out without being corrupted, so I want to try digging through windows once I have the .img file mounted)
I don't have many hopes but I need to try this...

Thanks
Try sdcard0 or sdcard1. Or you can direct the outputting file to your computer hard drive C:

Sent from my Nexus 7 using XDA Free mobile app
 

desalesouche

Senior Member
Feb 6, 2012
3,651
4,297
Try sdcard0 or sdcard1. Or you can direct the outputting file to your computer hard drive C:

Sent from my Nexus 7 using XDA Free mobile app
hi.
how to extract to pc/desktop intead sdcard?
i have 16 GB sdcard and telling me no space left...
thank you
adb shell
su
dd if=/dev/block/mmcblk0 of=/sdcard/EMMC.img
 

CVAngelo

Senior Member
Mar 24, 2015
1,014
392
Praia
investincv.blogspot.com
hi.
how to extract to pc/desktop intead sdcard?
i have 16 GB sdcard and telling me no space left...
thank you
adb shell
su
dd if=/dev/block/mmcblk0 of=/sdcard/EMMC.img
My earlier response clearly said to direct the output file to your C drive.

of=c:/directory/filename.img

Sent from my Nexus 7 using XDA Free mobile app
 

glosacco

New member
Oct 27, 2017
1
0
damaged img

Hi,
I followed your tutorial step by step (very nice) but every img I got results damaged.
I did it as root via adb on a Meizu 6 Pro Plus fully rooted.
What about?
Thanks a lot
Giovanni Losacco
 

dzidexx

Senior Member
Nov 9, 2015
1,694
522
Lublin, Poland
Hi everyone,
I did backup of all needed partitions with DD.
I don't know how to do backup of partition table.
I need it for making flashable stock rom - Motorola Moto X Style, only upper version is flashable.
In downloadable roms it is:
gpt.bin
Flashing with:
fastboot flash partition gpt.bin

Can anybody help me?
 

akkiman.01

Senior Member
Jul 24, 2016
66
6
is this relevent to the problem : unable to mount /system /cache /data (fastboot remote: partition table does not exist)
i have lenovo a6000 and it is not mounting system data and cache partition
it is showing system image size as 1800 mb and system,data,cache size as 0mb (internal storage as 0 mb)
i am unable to boot it....
it has no os installed and i am unable to mount storage also... fastboot is working only
unable to flash anything...
i can only boot recovery.img
i can use adb sideload
My question is,
1. Can I revive my mobile now?
2. is there anyway to mount the partitions ?(i am able to see the partitions in dev..../by name/ folder)
3. Can I use my external sdcard as the mounting location for system ,data,cache and for all?
4. Can I delete the corrupted partition table and create new one?(similar to 1)
Or if u know any other solutions please PM me or post it here....
Sorry for bad english
thank you
 

Top Liked Posts

  • There are no posts matching your filters.
  • 353
    Use:
    The main purpose is to make a file that contains all data in android specific partition. This is really handy in case of dumping leak firmwares.


    Pr-requirement:
    - Rooted device.
    - Knowledge of how to use adb or Terminal Emulator.

    The first step of making dump files out of device partitions is to locate its mounting points..!!
    So in our tutorial, we will make it in 2 sections. Section 1 for how to get mounting points, and section 2 for how to get partition dumped..
    Keep in mind that this is xda-university; so my target is to show beginners how to do that manually, without the aid of any tool, so they can get the concept behind it.. OK let's begin..!!

    Section 1:
    Getting mounting points
    There are several methods to achieve this, but we will discuss the easiest methods that give efficient information about the partition that you want to know its mounting point.
    All these methods will be described using adb shell.

    Way #1
    Code:
    adb shell
    cat /proc/partitions
    This one needs from you to figure out which block belong to which partition name.!!

    2ds4ujd.png


    Way #2
    Code:
    adb shell
    ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
    This one will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc)

    rsg20h.png

    This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).
    How?
    - In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).
    - Go to "/dev/block/platform/" folder
    - Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.
    - At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)
    - Now open adb shell and put that command..


    Way #3
    By pushing parted binary to /system/bin folder and run it (you can find it in attachment).
    Code:
    adb remount
    adb shell "su" "" "mount -o remount,rw /system"
    adb push parted /system/bin/parted
    adb shell
    chmod 0755 /system/bin/parted
    parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
    print

    11t5x7c.png

    Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.
    example:
    The hidden partition mounting point will be mmcblk0p10
    The radio partition mounting point will be mmcblk0p7
    The system partition mounting point will be mmcblk0p9
    The recovery partition mounting point will be mmcblk0p6

    and so on

    Don't forget to "quit" the parted action after grasping your device mounting points.

    N.B:
    - You may need to run first:
    Code:
    adb shell
    cat /proc/partitions
    to know what is the initial name for your device partition.. In the example above, it was mmcblk0.

    wbaufd.png

    - Also to be able to do adb push to /system partition for parted binary, you will need insecure boot.img used in your ROM or adbd insecure installed in your device (Check this thread for that app), or just push parted binary manually by any root explorer and then fix permissions to rwxr-xr-x (755).

    ***​

    Section 2:
    Dumping ROM partition
    After locating the mounting point of the partition you want to dump, open adb shell command prompt and type:
    Code:
    adb shell
    su
    dd if=[B][COLOR="Blue"]/yourMountingPoint[/COLOR][/B] of=[B][COLOR="Green"]/yourDestination[/COLOR][COLOR="Red"]/partitionType[/COLOR][/B]
    Let's say I want to take a dump out of system partition from above example. So the adb commands will be:
    Code:
    adb shell
    su
    dd if=[B][COLOR="Blue"]/dev/block/mmcblk0p9[/COLOR][/B] of=[B][COLOR="Green"]/sdcard[/COLOR][COLOR="Red"]/system.img[/COLOR][/B]
    This may take a while to complete the dumping process, depending on the size of your dumped partition; so be patient..

    Note:
    If the partition is formatted as ext3/4 then the dumped partition will have .img as an extension.
    Other partition dumps have different extensions; examples:
    • radio.bin
    • param.lfs
    • Sbl.bin
    • zImage (without extension)

    ***​

    Optional:
    Read Partition Image
    After dumping an image from android partition, you can mount it to extract a particular file for sharing, or the whole dump content in case the ROM chief wants to make a ROM out of dump files..
    For Linux Users:
    - Open terminal and type:
    Code:
    su -
    mkdir -p /mnt/disk
    mount -o loop [B][COLOR="Red"]yourImage.img[/COLOR][/B] /mnt/disk
    cd /mnt/disk
    ls -l

    For Windows Users:
    - Download LinuxReader from this site here.
    - Open it -> Drives -> Mount Image -> Then choose your dumped image and hit Mount. A new driver will appear that contains all files inside the dumped image called "Linux native Volume 1". Just double click it to get inside the dumped image.

    2roj2f4.png


    2dhbhxd.png


    I hope you will find this tutorial beneficial,,,
    Yours;

    115
    Actions Explanation

    ★ Tutorial Legends ★

    In this post, I will try to explain the use of each binary used in the tutorial, so you can make sense of each action taken.

    #1
    Code:
    adb shell
    Run remote shell interactively, as if you are in linux terminal.

    #2
    Code:
    cat /proc/partitions
    cat binary is used to concatenate file(s) and print them to standard output display. In our example, it prints the content of partitions file which is found in proc folder to screen display.

    #3
    Code:
    ls -al /dev/block/platform/dw_mmc/by-name
    ls binary is used to list directory contents.
    -al is the used option for ls which means to include entries that started with "." in long listing format. There are a lot of options for ls binary. You can always print ls --h to display help menu for other options available.

    #4
    Code:
    adb remount
    Remounts the /system partition on the device read / write. This has been disabled in some devices (those with secure boot image); so you need to make sure that you have patched adbd that can run this command effectively.

    #5
    Code:
    su
    Used to get super-user privilege.


    #6
    Code:
    mount -o remount,[B][COLOR="Red"]rw[/COLOR][/B] /system
    Specific command to mount the /system partition on the device read / write (rw).
    If you change rw to ro, you will get /system partition mounted as read only.

    #7
    Code:
    adb push parted /system/bin/parted
    adb push is used to copy file/dir from your local computer to android device. The usual format is adb push <local> <remote>

    #8
    Code:
    chmod 0755 /system/bin/parted
    chmod binary is used to set permissions for the specified file/dir.
    The number after chmod is the permission used. See the next box for better understanding of chmod formatting:
    Code:
    [CENTER][B][COLOR="Red"]----------------
    | CHMOD SCHEME |
    ----------------[/COLOR][/B][/CENTER]
              [B] r     w     x[/B]
               [B]4     2     1    [COLOR="Green"]= 7 (Full Permissions)[/COLOR][/B]
    
      User    ( )   ( )   ( )   [B][COLOR="Green"]--> 2nd digit[/COLOR][/B]
      Group   ( )   ( )   ( )   [B][COLOR="Green"]--> 3rd digit[/COLOR][/B]
      Other   ( )   ( )   ( )   [B][COLOR="Green"]--> 4th digit[/COLOR][/B]
    
      Special UID   GID   STK
              ( )   ( )   ( )   [B][COLOR="Green"]--> 1st digit, ignored on most cases or put 0[/COLOR][/B]
    In the above example, it is set to 0755 which means the following scheme:
    Code:
              [B] r     w     x[/B]
               [B]4     2     1[/B]
    
      User    ([B][COLOR="Red"]*[/COLOR][/B])   ([B][COLOR="Red"]*[/COLOR][/B])   ([B][COLOR="Red"]*[/COLOR][/B])   [B][COLOR="Green"]--> This equals to 7 (rwx)[/COLOR][/B]
      Group   ([B][COLOR="Red"]*[/COLOR][/B])   ( )   ([B][COLOR="Red"]*[/COLOR][/B])   [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
      Other   ([B][COLOR="Red"]*[/COLOR][/B])   ( )   ([B][COLOR="Red"]*[/COLOR][/B])   [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
    
      Special UID   GID   STK
              ( )   ( )   ( )   [B][COLOR="Green"]--> This equals to 0 (---)[/COLOR][/B]
    As you can see, if you said 0755, it will be as same as saying ---rwxr-xr-x

    #9
    Code:
    dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
    dd binary is used to copy a file with converting and formatting.
    if means input file; here we pointed to the whole partition, not specific file.
    of means outputting file to specific destination path; here it is to sdcard with system.img name.

    #10
    Code:
    mkdir -p /mnt/disk
    mkdir binary is used to make folder dir.
    -p is mkdir option which means to create folder with sub-folder at the same time. Here we want to create mnt folder that contains disk sub-folder in it. If the folder and or sub-folder(s) are already exists, it will not give error but nothing will be created.

    #11
    Code:
    mount -o loop yourImage.img /mnt/disk
    This is linux way to mount images into specific directory (/mnt/disk in this example).

    #12
    Code:
    cd /mnt/disk
    cd used to get inside specific dir path.

    #13
    Code:
    ls -l
    ls binary is used to list directory contents as described above.
    -l is the used option for ls which means to list contents in long listing format.


    Cheers
    11
    another way to get common names

    on way #2, I've often used:
    Code:
    cat /proc/emmc
    on a few devices to reveal similar info.

    Rob
    5
    can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??

    if you mean extract to modify boot.img, then I don't think there is away to do that from device itself in the moment..
    if you mean dumping boot.img then yes you can, just install terminal emulator from Google play and you can run adb shell commands directly from the device
    4
    can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??