Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android move app to sd

Tags:

android

Actually I want to find that what kind of items that are involved when we move the app to sd card? I have tried to search, but all the answer point me to "how to move app to sd" but actually I just want to know what items been move to sd and what items are left. I can see that there is still some memory left (in internal memory) when I move the app to sd. I am just curious what are the things left ? Where actually the app move to (in which part of the sd card)?

like image 947
Sam YC Avatar asked Oct 24 '12 06:10

Sam YC


1 Answers

Good Question!

Let me explain you with an example package say "com.example.app"

Now, when a app is installed for the first time, a new folder will be created by the name

/data/com.example.app

Inside this will contain all the app private data.

Similary, the APK itself is contained in

/data/app/com.example.app-1.apk

Now, when we move application to external storage, the following happens.

  • It will not be moved to /mnt/sdcard/ partition
  • Android will create a new folder under /mnt/asec partiton called /mnt/asec/com.example.app. You can reach this path using any File Manager apps as it has rw permissions
  • It will create a copy of libs directory if any and move all the files, databases here.
  • It will also copy the APK from "/data/app/com.example.app-1.apk" to /mnt/asec/com.example.app/com.example.app-1.apk

In this way, /data partition space will be saved and can be reused for other apps. This is a good trick to use when phone gets low on /data storage to move apps to external storage.

like image 133
Royston Pinto Avatar answered Nov 10 '22 13:11

Royston Pinto