The correct reference would point to our nandroid tag-wiki, as a Nandroid backup is what covers all content. However, this is only available via custom recoveries.
An alternative to that would be the dd
command ("Disk Duplicator"1).
Disclosure: the following describes an application I wrote and maintain:
My tool Adebar is able to generate you dd
scripts for all partitions your device holds, which you then can cross-check before execution. While doing that, Adebar tries to figure out what each partition is used for, so you won't end up just with cryptic names on the disk-images. To get to the content, you still had to figure the file system used on each partition (to be able to mount it as a Loop Device). But for the "worst case", you should be able to use these images to restore your device to the state it was in when you've created them (though I must admit I've never tried that yet).

files pulled/generated by Adebar (click image for larger variant)
Adebar is mainly written in Bash version 4, and utilizes adb to communicate with the device. It definitely runs fine on Linux. I have not tested it on other systems, and so far got no feedback from users maybe having tried that.
1: careful: it's nick-named "Disk Destroyer", as if you use it the wrong way around (i.e. swap source and target), you can end up with a "disk without content"
./abd pull .*
while rooted to copy nearly the whole device to my PC. however some files were omitted because root access was only granted for 15 minutes, not enough to copy all of the files. I suppose all I need to solve my problem now is a way to grant root access for an extended time period, any ideas? – cjmaria Jul 09 '15 at 15:32find . -type f -name "*.pub
(to be run from a shell while in the/
(root) directory of the file system) – no need to pull the entire file-system to your PC ;) – Izzy Jul 14 '15 at 20:16