[T-Mobile LG V10 Android Development] famewolf:
Great job! you forgot about cleanup though...after flashing the img why not go ahead and remove it from the sdcard? With system and data able to take up multiple gigabytes of space it could be an issue for folks that have a small sdcard where if you remove things(adb shell rm) right after you flash it should for the most part fix that.

Excellent timing though as I've been debating my update to nougat so I can install magisk and associated modules/use android pay.

*update*

Hmm at least under ubuntu linux this method won't work.

adb pull /dev/block/bootdevice/by-name/grow ./mmbackup\grow.img

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

failed to copy '/dev/block/bootdevice/by-name/grow' to './mmbackupgrow.img': Permission denied

I'll have to look into it further. This isn't really a linux issue...more the fact my phone will NOT execute these commands without su.

This works:

famewolf@hp810-135qe /workarea/android/v10 $ adb shell

adb server is out of date. killing...

* daemon started successfully *

127|shell@pplus:/ $ su

root@pplus:/ # dd if=/dev/block/bootdevice/by-name/grow of=/sdcard/grow.img

2015+0 records in

2015+0 records out

1031680 bytes transferred in 0.041 secs (25162926 bytes/sec)

root@pplus:/ #

I'd have to run them as su -c I suppose. "adb shell su -c dd if=<path> of=/sdcard/file.img"

..and that works...

famewolf@hp810-135qe /workarea/android/v10 $ sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/grow of=/sdcard/grow.img

adb server is out of date. killing...

* daemon started successfully *

2015+0 records in

2015+0 records out

1031680 bytes transferred in 0.037 secs (27883243 bytes/sec)

Something like this would work for me(/storage/0123-4567 = my sdcard):

backup_mm.sh

sudo adb shell mkdir /storage/0123-4567/mmbackup
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/grow of=/storage/0123-4567/mmbackup/grow.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/userdata of=/storage/0123-4567/mmbackup/userdata.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/cache of=/storage/0123-4567/mmbackup/cache.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/system of=/storage/0123-4567/mmbackup/system.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/fau of=/storage/0123-4567/mmbackup/fau.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/fota of=/storage/0123-4567/mmbackup/fota.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/spare5 of=/storage/0123-4567/mmbackup/spare5.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/factory of=/storage/0123-4567/mmbackup/factory.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/raw_resourcesbak of=/storage/0123-4567/mmbackup/raw_resourcesbak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/raw_resources of=/storage/0123-4567/mmbackup/raw_resources.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/mpt of=/storage/0123-4567/mmbackup/mpt.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/sns of=/storage/0123-4567/mmbackup/sns.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/drm of=/storage/0123-4567/mmbackup/drm.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/recovery of=/storage/0123-4567/mmbackup/recovery.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/boot of=/storage/0123-4567/mmbackup/boot.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/laf of=/storage/0123-4567/mmbackup/laf.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/spare4 of=/storage/0123-4567/mmbackup/spare4.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/rct of=/storage/0123-4567/mmbackup/rct.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/eksst of=/storage/0123-4567/mmbackup/eksst.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/encrypt of=/storage/0123-4567/mmbackup/encrypt.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/sec of=/storage/0123-4567/mmbackup/sec.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/DDR of=/storage/0123-4567/mmbackup/DDR.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/keystore of=/storage/0123-4567/mmbackup/keystore.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/ssd of=/storage/0123-4567/mmbackup/ssd.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/fsc of=/storage/0123-4567/mmbackup/fsc.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/fsg of=/storage/0123-4567/mmbackup/fsg.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/modemst2 of=/storage/0123-4567/mmbackup/modemst2.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/modemst1 of=/storage/0123-4567/mmbackup/modemst1.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/persist of=/storage/0123-4567/mmbackup/persist.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/misc of=/storage/0123-4567/mmbackup/misc.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/spare3 of=/storage/0123-4567/mmbackup/spare3.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/devinfo of=/storage/0123-4567/mmbackup/devinfo.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/persistent of=/storage/0123-4567/mmbackup/persistent.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/spare2 of=/storage/0123-4567/mmbackup/spare2.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/dpo of=/storage/0123-4567/mmbackup/dpo.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/msadp of=/storage/0123-4567/mmbackup/msadp.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/apdp of=/storage/0123-4567/mmbackup/apdp.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/limits of=/storage/0123-4567/mmbackup/limits.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/sdibak of=/storage/0123-4567/mmbackup/sdibak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/abootbak of=/storage/0123-4567/mmbackup/abootbak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/rpmbak of=/storage/0123-4567/mmbackup/rpmbak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/tzbak of=/storage/0123-4567/mmbackup/tzbak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/hypbak of=/storage/0123-4567/mmbackup/hypbak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/pmicbak of=/storage/0123-4567/mmbackup/pmicbak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/sbl1bak of=/storage/0123-4567/mmbackup/sbl1bak.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/aboot of=/storage/0123-4567/mmbackup/aboot.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/rpm of=/storage/0123-4567/mmbackup/rpm.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/hyp of=/storage/0123-4567/mmbackup/hyp.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/sdi of=/storage/0123-4567/mmbackup/sdi.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/tz of=/storage/0123-4567/mmbackup/tz.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/sbl1 of=/storage/0123-4567/mmbackup/sbl1.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/pmic of=/storage/0123-4567/mmbackup/pmic.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/spare1 of=/storage/0123-4567/mmbackup/spare1.img
sudo adb shell su -c dd if=/dev/block/bootdevice/by-name/modem of=/storage/0123-4567/mmbackup/modem.img
adb pull /storage/0123-4567/mmbackup/ ./mmbackup/

