- James Thornton |
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’
- Java Development Kit (JDK)
- Android Developer Kit (SDK)
- HTC Sync or USB drivers (such as Google’s or these)
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]