[T-Mobile LG V10 Android Development] famewolf:
But I've ran scripts in the past that backup every single partition of the device as img files...using something like those it's easy enough to make a zip that will flash all of them back to marshmallow. I had to do something similar on the alcatel idol 3 when folks had flashed a rom where the "dev" and I do use the work lightly since he actually felt the need to put dev into his userid, had chosen to release a rom that replaced the users modem, rpm, tz and a few others with one that was not fully compatible from a similar but not identical model. (the idol 3 has different variants for different parts of the world) depending on what bands they use.

Here's the linux version for the alcatel idol3 6045i NOT our phone:

echo BACKUP IDOL3 6045 partitions by DallasCZ _-_ Linux and Mac Shell Script by FameWolf
echo This script REQUIRES root and saves the backup to a folder named "'idol3_blocks'" in your home directory.
echo
echo Press enter key to begin or Ctrl-C to abort.
sed -n q </dev/tty
echo Working...
adb shell mkdir /storage/sdcard1/mybckup

adb shell su -c "dd if=/dev/block/mmcblk0p1 of=/storage/sdcard1/mybckup/modem"
adb shell su -c "dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/mybckup/tunning"
adb shell su -c "dd if=/dev/block/mmcblk0p3 of=/storage/sdcard1/mybckup/traceability"
adb shell su -c "dd if=/dev/block/mmcblk0p4 of=/storage/sdcard1/mybckup/fsc"
adb shell su -c "dd if=/dev/block/mmcblk0p5 of=/storage/sdcard1/mybckup/ssd"
adb shell su -c "dd if=/dev/block/mmcblk0p6 of=/storage/sdcard1/mybckup/sbl1"
adb shell su -c "dd if=/dev/block/mmcblk0p8 of=/storage/sdcard1/mybckup/rpm"
adb shell su -c "dd if=/dev/block/mmcblk0p10 of=/storage/sdcard1/mybckup/tz"
adb shell su -c "dd if=/dev/block/mmcblk0p12 of=/storage/sdcard1/mybckup/hyp"
adb shell su -c "dd if=/dev/block/mmcblk0p14 of=/storage/sdcard1/mybckup/modemst1"
adb shell su -c "dd if=/dev/block/mmcblk0p15 of=/storage/sdcard1/mybckup/modemst2"
adb shell su -c "dd if=/dev/block/mmcblk0p16 of=/storage/sdcard1/mybckup/simlock"
adb shell su -c "dd if=/dev/block/mmcblk0p17 of=/storage/sdcard1/mybckup/persistent"
adb shell su -c "dd if=/dev/block/mmcblk0p18 of=/storage/sdcard1/mybckup/splash"
adb shell su -c "dd if=/dev/block/mmcblk0p19 of=/storage/sdcard1/mybckup/tctpersist"
adb shell su -c "dd if=/dev/block/mmcblk0p20 of=/storage/sdcard1/mybckup/hdcp"
adb shell su -c "dd if=/dev/block/mmcblk0p21 of=/storage/sdcard1/mybckup/DDR"
adb shell su -c "dd if=/dev/block/mmcblk0p22 of=/storage/sdcard1/mybckup/fsg"
adb shell su -c "dd if=/dev/block/mmcblk0p23 of=/storage/sdcard1/mybckup/sec"
adb shell su -c "dd if=/dev/block/mmcblk0p24 of=/storage/sdcard1/mybckup/aboot"
adb shell su -c "dd if=/dev/block/mmcblk0p26 of=/storage/sdcard1/mybckup/boot"
adb shell su -c "dd if=/dev/block/mmcblk0p27 of=/storage/sdcard1/mybckup/recovery"
echo Long wait to image system. Please be patient. Copying roughly 3GB.
echo In another shell you can run "'adb shell ls -l /storage/sdcard1/mybckup/system'" to monitor the file size increasing.
adb shell su -c "dd if=/dev/block/mmcblk0p28 of=/storage/sdcard1/mybckup/system"
adb shell su -c "dd if=/dev/block/mmcblk0p29 of=/storage/sdcard1/mybckup/persist"
adb shell su -c "dd if=/dev/block/mmcblk0p30 of=/storage/sdcard1/mybckup/fota"
adb shell su -c "dd if=/dev/block/mmcblk0p32 of=/storage/sdcard1/mybckup/misc"
adb shell su -c "dd if=/dev/block/mmcblk0p33 of=/storage/sdcard1/mybckup/keystore"
adb shell su -c "dd if=/dev/block/mmcblk0p34 of=/storage/sdcard1/mybckup/config"

echo BACKUP copied partitions to hard drive... Another long wait.

adb pull /storage/sdcard1/mybckup /workarea/android/idol3/idol3_blocks/

echo BACKUP Done!
echo Press enter key to exit
sed -n q </dev/tty