[Q] Journaling FS for Internal SD using CM7 (or 9)? - AT&T Samsung Galaxy S II SGH-I777

While doing some internal storage cleanup, I came across a bunch of junk files in the Opera cache. I'm guessing I had Opera running at some point when my phone died not so gracefully, corrupting whatever it was doing at the time. The immediate problem is that I can't delete these files. The file system utilities cannot find the files, but the file names are still in the FAT somewhere:
Code:
/mnt/sdcard/Android/data/com.opera.browser/cache/cache/g_0027 # ls
ls: ./[email protected]Â¥a»â©âª./â¤â¬: No such file or directory
ls: ./â¤cr[âÏ
.âb.: No such file or directory
ls: ./º4ô/.áuâ*: No such file or directory
ls: .±gy/â*B.âÎü: No such file or directory
ls: ./òú)â©â§+.â/ü: No such file or directory
ls: ./±Ï=%âid
.âµ/: No such file or directory
ls: ./iaòêâ*·âñ.â/w: No such file or directory
My first question (although less important) is can I delete these files using some unconventional method (not including formatting the space)?
My larger question, and the one hinted at by the subject, is this: is it possible to format the internal SD space as ext4? From what I understand after doing some Googling, the stock kernel (and perhaps Android in general) is designed around the idea that your non data space would be formatted as VFAT (it's built into the /init.rc inside the zImage according to one thread in the i9100 forums). Is this also the status of CM7/9? I did find an entry in the CM forums from last October where somebody just did it on a whim and ran into issues, to which others replied that apps2sd can use the space when set up for it...but no solution for actually using the space as regular storage.
I know enough about coding to really muck stuff up (I took a real basic C++ course way back in high school, know very little java, and a decent amount of scripting languages, but that's about it...I can stumble through reading code, but it'd be a mess trying to change it), so I'm not exactly inclined to dig into this that far, but I wouldn't mind assisting in some way if someone else was interested (I'll be happy to be a guinea pig, and don't mind trying to figure out some of the code stuff...I just wouldn't know what to do with it all if I did figure something out). I rarely connect to my phone via USB anymore, even more rarely do I mount the SD as mass storage to a PC, and yet more rarely still do I connect to a Windows PC via USB and mount as mass storage. Unless there's a good, solid argument for why the space uses VFAT besides compatibility with Windows, I'd love to be able to switch to a journaled file system.

Related

Swap External_SD with Internal SD (WIP, need help)

There is a sizable thread over i9003 forum about editing vold.fstab to swap internal with external sd. I guess they were more desperate as i9003 comes with very small internal storage. But even our "16GB" isn't enough for many of us.
I'm on 2.3.5, and I've tried editing the file using vim, and have failed miserably each and every time.
Unfortunately, the fstab file for i9003 differs quite a bit from the one for i9100. Here are what I've noticed:
i9003:
mount_deep
mbr_policy
i9100:
format_option
otg subsection
They also have different sysfs path and mount point.
Any knowledgeable person/people wanna jump in and make the magic happen?
does no one else see the value in this?
Sure I do
For instance I applied the idea from ownwhere (here) but in the most simple way just to test it.
I tested it with the gameloft dir.
So first I moved /sdcard/gameloft/ to /sdcard/external_sd/gameloft/
Then I created back an empty folder /sdcard/gameloft/
and then I mounted the external_sd/gameloft dir in it with :
mount --bind /sdcard/external_sd/gameloft/ /sdcard/gameloft/
I used Script Manager free version from market to run this script at boot time (added a baaad sleep 60 at the top of it to wait for the system to finish the storages checks).
And this works for me. It will help me to wait for a true external_sd / internal_storage swap mod...
I hope it will also help other people here in the same way as it did for me
sirnono said:
Sure I do
For instance I applied the idea from ownwhere (here) but in the most simple way just to test it.
I tested it with the gameloft dir.
So first I moved /sdcard/gameloft/ to /sdcard/external_sd/gameloft/
Then I created back an empty folder /sdcard/gameloft/
and then I mounted the external_sd/gameloft dir in it with :
mount --bind /sdcard/external_sd/gameloft/ /sdcard/gameloft/
I used Script Manager free version from market to run this script at boot time (added a baaad sleep 60 at the top of it to wait for the system to finish the storages checks).
And this works for me. It will help me to wait for a true external_sd / internal_storage swap mod...
I hope it will also help other people here in the same way as it did for me
Click to expand...
Click to collapse
But you'd have to unmount every time you want to use usb storage, no?
I think I've tried all realistic combination/possibility of editing the vold.fstab file given my very limited knowledge. My conclusion is, someone with knowledge needs to try this
ln -s /sdcard/external_sd/gameloft /sdcard/gameloft ?
samaral said:
ln -s /sdcard/external_sd/gameloft /sdcard/gameloft ?
Click to expand...
Click to collapse
Nope, doesn't work. Does symlink even work on FAT?
g2tl said:
But you'd have to unmount every time you want to use usb storage, no?
I think I've tried all realistic combination/possibility of editing the vold.fstab file given my very limited knowledge. My conclusion is, someone with knowledge needs to try this
Click to expand...
Click to collapse
Hello
Yes I need to do this if i want to use usb storage on desktop computer with the default system option.
But you can use apps like multi mount sd-card lite (free on market) to mount sd-card(s) on desktop computers and keep them mounted on the phone (read-only).
This way I didn't get any mounting problems but I didn't test very much so perhaps this can lead to mounting errors later on.
Maybe you have already tried this ?
I get massive slowdonws when copying large files with that widget.
Sent from my GT-I9100 using XDA App

[Q] Apps think int-sd is ext-sd ?

I'm seeing almost every app (except for CWM recovery) thinks the
/mnt/sdcard directory is the external card (which is true in most
android devices). So they are looking in and placing files in the wrong
place. Smarter apps allow me to set a virtual root for it to start with,
but Kindle and Nook insist on looking in /mnt/sdcard/<appname>
for the stored books.
Does anyone know a workaround to repoint /mn/sdcard/<appname>
to /mnt/sdcard/ext_sd/<appname>.
Personally, I think the idea to change the meaning of
the /mnt/sdcard, (from the uSD card to part of the on
board flash memory), was not thought out well.
Yeah its a head scratcher. I assume that HTC decided after putting out a $600 tablet they could save money by not including a $7 SD card in the ext. slot and just defaulted everything to the internal SD. I'm sure someone could write a script to change the mount points on rooted ROMs, but not sure what might fail if you change cards.
hmm as a temp workaround I guess I can run a script to copy the
/sdcard/ext_sd/nook and /sdcard/ext_sd/kindle directories
to the corresponding places on the internal 'sdcard'?
Does android have an rc.local like file to run after the system mounts the two devices, and one to run at shutdown, to do the copies?
being vfat, I can't softlink the directories to point to the real sdcard
is there a way to overlay mount the 2 directories from the real sdcard
to the internal flash sdcard?

[Q] Deleted ext sd card directory

While using WiFi Explorer to attempt to delete a file from my external sdcard I seem to have deleted the whole external sdcard directory on my stock Rezound. I have tried factory reset, but that doesn't add the missing directory back. As it is now my external card won't mount. I'm sure that there used to be a directory called ext-sdcard or something similar, but there isn't anymore.
If someone could please give me a very detailed walk-through of how to fix this, I would be very grateful. I'm 65+, not too terribly up on this stuff, but I am pretty good at following exact directions to copy and paste when it comes to rooting, etc.
Thanks in advance.
Can't say that I have been in that situation, so I'm not really sure what you deleted. If you just deleted the shortcut, then your data might still be there. Just so we're on the same page, do you have ES File Explorer installed? If not, can you download it from the Market?
Once you launch it. It should take you to the Internal sdcard. Do you see any folders or files? Look for "ext_sd". Might be wrong, but I believe that is just a shortcut to your External sdcard, not your actual card. If that folder is not there, hit the menu button, select New, folder, and name it... ext_sd
If that doesn't work or you do not care about the data on your cards, you could always try reformatting the sdcards. (Just be warned. If you do that, you WILL lose any data that might on the cards, such as pictures.) It should be on the same settings menu as the factory wipe was. First try "Erased SD card". If it is greyed out, select "Unmount SD card" first. If you still can't access the card, try erasing phone storage. Once reformatted, it may reload your ext sd card mapping.
I had a similar problem, since there is /sdcard and /sdcard2 in the root (top-level) directory I figured those were the actual mount points and /mnt/sdcard and /mnt/sdcard/ext_sd were symlinks. It turns out it's the exact opposite so I essentially deleted about 25GB worth of stuff I had on there.
Essentially you need to recreate the directory either from a file brower with root access (such as es file manager) or from the command line.
Run this command via either adb shell or a shell/terminal on your phone when you have root access: mkdir /mnt/sdcard/ext_sd
The mount command shows where it's mount point actually is. Like said above it is in /mnt/sdcard/ext_sd
/dev/block/vold/179:65 /mnt/sdcard/ext_sd vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0202,dmask=0202,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
"Incorrect syntax" now
brando56894 said:
Essentially you need to recreate the directory either from a file brower with root access (such as es file manager) or from the command line.
Run this command via either adb shell or a shell/terminal on your phone when you have root access: mkdir /mnt/sdcard/ext_sd
Click to expand...
Click to collapse
I really appreciate the help. OK, I unlocked it, got root and tried to run the command "mkdir /mnt/sdcard/ext_sd" (without the quotes) with adb. The message I received back was "The syntax of the command was incorrect".
Hopefully I am a lot closer than I was.
If you don't mind, can I make a suggestion? Have you ran the latest .22 leaked RUU or any updates prior to this? Maybe look into Cleanrom 4.2(if you flashed the leak) or Cleanrom 1.7.5(if no leak). May be worth your time and patience to do this instead, as time is money.
Got it working - Thanks everyone
Prize goes to the suggestion of installing the leaked 4.0 Took me all day to figure out how to use adb, (it's hell to get old, kids), but finally all the stars were aligned and voilla. ICS kicks butt! Tomorrow I will see if I can remember how to unlock this thing again and install CleanRom. Again, thanks to all the helpful and friendly folks out there.
Glad you got it fixed!

[UPDATE]possibility to move ANY game data to sdcard2 ;)

hi there, thats it
is there any possibility to move the games-data to the sdcard2?
i couldn´t get gl2sd to work correctly. it moves my data, but my games dont recognize it and begins to download the data again (yes, i mounted the storage ^^).
ive got a 32gb sdcard, it would be awesome to get something to work in that direction.
----
Update:
YES I GOT IT! thx google and a guy named sergey_f1 ( credits goes to him, i only changed it for tablet s)
here it is: (example galaxy on fire2)
mount -o bin /mnt/sdcard2/net.fishlabs.GalaxyonFire2THD /mnt/sdcard/Android/data/net.fishlabs.GalaxyonFire2THD
in scriptmanager with SU + Boot on
please confirm if i made something wrong. im not a dev nor am i used to it-basics ^^
but for now it rocks
This should work. One thing to be wary of for new users reading this:
You're not actually really moving game data anywhere. You are simply making the folder /mnt/sdcard/Android/data/ be actually stored on another filesystem device. Anyone who has used Linux would understand the concept of remounting a folder elsewhere. The biggest difference with this (for your average user) is that if you remove the SD Card, you will not be able to use those games properly as their data storage location is now completely invalid, not just that the files are missing. This also means that if you are, for example, copying files from the /mnt/sdcard/Android/data folder onto your PC, you won't save any space on your internal storage, since that folder is mounted elsewhere.
As you said, that should work, its just a good idea to know technically whats going on before people start remounting FS's all over the place.

[Q] How does mounting work on android?

Seeing how I'm not getting any response to my question about f2fs, I thought I should educate myself on the general topic of storage on android.
From what I understood the external SD card is mounted by vold automatically when it's detected, based on the entries in /etc/vold.fstab. I skimmed through the vold sources and saw only support for the FAT file system (Fat.h, Fat.cpp), so I guess if I was interested in adding support of another file system I would have to modify vold, right?
Then I see here (link 1), that the external storage is case-insensitive and permissionless, so I will probably have to chmod 777 everything that goes on the card if it's not FAT32, right? Probably apps creating files on the card will store them with some sort of permissions that will prevent other apps from seein/reading them. I wasn't sure what would happen, so I thought I'd search on the net about how to handle ext4-formatted cards - first resource I found is here (link 2), though it's cm-specific it seems like it should work with any android. So I tried using the sdcard binary to bind my sdcard to /storage/extSdCard, this had however no effect, I just get a message:
Code:
get_selabel_handle: file_contexts is loaded from /file_contexts
nothing else happens. I guess that has something to do with SELinux, however I have it set to permissive, so I have no Idea where to go from here.
I'm kinda stuck and would be thankful for any help or links to reading material on this topic.
p.S: I'm not allowed to post links, because the system apparently wants to see me post crap 10 times till it allows me to post links, so I edited them out. The first link is documentation of external storage on android and the second is the first search result for "ext4 sdcard android".

Categories

Resources