This script will require you to have the semi permanent root adb shell mentioned here: http://androidforums.com/threads/semi-permanant-root-shell.1039076/
This is required to give you permission to read the system partitions. The script Backup_all.sh should run asis on linux/mac. It will also run on windows with minor changes which are documented in the script. (Basically you rename it to a .bat file and then put a # sign in front of 3 lines while removing the # sign from the line below it. REALLY simple. It should then work on windows. Change "/workarea/android/zm2/z958_blocks/" to where you want the partition files to be saved.
These are taken directly from the script and show the partitions being backed up..obviously the system one is going to be BIG. Around 3GB typically. If you don't need it just comment it out and the backup will be much smaller. I do recommend copying ALL files in /system/app to a folder on your pc in case you debloat something you should not have. ( abd pull /system/app ./system_apps/ ). I have to admit I'm curious if we can write to non critical partitions like "splash" which is the splash screen shown while booting. If someone has the splash for a normal non at&t zmax2 I'd be willing to try it. [ *update* Do NOT try and write to the splash screen unless you prefer your phone as a paperweight. I'll be trying to do an exchange at best buy tomorrow. Stick to just backing up things for now. ]
adb shell "dd if=/dev/block/mmcblk0p1 of=/storage/sdcard1/mybckup/sbl1"
adb shell "dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/mybckup/ddr"
adb shell "dd if=/dev/block/mmcblk0p3 of=/storage/sdcard1/mybckup/rpm"
adb shell "dd if=/dev/block/mmcblk0p4 of=/storage/sdcard1/mybckup/tz"
adb shell "dd if=/dev/block/mmcblk0p5 of=/storage/sdcard1/mybckup/hyp"
adb shell "dd if=/dev/block/mmcblk0p6 of=/storage/sdcard1/mybckup/fsg"
adb shell "dd if=/dev/block/mmcblk0p7 of=/storage/sdcard1/mybckup/pad"
adb shell "dd if=/dev/block/mmcblk0p8 of=/storage/sdcard1/mybckup/ssd"
adb shell "dd if=/dev/block/mmcblk0p9 of=/storage/sdcard1/mybckup/sec"
adb shell "dd if=/dev/block/mmcblk0p10 of=/storage/sdcard1/mybckup/ztelk"
adb shell "dd if=/dev/block/mmcblk0p11 of=/storage/sdcard1/mybckup/splash"
adb shell "dd if=/dev/block/mmcblk0p12 of=/storage/sdcard1/mybckup/echarge"
adb shell "dd if=/dev/block/mmcblk0p13 of=/storage/sdcard1/mybckup/ztecfg"
adb shell "dd if=/dev/block/mmcblk0p14 of=/storage/sdcard1/mybckup/persist"
adb shell "dd if=/dev/block/mmcblk0p15 of=/storage/sdcard1/mybckup/fsc"
adb shell "dd if=/dev/block/mmcblk0p16 of=/storage/sdcard1/mybckup/modemst1"
adb shell "dd if=/dev/block/mmcblk0p17 of=/storage/sdcard1/mybckup/modemst2"
adb shell "dd if=/dev/block/mmcblk0p18 of=/storage/sdcard1/mybckup/aboot"
adb shell "dd if=/dev/block/mmcblk0p19 of=/storage/sdcard1/mybckup/modem"
adb shell "dd if=/dev/block/mmcblk0p20 of=/storage/sdcard1/mybckup/boot"
adb shell "dd if=/dev/block/mmcblk0p21 of=/storage/sdcard1/mybckup/recovery"
adb shell "dd if=/dev/block/mmcblk0p22 of=/storage/sdcard1/mybckup/misc"
adb shell "dd if=/dev/block/mmcblk0p23 of=/storage/sdcard1/mybckup/keystore"
adb shell "dd if=/dev/block/mmcblk0p24 of=/storage/sdcard1/mybckup/config"
adb shell "dd if=/dev/block/mmcblk0p25 of=/storage/sdcard1/mybckup/oem"
adb shell "dd if=/dev/block/mmcblk0p26 of=/storage/sdcard1/mybckup/cache"
adb shell "dd if=/dev/block/mmcblk0p27 of=/storage/sdcard1/mybckup/system"
#optionally backup user data.
#adb shell "dd if=/dev/block/mmcblk0p28 of=/storage/sdcard1/mybckup/userdata"
Script is attached here: http://www14.zippyshare.com/v/x4lkgLb8/file.html
It is also pasted below:
This is required to give you permission to read the system partitions. The script Backup_all.sh should run asis on linux/mac. It will also run on windows with minor changes which are documented in the script. (Basically you rename it to a .bat file and then put a # sign in front of 3 lines while removing the # sign from the line below it. REALLY simple. It should then work on windows. Change "/workarea/android/zm2/z958_blocks/" to where you want the partition files to be saved.
These are taken directly from the script and show the partitions being backed up..obviously the system one is going to be BIG. Around 3GB typically. If you don't need it just comment it out and the backup will be much smaller. I do recommend copying ALL files in /system/app to a folder on your pc in case you debloat something you should not have. ( abd pull /system/app ./system_apps/ ). I have to admit I'm curious if we can write to non critical partitions like "splash" which is the splash screen shown while booting. If someone has the splash for a normal non at&t zmax2 I'd be willing to try it. [ *update* Do NOT try and write to the splash screen unless you prefer your phone as a paperweight. I'll be trying to do an exchange at best buy tomorrow. Stick to just backing up things for now. ]
adb shell "dd if=/dev/block/mmcblk0p1 of=/storage/sdcard1/mybckup/sbl1"
adb shell "dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/mybckup/ddr"
adb shell "dd if=/dev/block/mmcblk0p3 of=/storage/sdcard1/mybckup/rpm"
adb shell "dd if=/dev/block/mmcblk0p4 of=/storage/sdcard1/mybckup/tz"
adb shell "dd if=/dev/block/mmcblk0p5 of=/storage/sdcard1/mybckup/hyp"
adb shell "dd if=/dev/block/mmcblk0p6 of=/storage/sdcard1/mybckup/fsg"
adb shell "dd if=/dev/block/mmcblk0p7 of=/storage/sdcard1/mybckup/pad"
adb shell "dd if=/dev/block/mmcblk0p8 of=/storage/sdcard1/mybckup/ssd"
adb shell "dd if=/dev/block/mmcblk0p9 of=/storage/sdcard1/mybckup/sec"
adb shell "dd if=/dev/block/mmcblk0p10 of=/storage/sdcard1/mybckup/ztelk"
adb shell "dd if=/dev/block/mmcblk0p11 of=/storage/sdcard1/mybckup/splash"
adb shell "dd if=/dev/block/mmcblk0p12 of=/storage/sdcard1/mybckup/echarge"
adb shell "dd if=/dev/block/mmcblk0p13 of=/storage/sdcard1/mybckup/ztecfg"
adb shell "dd if=/dev/block/mmcblk0p14 of=/storage/sdcard1/mybckup/persist"
adb shell "dd if=/dev/block/mmcblk0p15 of=/storage/sdcard1/mybckup/fsc"
adb shell "dd if=/dev/block/mmcblk0p16 of=/storage/sdcard1/mybckup/modemst1"
adb shell "dd if=/dev/block/mmcblk0p17 of=/storage/sdcard1/mybckup/modemst2"
adb shell "dd if=/dev/block/mmcblk0p18 of=/storage/sdcard1/mybckup/aboot"
adb shell "dd if=/dev/block/mmcblk0p19 of=/storage/sdcard1/mybckup/modem"
adb shell "dd if=/dev/block/mmcblk0p20 of=/storage/sdcard1/mybckup/boot"
adb shell "dd if=/dev/block/mmcblk0p21 of=/storage/sdcard1/mybckup/recovery"
adb shell "dd if=/dev/block/mmcblk0p22 of=/storage/sdcard1/mybckup/misc"
adb shell "dd if=/dev/block/mmcblk0p23 of=/storage/sdcard1/mybckup/keystore"
adb shell "dd if=/dev/block/mmcblk0p24 of=/storage/sdcard1/mybckup/config"
adb shell "dd if=/dev/block/mmcblk0p25 of=/storage/sdcard1/mybckup/oem"
adb shell "dd if=/dev/block/mmcblk0p26 of=/storage/sdcard1/mybckup/cache"
adb shell "dd if=/dev/block/mmcblk0p27 of=/storage/sdcard1/mybckup/system"
#optionally backup user data.
#adb shell "dd if=/dev/block/mmcblk0p28 of=/storage/sdcard1/mybckup/userdata"
Script is attached here: http://www14.zippyshare.com/v/x4lkgLb8/file.html
It is also pasted below:
Code:
echo BACKUP ZTE Z958 partitions by Famewolf _-_ Linux and Mac Shell Script
echo This script REQUIRES an adb root shell and saves the backup to a folder named "'z958_blocks'" in your home directory.
echo To run this script under windows rename it to Backup_all.bat. Put a # in front of the lines beginning with "sed"
echo and remove the # from the line beginning with pause. Also change the adb pull line. Details below.
echo
echo Press enter key to begin or Ctrl-C to abort.
sed -n q </dev/tty
#for windows comment out the sed line above and uncomment the pause line below.
#pause >nul
echo Working...
adb shell mkdir /storage/sdcard1/mybckup
adb shell "dd if=/dev/block/mmcblk0p1 of=/storage/sdcard1/mybckup/sbl1"
adb shell "dd if=/dev/block/mmcblk0p2 of=/storage/sdcard1/mybckup/ddr"
adb shell "dd if=/dev/block/mmcblk0p3 of=/storage/sdcard1/mybckup/rpm"
adb shell "dd if=/dev/block/mmcblk0p4 of=/storage/sdcard1/mybckup/tz"
adb shell "dd if=/dev/block/mmcblk0p5 of=/storage/sdcard1/mybckup/hyp"
adb shell "dd if=/dev/block/mmcblk0p6 of=/storage/sdcard1/mybckup/fsg"
adb shell "dd if=/dev/block/mmcblk0p7 of=/storage/sdcard1/mybckup/pad"
adb shell "dd if=/dev/block/mmcblk0p8 of=/storage/sdcard1/mybckup/ssd"
adb shell "dd if=/dev/block/mmcblk0p9 of=/storage/sdcard1/mybckup/sec"
adb shell "dd if=/dev/block/mmcblk0p10 of=/storage/sdcard1/mybckup/ztelk"
adb shell "dd if=/dev/block/mmcblk0p11 of=/storage/sdcard1/mybckup/splash"
adb shell "dd if=/dev/block/mmcblk0p12 of=/storage/sdcard1/mybckup/echarge"
adb shell "dd if=/dev/block/mmcblk0p13 of=/storage/sdcard1/mybckup/ztecfg"
adb shell "dd if=/dev/block/mmcblk0p14 of=/storage/sdcard1/mybckup/persist"
adb shell "dd if=/dev/block/mmcblk0p15 of=/storage/sdcard1/mybckup/fsc"
adb shell "dd if=/dev/block/mmcblk0p16 of=/storage/sdcard1/mybckup/modemst1"
adb shell "dd if=/dev/block/mmcblk0p17 of=/storage/sdcard1/mybckup/modemst2"
adb shell "dd if=/dev/block/mmcblk0p18 of=/storage/sdcard1/mybckup/aboot"
adb shell "dd if=/dev/block/mmcblk0p19 of=/storage/sdcard1/mybckup/modem"
adb shell "dd if=/dev/block/mmcblk0p20 of=/storage/sdcard1/mybckup/boot"
adb shell "dd if=/dev/block/mmcblk0p21 of=/storage/sdcard1/mybckup/recovery"
adb shell "dd if=/dev/block/mmcblk0p22 of=/storage/sdcard1/mybckup/misc"
adb shell "dd if=/dev/block/mmcblk0p23 of=/storage/sdcard1/mybckup/keystore"
adb shell "dd if=/dev/block/mmcblk0p24 of=/storage/sdcard1/mybckup/config"
adb shell "dd if=/dev/block/mmcblk0p25 of=/storage/sdcard1/mybckup/oem"
adb shell "dd if=/dev/block/mmcblk0p26 of=/storage/sdcard1/mybckup/cache"
adb shell "dd if=/dev/block/mmcblk0p27 of=/storage/sdcard1/mybckup/system"
#optionally backup user data.
#adb shell "dd if=/dev/block/mmcblk0p28 of=/storage/sdcard1/mybckup/userdata"
echo BACKUP copied partitions to hard drive... A long wait.
#Linux abd pull line. Comment out for windows and uncomment adb pull below.
adb pull /storage/sdcard1/mybckup /workarea/android/zm2/z958_blocks/
#Windows adb pull below. Comment the line above and uncomment (remove the #) the line below.
#adb pull /storage/sdcard1/mybckup %CD%/workarea/android/zm2/z958_blocks/
echo BACKUP Done!
echo Press enter key to exit
sed -n q </dev/tty
#for windows comment out the sed line above and uncomment the pause line below.
#pause >nul
Attachments
Last edited: