|

Wondering why your HTC Android phone keeps running out of memory? One of the answers could be that it’s crammed full of apps. By default the Android Market stores all of your apps on your device’s internal memory, rather than your larger SD card.

Don’t worry though because with a bit of patience and the help of the Android SDK it can be done. Start by downloading the following tools:

What you need to perform the ‘hack’

Now, on your phone, go to Settings > Applications > Development and activate USB Debugging.

1. Install the SDK and Platform-tools

To start, install the Java JDK, then the Android SDK. After having installed the SDKs, open the Android SDK Manager and check the Android SDK Platform-tools package. Then hit the Install button.

This package of tools contains the Android Debug Bridge (ADB), a utility that allows you to communicate with an Android device via command line. This is what you need to be able to tell Android to automatically install apps to a memory card.

2. Connect your phone to your computer

Now connect your Android phone to your PC using the USB cable in HTC Sync mode. If the HTC Sync program opens automatically in Windows, shut it down from the Task Bar (Right-click on the icon and click ‘Close’).

Bear in mind that not all USB cables are valid with all devices. In some cases, they won’t connect your phone to your device. Have more than one to hand just in case.

3. Open a command console and carry out checks

Go to Start > Run in Windows, or hit Windows+R and type cmd. In the command console that appears, switch to the directory ‘Program files (x86)’ or ‘Program Files’ and enter the path: Android/Android-SDK/Platform-tools. Once you’re here:

  • Type adb devices to see if your device is connected and recognized
  • You should see your device with its serial number listed
  • If it doesn’t show up or appears as offline, try with a different USB cable
  • Type netstat and check if port 5037 is in use
  • It’s this port that uses the ADB. If it’s in use, kill the process which is using it

Before continuing, it’s recommended that you deactivate any firewalls or antivirus on your system, because this can interfere with the ADB connection process.

4. Run the command to force apps to install on SD card

Android has a parameter that describes how to install applications on the mobile by default. This parameter is called setInstallLocation, and accepts three values:

  • 0 [auto]: Lets the phone decide the best location for an app
  • 1 [internal]: Installs everything on the internal memory
  • 2 [external]: Installs everything on the memory card

As you might have guessed, you now need to change the value from 0 to 2 in setInstallLocation. To do this, run the following command:

  • adb shell pm setInstallLocation 2

If no error message appears, disconnect the phone, turn it off and reboot it. From now, all applications will install automatically on the SD card. If you want to revert back to the previous way, repeat the process, changing the 2 for a 0.

A word of warning

Certain applications, such as widgets, don’t run well from the memory card. If you experience problems you should move these apps from the SD card to the phone.

Have you been having problems with space on your Android device? What method do you use to free up space?

[Via Softonic Spain]

Commented

  • ts |
    26/11/11
    ts

    just wonder why google never resolve this limitation

  • vishnusuryo |
    06/12/11
    vishnusuryo

    dimana saya harus mencoba untuk proses adb shell pm setInstallLocation 2

  • geo |
    14/12/11
    geo

    Doesn't work on rooted Android 2.2 on Acer Liquid:everything OK, but the destination for installations (2) doesn't change.

  • Dante |
    21/12/11
    Dante

    I have done this and the command "getInstallLocation" actually confirmed "2". Then I tried to install the App "Doubletwist" and it does not work. It was downloaded but the installation process could not be finished. It is possible that some Apps are specifically made to work on a specific location?

  • saeed |
    08/02/12
    saeed

    oops

  • kashan |
    15/09/12
    kashan

    i have done all . but getting command error setInstallLocation in my HTC Explorer .

  • vilhelm joelsen |
    07/10/12
    vilhelm joelsen

    macbook

  • arshad |
    25/12/12
    arshad

    can i expand the system memory of my android phone running 2.3.6 lg optimus l3 dual

  • Akul |
    12/06/13
    Akul

    is this process completely safe..?

  • Gurpreet singh |
    19/06/13
    Gurpreet singh

    Dear Sir,

    I have done everything as per this tutorial, i got the error at the end. its showing unknown command 'setInstallLocation',, please help... I have MicroMax A116 (Canvas HD)

  • scandragon |
    19/06/13
    scandragon

    You might want to try adb shell pm set-install-location 2 The errormessage even tells you to do that

  • Gurpreet singh |
    20/06/13
    Gurpreet singh

    thanks for your help, it worked "set-install-location 2" and no error came after that. But my problem has not solved. Actually my phone has three type of storage. 1. Phone storage (Phone's inbuilt memory) 2. Internal SD Card (phone's inbuilt memory card) 3. External SD Card (my external memory card)

    This procedure can set the installation upto only Internal SD Card... which my phone also can do by itself.

    I want to use External SD Card for default installation....... please please help me if anybody can... developers please...

  • chiff |
    21/06/13
    chiff

    Why does android have this ridiculous limitation? Phone 1GB, Internal 2GB, SD 16GB

    These should be of no difference! How else am I supposed to install a 2GB game...

  • Gurpreet singh |
    22/06/13
    Gurpreet singh

    thanks for your help, it worked "set-install-location 2" and no error came after that. But my problem has not solved. Actually my phone has three type of storage. 1. Phone storage (Phone's inbuilt memory) 2. Internal SD Card (phone's inbuilt memory card) 3. External SD Card (my external memory card)

    This procedure can set the installation upto only Internal SD Card... which my phone also can do by itself.

    I want to use External SD Card for default installation....... please please help me if anybody can... developers please...

  • Gurpreet singh |
    24/06/13
    Gurpreet singh

    thanks for your help, it worked "set-install-location 2" and no error came after that. But my problem has not solved. Actually my phone has three type of storage. 1. Phone storage (Phone's inbuilt memory) 2. Internal SD Card (phone's inbuilt memory card) 3. External SD Card (my external memory card)

    This procedure can set the installation upto only Internal SD Card... which my phone also can do by itself.

    I want to use External SD Card for default installation....... please please help me if anybody can... developers please...

  • Gurpreet singh |
    24/06/13
    Gurpreet singh

    thanks for your help, it worked "set-install-location 2" and no error came after that. But my problem has not solved. Actually my phone has three type of storage. 1. Phone storage (Phone's inbuilt memory) 2. Internal SD Card (phone's inbuilt memory card) 3. External SD Card (my external memory card)

    This procedure can set the installation upto only Internal SD Card... which my phone also can do by itself.

    I want to use External SD Card for default installation....... please please help me if anybody can... developers please...

  • Why do you care>? |
    24/06/13
    Why do you care>?

    Ummmm yeah im reporting this website. FYI you dont need the "java pack" to perform this hack. That java pack is full of junk that just attacked my laptop and started installing a bunch of CRAP on my laptop! Nothing but spam of course. Good thing i have a awesome antivirus and a strict router. Surprised that this site got through my filter! THIS SITE IS SPAM AND LOADED WITH VIRUSES!!! DO NOT DOWNLOAD ANYTHING FROM HERE!!!!

  • Raro |
    27/06/13
    Raro

    was more easy before the stupid update ,u was hving the option of select to save on sd or no nd after ok, but now it show but dont work...

  • poopzy |
    30/06/13
    poopzy

    when i check using, pm set-intallation it says 2[external] but still on my application manager sd card storage doesn’t show..please help..thank you very much

  • Siihng |
    01/07/13
    Siihng

    Why just there are not places to have this ready to use as an internet café? The whole process is ridiculous.

  • Siihng Again |
    01/07/13
    Siihng Again

    Android should be external sd card ready to install with just a click. These are applications from the same market place!

  • truth spreader |
    08/07/13
    truth spreader

    the reason why GOOGLE doesn't force everything on SD is to make sure people buy high end phones and not low end phones: otherwise there wouldn't be much difference between a Galaxy Mini and the high end Galaxy: it would all depend on SDCard and Battery (which could be bought at 25% in China)

    And we can't have that can we? Bad for business...

  • James |
    12/07/13
    James

    I tried this on my gingerbread(2.3.6) LG mytouch and it worked perfect! Apps that I could not move to the SD card before, now allowed that option in application settings. worked great, phone also alerted me to app that could now be moved and made recommendations. I followed the steps exactly and installed both software and then updated SDK manager and installed platform tools as instructed. I had to use the DOS command: " adb shell pm setInstallLocation 2" and all done. You must capitalize the I and L in the setInstallLocation command. Thank You

  • Sonia |
    13/07/13
    Sonia

    I got it working , Thanks for the tip, I was able to moved some apps to SD card but face book is not moving so I can't install updates on facebook because of internal memory storage. Other problem is now when I install any app it says in the and that "app can be moved to SD card" and when I check its in the list for SD card app, but my internal memory is also getting reduced same amount so I am back to internal memory storage problem if I install anymore app.. Can anybody point me to any direction please?

  • Abd ur Rehman |
    26/07/13
    Abd ur Rehman

    Thank you. It resolved issue of low storage. Great step by step guide. Cheers.

  • Filip |
    31/07/13
    Filip

    Is this only for HTC???

  • Filip |
    31/07/13
    Filip

    Does this work for LG???

  • MichelM |
    05/08/13
    MichelM

    I'm having some trouble going through the procedure. I believe this is only for HTC running froyo and so does not need to b routed I can't see ADB in DOS test ? And HTC sync won,t work for me but it seems I could use the USB option that shows my HTC Desire Will keep trying!

  • Derek |
    07/08/13
    Derek

    It doesn't work with HTC Wildfire. I went through the procedure with no error, but in the end new apps still get installed on internal memory, which is not what we all want.

  • InfoPro78 |
    23/08/13
    InfoPro78

    It Works Thanks Alot !

  • rahulmahajan031 |
    10/09/13
    rahulmahajan031

    Thanks works perfectly on my x10 but some app still cant be moved Thanks a lot

  • kourosh |
    11/09/13
    kourosh

    Hi there Is this method works on galaxy note 8 (GT_N5100)?

  • adarsh |
    14/09/13
    adarsh

    after installing a game after the procedure given above won't there be a decrease in the memory of external memory card

  • shusi.scafeyisayo |
    10/11/13
    shusi.scafeyisayo

    HELLO THERE... I SO MUCH BELEVE IN THIS PROCEDURES JUST BY READING IT. PLEASE CAN THIS WORK ON SAMSUNG GALAXY GRAND DUOS?

  • matrix-1997 |
    25/12/13
    matrix-1997

    THAT'S what i had when i tried with adb shell pm setInstallLocation 2 on my galaxy 3 I5800 WHAT CAN I DO???

    Error: unknown command 'setInstallLocation' usage: pm [list|path|install|uninstall] pm list packages [-f] pm list permission-groups pm list permissions [-g] [-f] [-d] [-u] [GROUP] pm list instrumentation [-f] [TARGET-PACKAGE] pm list features pm path PACKAGE pm install [-l] [-r] [-t] [-i INSTALLERPACKAGENAME] PATH pm uninstall [-k] PACKAGE pm enable PACKAGEORCOMPONENT pm disable PACKAGEORCOMPONENT

    The list packages command prints all packages. Options: -f: see their associated file.

    The list permission-groups command prints all known permission groups.

    The list permissions command prints all known permissions, optionally only those in GROUP. Options: -g: organize by group. -f: print all information. -s: short summary. -d: only list dangerous permissions. -u: list only the permissions users will see.

    The list instrumentation command prints all instrumentations, or only those that target a specified package. Options: -f: see their associated file.

    The list features command prints all features of the system.

    The path command prints the path to the .apk of a package.

    The install command installs a package to the system. Options: -l: install the package with FORWARD_LOCK. -r: reinstall an exisiting app, keeping its data. -t: allow test .apks to be installed. -i: specify the installer package name.

    The uninstall command removes a package from the system. Options: -k: keep the data and cache directories around. after the package removal.

    The enable and disable commands change the enabled state of a given package or component (written as "package/class").

  • pintya01 |
    16/11/14
    pintya01

    when i executed command adb devices no list was shown.. ??? this is when i executed last command no error appeared but it is showing that device is not found... plzz help

23/11/14
Your avatar