HTC Desire – How To Force Android App To Install To SD Without Root [Tutorial]

I have already upgraded to Android 2.2 Froyo & it serves major change of moving my android apps to SD card after installation from market. But I tried using the feature & tried not to go with some tweak, But it just messes up & every time you have to move.

So got this small tutorial from Android Forum & thought it would be helpful for all of you if I publish it on my blog. Note that this tutorial only works for HTC Desire, there are small changes for other smartphones – So do not use this tut for other android phones.

1. Your android apps will get directly installed on SD card.

2. We don’t need root access for this , so nothing can go wrong on your HTC Desire default settings.

HTC Desire Android Apps Install SD

What You Need ?

Java JDK (You’ll need Java JDK for installing Android SDK, skip if you already have it )

Android SDK Setup

HTC Sync ( If you have Windows 7 You’ll need HTC  Sync for  USB driver installation )

How To Force Android App To Install To SD Without Root

Step 1.

Enable USB debugging on your Android device from Settings > Applications > Development > USB debugging.

Step 2.

Now extract  the package of Android SDK setup to the folder of your choice, run SDK Setup.exe and click on Available Packages to the left.

If you get an error message at this point, enable “Forcehttps://…” in the Settings. From the list of available packages, select “Usb Driver package”, click on theInstall Selected button in the bottom right corner and follow the prompts.
Step 3.

Then, Connect your phone to your computer with a USB-cable. Your OS will prompt you to install new drivers. Choose to install them from the android-sdk/usb_driver folder. Do not mount your device; you only need to plug-in the cable.

Step 4.

If you have Windows 7 It will not prompt to install the drivers so you install HTC Sync & then you cna install drivers. Plug in the phone now, set connection type to synchronize and check if HTC Sync recognizes the phone, if yes, you are set (HTC Sync installs the needed ADB drivers under Win 7).

All you need to do now is to enable the USB Debugging in your phone and set connection type to “Charge only” (tho it worked also with sync setting) and follow up rest of the tutorial.

Step 5.

Next, run a command prompt and navigate to the Android-SDK\tools folder. In Windows, this is done by selecting Run from the Start Menu (or by pressing Win+R) and typing cmd. You change drives in the command prompt by entering the drive letter followed by a colon (, and change folders with the CD command. For example, to enter the Android-SDK folder, simply type cd android-sdk.

Step 6

In the Android-SDK\tools folder, type in adb devices and you should get a serial number starting with “H” in return. All you have to do next is entering adb shell pm setInstallLocation

All metioned above means you have to type in command prompt exactly as follows:

cd AndroidSDK\tools\
adb devices
adb shell
pm setInstallLocation 2

And That’s it, you’re done! Android will now installapps to the SD card by default.

For switching back to Phone memory (In case you need it)

To switch back to storing software on the internal memory, enter adb shell pm setInstallLocation 0.

Suggestion from Forum Member Stublake 13  about installing certain apps on SD memory

“I should point out that it’s preferable to install certain apps to the main memory, since it will take a while before the SD card becomes available when you start your phone. Applications installed on the memory card will also be unavailable to the system each time you mount your phone as a disk drive. The internal storage is probably quicker as well, even though Google claims that “there is no effect on the application performance so long as the external storage is mounted on the device.” In general, apps that integrate with the Android OS and that often run in the background is better to install on the internal storage, while games and most other applications will have no problem chilling outside on your SD.”

Update: Homescreen widgets should be installed to the internal storage as well. I noticed that LauncherPro, for example, won’t recognize widgets stored on the SD card when you start your phone, because when the app is launched, the memory card is still unavailable.