Samsung Moment
Find Your Forum
  
Welcome, Guest. Please login or register.
Did you miss your activation email?

News: Do you like Samsung Moment?
Advanced search
Scratch-Proof your Samsung Moment        Best Price on Sprint Phones      Screen Protection Latest Ringtone for your mobile
Pages: [1]
Print
Topic: Huh.. did get something interesting from Spica Kernel  (Read 1819 times)
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« on: December 31, 2009, 01:59:57 PM »

Code:
+---------------------------------------------------------------------+
|  ffdisk : RFS-level Partitioning Tool for Flash Block Devices       |
+---------------------------------------------------------------------+
Usage : ffdisk [-a] <flash_block_dev>
-a option that automatically format without user interaction
-u user-region-percentage
Must be (100 >= percentage > 0)
The default is 100
-r reserved-area
Must be (10 >= area >= 2)
The default is 2
        <flash_block_dev> : device file for an FTL block device
                            (ex) /dev/bml0/1 : 1st FTL block device
                                 /dev/bml0/2 : 2nd FTL block device
                                 /dev/bml0/3 : 3rd FTL block device
[ffdisk] (i,f,q,h) >
-----------------------------------------------------------
 i : Print the device information
 p : Print the current partition table
 r : Rewind the partition table back to the one saved last
 f : Perform FTL-level format
 q : Quit this program
 h : Show this help message
-----------------------------------------------------------

Code:
+---------------------------------------------------------------------+
|  fdump : Low-level Partition Dump Tool for NAND Flash Memory        |
+---------------------------------------------------------------------+
Usage : fdump [-s] [-t] <flash_dev> <dump_file>
 -s          : exclude the spare area dump
 -t          : truncate dump file with valid STL blocks (STL partition only)
 <flash_dev> : device file for a flash memory chip or block device partition
             (ex) /dev/bml0/2 : 2nd partition of the 1st flash chip device
                  /dev/bml1/1 : 1st partition of the 1st flash chip device
 <dump_file> : output dump file

Code:
Usage : ferase <flash_chip_dev>
        <flash_chip_dev> : device file for a flash memory chip
                           (ex) /dev/bml0/c : 1st flash chip device
                                /dev/bml1/c : 2nd flash chip device
                                /dev/bml2/c : 3rd flash chip device
« Last Edit: December 31, 2009, 02:03:48 PM by zefie » Logged
Decepticrock
Newbie
*

Cookies: 0
Posts: 41



View Profile
« Reply #1 on: December 31, 2009, 02:04:50 PM »

Woah.  It actually came with the ffdisk utility? 
Logged
peepsalot
Jr. Member
**

Cookies: 8
Posts: 90


View Profile
« Reply #2 on: December 31, 2009, 02:55:03 PM »

So will this fdump give us an Odin-flashable .rfs image file with all the extra OOB data?  Are you able to run these utilities on the moment?
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #3 on: January 01, 2010, 11:49:10 AM »

So will this fdump give us an Odin-flashable .rfs image file with all the extra OOB data?  Are you able to run these utilities on the moment?

They run, but I didn't try reflashing yet.

Well, ffdisk says it would need a format before it can read partitions so I'll probably remove that later
Logged
peepsalot
Jr. Member
**

Cookies: 8
Posts: 90


View Profile
« Reply #4 on: January 01, 2010, 04:50:23 PM »

Tried fdump on /dev/bml5 just now and the dump matches the factoryfs.rfs from the recovery tar exactly, except for some additional data at the end of the dump file.  But I think that's because I didn't get a completely fresh dump of it.
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #5 on: January 01, 2010, 05:13:57 PM »

Tried fdump on /dev/bml5 just now and the dump matches the factoryfs.rfs from the recovery tar exactly, except for some additional data at the end of the dump file.  But I think that's because I didn't get a completely fresh dump of it.

so basically they gave us what we need to make releases lol
Logged
peepsalot
Jr. Member
**

Cookies: 8
Posts: 90


View Profile
« Reply #6 on: January 01, 2010, 05:35:28 PM »

Tried fdump on /dev/bml5 just now and the dump matches the factoryfs.rfs from the recovery tar exactly, except for some additional data at the end of the dump file.  But I think that's because I didn't get a completely fresh dump of it.

