/mnt/asec directory contain in Android? Can someone explain in brief?
Thought Google would have an official definition on Android Developers, but surprisingly not. So with a lil bit of Google I dug up this:
Look around P80 for related content. From what I understand, ASEC (Android Secure External Cache) was implemented in a time when Android devices come with limited storage and has to resort to external storage (i.e. SD card) for apps, and its purpose is to securely store part of the apps so as to prevent corruption and piracy by copying SD card contents.
Wikipedia also has a bit of intro here.
It's actually used to achieve "Move to SD card" feature.
Take a sample app called
When an app is installed, a new folder will be created by the app name
/data/com.sample.app which contains the app's private data. Similarly, the APK itself is contained in
When we move the application to external storage,
- It will not be moved to
/mnt/sdcard/partition. Android will create a new folder under
- It will also copy the APK from
On one hand, when I browse my rooted android through adb shell, I get here:
ls -al gives :
drwxrwx--x u0_a25 u0_a25 2018-10-28 23:52 cache drwxrwx--x u0_a25 u0_a25 2018-10-29 00:36 files lrwxrwxrwx install install 2018-10-29 09:48 lib -> /mnt/asec/com.sample.app-1/lib drwxrwx--x u0_a25 u0_a25 2018-10-29 07:45 shared_prefs
On the other hand, through USB connection, I get two mount points:
mtp:/Y330-U01/Phone storage/ mtp:/Y330-U01/SD card/
The following directory
mtp:/Y330-U01/Carte SD/.android_secure/ looks empty. Is it actually empty ?
When plugging directly the SD Card on the PC (via USB micro SD adapter) the directory
.android_secure/ appears to contain:
So in my opinion
/mnt/asec is a mount point for
/mnt/asec/com.sample.app-1/ mount points, leading to
.android_secure/*.asec secure disk image files (or kind of...)