Android identify internal memory or sd card. How to make a USB flash drive internal memory

Do you want to install applications on a MicroSD stick? Then you will need to format it as internal memory.

Unfortunately, some manufacturers such as Sony, LG or Samsung do not do this in the factory. But if you have a smartphone with Android Marshmallow or higher operating system, the command line will help you.

Android updates and Nougat issues when using this method

Some readers have reported difficulties installing system updates. Updating the operating system to Android 7.0 Nougat is not possible when formatting the flash drive using the method described below. Devices that have already updated to Android 7.0 Nougat don't even respond to console commands.

Since there is no relevant documentation on the net, we can only recommend that you do the steps described below in reverse order before the system update. Do not forget to back up your photos or music on your computer or cloud drive and free up as much space as possible on the SD card and internal memory of your smartphone. Delete unnecessary apps, then transfer your data back to internal storage. Then format the MicroSD card as removable media. Only after that you can safely proceed with the system update.

There were no problems with Android 6.0 Marshmallow

If we format the MicroSD as internal memory, we can install any applications to the card. This means that if you download 2 gigabytes of applications, then they will take exactly 2 gigabytes on the card. If we format MicroSD as a backup memory, then the situation will change somewhat.

In Android Marshmallow, it is theoretically possible to work with a MicroSD card as internal storage. The operating system allows you to transfer applications and data of these applications to the card. In fact, the memory of a smartphone can be expanded. Unfortunately, some smartphone manufacturers have removed the option to format cards as internal memory from the menu in the Android Marshmallow version.

Use only fast MicroSD cards, otherwise memory expansion will result in performance degradation.

No such option

The fact that the menu does not have an option to format the memory of a flash drive as internal does not mean that this option does not work. Power users reported using the command line to format MicroSD cards as internal storage in Galaxy S7 smartphone. We have successfully tested this option on Samsung Galaxy S7, Sony Xperia Z5 and LG G4 with Android Marshmallow.

All smartphones had the Android 6.0 Marshmallow operating system (either by default or after an update), and all models had a memory card slot. As we already mentioned, the option to format as internal memory was missing from the phone menu. Only the HTC One A9 and all Motorola Moto smartphones have this option.

Go to the dark side, expand your memory. I still don't understand why Samsung, LG and Sony have removed this option from the menu. I connected all three smartphones with inserted microSD card to the computer.

After that, in ADB tools, I typed the necessary commands in the command line. Once you have opened the command line and connected your smartphone, you can enter the first command:

adb shell

Now the command line can execute system commands for the smartphone. We need to format the memory card or part of it as internal memory. Even without such an opportunity in the graphical interface of Sony, Samsung and LG phones, we can send commands to the smartphone via the console.

First, however, we need to find out the card ID. This information can be obtained using the following command:

sm list-disks

In my case, the disk is named 179.64. You may have some other name. Remember the exact card ID. With the next command we will format the microSD card section. All data will be deleted. Remember to save important information on another card, on your computer, or somewhere else. If you are not going to remove the memory card from the phone at all, you can share the entire memory of the card. To do this, enter the following command into the console:

sm partition disk: 179.64 private

The command will take a few seconds or minutes to complete, depending on the size and speed of the card. If you want to share a part of the card's memory with other devices, you need to exclude this part from the hidden partition. Dividing the map into two sections will look like this

sm partition disk: 179.64 mixed 50

But this is not the end of the work. Now if you want to use the memory card as the internal memory of the phone, you need to transfer all applications and data. You can do this via the Android menu. Select an option SD Сart, find the menu item Move data... If you haven't split the map, then you won't be able to.


Move the data after partitioning the SD card, now all downloaded apps will be written to the microSD. Only system applications and updates will be stored in the internal memory of the smartphone. This means that you no longer have to face the problem of insufficient memory when downloading or updating applications.


On the Sony Xperia Z5, the total memory is displayed a little strange. The first thing you need to pay attention to is the SD card memory.

What's the catch?

The microSD data transfer rate is an order of magnitude lower when compared with the built-in memory. Therefore, do not spare money on a memory card with a high speed of data reception and transmission. Sandisk Extreme Pro and Extreme Plus MicroSD are the best we've seen so far. At 74 megabytes per second, you shouldn't have any lag.

Curiously, only the LG G4 phone correctly read the information from the card. Samsung showed an unnaturally high level of occupied memory, while the values \u200b\u200bon Sony were even negative. However, we did not have any problems, and even when connected to a computer, we could access all the data, although we only saw the general section, which is also available to other devices. Problems appeared only when installing system updates.

Expanding memory: success!

