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

Root Alternate way to back your apps to your computer.

johnlgalt

Antidisestablishmentarian
Oct 28, 2009
9,451
1,958
52
3rd Rock
androidforums.com
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:
adb reboot
and
Code:
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:
d:
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:
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:
101 files pushed. 0 files skipped.
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:
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:
101 files pushed. 0 files skipped.
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:
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:
101 files pushed. 0 files skipped.
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:
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:
101 files pushed. 0 files skipped.
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:
adb reboot
and watch your phone reboot (if you receive an error message like
Code:
error: protocol fault (no status)
but the DROID reboots anyway, ignore it).

HTH those of you who are CL / KB junkies like me.
 
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.
 
Upvote 0
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?)

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.

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...

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.

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.

Glad you found it :p
 
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