What is /data/app and why is app file there? - General Questions and Answers

I have some app in /data/app folder and only there? Some apps are simply not there. Why is this? Can I move the /data/app folder? I want to free some disk space.

Phpdna said:
I have some app in /data/app folder and only there? Some apps are simply not there. Why is this? Can I move the /data/app folder? I want to free some disk space.
Click to expand...
Click to collapse
Some apks are in /data/app and some are in /system/app.
Remove the ones that are unecessary to free up disk space and remove the respective dex file the dalvik-cache for the app.
Edit: Be careful to not remove required applications packages as you might cause instability or boot-loops among other issues. (A.K.A I'm not responsible for any of your problems)
No, you cannot move the folder.
However you could try https://play.google.com/store/apps/details?id=com.buak.Link2SD or My favorite: https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd

O.k. I know that I also tried mount2sd but it left my mobile unusuable. It doesn't explain why there is this /data/app folder. Some apks isn't there. For example downloaded apks sometimes install in /data/app and sometimes not. Can I move the apks from /data/app to system/app? Can it work? Is it possible it has to do with the search path? When I add /data/app to the search path can it work?

Phpdna said:
O.k. I know that I also tried mount2sd but it left my mobile unusuable. It doesn't explain why there is this /data/app folder. Some apks isn't there. For example downloaded apks sometimes install in /data/app and sometimes not. Can I move the apks from /data/app to system/app? Can it work? Is it possible it has to do with the search path? When I add /data/app to the search path can it work?
Click to expand...
Click to collapse
Depending on your phone its partitioning might allow you to free space on your data partition by copying apps from data to system (depending on if they have separate partitions in your phones memory). One drawback is that you will be unable to remove the apps using normal app management. It also might be the case that updates are not installed for those 'system' apps or the updates are installed in the data folder again. For samsung the /system/ partition is mounted read only so for those i'm quite positive that updates will not be placed in the system partition.
The 'easiest' solution to your storageproblem is using some kind of link2sd or mount2sd (the latter including a separate partition on your SD). Be careful choosing the right script because many are old and outdated and might fail. Also you will be unable to switch sd-cards because you cannot easily unmount the app partition and if you remove the sd without unmounting it you have a big risk of damaging the filesystem (been there done that :crying
My best experience back when i had to use a mount2sd script was with this app: https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
In the app description you find a quite clear list of requirements for your phone to use the app effective.
P.S. for the mount2sd app it is my recommendation to move it to /system/app because if it is in /data/app and your data is moved to your SD and for some reason the startup (init.d) script fails you will be unable to use Mount2SD because it was not loaded from sd. Moving it to system/app ensures you that it is available even if the startup script failed.

Qaatloz said:
Depending on your phone its partitioning might allow you to free space on your data partition by copying apps from data to system (depending on if they have separate partitions in your phones memory). One drawback is that you will be unable to remove the apps using normal app management. It also might be the case that updates are not installed for those 'system' apps or the updates are installed in the data folder again. For samsung the /system/ partition is mounted read only so for those i'm quite positive that updates will not be placed in the system partition.
The 'easiest' solution to your storageproblem is using some kind of link2sd or mount2sd (the latter including a separate partition on your SD). Be careful choosing the right script because many are old and outdated and might fail. Also you will be unable to switch sd-cards because you cannot easily unmount the app partition and if you remove the sd without unmounting it you have a big risk of damaging the filesystem (been there done that :crying
My best experience back when i had to use a mount2sd script was with this app: https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
In the app description you find a quite clear list of requirements for your phone to use the app effective.
P.S. for the mount2sd app it is my recommendation to move it to /system/app because if it is in /data/app and your data is moved to your SD and for some reason the startup (init.d) script fails you will be unable to use Mount2SD because it was not loaded from sd. Moving it to system/app ensures you that it is available even if the startup script failed.
Click to expand...
Click to collapse
I'm not going to try the app from spazdog again it left my mobile unusable and the uninstall was not easy. So,the apk can moved to system/app? Good to know, I find a solution to my problem because I moved the apk's to my sdcard. BTW. the problem was that moved apks are not in /data/app!!! Only the other apk's are in /data/app.... I wonder if I'm the only one? My next question is why is some apk's not moveable? It could help a lot of people to free disk space but some apks can't be move (with normal effort). Thanks for reading.

Related

Moving apps back to internal memory

I haven't yet found an answer on how to move apps back to internal memory after applying MoDaCo's ROM. Does anyone have the answer?
Can you not adb pull the app off of the sdcard and the adb push them to /system/app?
ekinnee said:
Can you not adb pull the app off of the sdcard and the adb push them to /system/app?
Click to expand...
Click to collapse
format your memory card to fat32 and then do a "factory reset"
ap2sd doesn't support fat32 and it will just place your apps "where they should be" trying to reverse ap2sd would be a big pain in the ass
*note this will wipe your phone*
But why /system/app?
The /system partition only shows 12 MB free for me. The /data partition is where apps normally are, right? My /data partition shows 91 MB free when I df -h, and my phone reports that it has 91 MB of free internal memory. So they should go on the /data partition, right?
I am new to the site and I dont know how to create a new post so I am going to address my issue here. the other day I downloaded a Iphone theme for my touch pro (Raphael) and now I cannot figure out how to restore it bak to the factory settings. I have done numerous hard resets and nothing has worked!!! HELP ME PLEASE!
At least put it in the right forum. This is the Hero forum.
jonnythan said:
But why /system/app?
The /system partition only shows 12 MB free for me. The /data partition is where apps normally are, right? My /data partition shows 91 MB free when I df -h, and my phone reports that it has 91 MB of free internal memory. So they should go on the /data partition, right?
Click to expand...
Click to collapse
are you talking about stock apps or market apps.... they are located in 2 different areas
/system/app -stock
/data/app -market
OR if you wanna get fancy /system/sd/app -market apps with ap2sd installed
I am talking about market apps. I want to move, for example, EasyMoney back to internal memory. There appears to be no way to do it though.
you must be pretty serious about moving them....alright well don't say I didn't warn you about it being a PITA
Code:
mv /system/sd/app/{name of your app} /data/local
*reboot phone with sd card removed*
*hope phone doesn't lock up on you*
Code:
mv /data/local/{name of your app} /data/app
*reboot into recovery and format sd card to fat32 only*
/data/app is a symlink to /system/sd/app.
If I move something to /data/app it goes into /system/sd/app. Which is right where it started.
I'm not sure I'm being understood here. We have apps2sd, which is great. I have a 500 MB partition for my apps. But now I've got 100 MB of internal memory on the phone that I can't use for apps.
I'd like to use some of that for my most frequently used apps.
jonnythan said:
/data/app is a symlink to /system/sd/app.
If I move something to /data/app it goes into /system/sd/app. Which is right where it started.
I'm not sure I'm being understood here. We have apps2sd, which is great. I have a 500 MB partition for my apps. But now I've got 100 MB of internal memory on the phone that I can't use for apps.
I'd like to use some of that for my most frequently used apps.
Click to expand...
Click to collapse
what I was suggesting was moving it from the link on the sd card to local storage, breaking the link, then moving it to where the link originally pointed before ap2sd. Then finally making it so the link will not be recreated.
I understand what you are saying now, but I don't know how you set that variable.... or if it that can even be done. If so, it can't be done easily.
what you're asking is like makeing a raid setup with your nand and your sd card... that's well beyond what I'm capable of doing.
I've moved several stock apps back and forth between /system/sd/app and /system/app without any problems. Reboot after move is a good idea though.
For market apps there might be an issue when upgrading if they are in the /system/app directory, but I haven't tested that.
flactemnad said:
I've moved several stock apps back and forth between /system/sd/app and /system/app without any problems. Reboot after move is a good idea though.
For market apps there might be an issue when upgrading if they are in the /system/app directory, but I haven't tested that.
Click to expand...
Click to collapse
there will be a problem, android market will not mount /system/app when it goes to update an app from the market. I tried this by accident by copying a a stock app and installing it over it's self (was testing a way to easily remove a stock app) locked the phone up.
There is probally no HUGE advantage in having the stock apps on the sd card as most of them (the ones accessed frequently... widgets etc) would be accessed from the much slower sd card as apposed to the much faster NAND.
The reboot is almost required if the app is running, if you do manage to move the file that's not in the middle of a read you'll get the dreaded com.android.core popup (infinately repeated unable to work around) So it's highly suggested that the app is not running in the backround, or widget on the desktop.
I also highly reccomend the restart when attempting to move apps from your /data/app or /system/sd/app note /system/sd/app is mounted... but not to be confused with any other part of /system
by mistake i deleted the visual voicemail app that comes with the phone and i was wondering if somebody could help me putting it back into the phone, i have the .apk file on my computer already
johnsongrantr said:
there will be a problem, android market will not mount /system/app when it goes to update an app from the market. I tried this by accident by copying a a stock app and installing it over it's self (was testing a way to easily remove a stock app) locked the phone up.
...
Click to expand...
Click to collapse
Thanks for the heads up. I don't have any market apps installed under /system/app, but I do have some stock apps on the sd that I can easily move back to straighten things out to a more proper setup.
aim1126 said:
by mistake i deleted the visual voicemail app that comes with the phone and i was wondering if somebody could help me putting it back into the phone, i have the .apk file on my computer already
Click to expand...
Click to collapse
nvm found an app on the market called apk installer, worked perfectly

Can't Uninstall Some Apps on Rooted MyTouch

I'm running CyanogenMod 4.2.4 and everything was fine. Then i reformatted my SD card (to root another phone) and now the apps i installed from the Market are missing. When I try to uninstall them, they don't exist. But if i try to download again from Market, it says they are laready installed, but still won't give me the option to uninstall.
Any way to remove these manually somehow with Terminal Emulator?
Yes, but one important question. Did you completely reformat, or did you just format the FAT32 partition?
If your ext partition is still there:
If you are using apps2sd method, then your apps are in /system/sd/app and /system/sd/app-private.
Browse these 2 folders and do "rm your-desired-app.apk" and any .odex files associated with them.
If you don't have anything on the ext partition:
Clear the market cache.
Check /data/app and /data/app-private for those apps. Also /data/data.
I don't understand though, when you are installing an app that "already exists" the system normally asks you to replace it...
Try this, let me know what happened.

How to get more internal space on galaxy fit

firstly I'm not responsible for any kind of damage caused to you
but I have tried all the things on my galaxy fit before explaining here
It's not copied from somewhere instead It's based on my experience on my galaxy fit.
For Non Rooted Devices
There is nothing other then using app2sd apps. Then move all the movable items to sd card. After installing app2sd all newly installed apps are automatically moved to external storege.
I uses app2sd by sam lu.
But for non rooted users I will highly recommend to root there device and make the best use of this smartphone.
for beginners everything about rooting/custom roms/nandroid backups etc is explained in this thread
http://forum.xda-developers.com/showthread.php?t=1606380
thanks a lot to A.cid for this wonderful guide
For Rooted Device
apps required
1.Root explorer or similiar
2.Link2SD (Link2sd Setup is explained later in this post)
step 1.Removing Useless system apps from stock or custom rom
go to /system/app using root explorer and mount as r/w
now delete unwanted apps
I will prefer freezing the app first using link2sd and then if phone is working fine then you can unfreeze and then delete that app
Step 2. Removing dalvik cache files
go to /data/dalvik-cache
now search for the dalvik cache files of deleted system apps
it will having name like
[email protected]@[email protected]
delete this file
Step 3. Linking files to Sd-ext or second partition of Sd card
if you have finished Link2sd setup then you can proceed further
open link2sd and then create Link for all the apps you want to linked to sd card
check all the 3 box 1. link apk 2. link dex 3. link lib files
and then your app will be moved to the sd-ext partition
if there are apps which are used very frequently then i prefer not linking dex files to sd card. link only apk for them.
currently system apps can't be linked using link2sd
In the case if app is not working properly after linking then remove links for that app.
Plz help me to improve this article.
suggestions and questions are welcomed.
forgive me for my poor english
Plz help in improving this article. If there is anything wrong in this post let me know. and if you have any other simple method to do this plz post here and help beginners to get more space. But try not to post complicated method which beginners find hard to perform
this post is for beginners
Link2SD steup on galaxy fit
Copied from A.cid main article from
http://forum.xda-developers.com/showthread.php?t=1606380
There are a lot of ways and scripts to transfer apps from your internal memory to the sd ext partition, but the most consistent method I found was Link2sd.
This method works across all roms (rooted stock and custom, both) that I’ve tried, even on all variations of CyanogenMod7 (CM7) as well as on ICS CM9, and is very easy to setup and use.
However, if a custom rom already has DarkTremor's a2sd (a2sdgui app will be present) or any similar script, then DO NOT configure them.
for example: Creeds v3 has a2sdgui, and if i want to use Link2sd, then after flashing Creeds, i SHOULD NOT run a2sdgui, and directly install (and configure) Link2sd...if you run/configure a2sdgui, then it will clash with the working of Link2sd.
Similarly, if any custom rom has any memory hack already implemented, then you cannot use Link2sd...
Steps to setup Link2sd:
• Download Link2sd from Play Store (it’s a free app).
• After it gets installed, run it, and allow root access.
• You will get a message to select the format of your sd partition, select “ext3”.
• Link2sd will then automatically create mount scripts that it requires to work, and will then tell you to reboot your phone.
• Do a proper reboot, and not a ‘hot reboot’.
• After rebooting, open up Link2sd, press menu then select “settings”.
• Select/check the options “automatically link newly installed applications to sd”, “auto link notification”, “relink lib files at boot” (and “fast scroll”, if you want).
• For “install location” option, select “internal”.
• Then go to “auto link settings” and select/check all the three options (you can skip/ unselect “link dalvik-cache file” if you wish)
• Done
Now, every new app that you will install will automatically be moved to your sd ext partition.
Link2sd is also an excellent (and fast loading) app manager, with which you can freeze, uninstall, re-install…though you can move only user apps to sd-ext partition.
Also, there is no point in having your entire phone memory empty, so you probably should unlink the dex (dalvik cache) of your apps. I usually link only the apk and lib files, and leave the dex files unlinked and on the phone storage, so as to avoid any sluggishness in operation., though if your phone memory still fills up, you can link the dex of your rarely-used apps, and leave the dex of important and frequently used apps on the phone storage.
Suppose a custom rom has s2e/app2sd pre-implemented, then after a fresh install, FREEZE the app (rather than uninstall), and then install Link2sd...
Also, if you get error "mount script not created", then choose partition as ext4 (rather than ext3 mentioned below), even though your partition might be ext3...(don't know why this happens with some roms )
In some custom Roms Link2sd doesn't mount sd-ext partition even after selecting correct type of partition in that case try to select other types whether they are working or not
Like in Chocobread v3.2 it worked after selecting partition as ext4
Plz view this thread if you are still facing any problem
Go through this thread
http://forum.xda-developers.com/showthread.php?t=1698813
What happens when we install a new app??
I'm not a developer but this is what I experienced
/data directory is the space which is shown as Internal Storage in phone
/system directory has nothing to do with this internal storage
when we install a new app then it during the installation process three things happens
1.it creates an apk file in /data/app
2.creates an .dex file in /data/dalvik-cache
3.creates one folder in /data/data
when we move apps to sd that apk file moved to sd storage in
.android secure folder and creates an .asec file there
so basically that .dex file and data files are responsible for eating our internal space and for the apps which can't be moved to sd that apk file is also responsible.
we can't use widgets if app is on sd storage.
so in order to use widgets we have to move back to internal storage.
this is where Link2sd helps us
link2sd links selected files to sd-ext partition and for system it still appears in internal storage but it's not there actually.
While for system apps
.apk files remains in /system/app
only .dex files are in data/data directory
we can use widgets of system apps even apk files are not in /data/app directory
so it is recommended that if you want to use widget of the app but you don't want it on internal space(as it is using much more space while it is in internal memory)
here is the solution
create an apk file for that app using any backup app
then move that file to /system/app
change the permissions to rw-r--r--
for this simply see the permissions of any other system app and apply same here
to system
Simply partition your sd card via cwm.. U can get as much internal space as u want..
amn_grg said:
Simply partition your sd card via cwm.. U can get as much internal space as u want..
Click to expand...
Click to collapse
Let consider your post now tell me how to install 100 apps having size more than 500 mb
Without using link2sd or a2sd or any simliar app
Sent from my GT-S5670 using xda premium
Nikhil_G said:
Let consider your post now tell me how to install 100 apps having size more than 500 mb
Without using link2sd or a2sd or any simliar app
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
By symlinking apps manually, one by one...:beer:
Possible - yes
Feasible - no
Everything is possible bro!
Typed using a small touchscreen
a.cid said:
By symlinking apps manually, one by one...:beer:
Possible - yes
Feasible - no
Everything is possible bro!
Typed using a small touchscreen
Click to expand...
Click to collapse
Yeah right...
Informative Thread
amn_grg said:
Simply partition your sd card via cwm.. U can get as much internal space as u want..
Click to expand...
Click to collapse
can you detail the procedure please.
vikrant prabhakar said:
can you detail the procedure please.
Click to expand...
Click to collapse
partition ur sd card through cm recovery then install s2e from play store now all cm7 rom come with pre install s2e script .
Another way is to use terminal emulator .
Download terminal emulator from the PlayStore and then run the following codes:
Code:
su
*grant/allow superuser permissions*
Code:
pm set-Install-Location 2
exit
exit
Note: sometimes if you get an error you may have to run
Code:
pm setInstallLocation 2
if it fails.
All this does is it allows moving many apps that aren't normally movable to the SD card. After running these codes you should be able to move apps to the SD card via Settings>Apps.
This code also sets the default location for apps to install into as the SD card.
What i do for more internal memory..!
Partitioning your sd card is an option. But if you have a sd card of less storage then this option is ruled out. I use a 2gb sd card and partitioning it is not very feasible for me. so...
1. If I'm on a stock gingerbread ROM i use this script http://forum.xda-developers.com/showthread.php?t=2303856 .
(I dont use it very often. Only if necessary.) And i odex the ROM if it is de-odexed by using http://forum.xda-developers.com/showthread.php?t=2303856 Universal Odex Script by MatrixDJ96. Odexing works very well!!! :good:
2. For a custom ROM not many modifications are needed. I just remove the unwanted apps using Link2SD. :good:

Put system apps on internal app partition

Hi !
I've made a search but I've found nothing about that. Maybe I don't use the good term...
I'm currently trying to build a ROM for a tablet device (kyros mid 8127) but this model have a really limited system partition of 180mb. It's really small considering porting serious ROM or even just install gapps in system apps...
On the other hand, the app storage partition is far enough for me with its 700mb approximatly.
First, I though to change the mtd partitions. But this is to scary for me as there is no pre-made solution for this model and I don't want to brick my device ^^
So, I'm wondering if it's possible to store system apps on app partition instead of system partition ?
Don't know if this is really possible, but do you guys think I could extract the /system/app folder somewhere on internal app storage partition during ROM installation and symlink the /system/app folder to this place ?
data/app
Swyped on my blade
Yes, data/app is a solution for secondary apps. But I need to move all system apps to free space for framework etc... I've read that all system app can't be moved to data/app cause they'll not work properly from there.
So I'm wondering if we can trick the system just by symlinking system/app to an other location.

Link2SD Issues

Hello,
With the limited space on Optimus One I decided to try out Link2SD app. I was able to partition my SD card and Link2SD created the script. After reboot I tried linking some of my apps to SD (EasyMoney, Solid Explorer Beta2, Swype Installer and Swype). The first app (Solid Explorer) linked the app file, and delvic cache fine. Every app after that game me error: "Failure. mkdir failed for /data/sdext2/dalvic-cache, File Exists". Also, when I filter it to show only the linked apps even the first app isn't listed.
If I move only the app file it is successful, but every app force closes. Rebooting the phone simply forgets that I even had the applications installed (even after quick reboot). Finally removing the link does absolutely nothing. My guess is that the app never properly linked apps in the first place resulting in the app going into a 'limbo'. Now I have used some space in my SD partition and can't use the app or reclaim the space.
I am new to all this, but am researching what my fault is. Can someone point to what am I doing wrong? How do I get link2SD to simply move my apps to the partition to free up my internal space.
In a nutshell:
1. First app successfully moved, but link2SD still shows no apps are listed. Subsequent apps cannot be moved since dalvic-cache folder (or file) already exists).
2.. Moving only the app data results in FC. Rebooting results apps disappearing with no way to reclaim the used space.
How did you partition your SD card, and how is it formatted? Any other partitions on the card?
The SD card currently has two FAT32 partitions, both set as primary. Partitioned is using Minitool Partition Wizard.
Typically, the 2nd partition is formatted as ext2/3/4. If for some reason you need both partitions to be FAT, there's a setting in link2sd where you can specify that the 2nd partition is FAT. This is important because link2sd makes a script which is run when you boot up your phone, which mounts the partitions appropriately.
sorry if Out Of topic.
but anyone can tell me.
how to use link2sd.,.?
btw i'am using PARANOIDROID custom rom now.
SaveeOztra said:
sorry if Out Of topic.
but anyone can tell me.
how to use link2sd.,.?
btw i'am using PARANOIDROID custom rom now.
Click to expand...
Click to collapse
If you have second partition on SD the Link2SD moves apps to sd-ext.
When starting the first time, make sure to select the correct filesystem. CWM makes ext4 I think..
If you are already by that with incorrect partition, go Options=>More=>Recreate mount scripts.
I recommend to activate Auto Link in settings to have no need to worry about apps being linked.
I think that's all what you need, if you are basic. I have done that too.

Categories

Resources