I have a Sony Xperia U, and my 8GB of memory are divided in three parts: 2GB phone memory, 4 GB internal memory (replacing the MicroSD slot) and 2GB that I haven't really figured out about.

I don't want to mess with repartition. I just want to use each one as they must be used.

The problem is: many apps are optimized to save many things in SD, but for this phone it is not really useful, as it has plenty of space in phone memory! What can I do to make automatic created app data use internal memory only, leaving SD (internal, in Xperia U's case) free for my own use?

Edit: Thank you for your answers! John, my device is rooted, so, could you explain further about those permissions, please? Thanks in advance!

  • 1
    (Your English is fine. Better, even, than some native speakers.)
    – ale
    Apr 24, 2013 at 23:01
  • If you had a rooted device, you could set the folder permissions within the SD card to root only.
    – John
    Apr 25, 2013 at 4:08
  • 1
    If the developer coded that in his app, there's not much you can do. If he coded the "path" (e.g. /sdcard/funnyapp, or using getExternalStorageDirectory() (which is how it should be done) and appends /funnyapp (or whatever directory), you could play with symlinks (linking that location to internal storage) -- but even that will most likely fail, as symlinks will be "not supported" by the "sdcard's" file system.
    – Izzy
    Apr 25, 2013 at 5:58
  • Adding to Izzy's comment above, you are out of luck if the the developer explicitly wants the app to be installed in somewhere. More info regarding this can be found in Android support documents. @Izzy, Your comment is the answer to this question, isn't it?
    – Sid
    Jun 27, 2013 at 5:27

3 Answers 3


you say your phone is rooted, it is then possible to change the default installation location that the packagagemanager uses to install apps. this will only work with apps that allow it, as others have already pointed out, apps may choose to ignore the packagemanagers recommendation and install to internal/external anyway even if you choose the opposite. also, big game files in the obb directory are stored where the obb directory actually is located; this is dependent on which phone you use.

to change the default installation directory:

1) use terminal emulator from google play (or, alternatively, enable usb debugging and use adb)

2) in terminal emulator, enter:


accept the superuser request, then try either:

pm setInstallLocation X


pm set-install-location X

where X can either be

0 = let packagamanager decide

1 = install on internal by default

2 = install on external by default


As Sid encouraged, I'll convert my comment to an answer -- while merging in details from the other comments:

There are mainly two ways the SDCard is addressed from within apps:

  1. hardcoded path (e.g. /sdcard/funnyapp)
  2. using Androids API, i.e. getExternalStorageDirectory()

While 1. might fail if the SDCard is mounted to a different place, 2. would lead the app to store things in the "first" SDCard (on devices with internal SDCard, that means internal SDCard, on others external). But both cases share the fact: if the app doesn't offer a configuration option, there's nothing you can do to change that. Android does not offer a corresponding setting, and Symlinks don't work on SDCards (due to file system limitations).

Same applies to the storage used for the app itself, as Sid wrote pointing to Android support documents (see also the developers documentation on App Install Location for this). While in most cases one can move an app using the App2SD feature built into Android, the developer can overrule this so his app cannot be moved.

As for John's comment, this wouldn't really work. Still a little explanation on what he most likely meant: Using "root powers", you could change ownership of all files and directories. So his idea probably was to make all things on your SDCard owned by root, and only readable to others. This wouldn't work for multiple reasons:

  • This would make things even more complicated to you (as you couldn't write either without becoming root before, every single time).
  • You could not do that on directory level (e.g. doing it for every single directory except for one with a "fantasy name" like e.g. "MyOwnDocs", where you could store your stuff without the trouble from the previous argument), as the file system on the card (FAT) does not support that.
  • It could somehow if you use a script to remount the card read-write each time when you want to write to it, and make it read-only again once you're done. But again, this complication most likely isn't worth it. In addition, some apps might crash with a read-only SDCard, as they (for good reasons) don't expect an SDCard present but not writable.


So in short: If the apps cannot be configured such themselves, there's no way to accomplish this (except for re-writing those apps).

  • 1
    symlinks don't work on fat but he can mount bind a folder like: mount -o bind /internal/dir /sdcard/dir
    – Crayon
    Sep 6, 2014 at 18:00

Try using Lucky Patcher and installing the app's apk as a system app.

  • 1
    Could you link to Lucky Patcher? Will this actually change where the app saves things? Apr 6, 2015 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .