I'm trying to move with Lucky Patcher (also with app2sd and Samsung stock app) some apps from internal to external storage, but everytime with every apps movable I got this message:

java.lang.IllegalArgumentException: New installs into ASEC containers no longer supported

I have a Samsung Galaxy S7 with Android 8.0 and root.

Do you now why this happens? Maybe, Android 8.0 doesn't allow anymore this?

1 Answer 1


Native app2sd method - which placed encrypted .asec files in .android_secure folder on external SD card - was available only up to Android 5. For details see Why root cannot access “.android_secure” directory on external SD card?

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

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 (3), 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.

For apps with install location auto, default install location (set using pm set-install-location) decides where app will be installed. See this answer for details.

If you want to move all apps, use a third party solution 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. See details in this answer.


  • Can you explain the ps part. I don’t have adoptable storage on Rooted android 5. Sdcard has a f2fs partition which is same as /data. Can I make symlink a folder to sdcard partition to /data ? It will be removed after reboot…so can I make it persistent from init script ? Commented Aug 6, 2023 at 14:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .