Skip to content

Instantly share code, notes, and snippets.

@silvae86
Last active May 6, 2024 09:26
Show Gist options
  • Select an option

  • Save silvae86/d3d603133827a47355fb39c98ebf877d to your computer and use it in GitHub Desktop.

Select an option

Save silvae86/d3d603133827a47355fb39c98ebf877d to your computer and use it in GitHub Desktop.

Revisions

  1. silvae86 revised this gist Mar 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion android_backup_restore.sh
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ adb shell
    #ls -l /dev/block/platform/<block_device_name>/by-name/

    #for the Galaxy Note 3
    #ls -l /dev/block/platform/msm_sdcc.1/by-name/
    ls -l /dev/block/platform/msm_sdcc.1/by-name/

    #for Galaxy Note 3, handles 4GB Limit on SD Card by splitting the backup into 2000MB Parts.

  2. silvae86 revised this gist Mar 8, 2017. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions android_backup_restore.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,14 @@
    #!/sbin/sh

    #open adb shell
    adb shell

    #listing partitions (general command for Android devices)
    #ls -l /dev/block/platform/<block_device_name>/by-name/

    #for the Galaxy Note 3
    #ls -l /dev/block/platform/msm_sdcc.1/by-name/

    #for Galaxy Note 3, handles 4GB Limit on SD Card by splitting the backup into 2000MB Parts.

    #backup
  3. silvae86 revised this gist Feb 27, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion android_backup_restore.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/sbin/sh

    #for Galaxy Note 3
    #for Galaxy Note 3, handles 4GB Limit on SD Card by splitting the backup into 2000MB Parts.

    #backup
    dd if=/dev/block/platform/msm_sdcc.1/by-name/boot | gzip -c | split -b 2000m - /external_sd/backup_dd/boot.gz.
  4. silvae86 created this gist Feb 27, 2017.
    13 changes: 13 additions & 0 deletions android_backup_restore.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/sbin/sh

    #for Galaxy Note 3

    #backup
    dd if=/dev/block/platform/msm_sdcc.1/by-name/boot | gzip -c | split -b 2000m - /external_sd/backup_dd/boot.gz.
    dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata | gzip -c | split -b 2000m - /external_sd/backup_dd/userdata.gz.
    dd if=/dev/block/platform/msm_sdcc.1/by-name/system | gzip -c | split -b 2000m - /external_sd/backup_dd/system.gz.

    #restore
    cat /external_sd/backup_dd/boot.gz* | gzip -dc | dd of=/dev/block/platform/msm_sdcc.1/by-name/boot
    cat /external_sd/backup_dd/userdata.gz* | gzip -dc | dd of=/dev/block/platform/msm_sdcc.1/by-name/userdata
    cat /external_sd/backup_dd/system.gz* | gzip -dc | dd of=/dev/block/platform/msm_sdcc.1/by-name/system