By NKoyee


2019-07-08 10:25:05 8 Comments

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.

1 comments

@Irfan Latif 2019-07-10 07:10:41

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).
And:

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.

PS:
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.

@NKoyee 2019-07-10 17:04:02

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 2019-07-10 17:07:52

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?

@Irfan Latif 2019-07-10 17:24:38

@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

Related Questions

Sponsored Content

0 Answered Questions

I can't integrate updates to system

1 Answered Questions

Stuck on moving to SDcard

0 Answered Questions

Play store apps cannot write to external SD Card in Android Oreo

0 Answered Questions

Move apps to the SD card and keep them there

  • 2018-03-07 19:49:02
  • mweiss
  • 108 View
  • 1 Score
  • 0 Answer
  • Tags:   app2sd

1 Answered Questions

1 Answered Questions

0 Answered Questions

Android 4.0.4 move apps to sd card

0 Answered Questions

Huawei Ascend P6, Moving maps to external sdcard

1 Answered Questions

[SOLVED] Android sdcard appears empty to Windows?

Sponsored Content