I know of filesystems that you can resize while it is mounted. I know of filesystems that can be defragmented while it is mounted. There also those that can be filesystem checked while it is mounted. But, there is no general-purpose filesystem in common use--that I know of--which can be formatted while it is mounted. What would be the purpose of such a useless filesystem feature?I looked into this. Even during the CWM /cache wipe, cache is not unmounted during the format.
The test is this simple:
Code:
[I]Mount /sdcard in CWM[/I]
$ [B]adb push fmt-cache.zip /sdcard/[/B] [I]Copy test zip to SD card[/I]
329 KB/s (133218 bytes in 0.395s)
$ [B]adb shell ls -l /cache[/B] [I]Check /cache before format[/I]
drw-rw-rw- 1 root root 2048 Apr 18 17:03 lost+found
drwxrwxrwx 1 root root 2048 Apr 18 17:02 recovery
[I]"Install" the fmt-cache.zip using CWM here[/I]
$ [B]adb shell ls -l /cache[/B] [I]Check /cache after format[/I]
drw-rw-rw- 1 root root 2048 Apr 18 17:03 lost+found
drwxrwxrwx 1 root root 2048 Apr 18 17:03 recovery
[I]
Still looks OK, doesn't it? But that's only because of the in-memory
meta-data which is what's still being used by [/I]ls(1)[I].[/I] [I]Force a filesystem flush.[/I]
[I]Go back to the main menu and choose[/I] mounts and storage[I].[/I]
[I]Select[/I] unmount /cache
[I]Select[/I] mount /cache
$ [B]adb shell ls -l /cache[/B] [I]Now check the filesystem again[/I]
drw-rw-rw- 1 root root 2048 Apr 18 17:04 lost+found
drwsrwsrwt 1 app_4294 app_4294 2048 Dec 31 1969 ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
[I]
As expected, the filesystem's now corrupted[/I]
[I]How do you fix this? The filesystem /cache is on is YAFFS2, and [/I]that[I]
doesn't have a [/I]fsck[I]-type program. So, can't fix it, have to nuke it:[/I]
[I]Have to select[/I] format /cache
Actually, as you can see from the above, it is; but, that's beside the point. Nowhere in my post did I say that /cache should be "unmounted". I just said that the script should not format /cache while it was mounted. My point is that the install script should not do things behind CWM's back. And, if you unmount things--esp. /cache which CWM regularly uses--in the script, then you will be doing things that CWM is not aware of.
As to CWM not unmounting /cache when you select "format /cache" or "wipe cache", try this simple command in a separate CMD window (and don't exit it), then try to do one of those operations again:
Code:
$ [B]adb shell[/B]
~ # [B]cat > /cache/xxx[/B]
Code:
E:format_volume failed to unmount "/cache"
Lemme guess... Did some fairly basic test on this, then decided: "I'm gonna make myself look like a total prat on XDA today". Right?
It's a modified default.prop--not a build.prop. And, I thought I had given the reason:@rajeevvp why did you post that custom build prop file in your last post
though, I should probably have added: "right from the get go".For TnT you'll have to flash the zip file in the attachment immediately after doing the nvflash to enable ADB (and root) to grab all the logs
Attachments
Last edited: