Android - Installing to SDCard by default

This article at HowtoGeek describes a possible way utilizing the adb:

  • enable USB debugging
  • connect your device to your computer
  • execute the command adb shell pm setInstallLocation 2
    (or, new syntax, adb shell pm set-install-location 2)
  • disconnect, done.

This command will set the devices default installation target to your SDCard. That doesn't necessarily mean everything gets installed there: only apps supporting this will go there, and devs can "overrule" this in their apps manifest if they think it's needed. From the linked API reference:

Changes the default install location. Location values:

  • 0: Auto—Let system decide the best location.
  • 1: Internal—install on internal device storage.
  • 2: External—install on external media.

Note: This is only intended for debugging; using this can cause applications to break and other undesireable behavior.

For more details on ADB, and how you can e.g. get a minimal version of it to your computer (without the overkill of installing the entire SDK), you can take a look at the adb tag-wiki.


Update: To avoid confusion with t0mm13b's answer, some clearance on the installation process:

  1. you find some app on google-play-store and decide to install it
  2. after you've clicked "install" and agreed on terms/permissions, the apk is downloaded to /data/local, i.e. to your internal-storage. You can't change that.
  3. when the download is completed, the .apk will be installed automatically. Where to, depends on multiple things:
    • if the dev did not specify the android:installLocation property in his apps Manifest, the app will be installed to internal story. Full stop, no other choice (see: API reference).
    • if this android:installLocation is set to preferExternal, and external storage is available, it will go there.
    • if it's set to auto, it again depends:
      1. does the app contain widgets, services, wants to start at boot, and several other things, it goes to internal storage. Full stop, no other choice.
      2. it goes where the devices "default install location" points to

That cannot be changed! That is how Android works.

All downloads from Google Play goes to the internal filesystem, then from:

  • Settings > Manage applications
  • Tap on said app, check if button Move to SDCard is enabled, then you can do so.

If the button Move to SDCard is disabled or greyed out, its probably to prevent the app from functioning - such as their own widgets on home screen.

Also, see this answer in the related side-bar to the right of this page. :)


Install "Terminal Emulator for Android" in your mobile and open

$ su
# pm get-install-location
0[auto]
# pm set-install-location 2
# pm get-install-location
2[external]