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.
- 1 Instructions
- 2 Installing games to SD card Android SDK
- 3 Instructions
- 4 Tips Tricks & Warnings
- 5 Questions and Answers
- 5.1 I am not seeing my phone under adb devices?
- 5.2 Hi, OEM tablet from China, Android, not bootable?
- 5.3 I have a problem. After typing adb shell pm setInstallLocation 2 there is an error, please help me?
- 5.4 I want to restore the SD card on my Samsung Galaxy S5 Marshmallow 6.0.1 to external storage?
- 5.5 I got error message when doing adb shell pm setInstallLocation 2?
- 6 Comments
Instructions
- 1USB 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"The first step is to enable USB debugging on your phone.
- 2After downloading, open the folder where you've saved the file.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.
- 3
- 4You 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.If you are using Windows, you need to update the drivers for your phone.
- 5
- 6It'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.Go to the SDK directory you have previously downloaded using the command line.
- 7Your 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.Connect your phone to your PC via the USB, and then type "ADB Devices" on the terminal.
- 8There 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.If your phone is in the list of the ADB Devices, proceed by typing "adb shell pm setInstallLocation 2" then press "Enter".
- 9
- 10To reverse the changes, follow the previous steps, but instead of typing "adb shell pm setInstallLocation 2" you have to type "adb shell pmsetInstallLocation 1".
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
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.