Can't delete directory on Internal Storage - AT&T Samsung Galaxy S II SGH-I777

tl;dr `rm -rf <directory>` returns "Directory not empty"
I noticed that the old folder for Google Currents [/storage/sdcard0/Android/data/com.google.android.apps.currents] kept showing up regardless of how many times I 'cleaned it' with the app SD Maid. ES File Explorer returns that it contains 7 folders and contains 0 bytes and cannot be deleted.
Instead of letting an app handle it, I just mounted my phone with go-mptfs and decided to `rm -rf` from there. That returns "Directory not empty". There's two folders each with the same amount of sub-folders with similar names. Both contain files that are registered as 4GB with crazy characters as their name [according to my file manager]. `ls -al` won't list anything in any of the directories, but it will spit out that it can't find anything.
`rm -rf` through adb shell spits out the same error as before and Windows Explorer shows the same files with 4GB sizes. Despite the files appearing to be deleted through a file manager they still appear on the phone.
I'm completely stumped here. The only idea I've come across that makes a little sense is fsck, but I'd like to hear other ideas before I venture into unknown territories.
Ideas?

I have had I think the same issue with fders in a few occasions. For a while what I was doing was just renaming them BAD. Since it would not let me delete them. I had the same kind of issues where something in the folder would just refuse to be deleted. I THINK some part of the file got corrupted between doing something on a windows machine and my phone.
After I had a few BAD, BAD1, Etc files I finally decided to back up all my WANTED/NEEDED files and apps or whatever I had on my sdcard (internal) to a PC. This took a while with almost the whole sdcard filled. Once it was done I was then able to go into recovery and format my sdcard (internal) via cwm recovery. Then I restored all my files/folders I wanted/needed back to phone. It is the ONLY WAY I was able to get rid of it. Hope this helps ya.
Sent from My SGH-I777 Running Spiderman Themed AOKP or Spiderman Themed CM10

Thanks for the idea! I forgot about CWM's ability to format the storage it detects. I feel that may be the way I have to go, but I'd like someone to comment on the fsck idea first.

SquidLord said:
Thanks for the idea! I forgot about CWM's ability to format the storage it detects. I feel that may be the way I have to go, but I'd like someone to comment on the fsck idea first.
Click to expand...
Click to collapse
Hi… I also experiencing same problem like you.
Do you manage to delete those file without going through format feature via CWM Recovery?

You can also try the file manager from mrrobinson aroma.
It loads from recovery...so, could work.
Sent from my SGH-I777 using xda app-developers app

Related

Deleting/Editing Nandroid Backups

Is there a way to edit the name of the backup files in amons recovery. and is there a way to delete the backups. any help appreciated thanks
The backups are all located in the nandroid folder on your sdcard. the first folder inside nandroid is your device's serial number or something, the ones inside that are the backups, named by date and time. im pretty sure you can renaame these folders with no harm done to nandroids restore abilities and deleting them does absolutely no harm
if you want to edit the internals, you need to unyaffs it
When i rename the back up it will never let me back up so i wouldnt do that.... i lost my backup because of this :/
that sucks
He is right.. i went into the sd card went to nandroid and tried changing the names of the backups to keep them organized and it wouldnt restore.. then i renamed them to what they were before i changed them and they restored succesfully.. so can anyone shed some light if it is even possible to rename these nandroid backups?
Im sure it is an issue with Amon-ra's program.
Go find the guy and ask him.
There is a way to edit the name and still have the backups work.
The original name is BSD-20100330-0745. You apparently need the last part for the date and such. I changed the name to EvilEris1.1 and it failed, but if it is changed to EvilEris1.1-20100330-0745 it works. You just need the "-20100330-0745". So "(name)-20100330-0745" will work.
Amon_RA said:
Renaming works fine, just don't use spaces or special characters.
Click to expand...
Click to collapse
i didnt link the thread he posted that in because i told him about this thread and dont want posts in two places. though you could find it easily im sure....
Excellent, that is better than what I had to do.
Problem solved!!!!!!!
I was just messing around with it for an hour or so and I resolved my own question.... You can name the backups what ever you want.. you dont have to have the dates or anything just no spaces in the name... so if you wanted to name it "Evil Eris 1.1" it would have to be something like this... "Evil-Eris-1.1" No Spaces...
You could also (from a computer with your phone in recovery) do:
adb shell
nandroid-mobile.sh -b
It will ask you what to name it, and then it will automatically add the suffix.
you get the "run mobile.sh" error if you rename the folder directly under the "nandroid" folder on your sd card directory. you will also get this error if your battery is low or you have no storage left. the folder directly under the "nandroid" folder it is your serial number. if you're having issues, just go to the "other" menu and select "send recovery.log to SD card." then go in and search the recovery.log file on your sdcard for "serialno=" right after that there will be a 12 character string of capital letters and numbers directly followed by lower case letters that are useless for this purpose. Create a folder with the same name as that string (capital letters and numbers only, no lower case) and place your previously renamed backups into that folder and voila! you'll be able to restore them.
burdenedreflect said:
The backups are all located in the nandroid folder on your sdcard. the first folder inside nandroid is your device's serial number or something, the ones inside that are the backups, named by date and time. im pretty sure you can renaame these folders with no harm done to nandroids restore abilities and deleting them does absolutely no harm
if you want to edit the internals, you need to unyaffs it
Click to expand...
Click to collapse
thank you, it worked for me
I'm not sure this is the correct place to post this info or my question, but I believe it is at least relevant to the topic at hand. If not, I apologize profusely.
I have numerous backups created with CWM (v6.0.1.0) that are eating up an enormous amount of space on my Galaxy Nexus SD card. I've been flashing numerous ROMs and Kernels and I want to get rid of most, if not all of those backups and then create a fresh one from my current working/bootable ROM (JB 4.1.1), just so I have a good backup to roll back to if/when I hose up my phone.
For poking around on the the SD card, I'm using a Windows-based program called 'Android Commander' (Google it), which I find to be exceptionally handy. It is very much like Total Commander, which I've been using for MANY years (since version 1.0 of the original Windows Commander) on Windows boxes, as well as a variant under numerous Linux distros.
At any rate, what I've discovered is as follows;
1. the contents of the /clockworkmod/ directory on the SD card contains three directories and a couple of files (in its root). The directories are;
/clockworkmod/backup/
/clockworkmod/blobs/
/clockworkmod/download/
2. the /clockworkmod/backup/ folder contains folders that are dated and time stamped (date and time the backups were created).
3. within each of the /clockworkmod/backup/date-time folders, there are six (6) files, the largest being the 'recovery.img' file. There is also a 'boot.img' file and four (4) other files that are quite small. Each 'recovery.img' file sizes are in gigabytes (yeah, I have a lot of crap on my phone), so it's pretty obvious that deleting these directories will give me a great deal more storage space, which is my main goal in life right now (recoup all that space).
4. my main point here, however, revolves around the /clockworkmod/blobs/ director. There are over 3000 sub directories within that directory, and I have no idea how many files are within those sub directories or how much space on the SD card they occupy, although my guess is around 8-10 gigabytes. Being an astute user of Google, here's what I found out about all this;
"Starting with version 6, duplication support has been built into clockworkmod recovery. The blobs directory folder contains a hashed directory structure that holds the duplicated files across all backups."
// This info was derived from a post on Android Enthusiasts (author unknown).
"Don't delete anything in your blobs folder. Those are your nandroid backups. Starting with CWM6, it makes incremental backups and your backup files point to the files in the blobs folder. To free up space, delete unwanted backups and the next time you run nandroid, it will delete the unneeded files in the blobs folder."
// This info was derived from a post by 'NotJustAPhone', a very senior member of the Android Central forum.
And for my next trick ... what I'm wondering is if it REALLY matters whether or not I blow away the contents of the 'blobs' directory, and I guess that's my question. What if I do delete everything in 'blobs'? Since I'm going to flash another ROM and Kernel anyway, does it matter? That directory obviously started out life as being empty, right? What will CWM do, or more importantly, NOT do, should I blow away the contents of the 'blobs' directory (assuming the file system will let me)? Won't CWM just create a new/fresh/relevant set of directories/files within 'blobs' the next time I do a backup? Has anyone actually tried doing that?
And just in case anyone is wondering, the only thing in the /clockworkmod/download/ directory is the clockwordmod img file.
Thanks in advance for any response this might elicit.
Old Fart
ImaOldFart said:
I'm not sure this is the correct place to post this info or my question, but I believe it is at least relevant to the topic at hand. If not, I apologize profusely.
Click to expand...
Click to collapse
Hi! You're in the HTC Droid Eris section of the forum, and the latest version of CWM for the Eris is much older (v2.x).
Without direct experience with the newer versions, all I can wonder is that doesn't CWM have any way built-in to delete old backups?
On the Eris, the easiest and most reliable way of using CWM is through installing the "ROM Manager" app, in which you can then manage your backups from the Android interface. In the future, you might want to consider trying that for your device as well as it may make it easier for you to manage your own backups.
I have no idea if under your configuration if installing ROM Manager now would help you delete your old backups, and I realize that even then you would probably only be able to delete them one by one, which is how it works for me in ROM Manager, and that being able to delete them en mass via Windows might be tempting. I keep four backups of my currently running ROM, and number them. I keep the very first one which is usually after I configure the ROM to my liking without really installing or restoring any apps.
Maybe you should ask wherever CWM-specific support is, but definitely at least in the section for your phone might attract better answers.
Good luck.

