[Google Pixel 4a 5G Guides, News, & Discussion] Deleted member 6200352:
Once device is rooted, since there is no extSD, FULL backup options are limited. I'm sure people know about this but just wanted

to share what I recently learned. Via Busybox/Toybox , netcat, and dd one can dump the partition data using dd over a netcat TCP stream on a local USB network. With one terminal pooping it out, you have another terminal capturing it and dumping it to a image file.

Example:

On rooted phone connected to PC

Reboot into TWRP or Lineage Recovery (tested on Lineage Recovery they use Toybox. I think TWRP uses busybox but I could be wrong)

adb devices

<make sure adb sees device>

<Enter ADB Shell phone # prompt should be present>

adb shell

dd if=/dev/block/sda19 | gzip | toybox nc -l -p 8888

(may work better w/o gzip/bzip2 but will create massive userdata file whereever you store it.)

or

dd if=/dev/block/sda19 | toybox nc -l -p 8888

<you have been warned!>

*this command will run and read sda19 (userdata), piping the output through gzip to compress (or directly to netcat if omit compression if used alternative command above) then to the toybox/busybox command executing netcat over tcp port 8888.

|'s (pipes) are used when the output needs to input into another COMMAND/PROGRAM.

> (redirects) are used when the output needs to write to a FILE. |'s for programs, >'s for files.

On the 2nd terminal on computer

adb forward tcp:8888 tcp:8888

netcat 127.0.0.1 8888 > userdata.bin.gz

OR if you elected w/o compression use

netcat 127.0.0.1 8888 > userdata.bin

instead (or any filename u want really).

<this command uses netcat to capture the stream of data sent over port 8888 from the 1st terminal and dump it to the compressed/uncompressed image file.>

This will take a long long time. There are dd options to speed up the process but I'm lazy and maybe will include later. Compression option will speed it up but not sure I trust it as I get unexpected end of file on the archive when I test it. Havnt tried it uncompressed yet.

* Or just use:

Partitions Backup & Restore by Wanam, from Google Play at

Partitions Backup & Restore - Apps on Google Play

Backup your important partitions to avoid any data or IMEI corruption

play.google.com

URLs:

Imaging Android with ADB, Root, Netcat and DD

Today we are going to acquire an android smartphone (Samsung Note II) using Android Debug Bridge (ADB), netcat and dd. The system I am using is Ubuntu linux. On the “forensic workstation” you will need ADB and netcat installed. I’m using the excellent instructions from here.

dfir.science

How do I stop an adb port forward?

One can forward a port with adb forward tcp:8080 tcp:8080. But do I need to kill the adb server to stop this forwarding? I'm looking for a way to stop forwarding of a port in adb, after it was set...

stackoverflow.com

Data Acquisition Using Android Debug Bridge (ADB) | Access Now Digital Security Helpline Public Documentation

The Helpline has come into possession of an Android device that could be infected or can be used as digital evidence.

communitydocs.accessnow.org

Extracting data physically with dd | Packt Hub

In this article by Rohit Tamma and Donnie Tindall, authors of the book Learning Android Forensics, we will cover physical data extraction using

hub.packtpub.com