We ran a performance test of extended memory. We have Final Fantasy IX installed on all devices. The game takes 1.8 GB. After installation, you can see exactly where the game data is located. In all cases, 1.8 GB less free space is reflected on the SD card after installation. This cannot be achieved if the card is formatted as a removable memory, as the entire data cannot be transferred.

Compare the indicators of the internal memory and the memory of the card in the screenshot.

What will happen ...

Of course, it would be logical to ask what happens if we pull out the card. In fact, this is a big problem for applications, because in this case they will not have access to the data they need to work. Since all system data is in internal memory, the application icons were replaced by the standard system icon, but everything returned to its place when we inserted the card again.

If you lose or damage your SD card, all data will be lost. They cannot be restored as they are encrypted as internal memory. So don't forget to make regular backups. That's it, you can now enjoy an inexpensive way to expand the internal storage of your Android Marshmallow phone.

Safely remove SD card formatted as internal memory

To safely remove the card from your smartphone, you need to follow all the steps in reverse order. Since internal storage is usually not enough, you will have to transfer photos and other data to another physical or cloud storage and uninstall all applications. After that, return to the settings item Memory and USB and press Transfer data in step Inner memory on the menu. Then format the SD card as removable media. Be sure to make a backup so as not to lose data.

It worked? What card are you using? Write in the comments.

Many people want to know how to install applications on an SD card in Android devices. If the user has a phone or tablet with a small amount of permanent memory and RAM, then he probably often uninstalls programs to free up space. But there is a way to increase the storage capacity by using an SD card.

Installation methods

Data-lazy-type \u003d "image" data-src \u003d "http://androidkak.ru/wp-content/uploads/2017/05/link2sd_copertina-300x131.png" alt \u003d "(! LANG: Link2SD" width="300" height="131" srcset="" data-srcset="http://androidkak.ru/wp-content/uploads/2017/05/link2sd_copertina-300x131..png 768w, http://androidkak.ru/wp-content/uploads/2017/05/link2sd_copertina.png 800w" sizes="(max-width: 300px) 100vw, 300px"> !}
By default, Android games and applications are installed on your smartphone's built-in storage, which may be too small. If you have SD, then you can make it so that some programs are installed there by default, thereby freeing up space for more information. Under certain conditions, almost any installed program can be transferred to a removable flash drive.

How to install an app to Android SD card? There are several different ways to accomplish this operation. Choosing the correct method depends on the version of the operating system and the data you want to move. In Android 6.0 Marshmallow settings, it is possible to adapt SD as built-in storage by automatically installing authorized games and software to the removable storage.

Some smartphones without a new operating system allow you to manually move the application to the memory card, but only if the developer allows it. An alternative way to transfer programs is to use the Link2SD application.

It should be noted that programs launched from the card are likely to run slower than those in the built-in memory.

That is why you can transfer applications to an external flash drive only in case of extreme need. It is recommended to use this method whenever possible for programs that do not need high speed for normal operation.

How to adapt an SD card to internal memory

Traditionally, SD on Android has served as portable storage. This means that they can store videos, music and photos for use on your smartphone. SD can be connected to a computer for double-sided file transfer. When used as a portable storage device, the card can be removed without compromising functionality.

Read also: How to install games with cache on Android

How do I install applications to a memory card? Android 6.0 Marshmallow system allows you to use SD as built-in storage, making it an integral part of your smartphone. If you accept a removable flash drive as the main storage, then by default the new software will be installed on it. If desired, the user can move the program back to the built-in memory.

If an external drive is used as the main storage, then it cannot be removed so that it does not affect the functionality of the gadget. In this case, the card cannot be used on other devices (including a PC). The SD card is formatted as a local EXT4 drive, encoded with 128-bit AES encryption and mounted as part of the system. When Marshmallow accepts the drive, it will only work with it.