Where are the wallpapers/ringtones located?

My phone is rooted, i've cleaned out most of the bloatware and i'm starting to customize it to my own, but i'm trying to find out where to put my music/ringtones/pictures/wallpapers and i'm kind of lost.
When I mount and open it to view files, these are the folders in my internal storage
Android
ClockworkMod
data
DCIM
FeebeRings
layar
TitaniumBackup
newsImage
update.zip
Can someone please tell me exactly where to put all of my things? It would be GREATLY appreciated, thanks!
For your Music,, you can put them in any folder,, the OS does a screen on the SD Card on every boot and it will detect your music. So basically just put them in a folder named Music.
The Ringtones go in \system\media\audio\Ringtones
Pictures Goes in DCIM, wallpapers can be put in the same directory cuz when the OS scans the SD Card it will detect your wallpapers as pictures.
The built in wallpapers are in an .APK so you can not have your wallpapers added to the built in...
^ I think you could probably take the TWwallpaper .apk and extract it to find the pics and delete/add them and then rezip it?
system/app/twwallpaperchooser/res/drawable-hdpi
this is where the backgrounds are. I wonder if you could just add/delete them in this folder using root explorer?
I have never done it.. but it seems like it could be done.
eortizr said:
The Ringtones go in \system\media\audio\Ringtones
...
Click to expand...
Click to collapse
So, I have the same question (having just successfully flashed), but am confused about the answer. In the poster's question, as in my phone, there is no "system" directory.
I still have bionix-v-1.3.1.zip in the root directory of the internal memory. Apparently the poster had already removed the .zip file of whatever version he/she flashed from the root directory. The only place I can find a \system\media\audio\Ringtones directory is in that zip file. I see all of my currently available ringtones there, and can't find them in any other directory. (This seems odd, as I'd have expected them to be created somewhere else in phone's internal memory, as part of the flashing process).
Are you saying to just go ahead and treat bionix-v-1.3.1.zip like a directory, and drag a file into the directory in that file?
P.s. I have that "is this so obvious to everybody but me?" feeling, since xKrazYx626 seemed to have no problem understanding your answer
You guys need to get root explorer to view these directories
Project-V 6/11/11
Shortbus-Driver said:
You guys need to get root explorer to view these directories
Project-V 6/11/11
Click to expand...
Click to collapse
+1 to that shortbus

[Q] Is there any way 2 get rid of the unused app folders apps leave behind?

