[T-Mobile myTouch 4G Slide] Blue6IX:
Return to Contents Page - doubleshot Developers Reference

Also, see this post on Preparing for backup.

Hey all, time for a quick public service announcement to help people make sure they don't lose things they may want to use later that came on their phone.

Post 1 - ADB backup methodology. Does not create installer package.

Post 2 - Clockworkmod Backup methodology. Does create installer package usable through CWM.

****Post 2 to be updated for Official CWM 5.0.2.7 - Meantime the method is the same.

Post 3 - To be announced.

IMPORTANT: Make sure you back up all your unique user data ( phone numbers, saved files and the like ) before doing anything to the phone. If something happens and you lose your data, don't blame me. The point of this guide is to backup your stuff, and stress the importance of backups, so ( Duh! ) make sure you backup anything you've done to the phone before you start.

-Back up your

SDcard

as well before starting. Just plug your phone into your computer and open up a window to it, you can drag and drop all the files off the SDcard. You could also power off the phone ( fastboot off! for best results ) and take out the SDcard and plug it into your computer with a card reader to accomplish this.

-After you back up your stuff, might be a good time to do a factory reset to your phone. If you haven't flashed a ROM yet, then perfect! Do a factory reset anyway to make what we're gonna do next as "stock" as possible. After a factory reset you will probably have to re-install superuser and busybox.

( To do a factory reset, open your app drawer and go to settings. Then go to "SD & Phone Storage" and select "Factory data reset". Yes, you do want to wipe your SDcard too. )

By the end of this guide you will understand why everyone here playing around with this kind of stuff should have the Android SDK on their computer, so on to the guide:

Today's workshop is going to require the use of ADB ( android debug bridge ), but don't be afraid of it - it's not as hard as it seems. I will also be assuming the use of a windows computer ( I'm using XP, other versions are probably similar in executing these instructions )

What we're going to do is make a quick backup of all the stuff you can easily save on your device.

You will need root access to the device to make this happen, or you will get : permission denied.

