Force Application to Install on Your SD Card Using ADB (Android Debug Bridge)

Edited by Clifford, Charmed, Innocent Yogo, Eng and 14 others

Installing applications or games that require a lot of memory is a pain, especially for those of us who don't have the luxury of a large internal memory on our phones. Google has addressed this issue by introducing the option of moving apps to our SD card. However, this option is dependent on the app developer. Using ADB (Android Debug Bridge) you can force the application to be installed on your SD card instead of the internal memory of your phone. Using this method, you don't have to root your phone, and you can easily reverse the process if you decide you no longer want it.

Instructions

  1. 1
    The first step is to enable USB debugging on your phone. USB debugging is used by developers to feed useful information to your computer when developing an application for Android system. To enable this on your phone, open up the Settings menu by touching the "Settings" icon. Tap "Applications" , then "Development", then you have to tick "USB Debugging"
    Advertisement
    Was this step helpful? Yes | No| I need help
  2. 2
    Next you need to install the Android SDK (Software Development Kit) on your PC by visiting SDK and choose the correct version of SDK for your operating system. After downloading, open the folder where you've saved the file.
    Advertisement
    Was this step helpful? Yes | No| I need help
  3. 3
    You should have downloaded an .exe file if you are using Windows operating system. If you are using Linux, or OS X, you'll get a zipped folder. Just unzip it to see the entire file.
    Was this step helpful? Yes | No| I need help
  4. 4
    If you are using Windows, you need to update the drivers for your phone. You have to connect your to your computer using the provided USB cable, but do not mount the SD card on the phone. Windows will ask you to install additional drivers for your phone.
    Was this step helpful? Yes | No| I need help
  5. 5
    You have to open up a terminal/command line by clicking Start then run and type CMD on the space provided, then hit enter. For OS X - the terminal app in the utilities folder. For Linux, it should be on your app list.
    Was this step helpful? Yes | No| I need help
  6. 6
    Go to the SDK directory you have previously downloaded using the command line. It's important to place the ADB tool folder where you can easily access it e.g. - in the root of your drive. If you have placed the folder on your C drive, just type "CD \adbtools" and hit enter. If you got the message that the system cannot find the specified file , then you must be in the wrong directory.
    Was this step helpful? Yes | No| I need help
  7. 7
    Connect your phone to your PC via the USB, and then type "ADB Devices" on the terminal. Your phone should appear on the list. If not, it may be that you have a missing driver. Just double check your phone and make sure you have all the drivers.
    Was this step helpful? Yes | No| I need help
  8. 8
    If your phone is in the list of the ADB Devices, proceed by typing "adb shell pm setInstallLocation 2" then press "Enter". There should be a brief pause and the command prompt will return. All apps that you now install should go straight into your SD card by default, saving your internal memory space.
    Was this step helpful? Yes | No| I need help
  9. 9
    You could check this by installing an app. Tap "Settings". Tap "Applications" and then "Manage Application". Tap the "SD card" tab. Check if the application is listed there.
    Was this step helpful? Yes | No| I need help
  10. 10
    To reverse the changes, follow the previous steps, but instead of typing "adb shell pm setInstallLocation 2" you have to type "adb shell pmsetInstallLocation 1".
    Was this step helpful? Yes | No| I need help

Important Note! Any previously installed apps will NOT be installed back on your internal memory.

Installing games to SD card Android SDK

To install games to the SD card of your Android using the SDK, you need to download the game application to your device first, then you can follow the procedures mentioned above in this article, with a few differences.

Instructions

  1. 1
    Open the settings menu by tapping on "Settings". icon on your home screen.
    Was this step helpful? Yes | No| I need help
  • 2
    Go to "Applications".
    Was this step helpful? Yes | No| I need help
  • 3
    Go to "Developments".
    Was this step helpful? Yes | No| I need help
  • 4
    Tick on the "USB Debugging" to enable it on your Android device.
    Was this step helpful? Yes | No| I need help
  • 5
    Ensure that you've installed the SDK on your computer.
    Was this step helpful? Yes | No| I need help
  • 6
  • 7
    Connect your phone to your PC via the USB.
    Was this step helpful? Yes | No| I need help
  • 8
    Type "ADB Devices" on the terminal. You will be able to see your phone on the list.
    Was this step helpful? Yes | No| I need help
  • 9
    Now type "adb shell pm setInstallLocation 2".
    Was this step helpful? Yes | No| I need help
  • 10
    Press "Enter" after typing, and wait for the command.
    Was this step helpful? Yes | No| I need help
  • 11
    Install the games you already downloaded. They will automatically go to the SD card, since all apps now installed go to the SD card by default.
    Was this step helpful? Yes | No| I need help
  • 12
    Check to see if the game is installed in the SD card. To do this, go to the settings menu, then "Manage Applications", and then to "SD card", and you will be able to see if the game app is listed there.
    Was this step helpful? Yes | No| I need help
  • 13
    If the game is in the list, then you've successfully installed it to the SD card.
    Was this step helpful? Yes | No| I need help
  • Tips Tricks & Warnings

    • Any applications you've previously installed, will not automatically be moved to your memory card.
    • You have to uninstall and reinstall any application that you want to move to your memory card.

    Questions and Answers

    I am not seeing my phone under adb devices?

    I have tried everything and installed the Google USB driver on my Windows XP but am still not seeing my phone under list of adb devices

    Make sure you've installed the latest oem adb drivers for your PC. You can find the latest version here:

    http://koush.com/post/universal-adb-driver

    You'll also want to try different USB ports on your computer. It's recommended that you use the ports on the back of the PC for better compatibility.

    Lastly, check and see if your phone's USB debugging mode is turned on. You need to have this enabled while connected to your PC. Go into your phone's settings and turn it on in Developer Options.

    http://screencast.com/t/Ed2HeR7GeoFI


    Hi, OEM tablet from China, Android, not bootable?

    When I try to open, there is only the Android logo and it won't open. How can I enable USB debug mode. After enabling it, I will get root rights then upload ROM

    VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.

    I have a problem. After typing adb shell pm setInstallLocation 2 there is an error, please help me?

    I am from Poland. I have tried: Everything is OK, but there is a problem with the device saying it's offline. I think it was caused by: Maybe wrong driver?

    VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.


    I want to restore the SD card on my Samsung Galaxy S5 Marshmallow 6.0.1 to external storage?

    The command line "sm partition disk:xxx,xx private" did not perform as eloquently as I had hoped. I don't know how to reverse the procedure and make the card external storage again. This question is not answered or even asked anywhere and I have asked in a dozen different ways attempting to find the answer. I have tried: Attempting to teach myself the ABD tools command line. I think it was caused by: I had foolishly high expectations. When it seems too good to be true, well, you know.

    VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.



    I got error message when doing adb shell pm setInstallLocation 2?

    Hi Strongfire. . I was doing what you told me about how to do adb shell pm setInstallLocation 2. but its failed and I got message like Error: java.lang.SecurityException: Package Android does not belong to 2000. . do you what is this? can you fix it for me?. btw my phone is Samsung Galaxy J2 Prime. . OK thanks for all your effort for me. I think my Samsung is prohibiting all the way to make SD card as internal memory. I have tried: I tried all what you told me but there is a little bit different between your comman and my command you command is adb shell pm setInstallLocation 2 and my command is adb shell pm set-install-location 2. I think it was caused by: I think my Samsung is prohibiting all the way to make my SD card as installable apps like internal memory and this is the error Error: java.lang.SecurityException: Package Android does not belong to 2000

    VisiHow QnA. This section is not written yet. Want to join in? Click EDIT to write this answer.

    If you have problems with any of the steps in this article, please ask a question for more help, or post in the comments section below.

    Comments

    Article Info

    Categories : Android

    Recent edits by: Maria Quinney, DeleteQnA, CynthiaOsborne1960

    Share this Article:

    Thanks to all authors for creating a page that has been read 15,470 times.

    x

    Thank Our Volunteer Authors.

    Would you like to give back to the community by fixing a spelling mistake? Yes | No