My smartphone has ability to use two sim card or one sim card plus sdcard. Generally, I'm using second option (sim+sdcard), sdcard as adopted storage. I want to use second sim card temporarily. But if I will unmount sdcard and pull it out will I be able to use it later without problems?

2 Answers
2

Once you've adopted your external SD card as internal storage, you no longer can simply remove it without causing massive issues (apps crashing and the likes) – after all, the card is acting as internal storage then, covering everything that goes to /data/data (i.e. all the apps' data, configurations etc.).

The only way to take it out without causing issues is to convert it back to "portable storage". Which is technical possible – as long as there's sufficient internal storage available. If there is, I'd wonder why you've adopted the card – so that probably won't be done by just pressing a single button: you'd first need to make enough space, i.e. remove data stored in "adoptable storage" so the remains fit into real internal storage again.

TL;DR: No, you cannot simply unmount and take the card out to free the shared slot.

Try it and see the terror, @QkiZ. That's one of the reasons I avoid adoptable storage. No need for me to try. What do you think will happen if your apps certainly no longer can access their data? Also see our adoptable-storage tag-wiki.
– Izzy♦Jan 4 '18 at 19:15

It works as expected. I successfully unmount adopted storage.

First I moved all apps to internal memory. Then I unmount adopted storage from SD card options.

System starts syncing data that was not written yet and after minute there was intent notification "You can remove sdcard safely". So I removed card. Nothing wrong was happening. Of course, wallpaper disappears but it was predictable.

Another side effect was that I can't save screenshot so I made these photos by another phone.

After some time I inserted same SD card to smartphone and Android mount it automatically. Wallpaper appears again and all my files from SD card was in the same place as before.

Technically adopted storage is separate file system but mounted in a file system, in the specified directory. Not every app can be moveable to adopted storage. It behaves like normal SD card with FAT/exFAT file system but Android merge view of internal memory directory in one "file system". Another difference is that adopted storage is encrypted. Android mounts that encrypted block device, decrypt it and mount in /mnt/expand/. No system data are moved to adopted storage, only apps that developer implement an option to move app data to adopted storage.

That's what I predicted. Only you included the step to avoid the trouble I've mentioned: "First I moved all apps to internal memory." Your question doesn't include that. Usually one uses adoptable storage because internal storage is too small for the apps to fit. If yours fit all in, I don't see why you're using it at all. // What I wonder about is your last big paragraph: to my knowledge, adoptable storage completely replaces internal, so all apps+data would go there. Are you really talking about adoptable storage, not App2SD as it sounds?
– Izzy♦Jan 5 '18 at 8:46

My question was "can I remove card". I mention nothing about apps because it doesn't matter. Even if didn't move apps, the worst thing that could happen it will be that I can't be able to run that app and that's it. No data will be lost. Why I'm using adopted storage? Because it's encrypted. This is second reason why someone should use adopted storage. Did you even check how adopted storage works? Did you check how looks mount points in enabled adopted storage phone? No, not all apps+data goes there. Only these where the developer adds an ability to move app+data to adopted storage.
– QkiZJan 5 '18 at 13:19

Look at source.android.com/devices/storage/adoptable "Apps can be placed on adopted storage media only when the developer has indicated support through the android:installLocation attribute." "Apps moved to adopted media are remembered while the media is ejected, and return when the media is reinserted." And I'm not talking about App2SD nor Link2SD.
– QkiZJan 5 '18 at 13:21

In App2SD only APK files are moved, data stays in /data partition. Link2SD is not an official way to move apps to SD.
– QkiZJan 5 '18 at 13:27

I won't discuss that here in the comments – but if apps don't matter, then why do you move them back before? Your question suggests you want to simply unmount and go; your answer says it doesn't work that simple (as does mine). And yes, I checked how adoptable storage works (when it came out with MM). I decided against using it for myself: Encryption is certainly good, but not if I'm not in control of the key (i.e. I cannot mount the card on a different machine in case my Android device dies). That's what I use the card for: to have a backup in such case. Saved my day more than once.
– Izzy♦Jan 5 '18 at 17:15