• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Backup All partitions to microsd and PC.

Did you find this useful?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 0 0.0%
  • I don't understand what this does.

    Votes: 0 0.0%

  • Total voters
    0

FameWolf

Newbie
Dec 28, 2015
17
2
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:

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

  • Backup_all.sh.txt
    3.2 KB · Views: 214
Last edited:
Is there a signed zip anywhere in the filesystem on the phone that you could upload? Like a firmware update zip package that I can flash in recovery to restore my phone to working order? If the firmware update upgrades the boot image I will be able to boot my phone since the boot partition on my phone got corrupted. I can access DFU but ZTE has not provided anything needed to make flashing possible through it. Using recovery will be my only option.
 
Upvote 0
The bootloader is locked. The partitions are read only. There is NO custom recovery. That was my point. This is off topic for the thread so please post your questions in a separate thread in the forum.

You can always take your phone back to where you got it and they can reflash it to factory.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones