Nandroid backups - Why Yaffs2 and not Ext3 - Defy Android Development

Hey guys!
It has been already a while messing around with my Defy but one question still remains unanswered for me.
If /cache, /data and /system partitions are Ext3 formatted (you can check this by typing mount in Terminal Emulator), why do nandroid backup images have Yaffs2 filesystem then? Why does this conversion occur? Doesn't it make much more sense to image the partition in its original filesystem?
Thanks in advance...

Nandroid backup - image with YAFFS filesystem. - not dump of partitions.
When recovery is simply unpack files on the ext3 partition.

i suppose earlier (android) adoption of yaffs2 played a big part of that decision, but now it may very well be tar.
it's just a lot easier not to change what's not broken, isn't it?

Will soon be changed to TAR format (Recovery 4.0 will support the two formats)

It sounds good.
Wish the recovery would be more powerful after its source open.

Related

[Q] Reformat data partition as ext4

Rather than making a loopback filesystem, I've been trying to reformat the data partition as ext4, but haven't been able get past the galaxy "S" screen yet (the big S on boot). Here's what I did
* Compile a kernel with ext4 and modified init.rc to mount /data as ext4.
* Reboot into recovery and format /dev/block/mmcblk0p2 as ext4.
* Reboot into download and flash the custom kernel.
It was stuck at "S" for a while, then the screen went dark, and the only thing I could do was to pull out the battery. Then I went into recovery mode and found the partition was trashed, i.e. I couldn't mount it as ext4 again. I had to format it back to rfs and restore the stock kernel to get it to boot. I have to believe that there's something other than init.rc that assumes data partition to be in a certain format. Has anyone had success on a similar task?
BTW, the same process DID work for /dbdata, but I see no visible improvement in Quadrant score...
I has a similar thing occur on my first attempt with nilfs2. Did you remove anything that would attempt to mount as rfs? I think the rfs driver will claim pretty much anything that might be rfs, so if your format left the backup FAT intact, that might be your problem. By the way, the nilfs2+user_init kernel I posted in the mimocan fix thread does support ext4 as well, and allows you to customize the mount without rebuilding your kernel.
Sent from my SAMSUNG-SGH-I897 using XDA App

[Q] Why not using compressed fs (cramfs,squashfs) for /system (nand p2)?

Hey all,
assumed that within /system will only written at installation time (and yeah, by OTA upgrades, root usage, etc.), would it be a mess to use a compressed fs?
There are cramfs (r/o) and squashfs (r/o). These are also used by other embedded systems like openwrt.
So when it is r/o , could it be overlayed by another partition? So nand p3 could overlay /system and /data would be a normal folder in the overlay and does'nt need its own mount.
Just some thoughts to increase user space on my good old device which is now reborn, thanks to Android.
Cheers,
Sven

