Sie sind auf Seite 1von 11

2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions

NEWS FORUMS DEVICES TOPICS BEST POSTS

# OnePlus 7T Pro # Android 10 # Galaxy Note 10 # 5G # Honor 9X # ZenFone 6 # Xiaomi # Galaxy S20 # Snapdragon # Samsung # Pixel 4 # Honor # Redmi Note 8 Pro

 xda-developers  General discussion  XDA-University  [GUIDE] Making Dump Files Out of Android Device Partitions by majdinj

[GUIDE] Making Dump Files Out of Android Device Partitions


By majdinj, Senior Member on 19th September 2013, 04:18 AM

980 posts
  
Thanks:
Thanks: 3,455   Tweet   Like

 Reply

1 2 3 11  Last  Search Thread FORUMS

XDA-University
Use:
The main purpose is to make a file that contains all data in android specific partition. This is really handy XDA Assist
in case of dumping leak firmwares.
About xda-developers.com

General
Pr-requirement:
- Rooted device.
device. Paid Software Announcement and Discussion
- Knowledge of how to use adb or Terminal Emulator. [More]

The first step of making dump files out of device partitions is to locate its mounting points..!!
Remove All Ads from XDA
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,
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:
Code:
adb shell
cat /proc/partitions

This one needs from you to figure out which block belong to which partition name.!!

Way #2
Code:
Code:
adb shell
ls -al /dev/block/platform/dw_mmc
/dev/block/platform/dw_mmc/by-name
/by-name

This one will give you info about the dev block names WITH their familiar names (i.e, boot,
boot, recovery,
system...
system... etc)
 MOST THANKED

ALL-TIME

112 Actions Explanation ★ Tutorial Legends ★ In


this post, I …

majdinj OP 2013-Sep-19 5:34

https://forum.xda-developers.com/showthread.php?t=2450045 1/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions

10 another way to get common names on way


insink71#2, I've often used: cat … 2013-Nov-07 18:26

5 (quote) if you mean extract to modify


boot.img, then I don't …

majdinj OP 2013-Nov-13 15:22

4 I also wrote a guide, It just using the "by-name"


and needs …

warwolfx0 2013-Nov-18 21:22

4 can i able to mount boot.img in android


itself...actually i …

hasan4791 2013-Nov-13 4:48

THREAD SEARCH

This command is not universal between devices,


devices, and you will need to gather its pieces Search this thread

