Backup your Droid :D

Discussion in 'Android Hacks and Help' started by modmadmikee, Jan 17, 2010.

  1. modmadmikee

    modmadmikee New Member

    Joined:
    Dec 1, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    After seeing Mangadroid disappear from the market I decided it would be a good idea to do a complete backup. So i made a shell-script to do it for me which backs it up to the sdcard (you need to root your phone, have the "su" command, and have busybox cp installed [see http://forum.xda-developers.com/showthread.php?t=442754 and go to "PART 2 - BUSYBOX"]. (note: If you overuse the sdcard too much it will fail eventually so back that up to your pc)

    (doesn't copy ram-based directories like /dev, doesn't copy symlinks because the fat32 fs of the sdcard doesn't support it) [ if you want a FULL backup (including symbolic links although still not ram-based directories) you will need to dd the file-systems to files on the sdcard, I will post how later]

    here is the script I made:

    Code:
    mkdir /sdcard/droid_backup
    cp -R /sqlite_stmt_journals /sdcard/droid_backup
    cp -R /config /sdcard/droid_backup
    cp -R /cache /sdcard/droid_backup
    cp -R /d /sdcard/droid_backup
    cp -R /system /sdcard/droid_backup
    cp -R /init.sholes.rc /sdcard/droid_backup
    cp -R /init.rc /sdcard/droid_backup
    cp -R /init.goldfish.rc /sdcard/droid_backup
    cp -R /init /sdcard/droid_backup
    cp -R /default.prop /sdcard/droid_backup
    cp -R /data /sdcard/droid_backup
    cp -R /root /sdcard/droid_backup

     
    #1 modmadmikee, Jan 17, 2010
    Last edited: Jan 17, 2010
  2. modmadmikee

    modmadmikee New Member

    Joined:
    Dec 1, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Oh and here is how to run it once you save it to your sdcard as droid_backup.sh:
    1. Open a terminal (or use ASE>Interperters>shell).
    2. Run these commands:
    Code:
    su
    sh "/sdcard/droid_backup.sh"
     
  3. modmadmikee

    modmadmikee New Member

    Joined:
    Dec 1, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    DD backup script:

    Code:
    mkdir /sdcard/droid_dd_backup/
    dd if=/dev/block/mtdblock4 of=/sdcard/droid_dd_backup/system.img 
    dd if=/dev/block/mtdblock6 of=/sdcard/droid_dd_backup/data.img
    dd if=/dev/block/mtdblock5 of=/sdcard/droid_dd_backup/cache.img
    dd if=/dev/block/mtdblock0 of=/sdcard/droid_dd_backup/config.img
    Note: if you get an I/O error about "/dev/block/mtdblock5" then you (like me) have corrupted your /cache partition (not caused by dd but by over using your phone). To fix it turn the phone off > press and hold x > turn the phone on while still holding x > continue holding x till you get a picture with a warning sign> press volume up while pressing the camera button > a menu should appear and chose the option to clear the cache partition > chose the reboot now option.
     
    #3 modmadmikee, Jan 17, 2010
    Last edited: Jan 17, 2010
  4. Tyree2

    Tyree2 New Member

    Joined:
    Feb 22, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    sounds good to me
     
  5. Staywide8

    Staywide8 Member

    Joined:
    Jan 24, 2010
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    What are you, a troll? Three posts all saying the same thing.
     
  6. r314bd

    r314bd Member

    Joined:
    Jan 29, 2010
    Messages:
    863
    Likes Received:
    23
    Trophy Points:
    18
    Ratings:
    +23
    any difference between doing this and using nandroid?
     
  7. mjones1052

    mjones1052 Member

    Joined:
    Dec 21, 2009
    Messages:
    343
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Philly
    Ratings:
    +0
    We have nandroid and the .sbf file that they use to flash the entire phones image. What do we need this for?
     
  8. blake2050

    blake2050 Member

    Joined:
    Jan 6, 2010
    Messages:
    342
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    nandroid is good enough. In your script I see the reference to sholes and just thought Id point out that not everyone uses sholes. Plus if you want to make a backup of applications/data then use MyBackup Pro. I use it all the time to restore apps and data to my phone after switching roms.. Very handy.
     
  9. standard101

    standard101 Member

    Joined:
    Feb 26, 2010
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    SoCal
    Ratings:
    +0
    Current Phone Model:
    Galaxy S6 Edge
    sorry for the semi-hijack, but this seems like the relevant topic. does the nandroid backup capture all text messages? i recently did a nandroid backup before applying a new ROM but i have no idea how to get my data back, especially my old text messages. is this recoverable from the nandroid backup i created and if so how do i go about restoring only the messages and not the other stuff?

    thanks in advance.
     
  10. mrdroid

    mrdroid Member

    Joined:
    Dec 16, 2009
    Messages:
    511
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Pittsburgh, PA
    Ratings:
    +0
    No you can't restore individual apps from nandroid. Use something like Titanium or My Backup.
     
  11. justin82

    justin82 Super Moderator
    Staff Member Premium Member

    Joined:
    Dec 11, 2009
    Messages:
    3,693
    Likes Received:
    214
    Trophy Points:
    178
    Ratings:
    +216
    will one of these restore home screens back to there setup or does that have to be done manually
     
  12. thatguychuck

    thatguychuck Member

    Joined:
    Oct 31, 2009
    Messages:
    433
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    SD
    Ratings:
    +0
    Those "sholes" files were still on my phone even after I completely "stocked" it with a .sbf flash. I think they are a part of the OS and not a SholesMod thing.
     
Search tags for this page
/dev/block/mtdblock6 read error i/o error
,
/dev/block/mtdblock6: read error: i/o error
,
andriod command cp dd mkdir
,

android dd backup

,
backup android with dd command
,
dd android
,
dd command android
,
dd command android backup read error
,
dd command android sdcard
,
droid cp