So, after you successfully S-OFF, then install Superuser (Root) and busybox, ( don't forget to check that you have root & busybox installed correctly ) put the phone down for a few minutes and take the time to get ADB running on your computer.

You'll need to download the Java Development Kit and install that on your computer. Next, you'll need the Android SDK downloaded and installed on your computer. Don't forget to run the SDK manager to get the rest of the android tools you need to make it work. Plenty of guides around on XDA if you need help with that. You will need platform-tools to use ADB.

Also, configuring the Android SDK itself to work on your computer is beyond the scope of this guide, but again, there are tons of resources all over XDA to find out how to do this.

For the rest of this posting, I will assume you have ADB set up, and I will assume you install the Android SDK to the following location:

C:\Android

That's a folder on your C: drive called Android. So far, pretty simple, right?

(If you installed it somewhere else, just modify the command to account for that)

Okay, now that that's all done, let's go ahead and get your phone backed up.

First thing you have to do, is pick up your phone and make sure it's in USB debug mode. You can accomplish this by going to:

You might want to also select "Stay awake" while there too, to prevent the phone from sleeping while you work with it.

That being done, plug your phone into the computer with the USB cable it came with. Don't do anything else to it yet, just forget about it for a little while.

(I will put all commands you type in bold so you can see them easily. Make sure to not miss any empty spaces between letters or symbols, and type them in exactly as shown.)

Now, kick up your command prompt. Go to Start, Run, and type in cmd and hit enter (or click ok).

Next, type in CD \ and hit enter. Your command prompt should now just look like:

C:\>

Now, type in CD C:\Android\platform-tools and hit enter. Before hitting enter, it will look exactly like this:

C:\>CD C:\Android\platform-tools

Your command prompt should now look like:

C:\Android\platform-tools>

Okay, stop. Go to your C drive on your computer. Make a new folder, call it "AndroidPhone" (no quotes or spaces in the name). We called it that so it will sit right next to your Android folder, making it easy to find.

Okay, go back to your DOS window, and make sure you still see...

C:\Android\platform-tools>

...as the last line in the window.

Now you want to type in: adb pull / C:\AndroidPhone and hit enter.

Before you hit enter, the whole line should look like this:

C:\Android\platform-tools>adb pull / C:\AndroidPhone

Note the spaces, and where they are. Make sure to get the forward and backward slashes right.

After you hit enter, sit back and wait. The DOS window is going to light up with a whole mess of stuff that will scroll down the screen. Some things will be skipped, others won't be. Just be patient and wait for it to be finished, it's going to take a while. Some things will happen faster then others.

When done, your DOS window will sit there and the last line will look like:

C:\Android\platform-tools>

...and have a blinking underscore right after it.

Go check the AndroidPhone folder, and make sure you got it all. It should be somewhere around 700MB in size. If it's a lot less, then you weren't successful.

That's it! Congratulations, you now have a copy of most of what was on your phone when you got it. Wasn't that hard, was it?

Let's take a look at some other ways we can use the pull command:

If you want to back up a specific folder, the "system" folder for instance and put it in a different folder called "NewBackup", then you would type this in as your command instead:

adb pull /system C:\NewBackup

...and it should look like this before hitting enter:

C:\Android\platform-tools>adb pull /system C:\NewBackup

Make sure to create the "NewBackup" folder before running the command!

If you only wanted to back up the system apps on the phone, and wanted them in a seperate folder called "AppBackup" and then in a folder inside that one called "stockapp" - you would type in this command:

adb pull /system/app C:\AppBackup\stockapp

...and it would look like this before hitting enter:

C:\Android\platform-tools>adb pull /system/app C:\AppBackup\stockapp

Don't forget to make the folders you will be saving to before you run the command.

For our last example, if you wanted to back up a specific app, to just your C drive, you could do this command:

adb pull /system/app/Calculator.apk C:\

...and it would look like this before hitting enter:

C:\Android\platform-tools>adb pull /system/app/Calculator.apk C:\

Two things to note here:

1- Typing this does not work:

[COLOR="Red"]BAD CODE EXAMPLE DO NOT DO THIS[/COLOR]
C:\Android\platform-tools>adb pull /system/app/[COLOR="Red"]c[/COLOR]alculator.apk C:\

Why? the app name is typed with a lower-case "C" at the beginning. This is case sensitive, and the app we are talking about has an upper-case first letter. Compare that bad code example to the previous good one for the same app.

2-The HTC optimized apps have an "Odex" file there as well. Backing up this specific app directly, which also has a companion file Calculator.odex, doesn't get the other file. We also have to get it manually by doing it this way, type in the following command:

adb pull /system/app/Calculator.odex C:\

...which looks like this before hitting enter:

C:\Android\platform-tools>adb pull /system/app/Calculator.odex C:\

...and you will have both the app and it's odex file saved.

You don't need the .odex files to re-install the app on your phone, they will work without them. Re-installing the .apk file doesn't re-install the .odex file, you would have to put the .odex file back on the phone manually.

So that about covers it, and shows how to use the command to place things in different locations, get different folders, and specific files.

I tried to show the command with just enough variation that you could easily see what parts of the command affected which part of the outcome, and make it very plain to see how it all worked.

I even made sure to show you that you can open other folders on your computer with the DOS prompt open, do things like create folders, and then come back to the DOS window and execute a command you already typed in.

I wrote this because i've seen people already asking for things like stock system fonts, and so forth, and you should already have that backed up before you go ahead and flash a ROM. To account for the wide range of familiarity people have with the adb pull command, I tried to make the whole thing targeted to someone who has never used that specific command before.

As I said above, installing and configuring the Android SDK and the adb command specifically are beyond the scope of this thread, since it's been covered to death elsewhere on XDA and we don't need yet another one of those threads.

I think you can now see why doing such a thing is a good idea even if you just flash ROMs and don't actually create them. The Android SDK can be useful for users, too, since flashing a ROM is not something a typical user of the phone is expected to be doing. By flashing a ROM, or trying to, you take that step that makes you an advanced user of your phone.

I am extremely cautious when it comes to backups of my data, and make many of them. In my experience, most people seem to only think about backups when they need them, and by then it's too late to make one. Doing this right after you get root can save you from losing anything you might want back again some day.

For bonus points, you can then burn that folder you made of all your phone data to a DVD. Don't forget to put the Java SDk, Android SDk, and anything else you downloaded or used to make this work on the DVD as well so you can do this again or on another computer...without having to download all the software packages over and over again.

Just a friendly public service announcement/guide, and as a helpful bonus, i'm going to list all the stock system apps below with their complete location listed. This may make it more helpful to browse the other threads in our corner of XDA telling you what apps you can remove and such.

My most worthwhile contribution to the development community at this time is time itself, so trying to map out and explain where everything is on the device is where i'm at. If you are reading this, then you're along for the ride too.

Edit to add:

I was going to list the stock apps here by .apk name for reference. When I sat down to do it, this came out:

MT4GS Stock App Developers Reference

Go there for a list of apps if you need it, but the reference was written for developers - the apps are listed in alphabetical order according to .apk name, not by any other names programs might call them.