Jpg "alt \u003d" (! LANG: SD card" width="300" height="182" srcset="" data-srcset="http://androidkak.ru/wp-content/uploads/2017/05/118227p09-300x182..jpg 720w" sizes="(max-width: 300px) 100vw, 300px"> !} Now how to set up an SD card. Make sure to back up your data and save it on your computer before using the USB flash drive as internal storage. The onboarding process will delete all data. It is possible to return data to SD after the drive has been adopted as built-in storage.

To transfer data, you need to connect Android directly to your computer. It is not possible to remove the SD from the device and connect it directly to the PC for file transfer. If the drive was used as a portable storage and it contains data, then you need to transfer it to the built-in memory. If you do not do this, then the programs will be removed and they will have to be reinstalled.

When using SD for internal storage, make sure the card is fast. When buying a new drive, look for Class 10 and UHC. If you choose a cheaper and slower SD, then it will slow down the device as a whole. If you have plans to configure the drive as internal storage, then it is better to spend the money on purchasing a fast card. The Android system will test the SD speed during the sync process and warn the user if it is too slow and could negatively affect the gadget's performance.

Many smartphone users sooner or later face the problem of insufficient memory. This is especially true for budget phones. 16 GB is not much. Moreover, if the ROM is even smaller - 8 GB (yes, there are such models).

Buying a microSD only partially solves this problem. For Android phone owners, we recommend using the Adoptable Storage feature, which allows you to combine ROM and memory card into a single logical partition.

Unfortunately, the Adoptable Storage feature only appeared in the latest versions of Android (starting with Android 6). We will show you how to properly combine memory and microSD in Android 7 (in other versions of Android, this procedure is similar).

Before combining, you have two memories: the phone's internal memory (ROM) and external memory (microSD). Even if you designate a memory card as the default recording drive, some of the data will still be written to ROM. And the smartphone's memory will fill up over time (even if there is a lot of free space on the memory card). We'll have to deal with cleaning it.

But after combining, you will get a single memory. Its volume will be equal to ROM + microSD.

Step 1
Turn off the smartphone, insert the memory card (microSD). The phone must be charged at least 15-20% (do not allow discharge during the setup and pairing procedure!).

Step 2
We turn on the phone. If the memory card is empty, a message will appear indicating that the SD card has been detected and you will be prompted to configure it.
In my case, there was information that the SanDisk SD card is not supported. It should be so. The fact is that before it was used on another phone and was already merged. With this operation, all information is encrypted and the data will not be visible on another phone.

Step 3
You will be prompted to configure the map as Portable media (standard use) or as Inner memory... Choose the latter.

Step 4
Please note that once setup is complete, this card will only work on this phone. All information that was on the map earlier will be destroyed.

- After formatting, the memory card will be encrypted. Data access will be possible only from this smartphone. After a factory reset, you will also lose access to your data.
- If the memory card fails, you will lose data, so take care of the backup settings (especially since Google already advises to do this).

Step 5
After completing the formatting, a message was displayed stating that the SD card is running slowly, which can cause problems and reduce the data transfer rate. You can ignore this message, but try to use high speed class 10 cards.

Step 6
Transfer the suggested piece of data from the internal memory to the memory card.

In many models of smartphones, the function of saving photos to a memory card is built in by default. However, there are devices in which this parameter must be set manually or it is absent altogether, and the images taken are saved in the internal memory of the phone. How to make sure that photos are saved to the memory card of the Android device - this will be discussed in the article.

For different models of Android smartphones, there are different ways to solve the problem of saving images to memory. Despite the fact that a specific phone model has its own peculiarities of setting storage parameters. In a certain line of devices, the location of the function for saving photos to a memory card is usually the same. We will consider the peculiarities of the location of this function and various ways of solving the problem, characteristic of any configurations of smartphones.

Method 1 - changing the storage partition in the camera settings

In most smartphones, the folder for saving photos can be set in the camera settings. To do this, you need to start it and find the "settings" tab, in which the item concerning the storage of images will be registered. It can be called something like this:


Item "Save to memory card" of the "Camera settings" section

Here it is necessary to move the slider of the item "Save to memory card" to the right position, thereby activating the saving of photos to the memory card. As a rule, this way the problem is solved in most cases. If it doesn't help, move on to the next one.

Method 2 - change the save folder in the smartphone settings

Often, image storage parameters can be changed directly in the "Settings" section of your device. A method is implemented in several steps:


If this solution did not help you, move on to the third.

Method 3 - restore default camera settings

Some deliberate or accidental changes to the camera parameters can also affect the smartphone's operation, resulting in the SD card failure. In this case, we recommend that you restore the camera to factory settings. In our smartphone model, this is done like this:

Method 4 - hardware resolution of the problem of saving photos to a memory card

If the previous methods did not help saving images to a memory card, then perhaps the problem lies in the phone itself, since the memory module is a vulnerable spot in the device and its operation can easily be disrupted, for example, if the smartphone falls. It will not be superfluous to check this with the following steps:

  1. Turn off the phone and remove the memory card;
  2. Turn it on and take a test shot;
  3. Turn off the device again, insert a memory card and start it;
  4. Try again to photograph something.

After completing these steps, the failure is usually eliminated and subsequent pictures are already saved to the SD card.

We examined the main causes of the problem of saving a photo to a memory card and how to resolve it on Android gadgets. Hope this article helped you troubleshoot this issue.

I'll make a reservation right away that we are not talking about programs like link2sd. The principle is similar, but we will not link the program directories, but the data directories of these programs, for example / sdcard2 / Navigon -\u003e / sdcard / Navigon or / mnt / extSdCard / Books -\u003e / sdcard / Books, etc.
In addition, we need a root (where can we go without it). By the way, after I learned about this program, this is another argument for me for root.

Many owners of android smartphones or tablets with small built-in memory have probably faced the following problem: a large sd card is inserted (for example, 16, 32 or even 64 Gigabytes), but after installing several heavy programs, our device or another program insolently declares that there is no enough space. Sometimes the program itself is small, but after installation it goes online and pulls gigabytes of data onto the smartphone.
Once again, having received the message "No place" and looking at the card, we see that it is practically empty, but the internal memory of the device is packed to capacity.
This is because internal memory is often used as the default directory for many programs. The fact is that it is mounted as / sdcard, which historically has always been an external sd card (it used to be the case on all smartphones). The external sd card is mounted in this case as / sdcard2, / mnt / sdcard2, / mnt / extSdCard or even /sdcard/.externalSD. I understand that this is done by the manufacturers so that the device works out of the box, i.e. no sd card at all.

Many "unscrupulous" programs always want to read / write data from / to the / sdcard / SubstituteName. This can rarely be changed in the program settings.
As a result, we have what we have, and several possibilities to correct the current situation:
The last two methods are also not a panacea, because require certain skills from the user, in addition, they are not sufficiently "clean", for example, there are known problems when connecting a smartphone to a computer via usb (cannot be unmounted), etc.

The DirectoryBind program, which a good person slig from xda wrote for himself and posted on the forum for public use, will help to fix the situation.

QR code


Although the audience here is technically savvy, a couple of explanations need to be made for inexperienced Habr readers. As he himself wrote (the program is not idiot-proof), i.e. unlikely to pass the fool test.

After installation, run the program (for the first time, of course, we permanently allow Root rights), click the menu then "Preferences" and set the default paths to the external memory "Default data path" for example / sdcard / external_sd / and the internal memory "Default target path" / sdcard / ... We leave the menu.

Click the menu, then "Add new entry"

Now let's create a new directory link, for example, move the CamScanner folder to an external card. A long press on the path to folders opens a small built-in file manager in which you can create and / or select a folder. The folder on the external map must be created (and empty).

By checking the "Transfer files from target to data" checkbox, files and folders will be transferred from the / sdcard / CamScanner / directory to the / sdcard / external_sd / CamScanner directory.

It should be noted that the links after creation are not automatically activated (gray floppy disk icon, as in the screenshot below for gameloft). To complete the binding of folders, select the necessary links with checkmarks and click menu -\u003e "Bind checked". The icons of active (linked) folders should turn green.

By the way, if you want to attach the entire external card, I fully recommend doing it not like this / sdcard / externalSD /, but with a dot in front of /sdcard/.externalSD/. This will save you the trouble of double thumbnails in galleries, etc. The truth will not help for all galleries and players. some are looking for media in hidden directories.
After suffering, I decided for myself to link only individual directories.

UPD. By the way, an external SD card is much slower than the internal memory, so transferring program data to an external SD naturally slows down the work of this program. This should be especially remembered for those who decide to completely change the mount points of internal and external memory, because chances are your entire device will run slower than before.

I hope this program will complement your collection of useful utilities for android devices.

If you still decide to swap the internal and external memory, i.e. reassign an external sd card to / sdcard and there is no such option in the device settings - having a root, this can be easily done by performing the following operation:
In Root-Explorer, mount "/ etc" as R / W (if R / O), find the file "/etc/vold.fstab", save a copy and open it (with a long click) in the Text Editor.
In the next two lines, change the name of the mount points in places: dev_mount sdcard / mnt / sdcard [email protected] /devices/platform/goldfish_mmc.0 ... dev_mount sdcard / mnt / external_sd auto /devices/platform/goldfish_mmc.1 ... on dev_mount sdcard / mnt / external_sd [email protected] /devices/platform/goldfish_mmc.0 ... dev_mount sdcard / mnt / sdcard auto /devices/platform/goldfish_mmc.1 ...
You can read more details. They also suggest, as an alternative, to use another interesting program Root External 2 Internal SD.
I will add that in both cases, before switching, you need to copy the entire contents of the / sdcard folder to an external sd card.
Remember, after a switch, your entire system may work better than before.
be careful - you need to understand that everything that you do under the root, you do at your own peril and risk, and for example, saving the wrong "vold.fstab" may lead to the inability to load the device and for treatment you will need to boot into recovery and edit "vold.fstab" already there.

This method can be used in conjunction with DirectoryBind, only now, on the contrary, "Default target path" (/ sdcard) and all links created in DirectoryBind will point to an external map.

Did you like the article? To share with friends: