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).
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 (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
.
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. See details in this answer.
RELATED: