Tag Archives: Android Debug Bridge

Android debugging: Force app to be installed on SD card

If you are working on a big application which uses a lot of memory you might get the error „No space left on device“ when trying to debug. With a Android Debug Bridge (ADB) command you can force the application to be installed on the SD card directly.

You have following options to chose when it comes to where the app shall be installed by default:

The setInstallLocation command changes the default install location
0 [auto]: Let system decide the best location
1 [internal]: Install on internal device storage
2 [external]: Install on external media

Do as described:

  1. Connect your phone to your computer via USB. Make sure it is in debug mode.
  2. Open Windows CMD Command (cmd.exe)
  3. Type following command if you want the default location to be your SD card:
    adb shell pm setInstallLocation 2
That’s about it. From now on when testing your app it will automatically be installed on the SD card instead of the internal memory.