Android Tutorial

7.12.2011

How to move all Android apps to SD card

One of the most anticipated additions to Android 2.2 (aka Froyo) was ability to install applications to SD card. When internal phone memory gets full, Android users have two problems: 1) users can’t install any more apps and 2) phone starts working slowly. The slow down is caused by the lower speed of write operations to the internal phone flash memory when it’s getting full (see this post for more information on this topic), but the bottom line is that having low available space in the internal memory is not desirable.
So what should a user do when the phone is running out of internal memory? Uninstalling unused apps is an obvious and easiest solution. Moving apps that support Froyo’s apps2sd feature to SD card is another option. However, for this feature to work developers need to enable this option in their apps and unfortunately many large apps still do not support apps2sd. Turns out there is a hack that can let you move almost any Android app to SD card even if the app developer did not enable this option. More about this hack below, but first let’s take look at the limitations of the Android apps2sd feature.

Apps2sd limitations

Apps2sd functionality is a step in the right direction. However, the way it is implemented creates some restrictions which you should know about:
  • When an app is moved to SD card, portion of an app still remains in the internal phone memory. On average, you can expect that application’s footprint in the phone memory will be reduced by a factor of 2. Note that for some apps the move will save less than 50%, e.g. Google Earth size in the internal memory reduces from 20.5 MB to 15MB, Adobe Flash Player 10.1 reduces from 12.4 MB to 8 MB.
  • If you use a widget on your home screen from an app, this app should not be moved to SD card because the widget will stop working.
  • Android OS doesn’t have any batch tools to move all movable apps to SD card at once. You will need to manually move one app at a time by going through the list of installed apps in Settings->Applications->Manage Applications. This means 2 taps per app and is a tedious process.
  • [Update] System apps such as Maps and Youtube cannot be moved to SD card using stock firmware. On some phones Adobe Flash Player is pre-installed as a system app and also cannot be moved. However, they can be deleted on a rooted phone – see FAQ below. They also can be moved if you root and install custom firmware such as CyanogenMod 7 – see FAQ. [/Update]
  • If you re-flash phone’s firmware, some backup applications may not restore your apps to SD card, but will restore them to the phone memory.
Despite these restrictions, moving apps to SD card is a good way to free up internal phone memory and speed up your Android phone.

Moving (almost) all Android apps to SD card

To run commands which will enable Move to SD card button for most installed apps, you need to have adb executable on your computer. Adb stands for Android Debug Bridge and is used for Android software development, but it is a very useful tool to have for any advanced Android user. You do not need to have a rooted phone to run adb commands.
  1. To download the latest version of Android SDK (which includes adb executable), follow instructions from step 2 in the Installing the SDK article from the official Android development site. Note: you do not need to install any other software such as Eclipse for this procedure.
  2. After downloading the archive of the SDK, unzip it to any folder and remember its location (let’s call this folder <sdk>).
  3. If you are installing Android SDK on Windows machine, you also need to install USB driver as described in USB driver for Windows section.
  4. Connect the phone using USB cable and do not enable USB storage mode. Go to Settings -> Applications -> Development and enable USB debugging.
  5. Start terminal window on your computer.
  6. Navigate to folder containing file named “adb” (updated to reflect move of adb from sdk\tools to sdk\platform-tools in 2.3):
    • If using SDK 2.2 or older: in the terminal window navigate to <sdk>\tools folder (using “cd full-path-to-sdk-tools” command).
    • If using SDK 2.3 or later: in the terminal window navigate to <sdk>\platform-tools folder (using “cd full-path-to-sdk-platform-tools” command).
  7. Type the following two lines in the terminal window and press Enter after each line:
    • adb shell
    • pm setInstallLocation 2
  8. Now on your phone go to Settings->Applications->Manage Applications->All.
  9. Press hardware Menu button and select Sort by Size.
  10. Tap on each app that is taking significant amount of space and tap Move to SD card button. Press hardware Back button and repeat.
  11. (optional) To change the default installation location for new apps back to the internal phone memory,  go back to your terminal window and type:
    • pm setInstallLocation 0
  12. (important) Go to Settings -> Applications -> Development and disable USB debugging. Leaving USB debugging enabled makes your phone vulnerable (e.g. lock pattern can be reset).
  13. Enjoy!

FAQ

  • Q: Does my phone need to be rooted for this hack to work?
    • A: No.
  • Q: Do I need to setup a full development environment (Java, Eclipse) for this to work?
    • A: No.
  • Q: I don’t have time for this hack. How can I check which of my installed apps officially support moving to SD card?
    • Install “App 2 SD” app from Android Market (or use this download link) and it will list applications for which developers enabled apps2sd support.
  • Q: Can I move all apps to SD card in one operation?
    • A: As far as I know, no (using stock firmware). If you do know a way to do so, please let me know in the comments.
  • Q: Can I move systems apps such as Maps, Youtube, and Adobe Flash Player to SD card?
    • A: No. Moving system apps to SD card is not possible on both unrooted and rooted phones using stock firmware.
  • Q: Can I delete bloatware apps installed as “system apps” by the carriers?
    • Yes, but only if you rooted your device. With a rooted phone you could delete unused system apps, but it gets a bit complicated. Deleting some apps may cause problems with subsequent OS updates, so you should be careful. See this list for Android system apps can be safely removed. Instead of deleting, you can “freeze” unused system apps (e.g. using Titanium Backup). Freezing an app will remove it from the app drawer and memory and will make sure it is never launched, but it will not free any space in the internal phone storage.
  • Q: Can I move system apps to SD card on a rooted phone if I’m using a custom firmware?
    • A: Yes. The most popular “aftermarket” Android firmware CyanogenMod 7 puts the absolute minimum of the apps in the system folder. CyanogenMod 7 also includes a hack described above to allow most apps to be movable to SD card. As a result, many Android apps such as Maps, Youtube, Gmail can be moved to SD card on CyanogenMod 7, while they are unmovable to SD in the stock firmware.

No comments:

Post a Comment