Forensics Matters 🕵️

Practical notes on digital forensics and incident response

Dump an Android partition for forensic analysis

·

Update (October 2026): this technique needs a rooted device and is most useful on older Android versions. On modern devices the userdata partition is protected by file-based encryption, so a raw dump of it is encrypted and of limited use without the keys: for current devices a logical acquisition or a dedicated mobile forensics tool is usually the way to go.

In this guide we dump a partition from an Android device so that we can analyze it on a forensic workstation.

Prerequisites

  • A rooted Android device with USB debugging enabled
  • A forensic workstation with adb (Android Debug Bridge)
  • BusyBox installed on the device (we need its netcat)

1. Connect the device

Connect the device to the workstation via USB and open a terminal. Check that adb sees it:

$ adb devices

You should get the list of connected devices:

Output of adb devices
Output of adb devices

2. Find the partition

Open a shell on the device and become root:

$ adb shell
$ su

List the partitions by name:

# ls -al /dev/block/platform/msm_sdcc.1/by-name

The msm_sdcc.1 part depends on the device: if the path doesn’t exist, find the right one with ls /dev/block/platform/. On many recent devices the same links are also available under /dev/block/by-name.

The output shows each partition name (boot, cache, userdata…) and the block device it points to:

List of Android partitions by name
Android partitions by name

3. Dump the partition over netcat

Choose the block device to acquire (in this example /dev/block/mmcblk0p23) and use dd to create a bit-for-bit image. Instead of writing the image to the device’s own storage, which would alter it, we stream it to the workstation over the USB connection with netcat.

In a new terminal on the workstation, forward TCP port 8888 on the host to port 8888 on the device:

$ adb forward tcp:8888 tcp:8888

Open an adb shell, become root again and start dd, piping its output into BusyBox netcat listening on port 8888:

$ adb shell
$ su
# dd if=/dev/block/mmcblk0p23 | busybox nc -l -p 8888

Right away, in another terminal on the workstation, connect to the forwarded port and save the stream to a file:

$ nc 127.0.0.1 8888 > userdata_dump.img

When dd finishes, userdata_dump.img is ready to be analyzed. Hash it (for example with sha256sum userdata_dump.img) and record the value in your case notes.

2 responses to “Dump an Android partition for forensic analysis”

  1. sara Avatar
    sara

    can i analyze this dump file with volatility?

    1. Matteo Avatar
      Matteo

      Volatility is useful for volatile memory dump, I suggest you to use Autopsy, which is full of excellent android parsers.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.