Skip to content
MicaNT-KernelPublic

About

Flash-Friendly File System (F2FS) Userland Engine, WinFsp Mount Driver, and Storage Daemon for Windows NT & MicaNT

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

TitanF2FS Hero Artwork

TitanF2FS

Clean-Room Flash-Friendly File System (F2FS) Storage Engine & WinFsp Mount Driver for Windows NT & MicaNT

CI License: Apache 2.0 Standard: C++23 Platform


Overview

TitanF2FS brings native support for Samsung's Flash-Friendly File System (F2FS) to Windows NT and the MicaNT operating system without third-party kernel drivers or proprietary components.

Designed specifically for NAND flash memory devices (NVMe SSDs, eMMC, SD cards, USB flash drives, and Android storage devices), F2FS utilizes a log-structured file system (LFS) architecture that optimizes write amplification, prevents wear-out hotspots, and delivers high random write throughput.

With TitanF2FS, Windows users, developers, and administrators can format, verify, scrub, and mount F2FS partitions, physical SD cards, Android storage dumps, and raw disk images directly to Windows drive letters (F:\).


Architectural Highlights

  • Userland Storage Engine: Zero kernel-mode drivers; 100% crash-isolated execution in user space via the WinFsp user-mode filesystem framework (zero risk of Blue Screens / BSODs).
  • Pure ISO C++23 Engine: Clean-room implementation handling Superblock (0xF2F52010), Checkpoint blocks, Segment Information Table (SIT), Node Address Table (NAT), Segment Summary Area (SSA), Inode tables, directory dentry blocks, and inline file data.
  • Log-Structured Consistency Scrubber: titanf2fs_check.exe verifies segment allocations, checkpoint validity, and directory health.
  • Background Service Daemon: titanf2fs_svc.exe runs as a Windows NT service providing Named Pipe IPC (\\.\pipe\titanf2fs_ipc) for disk discovery, hot-plugging, and automated mounting.
  • 1-Click Installer: Self-contained titanf2fs_setup.exe with bundled WinFsp MSI and LZ4-compressed binaries.

Prerequisites

To mount F2FS filesystems as Windows drive letters, WinFsp (Windows File System Proxy) is required.

  1. Install WinFsp:
  2. Administrator Privileges:
    • Required only when accessing physical drives (e.g., \\.\PhysicalDrive2).
    • Mounting regular disk images (.img, .raw) does not require Administrator rights.

Quick Start Guide

Step 1: Create or Format an F2FS Volume

You can format a raw disk image file or a physical storage drive:

# Create and format a 512 MB raw F2FS disk image:
titanf2fs_format.exe flash_drive.img --size 512 --label "TitanFlash"

# Or format an existing physical SD card or USB drive (Run as Administrator):
titanf2fs_format.exe \\.\PhysicalDrive2 --label "SamsungSD"

Step 2: Mount to a Windows Drive Letter

Mount your F2FS container or device directly to any available Windows drive letter (e.g., F:):

# Mount disk image to drive F:
titanf2fs_mount.exe flash_drive.img F:

# Mount with custom volume label in read-only mode:
titanf2fs_mount.exe flash_drive.img F: --label "AndroidData" --readonly

# Mount a physical SD card / USB drive (Run as Administrator):
titanf2fs_mount.exe \\.\PhysicalDrive2 S: --label "SamsungSD"

Once mounted, F:\ is immediately accessible in Windows Explorer, PowerShell, and Command Prompt like any native NTFS or FAT32 volume!

To cleanly unmount, simply press Ctrl+C in the console window.


Command-Line Tools Reference

1. File System Mounting Bridge (titanf2fs_mount.exe)

Usage: titanf2fs_mount <device_or_image_path> <drive_letter:> [options]

Options:
  --label <name>         Set volume label in Windows Explorer (default: disk label)
  --readonly             Mount volume in read-only mode

2. File System Formatter (titanf2fs_format.exe)

Usage: titanf2fs_format <target_device_or_file> [options]

Options:
  --size <MB>            Specify size in MB when formatting a new image file
  --label <name>         Volume label (max 16 characters)
  --overprovision <pct>  Overprovisioning segment ratio percentage (default: 5%)

3. Consistency Checker & Scrubber (titanf2fs_check.exe)

Scans F2FS metadata, verifies superblock CRC, validates active checkpoint versions, inspects NAT/SIT allocations, and audits directory trees:

titanf2fs_check.exe flash_drive.img

4. Background Storage Service Daemon (titanf2fs_svc.exe)

Runs in the background as a Windows NT service for hotplug event handling and system-wide mounting:

# Install as a Windows Service (Run as Administrator):
titanf2fs_svc.exe --install

# Start the service:
net start TitanF2FS

# Run interactively in the current console:
titanf2fs_svc.exe --run

# Uninstall the service:
titanf2fs_svc.exe --uninstall

Working with Android Storage & Physical Media

Mounting Android userdata.img / system.img

Modern Android devices format internal flash (/data) with F2FS. You can mount Android raw partition backups directly:

# If sparse Android image, convert to raw first (e.g. via simg2img):
# simg2img userdata.sparse.img userdata.raw.img

# Mount Android userdata to U:
titanf2fs_mount.exe userdata.raw.img U: --readonly --label "AndroidUserdata"

Identifying Physical Flash Drive Numbers

To find the physical drive path for an SD card or USB drive:

# In PowerShell:
Get-Disk | Select-Object Number, FriendlyName, Size, OperationalStatus

# If disk number is 2, the target path is:
\\.\PhysicalDrive2

Troubleshooting & FAQ

[-] Error: WinFsp dynamic library (winfsp-x64.dll) was not found on this system.

  • WinFsp is not installed. Download and install WinFsp from https://winfsp.dev or run winget install WinFsp.WinFsp.
  • If WinFsp was installed recently, ensure the WinFsp service is started (net start winfsp-launcher).

[-] Error: Failed to open F2FS volume at \\.\PhysicalDriveX

  • Windows requires Administrator rights to access raw block devices. Re-launch PowerShell or Command Prompt with Run as administrator.
  • Ensure another process (such as a disk partitioner or raw writer) does not have an exclusive lock on the drive.

[-] Error: Failed to mount F2FS volume to F:

  • The drive letter F: may already be in use by an optical drive, USB device, or network share. Choose another letter (e.g. X:, S:, M:).

[-] Error: Invalid F2FS Superblock Magic

  • The file or partition is not formatted with F2FS (expected magic 0xF2F52010). Run titanf2fs_format.exe or verify the disk using titanf2fs_check.exe.

Clean-Room Legal Provenance

TitanF2FS is an independent, clean-room implementation developed in strict adherence to:

  • 17 U.S.C. § 1201(f) (Reverse Engineering for Interoperability)
  • Google LLC v. Oracle America, Inc., 141 S. Ct. 1183 (2021)
  • Sony Computer Entertainment, Inc. v. Connectix Corp., 203 F.3d 596 (9th Cir. 2000)

Refer to CLEAN_ROOM_PROVENANCE.md for full compliance details.


License

TitanF2FS is licensed under the Apache License, Version 2.0. See LICENSE for details.

About

Flash-Friendly File System (F2FS) Userland Engine, WinFsp Mount Driver, and Storage Daemon for Windows NT & MicaNT

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages