Alternate way to back your apps to your computer.


Last Updated:

  1. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member This Topic's Starter

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    Hey, folks.

    I have been experimenting on how to make an easy backup of my apps when installing different (alternate) ROMs, and I tried to use the method that Fabolous uses, but my DROID doesn't seem to like that method at all.

    Not.
    One.
    Bit.

    So, I remembered some instructions that I saw earlier, in another thread, on how to edit the color of fonts and such in your system, and I thought "Yanno, that push / pull can be very very useful if I can figure it out." So, I played around with some trial and error, and got it working.

    Now, with my system, I have edited the System PATH environment variable to include the full path to my Android SDK tools directory, so I can simply run adb commands from the run dialog (like
    Code (Text):
    1. adb reboot
    and
    Code (Text):
    1. adb reboot recovery
    so if you need help with doing that, then I'll make another post about it (although the rooting FAQs should contain all of that info).

    So, without further ado, here goes.

    Step 1: Preparation:

    First of all, you want to open a cmd prompt. It doesn't necessarily matter where you open it b/c you'll probably need to create a directory to host all your apps on you machine. For instance, I have a folder in my Downloads directory called Android, where I store all of my alternate ROMs, apps list, and even kernels, default ROMs, and the SBF emergency recovery file. So, upon opening the cmd prompt, I change drives and then cd to the appropriate directory, like so:
    Code (Text):
    1. d:
    2. cd \Downloads\Android\Apps
    Note: if you have no need to change to a different hard drive, then you skip the first command, and the second command you use whatever directory structure you have on your machine.

    Now, if you want to backup your apps from the DROID to your computer, keep reading. If you already have your apps backed up, skip down a section to restore them to your DROID.

    Step 2a: Copying from DROID to computer:

    Now, here comes the magic. To backup your apps up from phone to local machine directory, connect your phone via the USB cable (no need to mount the SDCard) and type the following command (su is not needed):
    Code (Text):
    1. adb pull /data/app .
    You should see a lot of frenzied activity as it copies all of your apps to your local HD.

    As soon as the copying is finished, you should see something like this:
    Code (Text):
    1. 101 files pushed. 0 files skipped.
    2. 982 KB/s (69053529 bytes in 68.611s)
    Et voila! - your apps are backed up.

    Step 2b: Copying from DROID to SDCard:

    To backup your apps up from DROID to the SDCard, connect your phone via the USB cable (no need to mount the SDCard) and type the following command (su is not needed):
    Code (Text):
    1. adb pull /data/app /sdcard/{insert your directory name here}
    You should see a lot of frenzied activity as it copies all of your apps to your local HD.

    As soon as the copying is finished, you should see something like this:
    Code (Text):
    1. 101 files pushed. 0 files skipped.
    2. 982 KB/s (69053529 bytes in 68.611s)
    Et voila! - your apps are backed up.

    Step 2c: Copying from computer to DROID:

    This is just as easy. I am assuming you have already done the preparation step - if not, do it, b/c you'll need it.

    To restore your apps up from local machine directory to your DROID, connect your phone via the USB cable (no need to mount the SDCard) and type the following command (su is not needed):
    Code (Text):
    1. adb push . /data/app
    You should see a lot of frenzied activity as it copies all of your apps to your local HD.

    As soon as the copying is finished, you should see something like this:
    Code (Text):
    1. 101 files pushed. 0 files skipped.
    2. 982 KB/s (69053529 bytes in 68.611s)
    Et voila! - your apps are restored to your DROID.

    Step 2d: Copying from SDCard to DROID:

    I am assuming you have already done the preparation step - if not, do it, b/c you'll need it.

    To restore your apps up from SDCard to your DROID, connect your phone via the USB cable (no need to mount the SDCard) and type the following command (su is not needed):
    Code (Text):
    1. adb push /sdcard/{insert your directory name here}/ /data/app
    You should see a lot of frenzied activity as it copies all of your apps to your local HD.

    As soon as the copying is finished, you should see something like this:
    Code (Text):
    1. 101 files pushed. 0 files skipped.
    2. 982 KB/s (69053529 bytes in 68.611s)
    Et voila! - your apps are restored to your DROID.

    At this point, I highly recommend that you reboot your DROID. Fortunately, you can easily accomplish this as well. In the cmd prompt window, type
    Code (Text):
    1. adb reboot
    and watch your phone reboot (if you receive an error message like
    Code (Text):
    1. error: protocol fault (no status)
    but the DROID reboots anyway, ignore it).

    HTH those of you who are CL / KB junkies like me.
     

    Advertisement
    rcaine, shrink57 and UBRocked like this.
  2. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member This Topic's Starter

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    Added more info so you can choose to backup to a local directory on your computer or else backup to the SDCard.

    Considering adding .BAT file attachments for those who don't want to ahve to type this in every time....
     
  3. jasonb1985

    jasonb1985 Well-Known Member

    Joined:
    Jan 5, 2010
    Messages:
    987
    Likes Received:
    67
    Or you could backup with titanium backup and then just copy the files to your computer. Sounds a lot easier to me.
     
  4. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member This Topic's Starter

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    Yes, you could - hence the word alternate in the title....
     
  5. headbanger51

    headbanger51 Well-Known Member

    Joined:
    Feb 25, 2010
    Messages:
    185
    Likes Received:
    10
    This was great stuff. I wish I'd seen this before I flashed last night, but it'll still come in handy for the next round!
     
  6. shadowdude777

    shadowdude777 Well-Known Member

    Joined:
    Nov 8, 2009
    Messages:
    1,842
    Likes Received:
    122
    Hmm... does this method let the Market keep giving you updates on those apps? The reason I don't use MyBackup or Titanium Backup is because they don't seem to want to restore my Market links (I think Titanium does if you pay $4?)
     
  7. shrink57

    shrink57 Well-Known Member

    Joined:
    Dec 19, 2009
    Messages:
    1,529
    Likes Received:
    149
    Thanks for the great tutorial! It reminded me to put my sdk stuff in my path (I, like a big dummy had been moving stuff to the sdk\tools directory in Windows). It is amazing how I miss the obvious...
     
  8. headbanger51

    headbanger51 Well-Known Member

    Joined:
    Feb 25, 2010
    Messages:
    185
    Likes Received:
    10
    OK...I'm an idiot, but I think there's a step missing or a step that is generally understood by those other than myself. I opened a command prompt to the directory I want to backup my apps to, but when I type "adb pull..." I get a message that there is no such command. Can this be done via terminal emulator or am I missing a step somewhere? Do I have to launch adb?

    Disregard...found the step I was missing.
     
  9. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member This Topic's Starter

    Joined:
    Oct 28, 2009
    Messages:
    9,416
    Likes Received:
    1,919
    I have had no issues with updates in the market with a few apps that I have found updates for. When I first log in to access the market everything I have moved back shows up in market as installed.

    I suppose time will tell if there are any glitches.

    You're welcome. Another benefit of putting the tools directory in you PATH statement is that you can run ddms from your run dialog, and it will start the ddms.bat file, which is what I use to make screen captures of the DROID screens.

    Glad you found it :p
     

Share This Page

Loading...