[Q] SD Card will not mount after ext4 part.

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S (US, T-Mobile, manufactured Dec. '10)
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've tried all the recommended procedures garnered from the first 10 or so pages in google, xda, cyanogem forum, etc:
Restore from nandroid: Not possible, can't mount the SD,
Wipe/Reset: can't wipe /media as sd card won't mount,
partition sd card from within Clockwork: indicates success but does nothing,
format from within clockwork: unable to mount,
repartition using adb: works, parted can see them, I can move files to from, but the phone will not mount,
clearing fstab: no effect,
Fastboot works, but I don't have the proper images. ADB works, as do the installed utilities. Have not tried ODIN as again, I don't have the proper images. Should I attempt to compile my own images from source?
Update: SOLVED, Microsoft Windows. To whom it may concern: I was able to mount the /dev/block/platform/s3c-sdhci.0/by-name/media from two different laptops running OSX and Fedora/Ubuntu then successfully been able to partition them with fat32 as the ClockworkMod (and maybe Cyanogen?) expect with 0 progress. Then I pulled out an old Windows machine, installed the JDK/ADK's +tools and performed the same procedure and that time it worked. I'm uncertain as to what particular quality a 'genuine' Windows formatting provides, but either this phone or the particular software combination I'm running require it. I was able to mount & re-partition the /sdcard in Clockwork, then manually remove rebuild them and upgrade to ext4 using tune2fs as usual. In the interim for work and such, I had to find a surrogate (for the SIM) and could only find and old k750i (which still had a full charge and worked flawlessly all day, btw). Wow phones used to be small.
I think I was missing something about the way ClockworkMod handles fstab, because everytime I would modify it specifically to the specs I passed to parted while creating the partitions with mkpartfs, it would either ignore or overwrite them. So be careful messing with the sd-card, the S's aren't like the One's in the sense that if you screw it (the sd-card) up or it goes bad you can't just take it out and format it in another machine/phone, you have to appeal to ClockworkMod. ODIN $ucks by the way, I found fastboot to be much more effective.
If you format the sd partition ext4, then you should change the fstab too.
from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
to from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard ext4 rw
or from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard auto rw
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Of course, I don't know, whether the recovery has the vfat type in fstab. You might have to change it there too. On my linux box auto works very well in fstab.
Of course, if you partition your sd partition ext4, you won't be able to use it as usb memory from windows. (At least I am pretty sure you can't, haven't tried)
Well of course I couldn't let it die, I went back and started tinkering again now that I have a way back. I can't change the fstab it seems, whatever I change it to gets over written everytime either Clockwork or the Rom starts. It's weird, I know I'm missing something and I don't know much about CWMod. (had Amon_Ra on the N1, which had the nifty fsupgrade script)
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Click to expand...
Click to collapse
I'm quite familiar with unix style fs and fstab, it's the stubbornness I'm not used to. I'm also spoiled by vi and nano. CW has some nice scripts built in as well though.

Need FS Block Size: Bad Magic Block Error

SHORT: I need the filesystem block size (location would be nice too; however, I can guess that) so I can use e2fsck to restore my super-block.
LONG: I have been having issues for the past several days where I cannot umount /system. I thought it may have been a bad conversion going to/from or from/to rfs and ext4 and thought doing the conversion again had fixed it. But alas...it didn't.
I cannot umount the files system from adb ("device is busy" error) or CWMR ("Couldn't find valid filesystem superblock" in the log) on any version of ROM or using any kernel that I can find. Voodoo can seem to convert the filesystem (back/forth), but it only seem to work if I tell it to from the Voodoo Control and then reboot, which is odd. Still cannot umount.
When I try and use Navenedrob's Ext4 Formatter, it fails for /system. CWMR's log shows:
/tmp/tune2fs: Bad magic number in super-block while trying to open /dev/block/stl10
Couldn't find valid filesystem superblock
Should be fixable with e2fsck, if I can get the correct information from tune2fs.
Typically, the command should be:tune2fs -l /dev/block/stl10 OR tune2fs -l -L /system
That said, tune2fs is tell me "-l" is an unknown option.
Can someone who is familiar with tune2fs (or other filesystem tools) in the Android/BusyBox environment please post either the correct command or a list of the contents of the filesystem super-block? Please be sure to include if your /system is in EXT4 or RFS.
Man, I haven't see this **** in years. Even then, it was pretty exclusive to virtual/networked file system (e.g. LVM).
Any-who, much appreciated....
So, after sleeping on it, I came to realize an error in my thinking...
I cannot use e2fsck to fix an RFS filesystem. Even more upsetting is that I cannot seem to find anything on The Google about command line RFS tools. Guess I could try a conversion and EXT filesystem, then change the superblock, then convert back to RFS, but that seems awfully convoluted.
Suggestions?
I suggest you odin with pit and check repartition. That *usually* fixes everything.
Sent from my debloated ep1q charge......bro.
Thanks for the tip...I probably should have mention that I've used Pit+ED1 numerous times in a effort to fix this. It goes through successfully; however, it doesn't actually wipe the partition and I've found old files in /system.
UPDATE:
Last thing I tried is manually wiping everything from /system (in CWMR + adb shell). Also, wiped everything I could find having anything to do with voodoo or EXT4 (just in case). After power off then back to recovery, I found I could umount /system. Created a new partition, formatted, then wacked the partition.
I just (successfully) ran ED1+pit from the Samsung Flashing Utility (which I have NOT tried using before) and I am now in the process of upgrading. Once I have root back, I'll go see if the fix for /system was permanent.

Question f2fs read-write

I wanted to start customizing a ROM for our s22 and I was wondering how can I make system and vendor partitions read-write
to edit the files inside
for ext4 it was possible to unshare_blocks. not sure it's possible for f2fs. but you could convert into ext4 still..
https://forum.xda-developers.com/t/...s-rw-in-super-partition.4120963/post-87115427

Categories

Resources