• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

App installation/data location?

tr00don

Lurker
The Android manifest setting 'android:installLocation="preferExternal"' (or the equivalent Xamarin/VS2017 project setting 'Installation location: Prefer External') doesn't seem to work for me. Aside from the fact that IMO no person of a sound mind would call "external storage" a partition on the internal storage (OK, it's a matter of perspective) I am wondering what else can I do so that VS2017 installs my app to the SD card instead of the device. Actually what I would like is to store all app-generated data to the SD card instead of the emulated "external storage". Any help is greatly appreciated.
 
If your phone supports installing apps to SD then you could try the following:

Enable usb debugging
Install adb on a computer
Attach the phone to the computer
On the computer type the command:

adb shell pm set-install-location 2

"2" means "SD card". To undo it repeat the command with the argument 0 (auto) or 1 (internal).

Installing apps to sd was deprecated many years ago, but most manufacturers put it back in at least some of their phones. But for that reason I can't promise this will work.
 
If the device is really old the command format used to be a bit different: "setInstallLocation" I think, rather than set-install-location. Might be worth trying, or googling for variants on the command, just in case.
 
Back
Top Bottom