Related
I have been wondering if it is possible to modify where programs store their external data on the SD card, but have not been able to find an answer yet.
Example...
I have the program "FolderOrganizer" and it stores it's backup data to /mnt/sdcard/FolderOrganizer. Now what I would like to do is to clean up my SD card a bit by moving all my program saves to the /mnt/sdcard/Android/xxxxx folders. This way I know where all my backups, skins and etc are located at while keeping my file structure clean.
I have been using Root Explorer to poke around and see if I can find any indication of where these programs set their external save directories at (xml files etc), but I have not been able to figure it out yet.
I bet it is something easy that I am just missing. Can anyone help out or point me in the right direction?
djstaid said:
I have been wondering if it is possible to modify where programs store their external data on the SD card, but have not been able to find an answer yet.
Example...
I have the program "FolderOrganizer" and it stores it's backup data to /mnt/sdcard/FolderOrganizer. Now what I would like to do is to clean up my SD card a bit by moving all my program saves to the /mnt/sdcard/Android/xxxxx folders. This way I know where all my backups, skins and etc are located at while keeping my file structure clean.
I have been using Root Explorer to poke around and see if I can find any indication of where these programs set their external save directories at (xml files etc), but I have not been able to figure it out yet.
I bet it is something easy that I am just missing. Can anyone help out or point me in the right direction?
Click to expand...
Click to collapse
No... it's not something you're just missing... there is no standard and as a result it's almost impossible to achieve what you're aiming for. I too wish for the same, everything simply under <sdcard>/android/ ...
Some apps are hard coded in their code, some allow the user to select, some store in /data/data/xxx/shared_prefs/ - it's a lottery.
djmcnz said:
No... it's not something you're just missing... there is no standard and as a result it's almost impossible to achieve what you're aiming for. I too wish for the same, everything simply under <sdcard>/android/ ...
Some apps are hard coded in their code, some allow the user to select, some store in /data/data/xxx/shared_prefs/ - it's a lottery.
Click to expand...
Click to collapse
Thanks for the response. That is a bummer though, I was really hoping to be able to tell everything where to write to. I currently have a ext4 partition on my SD and that is where all my apps install to... if I can't tell the apps where to save on my SD partition, it would be nice to at least move it all to the ext4 partition.
There is crap all over on my SD card and my OCD is starting to kick in!
Yeah, I know the SD card can get messy... it's really stupid and annoying... Unfortunately, there is no SD card data saving guidelines for developers... and writing to an ext partition is completely out of scope for market apps because not all users have ext partitions... it would be nice, though, to have apps save data under one common folder... say /sdcard/data or /sdcard/Android... maybe we need to petition developers or Google!!
I agree with the saving to and ext partition. I just think it is silly that you can't at least specify a directory to save external data. I know some apps allow this, but I guess that if Google forced a change then everyone would have to change their code.
I wonder what would happen if you took out your SD and tried running those apps. Where would they write to then?
djstaid said:
I agree with the saving to and ext partition. I just think it is silly that you can't at least specify a directory to save external data. I know some apps allow this, but I guess that if Google forced a change then everyone would have to change their code.
I wonder what would happen if you took out your SD and tried running those apps. Where would they write to then?
Click to expand...
Click to collapse
Apps that require the sdcard for storage will usually either give an error when run without an sdcard or just not work at all.
I am also pretty anal about my storage and neatness, and I have given up on my sdcard being organized. What I have done is create folders with capital first letters to bring them to the top of the listing when browsing by default sort, at least I can find what I want easily without sifting through all the data folders..
That is pretty much what I have done. I guess it it better than nothing. If I knew more about programming I would try and build something to look for and modify those paths. I just never really understood/got into the whole programming thing... that is why I ended up in Infrastructure. lol
djstaid said:
That is pretty much what I have done. I guess it it better than nothing. If I knew more about programming I would try and build something to look for and modify those paths. I just never really understood/got into the whole programming thing... that is why I ended up in Infrastructure. lol
Click to expand...
Click to collapse
I'm with you there, long time (20+ years) building and repairing pcs, 0- years programming.
As far as building something to modify the paths used by programs accessing the sdcard in Android, that seems a nearly impossible feat. Each program would have to be modified, requiring reverse-coding (baksmali) each one individually, modifying the code, and recompiling (smali). This would also require re-signing and reinstalling each application, making updating from the market impossible, and would take a lot of work.
Due to the fact that applications are "sandboxed" (so to speak) in Android, I wouldn't think there was a global %externaldata% path variable that can be modified from /mnt/sdcard to /mnt/sdcard/Android, I am pretty sure that path is set in each application.
Though, I could be wrong. However, it is worth noting that if it is a global variable, changing it would result in applications that are already properly coded to use /mnt/sdcard/Android/%appname% or /mnt/sdcard/data%appname% to instead attempt to write the data to /mnt/sdcard/Android/mnt/sdcard/Android/%appname% as they would append their string to the global variable.
I believe, all we can do is petition developers to use a more structured data path in their programs, and learn to live with disorder!
daveid said:
I believe, all we can do is petition developers to use a more structured data path in their programs, and learn to live with disorder!
Click to expand...
Click to collapse
lmao!
this is true though... at least I know that I am not alone. haha
I am definitely with you all on this. I found this post after having the same epiphany just now. There needs to be more structure to the use of external storage. These little things are what set our OS apart from say, the "forbidden" iphone...
I have actually tried digging into different apps to see where the store locations are set at and have had no luck. I guess if I knew how to program or at least modify that one part of the app I would have more luck.
Problem with that is if I modify something in an app and it gets updated, I would have to do it all over again. I guess that is the gift and curse of having such an open OS. I will post back here if I figure something out though. I have been digging into the Android OS a little more, but I am still having problems understanding how it all works underneath.
Dear all,
first of all I wish to thank everyone in XDA that with his contribution helps us to make our devices blazing fast and really snappy.
Since I installed JPY firmware and I backed up every application I had the warning "Database almost full, please delete messages, contacts etc..." and in fact I have only 20Mb free.
I saw that Samsung to perform this big improvement in the software moved some application data in dbdata partition that is formatted to have only 128Mb!!
The problem is that at moment the maximum number of installable applications is limited due to dbdata space and this could be a big problem.
In other posts I read that other people had my same problem but no possible solution to fix it has been find out.
Is there any chance to fix this limitation?
Thank you for your awesome support
paky79 said:
Dear all,
first of all I wish to thank everyone in XDA that with his contribution helps us to make our devices blazing fast and really snappy.
Since I installed JPY firmware and I backed up every application I had the warning "Database almost full, please delete messages, contacts etc..." and in fact I have only 20Mb free.
I saw that Samsung to perform this big improvement in the software moved some application data in dbdata partition that is formatted to have only 128Mb!!
The problem is that at moment the maximum number of installable applications is limited due to dbdata space and this could be a big problem.
In other posts I read that other people had my same problem but no possible solution to fix it has been find out.
Is there any chance to fix this limitation?
Thank you for your awesome support
Click to expand...
Click to collapse
yes, it can be fixed by:
1/. remove/relocate the files under /dbdata
2/. disable the disk full warning (it will show u the prompt if the free space is under a certain percentage)
I still have over 90 MB left. Just how many apps do you have? 100+?
I have ca 80 applications.
Is it safe to move the app data from dbdata? If yes, where do I move the data?
80 applications!?! you a collector?
Any solutions
I've had the problem also till recently when I installed Darky's 9.0 and did a wipe for the sake of cleanness.
I am sure I'm going to encounter it again and I would gladly take some measures now when i have the time to do it before I am constrained by it.
At a rough search I did find some info about it, some even here on XDA, but nobody had a definitive solution.
Is there a way to increase this partition size or keep some info stored there in another place ?
Is there an app that will tend to put big chunks of data there, more than usual?
Hope somebody with better kung fu than us drops by and enlightens us
Every Smartphone has limited space. Every Computer has limited space.
Everything has limited space.
It's a smartphone, not a huge trash container where you can put everything you find at market into.
Only install apps which you are using often and not apps which you're using once a year.
segun_aduba said:
I've had the problem also till recently when I installed Darky's 9.0 and did a wipe for the sake of cleanness.
I am sure I'm going to encounter it again and I would gladly take some measures now when i have the time to do it before I am constrained by it.
At a rough search I did find some info about it, some even here on XDA, but nobody had a definitive solution.
Is there a way to increase this partition size or keep some info stored there in another place ?
Is there an app that will tend to put big chunks of data there, more than usual?
Hope somebody with better kung fu than us drops by and enlightens us
Click to expand...
Click to collapse
There was a discussion in the cache bug thread about increasing partition size. No one knows for sure because none of these problems popped up until quite recently. Cache is even more troublesome since it means we might not be able to download apps in the future.
But your usage is still unusual. I would suggest going through the app manager and see if any app is hogging up data.
Sent from my GT-I9000 using XDA App
I also have this problem, using right now 45mb of 96mb, that is with only 44 downloaded apps installed...
Sent from my GT-I9000 using XDA App
I have 109 apps installed and have 105mb free in dbdata, go figure.
peachpuff said:
I have 109 apps installed and have 105mb free in dbdata, go figure.
Click to expand...
Click to collapse
Do you have lagfix activated? Are you on 2.2.1 version?
I may be talking rubbish here, but shouldn't it be possible to move some of the folders to another partition and symlink them? This is Linux after all...
I'd try something like:
(THIS HAS NOT BEEN TESTED AND IT MIGHT BREAK SOMETHING)
- Move some of the biggest folders from /dbdata to another partition (if you're lagfixed and care about speed, you should move them to another partition with ext4 or whatever your lagfix uses). In a terminal emulator you could move them with:
mkdir /data/dbdata2; mv /dbdata/databases/com.whatever /data/dbdata2
- After moving them you should be able to symlink them with something like:
ln /data/dbdata2/com.whatever /dbdata/databases/com.whatever
Like I said, this isn't tested and might awfully break something (I'd do a backup and try with non-system programs first), but I'd guess it's worth a try if you really want to have more dbdata space.
EDIT: I just noticed that /system has limited space too, so you'd be better of moving them do /data, which seems to be the biggest partition on the SGS.
If anyone is interested I could try and create a shell script that would move all of the stuff from /dbdata to /data/dbdata and replace the stuff with symlinks automatically. Let me know...
MOD EDIT: links removed
UNDELETE - RECOVER YOUR FILES ON THE GO
Undelete for Android is an application for root users that allows you to recover any type of deleted file from your SD card or internal storage. With support for over 1000 file types, Undelete can come in handy if you accidentally delete photos or want some old tunes to listen to. Undelete can also securely wipe and shred files so that they will be impossible for others to recover.
WARNING: DATA RECOVERY IS NOT GUARANTEED. Sometimes even recently deleted files can be corrupted beyond repair as the operating system writes new files to memory.
Features:
- Restore any file that has not been written over
- Securely wipe/shred files
- Thumbnail generation
- Works with images, video, music, archives and binaries
- Batch operations
- Preview media files
Currently, only FAT is supported. On Tegra devices, only the external SD is supported. EXT 4 will probably never be supported - use a desktop tool (if you can find one).
Some files that are discovered after a scan may fail to recover as data may be corrupted beyond repair, just like desktop based solutions.
INTERNET and READ DATA permissions are needed for the logging system. Logs are only sent manually with your permission through the "Write to us" dialog.
Market link:
Screens:
Bump bump
So any issues with the Release Candidate?
Yeah thats great. And when youre traveling i suppose youll need it a computer and lots of cables...
Also, its bad form to advertise other tools in a paid software thread. Not a great start to your XDA membership.
ftgg99 said:
So any issues with the Release Candidate?
Click to expand...
Click to collapse
no issues on my DInc2. for the few times i've had to use it, it worked as intended. i've restored about six pictures and an mp3 with no troubles. even found pictures and music i had deleted long ago, and restored them for kicks.
one question though, should Undelete reside on the phone, or is it okay to move it to the SD as well? i've never tried to move it to the SD because i assumed it would cause issues. Undelete is quite small so having it on the phone really isn't an issue, but i like to keep as many apps on the SD as possible.
thanks for the great app. my fat fingers thank you too.
There should be no issues. If you do have some, let me know!
And of course, please leave a review on the market, that can help a lot, considering how many crumby reviews this app gets...
Thanks!
That sounds like something worth checking out
Please do! Let me know if you have any issues!
Any issues to report?
Is there an app that will ensure proper deletion so that apps like this don't work?
tejrl said:
Is there an app that will ensure proper deletion so that apps like this don't work?
Click to expand...
Click to collapse
This app will do it! Did i forget to leave that out of the description? You have to long press an item an choose "wipe".
You can also wipe in batch mode.
App is on saly - $2 dollars for to coincide with the upcoming release of 1.5!
We have almost completed work on Undelete 2.0 - it will be released tomorrow!
Looking forward to it! I saw the beta on the other site, but it was locked
Its coming in an hour or so!
Working perfectly THANK YOU!
Thank you! Enjoy!
Is there a hidden place where I can get this?
Sent from my Galaxy Nexus using xda premium
0mie said:
Is there a hidden place where I can get this?
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Silly me i forgot to post the link. Done.
Anything to report?
Sent from my GT-P7500 using xda premium
what is scope about fsync in zeus tweaker ?
plz help
It has 10x zoom and red dot on the center. Has night vision and wind speed & direction calculation. It fits on most military spec long barreled rifles.
Sent from my LG-P970 using xda app-developers app
I_SBerg said:
It has 10x zoom and red dot on the center. Has night vision and wind speed & direction calculation. It fits on most military spec long barreled rifles.
Sent from my LG-P970 using xda app-developers app
Click to expand...
Click to collapse
SalmanSH1 said:
what is scope about fsync in zeus tweaker ?
plz help
Click to expand...
Click to collapse
Nothing personal......
Sent from my LG-P970 using xda extra super maximum
OMG guys I just lolled sooo hard Thanks
After some searching i found this.
But i have no idea what you mean with your question.
Looks to me it's not a "zeus" specific function. Huexxx only added a function in his Zeus Tweaker tool to enable/disable the fsync function. It's a "disable at your own risk" feature. Turn it off nd you might get some screwed up files after a crash.
=================================
Android will do the sync when it needs to -- such as when the screen turns off, shutting down the device, etc. If you are just looking at "normal" operation, explicit sync by applications is never needed.
The problem comes when the user pulls the battery out of their device (or does a hard reset of the kernel), and you want to ensure you don't lose any data.
So the first thing to realize: the issue is when power is suddenly lost, so a clean shutdown can not happen, and the question of what is going to happen in persistent storage at that point.
If you are just writing a single independent new file, it doesn't really matter what you do. The user could have pulled the battery while you were in the middle of writing, right before you started writing, etc. If you don't sync, it just means there is some longer time from when you are done writing during which pulling the battery will lose the data.
The big concern here is when you want to update a file. In that case, when you next read the file you want to have either the previous contents, or the new contents. You don't want to get something half-way written, or lose the data.
This is often done by writing the data in a new file, and then switching to that from the old file. Prior to ext4 you knew that, once you had finished writing a file, further operations on other files would not go on disk until the ones on that file, so you could safely delete the previous file or otherwise do operations that depend on your new file being fully written.
However now if you write the new file, then delete the old one, and the battery is pulled, when you next boot you may see that the old file is deleted and new file created but the contents of the new file is not complete. By doing the sync, you ensure that the new file is completely written at that point so can do further changes (such as deleting the old file) that depend on that state.
Sent from my LG-P970 using xda premium
N00BY0815 said:
OMG guys I just lolled sooo hard Thanks
Click to expand...
Click to collapse
why?
Duumke1 said:
After some searching i found this.
But i have no idea what you mean with your question.
Looks to me it's not a "zeus" specific function. Huexxx only added a function in his Zeus Tweaker tool to enable/disable the fsync function. It's a "disable at your own risk" feature. Turn it off nd you might get some screwed up files after a crash.
=================================
Android will do the sync when it needs to -- such as when the screen turns off, shutting down the device, etc. If you are just looking at "normal" operation, explicit sync by applications is never needed.
The problem comes when the user pulls the battery out of their device (or does a hard reset of the kernel), and you want to ensure you don't lose any data.
So the first thing to realize: the issue is when power is suddenly lost, so a clean shutdown can not happen, and the question of what is going to happen in persistent storage at that point.
If you are just writing a single independent new file, it doesn't really matter what you do. The user could have pulled the battery while you were in the middle of writing, right before you started writing, etc. If you don't sync, it just means there is some longer time from when you are done writing during which pulling the battery will lose the data.
The big concern here is when you want to update a file. In that case, when you next read the file you want to have either the previous contents, or the new contents. You don't want to get something half-way written, or lose the data.
This is often done by writing the data in a new file, and then switching to that from the old file. Prior to ext4 you knew that, once you had finished writing a file, further operations on other files would not go on disk until the ones on that file, so you could safely delete the previous file or otherwise do operations that depend on your new file being fully written.
However now if you write the new file, then delete the old one, and the battery is pulled, when you next boot you may see that the old file is deleted and new file created but the contents of the new file is not complete. By doing the sync, you ensure that the new file is completely written at that point so can do further changes (such as deleting the old file) that depend on that state.
Sent from my LG-P970 using xda premium
Click to expand...
Click to collapse
very nice & fulll
Back in 2012 android police made a report that defraging your phone didn't help any.
Fast forward to today I don't know if that's still the case. I see apps like SD maid have RAVE reviews from Nexus 6 users on the play store review section https://play.google.com/store/apps/details?id=eu.thedarken.sdm&hl=en
But is it actually worth using?
Does clearing cache and dalvik do the same in TWRP?
I am asking these questions because I have moved around 24 GB's of data the past 2 weeks into different folders and deleted alot of stuff off the phone. I want to make sure my available memory is displaying correctly now.
I don't think defragging would do anything for performance on a mobile phone with flash storage. Defragmenting a hard drive is done to improve seek times and general performance, and I believe it's specifically with FAT/NTFS file systems where this is most useful.
Like SSDs, seek times aren't affected by file fragmentation. I'd imagine any perceived performance boost is placebo.
You don't need to defragment flash memory...you just don't. You're only burning readbwrite life by doing so.
SD Maid can be a useful tool but it has nothing to do with fragmentation and it works differently than clearing the caches in TWRP.
datajosh said:
SD Maid can be a useful tool but it has nothing to do with fragmentation and it works differently than clearing the caches in TWRP.
Click to expand...
Click to collapse
How does Maid work then? I guess I am confused how Maid cleans up my storage.
CCJ22 said:
How does Maid work then? I guess I am confused how Maid cleans up my storage.
Click to expand...
Click to collapse
It says in the description how it cleans up your storage:
Apps you have already deleted, sometimes leave data behind.
The system constantly creates logs, crash reports and debug files you don't really need.
Your SD-card is collecting files and directories you don't recognize.
Click to expand...
Click to collapse
It also looks to have a file explorer, app manager, and some other things.
Defragmentation brings no improvement on flash based storage and can actually be harmful, not only due to read/write cycles but also because in some instances it can counter wear-leveling.
edit: Actually see here for a better explanation: http://forum.xda-developers.com/showpost.php?p=58004678&postcount=9
CCJ22 said:
How does Maid work then? I guess I am confused how Maid cleans up my storage.
Click to expand...
Click to collapse
SD Maid cleans up your storage by deleting files.
Which files are deleted depends on what tool you use.
See here: http://sdmaid.darken.eu/help
TL;DR
CorpseFinder tool for app remains, SystemCleaner for general clutter such as log files, AppCleaner for cache-like files (meaning files that don't contain user generated content and will be recreated if necessary).
exactly what @Dark3n said..
great app btw, been using it for years. no, it doesnt defragment
Fragmentation can occur on non-magnetic storage, as the file is fragmented into multiple, non-contiguous chunks which lead to excessive metadata. The less contiguous the data, the more metadata needed to string it all together. While the performance hit of this type of fragmentation on flash storage is far less than on magnetic storage, it exists nonetheless and general cleanup can help. While it pertains to how Windows handles fragmentation of SSDs, the following article by Scott Hanselman sheds a lot of light here.
http://www.hanselman.com/blog/therealandcompletestorydoeswindowsdefragmentyourssd.aspx
Regardless, moving around data of that size probably doesn't matter. It's more the TRIM function you should be interested, which is enabled in Android since 4.3. That helps the system know which blocks of memory truly have nothing in them for a faster and more even write.