(GUIDE) Making Dump Files Out of Android Device Partitions
(GUIDE) Making Dump Files Out of Android Device Partitions
(GUIDE) Making Dump Files Out of Android Device Partitions
# 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
980 posts
Thanks:
Thanks: 3,455 Tweet Like
Reply
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
https://forum.xda-developers.com/showthread.php?t=2450045 1/11
2/16/2020 [GUIDE] Making Dump Files Out of Android Device Partitions
THREAD SEARCH
(/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
***
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
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
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
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
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
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 (
Quote:
#9
Code:
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
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
Quote:
#11
Code:
Code:
mount -o loop yourImage.img /mnt/disk
Quote:
#12
Code:
Code:
cd /mnt/disk
Quote:
#13
Code:
Code:
ls -l
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
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
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
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…
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
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
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
mitchst2
Thanks:
Thanks: 1,488
Senior Member
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
Message:
[ROOT][TOOL] TWRP 3.3.1-0 & ROOT FOR INFINIX S4 - X626 (MT6762) 17th August 2019
[APP][MOD][5.0+] Facebook - lighter and faster version by ALYSKY 10th October 2019
Wallhub - 1,000,000 Million Backgrounds ~ 4K ~ UHD ~ AMOLED ~QHD (***PROMO CODES***) 24th September 2019
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
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
https://forum.xda-developers.com/showthread.php?t=2450045 11/11