(/dev/block/platform/dw_mmc/by-name).
How?
- In your device,
device, use any explorer that can get you to the device root (personally I use ES Explorer, by
pressing on "/" on navigation bar).
"/dev/block/platform/"" folder
- Go to "/dev/block/platform/
"by-
- Here you will see some files and folders, we need to open folders and search for the folder called "by-
name"
name" inside one of them; in my situation it was "dw_mmc
"dw_mmc"" folder which has the folder "by-name
"by-name"" inside it.
(/dev/block/platform/dw_mmc
- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name
/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:
Code:
adb remount
adb shell "su" "" "mount
"mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 0755 /system/bin/parted
parted /dev/block/mmcblk0
/dev/block/mmcblk0
print

SUGGESTED APPS
Official XDA Forum App
The XDA App is the fastest
way to access the forums on




mobile.

Navigation Gestures
Customizable gesture control
for any Android device.




/dev/block/mmcblk0p* where (*
Here, your mounting points will start with /dev/block/mmcblk0p (*) is the number shown in the
table above for each partition. XDA Labs
example: Labs is an independent app
mmcblk0p10
The hidden partition mounting point will be mmcblk0p store that gives developers
mmcblk0p7
The radio partition mounting point will be mmcblk0p 



full control over their work.
mmcblk0p9
The system partition mounting point will be mmcblk0p
Substratum
mmcblk0p6
The recovery partition mounting point will be mmcblk0p
The ultimate, most complete
theming solution for Android.
and so on 



Don't forget to "quit" the parted action after grasping your device mounting points. XDA Feed
The best way to get cutting
N.B: edge news about your device!




- You may need to run first:
Code:
Code: TOP FORUM DISCUSSIONS
adb shell Developers have exploited the Samsung Galaxy
cat /proc/partitions S9 and Note 9 to get root access on the

https://forum.xda-developers.com/showthread.php?t=2450045 2/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
Snapdragon models
 January 31, 2020
to know what is the initial name for your device partition.. In the example above, it was mmcblk0.
mmcblk0.
Unofficial LineageOS 17.1 brings Android 10 to
the Samsung Galaxy S8 and Note 8
 January 29, 2020

POCO X2 and Xiaomi Redmi K30 5G forums are


now open
 January 28, 2020

Memorigi is a beautiful to-do list app that helps


you plan and organize your life
 January 25, 2020

TWRP is now officially available for the Xiaomi Mi


A3 and Redmi Note 8 Pro
 January 24, 2020

NFCScreenOff mod enables scanning NFC tags


when your Android phone is locked
 January 22, 2020

1Controller Magisk Module adds PlayStation


Dualshock and Xbox game controller support to
- Also to be able to do adb push to /system partition for parted binary, you will need insecure boot.img rooted Android devices
used in your ROM or adbd insecure installed in your device (Check this thread for that app),
app), or just push  January 22, 2020
parted binary manually by any root explorer and then fix permissions to rwxr-xr-x (755).
More Forum Links 

***

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:
Code:
adb shell
su
dd if=/yourMountingPoint
if=/yourMountingPoint of=/yourDestination
of=/yourDestination/parti
/parti

Let's say I want to take a dump out of system partition from above example. So the adb commands will
be:
Code:
Code:
adb shell
su
dd if=/dev/block/mmcblk0p9
if=/dev/block/mmcblk0p9 of=/sdcard
of=/sdcard/system.img
/system.img

This may take a while to complete the dumping process, depending on the size of your dumped
partition; so be patient..

Note:
Note:
If the partition is formatted as ext3/4 then the dumped partition will have .img as an extension.
extension.
Other partition dumps have different extensions; examples:

radio.bin
radio.bin
param.lfs
param.lfs
Sbl.bin
Sbl.bin
zImage (without extension)
extension)

***

Optional:
Read Partition Image

https://forum.xda-developers.com/showthread.php?t=2450045 3/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
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..
files..
For Linux Users:
- Open terminal and type:
Code:
Code:
su -
mkdir -p /mnt/disk
mount -o loop yourImage.img /mnt/disk
cd /mnt/disk
ls -l

For Windows Users:


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

I hope you will find this tutorial beneficial,,,


Yours;
Attached Files
parted.rar - [Click for QR Code] (155.2 KB, 32073 views)

 

https://forum.xda-developers.com/showthread.php?t=2450045 4/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
The
The Following
Following 349
349 Users
Users Say
Say Thank
Thank You
You to
to majdinj
majdinj For
For This
This Useful
Useful Post:
Post: [[ View
View ]] Gift
Gift majdinj
majdinj Ad-Free
Ad-Free

 majdinj   
Thanks:
Thanks: 3,455
OP
OP Senior Member

19th September 2013, 11:34 AM | #2    

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.

Quote:

#1
Code:
Code:
adb shell

Run remote shell interactively, as if you are in linux terminal.

Quote:

#2
Code:
Code:
cat /proc/partitions

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

Quote:

#3
Code:
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.

Quote:

#4
Code:
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.

Quote:

#5
Code:
Code:
su

https://forum.xda-developers.com/showthread.php?t=2450045 5/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
Used to get super-user privilege.

Quote:

#6
Code:
Code:
mount -o remount,rw
remount,rw /system

(rw).
Specific command to mount the /system partition on the device read / write (rw ).
If you change rw to ro,
ro, you will get /system partition mounted as read only.

Quote:

#7
Code:
Code:
adb push parted /system/bin/parted

adb push is used to copy file/dir from your local computer to android device.
device. The usual format is
adb push <local> <remote>

Quote:

#8
Code:
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:
Code:
----------------
| CHMOD SCHEME |
----------------
r w x
4 2 1 = 7 (Full Permissions)

User ( ) ( ) ( ) --> 2nd digit


Group ( ) ( ) ( ) --> 3rd digit
Other ( ) ( ) ( ) --> 4th digit

In the above example, it is set to 0755 which means the following scheme:
Code:
Code:
r w x
4 2 1

User (*
(*) (*
(*) (*
(*) --> This equals to 7 (
Group (*
(*) ( ) (*
(*) --> This equals to 5 (
Other (*
(*) ( ) (*
(*) --> This equals to 5 (

Special UID GID STK

As you can see, if you said 0755,


0755, it will be as same as saying ---rwxr-xr-x

Quote:

#9
Code:
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;
file; here we pointed to the whole partition, not specific file.
file.
of means outputting file to specific destination path; here it is to sdcard with system.img name.

Quote:

https://forum.xda-developers.com/showthread.php?t=2450045 6/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions

#10
Code:
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.

Quote:

#11
Code:
Code:
mount -o loop yourImage.img /mnt/disk

(/mnt/disk in this example).


This is linux way to mount images into specific directory (/mnt/disk

Quote:

#12
Code:
Code:
cd /mnt/disk

cd used to get inside specific dir path.

Quote:

#13
Code:
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

 

The
The Following
Following 112
112 Users
Users Say
Say Thank
Thank You
You to
to majdinj
majdinj For
For This
This Useful
Useful Post:
Post: [[ View
View ]] Gift
Gift majdinj
majdinj Ad-Free
Ad-Free

 insink71   
Thanks:
Thanks: 266
Senior Member

8th November 2013, 12:26 AM | #3    

another way to get common names

on way #2, I've often used:


Code:
Code:
cat /proc/emmc

on a few devices to reveal similar info.

Rob

 
The
The Following
Following 10
10 Users
Users Say
Say Thank
Thank You
You to
to insink71
insink71 For
For This
This Useful
Useful Post:
Post: [[ View
View ]] Gift
Gift insink71
insink71 Ad-Free
Ad-Free

  
Thanks:
Thanks: 597

https://forum.xda-developers.com/showthread.php?t=2450045 7/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
Senior Member
 hasan4791

13th November 2013, 10:48 AM | #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..??

 
The
The Following
Following 44 Users
Users Say
Say Thank
Thank You
You to
to hasan4791
hasan4791 For
For This
This Useful
Useful Post:
Post: [[ View
View ]] Gift
Gift hasan4791
hasan4791 Ad-Free
Ad-Free

 majdinj   
Thanks:
Thanks: 3,455
OP
OP Senior Member

13th November 2013, 09:22 PM | #5    


Quote:
Originally Posted by hasan4791 

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

 
The
The Following
Following 55 Users
Users Say
Say Thank
Thank You
You to
to majdinj
majdinj For
For This
This Useful
Useful Post:
Post: [[ View
View ]] Gift
Gift majdinj
majdinj Ad-Free
Ad-Free

 Ricky Divjakovski   
Thanks:
Thanks: 7,652
Recognized Developer / Recognized C…
C…

17th November 2013, 11:43 AM | #6    


Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i nd they have trouble
executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb
shell

 

The
The Following
Following 33 Users
Users Say
Say Thank
Thank You
You to
to Ricky
Ricky Divjakovski
Divjakovski For
For This
This Useful
Useful Post:
Post: [[ View
View ]]

 majdinj   
Thanks:
Thanks: 3,455
OP
OP Senior Member

17th November 2013, 12:39 PM | #7    


Quote:

https://forum.xda-developers.com/showthread.php?t=2450045 8/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
Originally Posted by ricky310711 

Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i nd they have trouble
executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via
adb shell

Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for
boot.img, sbl.bin, modem.bin...etc right

 

The
The Following
Following 22 Users
Users Say
Say Thank
Thank You
You to
to majdinj
majdinj For
For This
This Useful
Useful Post:
Post: [[ View
View ]] Gift
Gift majdinj
majdinj Ad-Free
Ad-Free

 Ricky Divjakovski Thanks:


  
Thanks: 7,652
Recognized Developer / Recognized C…
C…

17th November 2013, 01:03 PM | #8    


Quote:
Originally Posted by majdinj 

Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it
for boot.img, sbl.bin, modem.bin...etc right

ofcoarse, i actually had a project going where it detects all partitions(modems, boot.img, system etc..) that archives
itself into a .zip
it was going well until i did something in the script, now it only works on the s3 it shall be continued one day!

 
The
The Following
Following 22 Users
Users Say
Say Thank
Thank You
You to
to Ricky
Ricky Divjakovski
Divjakovski For
For This
This Useful
Useful Post:
Post: [[ View
View ]]

 slicingtaco   
Thanks:
Thanks: 321
Senior Member

17th November 2013, 08:38 PM | #9    


Such great tutorial, this is de nitely going to come in handy for me. I have a question, how can you dump (extract) a
bootloader? Can i use the same method as dumping the ROM?
ROM?

 

 mitchst2   
Thanks:
Thanks: 1,488
Senior Member

17th November 2013, 08:43 PM | #10    


Could you explain how to extract stock recovery image please?

Sent from my HTC One using xda app-developers app

https://forum.xda-developers.com/showthread.php?t=2450045 9/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions

 
 Lgrootnoob   
Thanks:
Thanks: 118
Account currently disabled

17th November 2013, 10:00 PM | #11    


Where did the parted binary come from?

 

 Reply  Subscribe to Thread Page 1 of 33 1 2 3 11  Last 

Guest Quick Reply (no urls or BBcode)

Message:

Post Quick Reply Go Advanced

 Previous Thread Next Thread 

 Top Threads in XDA-University by ThreadRank

[ROOT][APP][9.0+] Android 10 Launcher (+ gestures, feed)  10th September 2019

 Android Apps and Games

[TOOLS][ZIPS][SCRIPTS]Android Backup and Restore Tools[Multiple Devices/Platforms]  8th December 2019

 Android Software and Hacking General [Developers Only]

[ROOT][TOOL] TWRP 3.3.1-0 & ROOT FOR INFINIX S4 - X626 (MT6762)  17th August 2019

 Miscellaneous Android Development

[APP][MOD][5.0+] Facebook - lighter and faster version by ALYSKY  10th October 2019

 Android Apps and Games

[MOVED][GApps][ARM64] ExLiteGApps Android Q 10.0  15th October 2019

 Android Software Development

[APP][5.0+] BatteryGuru  10th October 2019

 Android Apps and Games

[RECOVERY][UNOFFICIAL] TWRP for Galaxy A40  17th September 2019

 Miscellaneous Android Development

Wallhub - 1,000,000 Million Backgrounds ~ 4K ~ UHD ~ AMOLED ~QHD (***PROMO CODES***)  24th September 2019

 Android Apps and Games

 xda-developers  General discussion  XDA-University  [GUIDE] Making Dump Files Out of Android Device Partitions by majdinj

https://forum.xda-developers.com/showthread.php?t=2450045 10/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions

We're Social

XDA Developers was founded by developers, for developers. It is now a    


valuable resource for people who want to make the most of their mobile
devices, from customizing the look and feel to adding new functionality.
Are you a developer? | Terms of Service

More info

Contact Advertise Rules Suggest Content Security Privacy Policy XDA App Remove ads on XDA
-- XDA 2015
Root Any Device How To Guides XDA's Best

Devices

Redmi Note 8 Pro

Copyright © xda-developers. Hosted by Leaseweb

https://forum.xda-developers.com/showthread.php?t=2450045 11/11

Das könnte Ihnen auch gefallen