Copy From: http://www.hiapk.com/thread-543835-1-1.html
Your environment is Linux and Ruby is installed
2. Run Ruby stage1.rb and generate the stage1 file in the local directory. The generation process is long Because Ruby is very inefficient (it should be much faster to change to C)
3. Run Ruby stage2.rb to generate output. vfat (this is a vfat file)
4. If a vfat file is generated, you can use mount to load the output. vfat file to the/mnt/RFS directory.
Sudo Mount-o loop-T vfat ~ /RFS-extract/output. vfat/mnt/RFS
5. At this time, you can access the files in factory. RFS in the/mnt/RFS directory.
6. If you want to decompress other files, such as data. RFS, Change Factory. RFS in stage1.rb to data. RFS.
Copy From: http://www.hiapk.com/thread-530298-1-1.html
The system partitions, cache partitions, and data partitions in the Samsung factory and official Rom use the so-called Samsung RFS filesystem. The pda.tarin the official romers package factoryfs.rfsand datafs.rfs, and cachefs in csc.tar. RFS, I have never understood what the RFS format is. I tried to mount the file by fat. If it fails, it will be mounted by ext2. If it fails, it will also fail to be mounted by Android root filesystem, ramfs also fails. I rely on it. Why is there such an abnormal private file system. After trying to analyze its blocks, I found that the difference between the fat format and the fat format is that there is an extra 64 bits in every 2048, and then Google searches for the essence of the great Samsung RFS, actually: the fat format carries another log, that is, record every 2048 to protect power outages.
Fat itself is a low-performance format, and you need to embed logs directly. The time and memory you mount each time you boot will be very large! No wonder it takes more than one minute to start 5700 every time. Why not use ext3?
Based on this principle, 64 bits is removed at intervals of 2048, a new file is obtained, the file is converted to fat, and then mounted as a hard disk image. Finally, the files in each official Rom are seen.
PS, these files are not new, PDA package factoryfs. RFS is the content of the system in the Rom, including the APK and odex of various systems. The main structure in the ZIP file of MOD is almost the same, datafs. RFS contains only a few text documents, including cachefs in the CSC package. RFS is equivalent to a recovery, which is to patch the system. The patch is generally the APK and other system files in the specified language region.
As long as you do not brush the CSC package, your machine is a pure International Rom without Chinese.
Such a ROM file system has a major harm. The speed and memory overhead are lost at the starting line.