Er, crap i got that backwards... the dump is smaller than the rfs file from the recovery tar by a couple megs. 
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #7 on: January 01, 2010, 05:38:55 PM »

Tried fdump on /dev/bml5 just now and the dump matches the factoryfs.rfs from the recovery tar exactly, except for some additional data at the end of the dump file.  But I think that's because I didn't get a completely fresh dump of it.

Er, crap i got that backwards... the dump is smaller than the rfs file from the recovery tar by a couple megs. 

did you clean any unwanted apps out maybe thats why. otherwise it isnt dumping the oob either Sad
Logged
peepsalot
Jr. Member
**

Cookies: 8
Posts: 90


View Profile
« Reply #8 on: January 01, 2010, 05:48:59 PM »

It's definitely dumping the OOB, because the hex data is 100% identical to the recovery rfs up to the point where the file ends.  I'm trying a full dump of bml0 right now to see if I can extract the full bml5 rfs data from that.
Logged
peepsalot
Jr. Member
**

Cookies: 8
Posts: 90


View Profile
« Reply #9 on: January 01, 2010, 06:47:07 PM »

Ok, I was able to extract the full factoryfs.rfs data from an fdump of bml0.

boot phone to recovery mode:
adb shell
fdump /dev/bml0 /sdcard/bml0
exit
adb pull /sdcard/bml0 ./
dd ibs=2112 skip=4096 count=56576 if=bml0.rfs of=factoryfs.rfs

I'm using dd in increments of 2112, which is equal to the 2048 + 64 block size, since everything we dump will always be a multiple of that.

On an unmodified filesystem this will get you a byte for byte copy of the factoryfs.rfs from the recovery tar.

BUT, there is still one more thing left to figure out.  The factoryfs.rfs file is not the full size of the partition.  The full partition size is 64000 blocks instead of the 56576 which I am dumping to match the factoryfs.rfs.  So, if we wanted to dump a modified partition, we will need to figure out a way to know how many blocks to leave off the end.  Or it could be possible that dumping all 64000 blocks and flashing that will work fine.  The thing that bothers me about this idea, is how could the phone possibly be handling bad blocks if we are writing raw data to every last block.
« Last Edit: January 01, 2010, 07:17:01 PM by peepsalot » Logged
Pages: [1]
Print
Jump to:  

Got a new phone? Find the forum here


Related Topics
Subject Started by Replies Views Last post
Custom Kernel « 1 2 ... 25 26 »
Rooting
zefie 381 32980 Last post January 08, 2010, 06:53:16 PM
by yourm0m1
semi-interesting discovery
Rooting
zefie 3 869 Last post December 30, 2009, 07:05:25 PM
by Tyeo098
Kinda old but interesting article about android
General Android discussions
syntheticNRG 1 864 Last post April 29, 2010, 10:26:00 PM
by infamousjax
Another interesting 2.1 contact question
How To....
irratebass 3 780 Last post May 19, 2010, 01:49:57 PM
by Risket




Galaxy S3 | Galaxy Note | Galaxy Nexus | Kindle Fire | Atrix 4G | Motorola Xoom | Windows Phone 7
Nokia Lumia | Tech Support Forum | Top Hosts | Samsung Galaxy Tab | Samsung Galaxy S2 | Samsung Galaxy S | Samsung Wave
HTC Evo 3D | HTC Evo 4G | HTC Incredible | HTC Incredible 2 | HTC Incredible S | HTC Thunderbolt
Motorola Droid Razr
| HTC Desire | HTC Desire HD | HTC Desire Z | HTC Desire S | HTC Wildfire
Motorola Droid | Galaxy Indulge | Nokia N8 | Droid Charge | Droid X | Droid X2 | Droid 2| Droid 3 | Fascinate
HTC Sensation | HTC Flyer | LG Revolution | Asus Transformer | Xperia Play | iPhone 4 | Nexus S | Droid Bionic
HTC One | HTC Wildfire S | HTC Droid Eris


This is an Un-Official fan based Website. The views expressed on this website are solely those of the proprietor, or contributors to the site, and do not necessarily reflect the views or opinions of the parties it covers, and is not affiliated with, endorsed or sponsored by parties involved.
If you have a problem with any of the content posted on this website, please contact "mobile@vssupportqueue.com"
Term of Use | Privacy Policy | BlackRain 2006 by, Crip



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Sitemap