I use this command to dump the entire flash memory of my ESP32-Devkitc:

$ esptool.py --chip esp32 --port "/dev/ttyUSB0" --baud 921600 read_flash 0 0x400000 esp32_devkit_dump.bin
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b8:d6:1a:59:ab:60
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
4194304 (100 %)
4194304 (100 %)
Read 4194304 bytes at 0x0 in 51.9 seconds (646.5 kbit/s)...
Hard resetting via RTS pin...