I have a ton of folders on SD card and some places on my phone's internal storage that I want to know how to delete, bottom line is some of them are important folders that may be required by the system - some contain downloaded data from games and what not - such as The Sims Freeplay - that range in sizes from 400MB to 900MB.
I'm running on a stock phone, HAS NEVER BEEN ROOTED, DO NOT WANT TO ROOT THIS PHONE TO GET RID OF THESE - is there any ways to do this without rooting the phone?
Any help is appreciated
SDCard folder deletion
Hi,
As everyone gets to read/write on the sdcard you should be able to delete everything on the card.
Since you are unsure if the files are still needed, I'd suggest you back them up, delete them and put them back on the card if you run into problems.
Take a look at the files timestamps to identify old and probably unused files.
As for deleting stuff, I see several ways to accomplish that:
transfer files via USB mode
use a file manager from the market and just click your way through
use ADB from the android SDK, this will open a shell and you can use all the unix commands you want. You'll also have access to 'adb push' and 'adb pull' to transfer files.
Astro file manager .
Sent from my HTC PH39100 using xda premium
You can probably just delete the files using a file manager. It's tedious though.

Moving Google Access Music To SD With FolderMount??

I cannot get folder mount tovmove my Google Access music. In fact when I use it to browse my SD card, it never populates folder sizes or anything else.
I used this for the sane purpose on my Razr, with success. Has anyone got this app to work on their S4?
jeepguy_1980 said:
I cannot get folder mount tovmove my Google Access music. In fact when I use it to browse my SD card, it never populates folder sizes or anything else.
I used this for the sane purpose on my Razr, with success. Has anyone got this app to work on their S4?
Click to expand...
Click to collapse
I'm also having the same problem. Are the files stored somewhere else, because they don't appear to be in com.google.android.music.
EDIT: I think I figured it out! The location for the music is actually /data/data/com.google.android.music. Happy listening!
First kill play music app so it is not running
Then (I used solid explorer, but I am sure you could use a terminal app. adb shell, or any other app you prefer to use.
In Solid Explorer by deleting the music folder located in /data/data/com.google.android.music/files/music and then I created a symlink from /storage/extSdCard/files/music to /data/data/com.google.android.music/files which makes a music folder that points back to the external sdcard.
Last reboot your phone
It works very very well and all the music I want to cache from what I have stored in google works well.
Hope this helps you out.
Does it still let you write new music to this location?
It has for me. I have cached about 400 songs offline after doing the symlink
Sent from my SCH-I545 using Tapatalk 4 Beta
Ainvar said:
First kill play music app so it is not running
Then (I used solid explorer, but I am sure you could use a terminal app. adb shell, or any other app you prefer to use.
In Solid Explorer by deleting the music folder located in /data/data/com.google.android.music/files/music and then I created a symlink from /storage/extSdCard/files/music to /data/data/com.google.android.music/files which makes a music folder that points back to the external sdcard.
Last reboot your phone
It works very very well and all the music I want to cache from what I have stored in google works well.
Hope this helps you out.
Click to expand...
Click to collapse
symlinks are the way to go. do it with my solid state hard drive to a bigger drive, works great
This worked for me. But every time I reboot I get a "Google Music has stopped working" error. It onky does it once, right as the OS loads back up.
Ainvar said:
First kill play music app so it is not running
Then (I used solid explorer, but I am sure you could use a terminal app. adb shell, or any other app you prefer to use.
In Solid Explorer by deleting the music folder located in /data/data/com.google.android.music/files/music and then I created a symlink from /storage/extSdCard/files/music to /data/data/com.google.android.music/files which makes a music folder that points back to the external sdcard.
Last reboot your phone
It works very very well and all the music I want to cache from what I have stored in google works well.
Hope this helps you out.
Click to expand...
Click to collapse
It worked. Thank you.
Fixed the error. Now it's 100%
jeepguy_1980 said:
Fixed the error. Now it's 100%
Click to expand...
Click to collapse
How'd you fix it? Or did it just stop?
Sent from my SCH-I545 using xda app-developers app
I assume the problem was because I had converted Play Music to a use app. I just reinstalled my Rom and then recreated the symlink and it seeme to be working now.
darek65 said:
It worked. Thank you.
Click to expand...
Click to collapse
Anytime!
Ainvar said:
Anytime!
Click to expand...
Click to collapse
Is this really working or is it just duplicating your device folder on your sdcard? Since our phone's file system doesn't support symlinks, I don't understand how this is working! I've read many threads and no one can get this to work on the verizon version. Just curious!
Working for me! Symlink does work... thats what folderMount does.
Sent from my GT-N8013 using xda premium
krazykevin76 said:
Is this really working or is it just duplicating your device folder on your sdcard? Since our phone's file system doesn't support symlinks, I don't understand how this is working! I've read many threads and no one can get this to work on the verizon version. Just curious!
Click to expand...
Click to collapse
I did not symlick the folder from the phone to the sd card. I actually deleted the cache and files folder located in /data/data/com.google.android.music and then I created a symlink from the cache and files folder I created on the sdcard to the system root partition.
So look at it like this. I created shortcuts inside the system root folder from the source located on the sdcard. So when Google Music go to place content in the cache and files folder in the system root partition it is actually placing this content on the sdcard.
This has been keeping my internal storage from diminishing and is using the sdcard.
I would say why not try it out yourself and test it out. You will be able to see everything for yourself.
This is doing exactly what FoulderMount does from internal storage to sdcard, but for the system root. I actually got the idea to try this when I got an error from FolderMount stating it cant be done from within the app.
Hope this answers your questions and concerns on this.
---------- Post added at 12:57 AM ---------- Previous post was at 12:53 AM ----------
chewwy420 said:
Working for me! Symlink does work... thats what folderMount does.
I am actually using FolderMount to do this for AmazonMP3 folder, DCIM, Downloads, Wallbase, and quite a few other apps. Specially with the beta setting os excluding the duplicate folders from being scanned into the media apps. The folder I have the files and cache in I have a .nomedia file in the rot folder to keep duplicate files from showing up in the media apps.
Sent from my GT-N8013 using xda premium
Click to expand...
Click to collapse
Exactly, it is what made me try it for Google Music. I was thinking of doing this for the space time studios games but they don't hit over 50 megs each when you download the content.
i did try folder mount. And that's why I'm asking how yall two got it working. Our phone's, GS4's, does not support symlinks. Google it. There is no one else on the net with a verizon phone that has this working. Yes, there are tutorials on the net about using folder mount and various other ways, but they don't work for our verizon model. There are many many threads on the verizon gs4 forums about people asking about foldermount. When most verizon gs4 users use foldermount, it just makes a duplicate folder on the sdcard, both the device folder and the sdcard folders just mimic each other, not gaining you any space on the phone itself.
krazykevin76 said:
i did try folder mount. And that's why I'm asking how yall two got it working. Our phone's, GS4's, does not support symlinks. Google it. There is no one else on the net with a verizon phone that has this working. Yes, there are tutorials on the net about using folder mount and various other ways, but they don't work for our verizon model. There are many many threads on the verizon gs4 forums about people asking about foldermount. When most verizon gs4 users use foldermount, it just makes a duplicate folder on the sdcard, both the device folder and the sdcard folders just mimic each other, not gaining you any space on the phone itself.
Click to expand...
Click to collapse
I am guessing you did not read what I have said in this thread. I did not use foldermount for this one but I did list the ones I did use foldermount for. I did state however that I did a "symlink" for google music folders. I never stated that I used foldermount for that. But no matter what I have said in the past few posts you dont want to listen or even try it out for yourself. I am very happy to know there are so many threads stating this cant be done.
Here is some information about symbolic links as I think you should read more about it.
Also you can create a symlink on an ext4 FS which is where the link resides and its target is on a fat32 FS. I never stated that I created the target on a fat32 you assumed this.
Also googling around about this I found an actually XDA thread that talked about yet someone else who was able to do this back in Nov 2012....
More links for your reading pleasure.... link 1, link 2, and last but not least one about the space usage which seems pretty clear that it does not do double space. Depending on how the software reads it, it may think it is using that space but it really is not. Read a little more next time. Google is not a hard thing to use when searching for answers. Also it is not hard to accept something works when others in this thread and others have plainly stated that it works.
Also just a little more information just in case you aren't sure about everything you read
Screenshot of files symlink and screenshot of cache symlink
Screenshot of files folder on the SDCARD and now for the screenshot of the cache folder on the SDCARD
I removed some songs to see if the device would record different storage use on the system root folder and it did not.
All in all believe what you want and do what you want, this works for me and it has worked for others on this thread and another thread I found earlier tonight.
Now....
You must be rooted....
Force Stop Google Music
In Solid Explorer (this is what I used)
go to system root and /data/data/com.google.android.music/ and delete files and cache (cache if you want to)
go to sdcard and make a folder called Google Music (or anything you want to name it...) create a folder called files and cache in this folder.
now right click and chose properties on files and chose create a symlink and give the path of the "/data/data/com.google.android.music/files This will be the target that is created.
now right click and chose properties on cache and chose create a symlink and give the path of the "/data/data/com.google.android.music/cache This will be the target that is created.
Now you are done. This is exactly what I did and it works very very well........
I'm man enough to admit when I'm wrong. I should have dug some more on the symlinks. I got even more confused when chewy said he made symlinks, that's what folder mount does. How do you have your sd card partitioned and formatted if you don't mind answering?
Sent from my SCH-I545 using xda premium
krazykevin76 said:
I'm man enough to admit when I'm wrong. I should have dug some more on the symlinks. I got even more confused when chewy said he made symlinks, that's what folder mount does. How do you have your sd card partitioned and formatted if you don't mind answering?
Sent from my SCH-I545 using xda premium
Click to expand...
Click to collapse
Not a problem, I just wanted you to be able to see the info.
My sd card FS is fat32 formatted by winbloze 7. Now my real test will be to replicate all of this once I get my 64gb sd card which will be formatted in exFAT.
I use foldermount for everything else though. It does well from my usage so far for the base few days and I dont have to remember which folders I use symlinks on. I just know from reading either on here or on the app page that the app does not make links in the system root. So I just tried to do a symlink and it worked well. Googling tonight actually showed me someone else did it before me.
Since you are having issues can I ask what type of sdcard do you have and what fs is on it? Also what app are you using to do the symlink? is it an app or are you doing it from a terminal emulator or through adb shell?
Ainvar said:
Now....
You must be rooted....
Force Stop Google Music
In Solid Explorer (this is what I used)
go to system root and /data/data/com.google.android.music/ and delete files and cache (cache if you want to)
go to sdcard and make a folder called Google Music (or anything you want to name it...) create a folder called files and cache in this folder.
now right click and chose properties on files and chose create a symlink and give the path of the "/data/data/com.google.android.music/files This will be the target that is created.
now right click and chose properties on cache and chose create a symlink and give the path of the "/data/data/com.google.android.music/cache This will be the target that is created.
Now you are done. This is exactly what I did and it works very very well........
Click to expand...
Click to collapse
Just wanted to say thanks for this! I ended up buying Folder Mount thinking it would do it but I couldn't seem to access root folders. I didn't realize Solid Explorer could do it too and I already own it. The steps made it a snap

Why can't I delete this folder/files

Ok this is driving me nuts. I've tried every file manager, script manager, file deleter and everything else I could come up with. And before anyone asks yes I've connected my phone to my computer and tried getting rid of them that way with no luck. They seem to get deleted but when I look on my phone there still there. I've been successful at making copies of the folders which now resulted in me having 2 folders I can't erase.
Here's the folder named "tmp" that's on my sd card.
https://www.dropbox.com/sh/m9l4ur7txma5aby/9Wx7p9KF9W
The folder consists of a cleanup.sh file that is written like this
#!/sbin/sh
rm -rf /sdcard/theme/
echo "Cleanup complete"
And another file named
"This folder can be deleted after the theme has been installed"
I have no clue as to what theme it's referring to nor do I recall what theme installed this but all I want to do is get rid of it. When I try to delete it all I get is uninstall fail, or not enough memory, which makes no sense. I've tried changing permissions with no luck and I'm stumped. I don't think these folders are causing any harm to my phone but still I want them erased. If anyone may know of another way maybe through terminal command or something I can erase these files I would be greatly appreciated.
sent from my DNA
What is the path to the file?
Localhost798 said:
What is the path to the file?
Click to expand...
Click to collapse
There's many different paths but the most direct path is /sdcard/tmp/cleanup.sh
Or u could go /storage/emulated/0/tmp/cleanup.sh
sent from my DNA

Categories

Resources