This question already has an answer here:

I'm using Redmi 5 Plus with global Oreo 8.1 ROM, rooted with Magisk. And I can't move my apps to external sdcard.

I tried with native method of Android. But the Redmi 5 Plus or MIUI doesn't seem to have the option to move the apps. So, I used Apps2SD app to do the work. It has the option to move with just native method. But it failed with new installs into ASEC containers no longer supported. I also tried other apps but the same error.

marked as duplicate by Firelord Jul 13 at 14:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • MIUI probably just not showing the buttons. you can do it from adb shell android.stackexchange.com/questions/213312 and then any new installed app should be installed there. if phone is rooted you can force the Migrate Button with am start -n com.android.settings/com.android.settings.deviceinfo.StorageWizardMigrateProgress (after following the above tutorial (hidden link)) – alecxs Jul 8 at 22:16
  • The device was rooted. Tried Apps2Sd app. The error said something "the asec folder is write restricted". I tried with other like link2sd too. Same result. – NKoyee Jul 9 at 7:39
  • @IrfanLatif I think the problem is not with any specific app but rather the android itself. But the surprising thing is that why there isn't much commotion about it? Android is really a mess. restricting write access to Ext card already was out of my understanding and now this! I am not sure what you mean by portable or adoptable but my sdcard is what everyone else is using and mounting. – NKoyee Jul 9 at 9:36
  • 1
    external MicroSD Card can be splitted in two partitions. one partition remain vfat while the other partition must formatted ext4. The ext4 partition can be treated as internal memory while the vfat partition is still useable as external. of course Link2SD can do more than just native App2SD, but it is the nearly same concept – alecxs Jul 9 at 11:01
  • 1
    i don't use any of this, neither encryption. i never used WhatsApp at all (which is main reason for 90% waste) and i am fine with 10 GB. My girlfriend has just one single bind mount of WhatsApp Media Folder at startup, so all other apps remain at (faster) internal memory while the big WhatsApp garbage is stored on MicroSD. Best stable solution :) – alecxs Jul 9 at 12:22

Up to Lollipop, native app2sd moved .apk files as encrypted .asec files (1) to .android_secure folder in /mnt/sdcard/ or /storage/sdcard[0|1]/. On every boot these encrypted files were decrypted and placed in a temporary filesystem mounted at /mnt/asec/ (2) by vold, to which the symlinks from app directories in /data/app/ and possibly from library directories in /data/data/ were pointing.

Starting with Marshmallow, the native method of moving apps to external SD card works only if SD card is formatted as Adoptable Storage (3, 4):

ASEC containers have been deprecated since MNC, which is when we introduced the "adoptable storage" feature. Adoptable storage is a much better user experience, since we move both the APK and private app data together as a single unit.

* MNC is Macadamia Nut Cookie; code name for Android Marshmallow (6.x).

new installs into ASEC containers are no longer supported; use adoptable storage instead.

Adoptable Storage is a Full Disk Encrypted SD card, completely managed by vold, not visible to user as external SD card. See here how it differs from traditional Portable Storage. You can format SD card as partially Adoptable and partially Portable too.

Like the pre-Marshmallow app2sd phenomenon (5), apps only with installLocation set to preferExternal or auto in app's manifest are moveable:

Apps can be placed on adopted storage media only when the developer has indicated support through the android:installLocation attribute.

If you want to overcome this obstacle, use a third party app like Apps2SD or Link2SD.

An even better approach is to move /data/media instead of apps. Create an extra partition on external SD card and on post-fs-data mount it to /data/media using an init.d script or Android's init service. Other bigger directories /data/app or /data/data can also be moved in the same way.

If you want to keep files encrypted on external SD card, this can be achieved through native methods dm-crypt (Android's FDE) for block device encryption, ecryptfs for stacked filesystem encryption, or third party solution like EncFS for stacked encryption. New native method of filesystem encryption fscrypt (Android's FBE) may also work, but I haven't tried.

  • The strange thing is that, this is a big issue and why there is no much talk about it in the online world? I hardly find any questions or discussions about it. And this is a thing that affects a large amount of users. Or is it only me who moves apps to sd? I did search before posting my question but found nothing, and did search this site too. But it seems exact same question had already been asked. – NKoyee Jul 10 at 17:04
  • But if moving to extsdcard wouldn't work unless formatted as adoptable, why the Galaxy Grand Prime+ on Marshmellow allows to move? And the sdcard is newly bought and who would format it to adoptable? – NKoyee Jul 10 at 17:07
  • @NKoyee you will find majority in favor of adoptable storage concept. Personally I never used it. And the issue has been discussed if we make some deeper search: android.stackexchange.com/q/138356/218526 – Irfan Latif Jul 10 at 17:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.