[GUIDE] Making Dump Files Out of Android Device Partitions

Search This thread

IGGYVIP

Senior Member
Feb 17, 2014
833
309
/
Samsung Galaxy S4
Samsung Galaxy S10
I did confirm my original assumption that the filename and extension are not important. Thank you for the clarification on the partitions. I'm looking for the bootloader so I can try to figure out how to unlock it. I've never done this before and am looking for everything and anything.

Sent from my SAMSUNG-SM-N900A using XDA Free mobile app

as far as i can see note 3 atnt its being worked on by the pro's that got paid to do so :)
link : HERE
so better off just wait and save your device from bricking
 

Cobaltikus

Senior Member
I was able to mount the image files directly on my phone, using what I learned from this page http://www.techpository.com/?page_id=1201

Disclaimer: I honestly don't know the significance of all the details below. I simply know it works on my AT&T Note 3, and I wanted to share this as it is relevant to the OP.

1. Create an empty directory on your sdcard where your image contents will be accessed.

Code:
[SIZE="2"]mkdir /sdcard/mnt/disk[/SIZE]

Find a unique loop. The example I learned from uses loop250.
Code:
[SIZE="2"]ls /dev/block/loop*[/SIZE]
We see there is no loop250 so we are good to go with that one.

Create the loop.
Code:
[SIZE="2"]busybox mknod /dev/block/loop250 b 7 250[/SIZE]

Mount the image with these 2 commands:
Code:
[SIZE="2"]busybox losetup /dev/block/loop250 pathToImageFile
busybox mount /dev/block/loop250 /sdcard/mnt/disk[/SIZE]

To unmount the image run these 2 commands:
Code:
[SIZE="2"]umount /sdcard/mnt/disk
losetup -d /dev/block/loop250[/SIZE]

Feel free to correct my terminology or understanding if I have misstated anything.

Sent from my SAMSUNG-SM-N900A using XDA Free mobile app

---------- Post added at 01:12 PM ---------- Previous post was at 01:06 PM ----------

as far as i can see note 3 atnt its being worked on by the pro's that got paid to do so :)
link : HERE
so better off just wait and save your device from bricking

Nah. I'm too impatient. And I'm learning way too much to stop here and wait for someone else to have all the fun. They will probably beat me to it, but maybe not. And even if they do, I will have gained valuable knowledge that might help me unlock the Note 4 or 5.

Sent from my SAMSUNG-SM-N900A using XDA Free mobile app
 

Mr0lala

Senior Member
Aug 29, 2010
78
81
Ha Noi
I can't find boot.img and recovery.img

Hi, I need some help, I can't local my boot partition and recovery partition. Have any solution to find its????

Here my image:
10xgj8k.jpg

24q30uh.jpg


Thanks for your help and sorry my bad English :(
 

Attachments

  • 1.jpg
    1.jpg
    100.4 KB · Views: 189
  • 2.jpg
    2.jpg
    115.8 KB · Views: 191

EdwardSan

Member
Oct 15, 2014
6
0
LG G2 no partitions

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;


Hi, i cant use adb commans because there is no devices, is there any other way?
 

LNRawz

Member
Jan 19, 2011
33
7
Hi, I need some help, I can't local my boot partition and recovery partition. Have any solution to find its????

Here my image:
10xgj8k.jpg

24q30uh.jpg


Thanks for your help and sorry my bad English :(
Do the command <ls -la /dev/block/> (in ADB SHELL). If your device have a /by-name dir you will get the partitions friendly names.
If not, look for a recovery log. LG devices (mine and other models at least) place on this: /cache/recovery/last_log. There you should have a partitions table at the start. Not complete, but useful.
IF NOT, try to match the cat command with the parted one, relating the sizes. The cat command gives blocks, get the parted sizes and divide by some thing, usually 1024 for newer phones, 512 on older models.

Hi, i cant use adb commans because there is no devices, is there any other way?
You're probably missing the USB drivers for your phone. Look for it, install, then it should work.
 
Last edited:
  • Like
Reactions: Mr0lala

EdwardSan

Member
Oct 15, 2014
6
0
lg g2 bricked

Do the command <ls -la /dev/block/> (in ADB SHELL). If your device have a /by-name dir you will get the partitions friendly names.
If not, look for a recovery log. LG devices (mine and other models at least) place on this: /cache/recovery/last_log. There you should have a partitions table at the start. Not complete, but useful.
IF NOT, try to match the cat command with the parted one, relating the sizes. The cat command gives blocks, get the parted sizes and divide by some thing, usually 1024 for newer phones, 512 on older models.


You're probably missing the USB drivers for your phone. Look for it, install, then it should work.

I have all drivers, the phone in black screen and the PC recognized as QHSUSB_BULK, then don't accept adb commands

Maybe i lost partitions
 

LNRawz

Member
Jan 19, 2011
33
7
I have all drivers, the phone in black screen and the PC recognized as QHSUSB_BULK, then don't accept adb commands

Maybe i lost partitions

Looks like it, you don't have the software on the other side (the phone) to answer ADB.
Try fastboot. Try to put the phone on factory download mode and use fastboot to push recovery to it.
Did you search for an unbrick guide, so you have some insight on what is happening ?
Here
 
Last edited:

skivnit

Senior Member
May 21, 2012
2,708
365
is there a guide to show i can recover files from a dump?. i used this to dump my userdata now i would like to mount and see if i can recover the pictures that got deleted
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
is there a guide to show i can recover files from a dump?. i used this to dump my userdata now i would like to mount and see if i can recover the pictures that got deleted

I use ext2explore-2.2.71.zip and sometimes depends on image file, use sgs2toext4.zip and then ext2explore (both or windows tools)

follow the pictures as a guide
 

Attachments

  • sgs2toext4_ext2explore-2.2.71_tools.zip
    4.9 MB · Views: 233
  • Like
Reactions: adfree

asgardflotte

Member
Dec 25, 2010
7
0
Hi,
i could create some images with your guide. Thx for that.

But my main problem is, that i could not dump the mmcblk0 file, where all of my pictures and stuff must be located.
I managed to exporting this file to my external sd card, but after 4gb the process stopped. An Error occured, that the file is too big.
I dont need the boot loader or the recovery partition. I want my lost pictures back.

Can someone help me ?
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
Hi,
i could create some images with your guide. Thx for that.

But my main problem is, that i could not dump the mmcblk0 file, where all of my pictures and stuff must be located.
I managed to exporting this file to my external sd card, but after 4gb the process stopped. An Error occured, that the file is too big.
I dont need the boot loader or the recovery partition. I want my lost pictures back.

Can someone help me ?

If you had any picture (taken with the camera) they would be on your SDcard of externel SDcard.
what is your phone model?
 
Last edited:

johnnyside

Member
Sep 30, 2014
5
0
Help please

Hi. I have a briked chinese phone (F7102), so I decided to dump the stock rom from a friend phone (same model) using this tutorial:

"you need a rooted device first before you can do it.
after you have rooted it. download the following app from play store called "android terminal emulator"
copy the romdump file to your sdcard and put the sdcard into your device.
copy from your tab the file to /data/local/ (use e.g. ES File Explorer (need root access))
change the permission of the romdump file (using ES File Explorer --> Hold the file --> Properties --> and change it to 755(rwxrw-rw)
open the installed android terminal emulator app
use to following command
su
/data/romdump
After you run that you can copy the whole folder in /sdcard/romdump to pc (using external sdcard, usb plug-in,...)
"

Everething was perfect, and the result of it was a folder named "romdump", it contains the following files:

config.gz 0 KB
system.info.gz 2 KB
system.tar 480 MB
checksum.md5 1 KB

My question is, how do I flash those files into my briked phone, from fastboot? ADB? and wich one of those files do I have to flash (for the size i think is "system.tar").

I hope you can helpme, please try to put the whole procedure for flashing the rom. (I am a noob on this.)

PD: sorry for my english.
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
Hi. I have a briked chinese phone (F7102), so I decided to dump the stock rom from a friend phone (same model) using this tutorial:

"you need a rooted device first before you can do it.
after you have rooted it. download the following app from play store called "android terminal emulator"
copy the romdump file to your sdcard and put the sdcard into your device.
copy from your tab the file to /data/local/ (use e.g. ES File Explorer (need root access))
change the permission of the romdump file (using ES File Explorer --> Hold the file --> Properties --> and change it to 755(rwxrw-rw)
open the installed android terminal emulator app
use to following command
su
/data/romdump
After you run that you can copy the whole folder in /sdcard/romdump to pc (using external sdcard, usb plug-in,...)
"

Everething was perfect, and the result of it was a folder named "romdump", it contains the following files:

config.gz 0 KB
system.info.gz 2 KB
system.tar 480 MB
checksum.md5 1 KB

My question is, how do I flash those files into my briked phone, from fastboot? ADB? and wich one of those files do I have to flash (for the size i think is "system.tar").

I hope you can helpme, please try to put the whole procedure for flashing the rom. (I am a noob on this.)

PD: sorry for my english.

search your phone most chinese phones and tablet have ther own flash tools

Read this thread http://xdaforums.com/showthread.php?t=1943442&page=81
 

aparty

Member
May 27, 2009
25
0
After I made a dump with
dd if=/path/input_partition of=/output.img
I try to mount it in Windows using "DiskInternals LinuxReader".
I obtain the error "Can't open disk".

When I use "ext2explore", I read this message in log file:
"Invalid End of sector markerBad Super Block. The drive is not ext2 formatted.
No valid Ext2 Partitions found in the disk image."

Why? :confused: :confused: :confused:

What I need to read my "output.img"???
 

ibub

Senior Member
Oct 22, 2012
1,728
1,522
Louisville,Ky
After I made a dump with
dd if=/path/input_partition of=/output.img
I try to mount it in Windows using "DiskInternals LinuxReader".
I obtain the error "Can't open disk".

When I use "ext2explore", I read this message in log file:
"Invalid End of sector markerBad Super Block. The drive is not ext2 formatted.
No valid Ext2 Partitions found in the disk image."

Why? :confused: :confused: :confused:

What I need to read my "output.img"???
Exact command would help.

sent from my towelrooted LG L34C using tapatalk
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
After I made a dump with
dd if=/path/input_partition of=/output.img
I try to mount it in Windows using "DiskInternals LinuxReader".
I obtain the error "Can't open disk".

When I use "ext2explore", I read this message in log file:
"Invalid End of sector markerBad Super Block. The drive is not ext2 formatted.
No valid Ext2 Partitions found in the disk image."

Why? :confused: :confused: :confused:

What I need to read my "output.img"???
@aparty

Try this you might only need last app, skip sparse2img
http://xdaforums.com/showthread.php?p=57031901
 
Last edited:

aparty

Member
May 27, 2009
25
0
@aparty

Try this you might only need last app, skip sparse2img
http://xdaforums.com/showthread.php?p=57031901

@carl1961

It doesn't work. What else?

Follow more info:

-----------------------
Microsoft Windows XP [Versione 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

ImgExtractor.exe afmisc.IMG

ImgExtractor version 1.3.6 <Created by And_PDA (Based on sources ext4_unpacker)>


Extractor for images in EXT2\EXT3\EXT4\YAFFS2\CRAMFS filesystem formats
support SPARSE\SIN\MOTO structure formats

Open image file afmisc.IMG (size 16777216 bytes) successfull...
Analize format of file. Please wait...
-----------------------

Then Windows System Error!

Why?
 

carl1961

Senior Member
Dec 5, 2010
7,521
6,201
Tickfaw
@carl1961

It doesn't work. What else?

Follow more info:

-----------------------
Microsoft Windows XP [Versione 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

ImgExtractor.exe afmisc.IMG

ImgExtractor version 1.3.6 <Created by And_PDA (Based on sources ext4_unpacker)>


Extractor for images in EXT2\EXT3\EXT4\YAFFS2\CRAMFS filesystem formats
support SPARSE\SIN\MOTO structure formats

Open image file afmisc.IMG (size 16777216 bytes) successfull...
Analize format of file. Please wait...
-----------------------

Then Windows System Error!

Why?

example: on my phone your partition number will be different, this dumps to my internal sdcard.


dd if=/dev/block/mmcblk0p23 of=/sdcard/system.img

I copy the "system.img" to my folder where ImgExtractor_1_3_6 is at.

in command window in that folder You type:

ImgExtractor.exe system.img system -i


on my setup:

I run bat files I did so I do not have to type anything.. system.img.bat this is a txt file renamed to .bat

bat file contains:

ImgExtractor.exe system.img system -i

attached is my ImgExtractor_1_3_6, unzip and put on your c:\drive

double click Command Prompt.bat then bat file of image your doing.
 

Attachments

  • ImgExtractor_1_3_6.zip
    94.3 KB · Views: 389
Last edited:

aparty

Member
May 27, 2009
25
0
example: on my phone your partition number will be different, this dumps to my internal sdcard.


dd if=/dev/block/mmcblk0p23 of=/sdcard/system.img

I copy the "system.img" to my folder where ImgExtractor_1_3_6 is at.

in command window in that folder You type:

ImgExtractor.exe system.img system -i


on my setup:

I run bat files I did so I do not have to type anything.. system.img.bat this is a txt file renamed to .bat

bat file contains:

ImgExtractor.exe system.img system -i

attached is my ImgExtractor_1_3_6, unzip and put on your c:\drive

double click Command Prompt.bat then bat file of image your doing.

Thank you Carl.

I try, but I had Windows System Error, too.

This some info:

Code:
<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="ImgExtractor.exe" FILTER="GRABMI_FILTER_PRIVACY">
    <MATCHING_FILE NAME="ImgExtractor.exe" SIZE="193536" CHECKSUM="0xF85DE504" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="06/19/1992 22:22:17" UPTO_LINK_DATE="06/19/1992 22:22:17" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="kernel32.dll" SIZE="1033728" CHECKSUM="0x846DDE20" BIN_FILE_VERSION="5.1.2600.5512" BIN_PRODUCT_VERSION="5.1.2600.5512" PRODUCT_VERSION="5.1.2600.5512" FILE_DESCRIPTION="DLL client di Windows NT BASE API" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Sistema operativo Microsoft® Windows®" FILE_VERSION="5.1.2600.5512 (xpsp.080413-2111)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. Tutti i diritti riservati." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xFE5B9" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.5512" UPTO_BIN_PRODUCT_VERSION="5.1.2600.5512" LINK_DATE="04/14/2008 02:13:21" UPTO_LINK_DATE="04/14/2008 02:13:21" VER_LANGUAGE="Italiano (Italia) [0x410]" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="kernel32.dll" SIZE="1033728" CHECKSUM="0x846DDE20" BIN_FILE_VERSION="5.1.2600.5512" BIN_PRODUCT_VERSION="5.1.2600.5512" PRODUCT_VERSION="5.1.2600.5512" FILE_DESCRIPTION="DLL client di Windows NT BASE API" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Sistema operativo Microsoft® Windows®" FILE_VERSION="5.1.2600.5512 (xpsp.080413-2111)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. Tutti i diritti riservati." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xFE5B9" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.5512" UPTO_BIN_PRODUCT_VERSION="5.1.2600.5512" LINK_DATE="04/14/2008 02:13:21" UPTO_LINK_DATE="04/14/2008 02:13:21" VER_LANGUAGE="Italiano (Italia) [0x410]" />
</EXE>
</DATABASE>

I don't understand why.... :'(
 

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..??