restore_mm.sh

sudo adb push ./mmbackup/grow.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/grow
#REM sudo adb push ./mmbackup/userdata.img /storage/0123-4567/mmbackup/image.img
#REM sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/userdata
#REM sudo adb push ./mmbackup/cache.img /storage/0123-4567/mmbackup/image.img
#REM sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/cache
sudo adb push ./mmbackup/system.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/system
sudo adb push ./mmbackup/fau.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/fau
sudo adb push ./mmbackup/fota.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/fota
sudo adb push ./mmbackup/spare5.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/spare5
sudo adb push ./mmbackup/factory.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/factory
sudo adb push ./mmbackup/raw_resourcesbak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/raw_resourcesbak
sudo adb push ./mmbackup/raw_resources.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/raw_resources
sudo adb push ./mmbackup/mpt.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/mpt
sudo adb push ./mmbackup/sns.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/sns
sudo adb push ./mmbackup/drm.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/drm
sudo adb push ./mmbackup/recovery.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/recovery
sudo adb push ./mmbackup/boot.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/boot
sudo adb push ./mmbackup/laf.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/laf
sudo adb push ./mmbackup/spare4.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/spare4
sudo adb push ./mmbackup/rct.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/rct
sudo adb push ./mmbackup/eksst.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/eksst
sudo adb push ./mmbackup/encrypt.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/encrypt
sudo adb push ./mmbackup/sec.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/sec
sudo adb push ./mmbackup/DDR.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/DDR
sudo adb push ./mmbackup/keystore.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/keystore
sudo adb push ./mmbackup/ssd.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/ssd
sudo adb push ./mmbackup/fsc.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/fsc
sudo adb push ./mmbackup/fsg.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/fsg
sudo adb push ./mmbackup/modemst2.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/modemst2
sudo adb push ./mmbackup/modemst1.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/modemst1
sudo adb push ./mmbackup/persist.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/persist
sudo adb push ./mmbackup/misc.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/misc
sudo adb push ./mmbackup/spare3.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/spare3
sudo adb push ./mmbackup/devinfo.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/devinfo
sudo adb push ./mmbackup/persistent.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/persistent
sudo adb push ./mmbackup/spare2.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/spare2
sudo adb push ./mmbackup/dpo.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/dpo
sudo adb push ./mmbackup/msadp.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/msadp
sudo adb push ./mmbackup/apdp.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/apdp
sudo adb push ./mmbackup/limits.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/limits
sudo adb push ./mmbackup/sdibak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/sdibak
sudo adb push ./mmbackup/abootbak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/abootbak
sudo adb push ./mmbackup/rpmbak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/rpmbak
sudo adb push ./mmbackup/tzbak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/tzbak
sudo adb push ./mmbackup/hypbak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/hypbak
sudo adb push ./mmbackup/pmicbak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/pmicbak
sudo adb push ./mmbackup/sbl1bak.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/sbl1bak
sudo adb push ./mmbackup/aboot.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/aboot
sudo adb push ./mmbackup/rpm.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/rpm
sudo adb push ./mmbackup/hyp.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/hyp
sudo adb push ./mmbackup/sdi.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/sdi
sudo adb push ./mmbackup/tz.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/tz
sudo adb push ./mmbackup/sbl1.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/sbl1
sudo adb push ./mmbackup/pmic.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/pmic
sudo adb push ./mmbackup/spare1.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/spare1
sudo adb push ./mmbackup/modem.img /storage/0123-4567/mmbackup/image.img
sudo adb shell su -c dd if=/storage/0123-4567/mmbackup/image.img of=/dev/block/bootdevice/by-name/modem