1. Download our Official Android App: Forums for Android!

Tips Backup All partitions to microsd and PC.

Discussion in 'Android Devices' started by FameWolf, Jul 21, 2016.

?

Did you find this useful?

  1. Yes

    0 vote(s)
    0.0%
  2. No

    0 vote(s)
    0.0%
  3. I don't understand what this does.

    0 vote(s)
    0.0%
  1. FameWolf

    FameWolf Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    17
    Joined:
    Dec 28, 2015

    Dec 28, 2015
    17
    2
    26
    Male
    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 (Text):
    1.  
    2. echo BACKUP ZTE Z958 partitions by Famewolf _-_ Linux and Mac Shell Script
    3. echo This script REQUIRES an adb root shell and saves the backup to a folder named "'z958_blocks'" in your home directory.
    4. echo To run this script under windows rename it to Backup_all.bat. Put a # in front of the lines beginning with "sed"
    5. echo and remove the # from the line beginning with pause. Also change the adb pull line.  Details below.
    6.  
    7. echo
    8. echo Press enter key to begin or Ctrl-C to abort.
    9. sed -n q </dev/tty
    10. #for windows comment out the sed line above and uncomment the pause line below.
    11. #pause >nul
    12. echo Working...
    13. adb shell mkdir /storage/sdcard1/mybckup
    14.  
    15. adb shell "dd if=/dev/block/mmcblk0p1  of=/storage/sdcard1/mybckup/sbl1"
    16. adb shell "dd if=/dev/block/mmcblk0p2  of=/storage/sdcard1/mybckup/ddr"
    17. adb shell "dd if=/dev/block/mmcblk0p3  of=/storage/sdcard1/mybckup/rpm"
    18. adb shell "dd if=/dev/block/mmcblk0p4  of=/storage/sdcard1/mybckup/tz"
    19. adb shell "dd if=/dev/block/mmcblk0p5  of=/storage/sdcard1/mybckup/hyp"
    20. adb shell "dd if=/dev/block/mmcblk0p6  of=/storage/sdcard1/mybckup/fsg"
    21. adb shell "dd if=/dev/block/mmcblk0p7  of=/storage/sdcard1/mybckup/pad"
    22. adb shell "dd if=/dev/block/mmcblk0p8  of=/storage/sdcard1/mybckup/ssd"
    23. adb shell "dd if=/dev/block/mmcblk0p9  of=/storage/sdcard1/mybckup/sec"
    24. adb shell "dd if=/dev/block/mmcblk0p10  of=/storage/sdcard1/mybckup/ztelk"
    25. adb shell "dd if=/dev/block/mmcblk0p11  of=/storage/sdcard1/mybckup/splash"
    26. adb shell "dd if=/dev/block/mmcblk0p12  of=/storage/sdcard1/mybckup/echarge"
    27. adb shell "dd if=/dev/block/mmcblk0p13  of=/storage/sdcard1/mybckup/ztecfg"
    28. adb shell "dd if=/dev/block/mmcblk0p14  of=/storage/sdcard1/mybckup/persist"
    29. adb shell "dd if=/dev/block/mmcblk0p15  of=/storage/sdcard1/mybckup/fsc"
    30. adb shell "dd if=/dev/block/mmcblk0p16  of=/storage/sdcard1/mybckup/modemst1"
    31. adb shell "dd if=/dev/block/mmcblk0p17  of=/storage/sdcard1/mybckup/modemst2"
    32. adb shell "dd if=/dev/block/mmcblk0p18  of=/storage/sdcard1/mybckup/aboot"
    33. adb shell "dd if=/dev/block/mmcblk0p19  of=/storage/sdcard1/mybckup/modem"
    34. adb shell "dd if=/dev/block/mmcblk0p20  of=/storage/sdcard1/mybckup/boot"
    35. adb shell "dd if=/dev/block/mmcblk0p21  of=/storage/sdcard1/mybckup/recovery"
    36. adb shell "dd if=/dev/block/mmcblk0p22  of=/storage/sdcard1/mybckup/misc"
    37. adb shell "dd if=/dev/block/mmcblk0p23  of=/storage/sdcard1/mybckup/keystore"
    38. adb shell "dd if=/dev/block/mmcblk0p24  of=/storage/sdcard1/mybckup/config"
    39. adb shell "dd if=/dev/block/mmcblk0p25  of=/storage/sdcard1/mybckup/oem"
    40. adb shell "dd if=/dev/block/mmcblk0p26  of=/storage/sdcard1/mybckup/cache"
    41. adb shell "dd if=/dev/block/mmcblk0p27  of=/storage/sdcard1/mybckup/system"
    42. #optionally backup user data.
    43. #adb shell "dd if=/dev/block/mmcblk0p28  of=/storage/sdcard1/mybckup/userdata"
    44.  
    45.  
    46.  
    47. echo BACKUP copied partitions to hard drive... A long wait.
    48.  
    49. #Linux abd pull line.  Comment out for windows and uncomment adb pull below.
    50. adb pull /storage/sdcard1/mybckup /workarea/android/zm2/z958_blocks/
    51. #Windows adb pull below.  Comment the line above and uncomment (remove the #) the line below.
    52. #adb pull /storage/sdcard1/mybckup %CD%/workarea/android/zm2/z958_blocks/
    53.  
    54. echo BACKUP Done!
    55. echo Press enter key to exit
    56. sed -n q </dev/tty
    57. #for windows comment out the sed line above and uncomment the pause line below.
    58. #pause >nul
    59.  
     

    Attached Files:


    Advertisement

    #1 FameWolf, Jul 21, 2016
    Last edited: Jul 21, 2016
  2. anthonykb

    anthonykb Newbie
    Rank:
    None
    Points:
    28
    Posts:
    24
    Joined:
    Apr 14, 2016

    Apr 14, 2016
    24
    21
    28
    Male
    Tweaking
    New London, CT
    Do you have a backup of the boot partition for the ATT GoPhone model? Would you mind uploading it?
     
    #2 anthonykb, Aug 30, 2016
    Last edited: Aug 30, 2016
  3. FameWolf

    FameWolf Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    17
    Joined:
    Dec 28, 2015

    Dec 28, 2015
    17
    2
    26
    Male
    I have one but without the bootloader being unlocked you are not going to be able to do much with it. Why not just make your own backup?
     
  4. anthonykb

    anthonykb Newbie
    Rank:
    None
    Points:
    28
    Posts:
    24
    Joined:
    Apr 14, 2016

    Apr 14, 2016
    24
    21
    28
    Male
    Tweaking
    New London, CT
    I can flash the boot image in dfu mode (Vol Up + Vol Down) while plugging in to restore the phone to working condition. I am willing to donate $10.00 to you when I get money if you can upload the boot image.

    adb shell "dd if=/dev/block/mmcblk0p20 of=/storage/sdcard1/mybckup/boot"
     
  5. FameWolf

    FameWolf Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    17
    Joined:
    Dec 28, 2015

    Dec 28, 2015
    17
    2
    26
    Male
  6. anthonykb

    anthonykb Newbie
    Rank:
    None
    Points:
    28
    Posts:
    24
    Joined:
    Apr 14, 2016

    Apr 14, 2016
    24
    21
    28
    Male
    Tweaking
    New London, CT
    Thanks! You are a life saver.
     
  7. anthonykb

    anthonykb Newbie
    Rank:
    None
    Points:
    28
    Posts:
    24
    Joined:
    Apr 14, 2016

    Apr 14, 2016
    24
    21
    28
    Male
    Tweaking
    New London, CT
    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.
     
  8. FameWolf

    FameWolf Newbie
    Thread Starter
    Rank:
    None
    Points:
    26
    Posts:
    17
    Joined:
    Dec 28, 2015

    Dec 28, 2015
    17
    2
    26
    Male
    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.
     
Tags:

Share This Page

Loading...