-
UFS2Tool v4.0 Stable
released this
2026-02-15 10:45:15 -06:00 | 7 commits to main since this release🗄️ UFS2Tool v4.0
🖥️ New GUI Features
- UFS Image Content Browser
- Tree-view content browser for inspecting and manipulating UFS image contents, with drag & drop for adding files.
- Refresh, Extract, Add File, Add Folder & Delete options
- Write Filesystem
- Write UFS images to USB/HDD/SSD drives on Windows, Linux, and macOS
- PS5
- Batch Processing to convert multiple folders to UFS images in one operation.
- Language auto-detection
- Auto-applies language from OS locale on startup
📟 New UFS Image Commands
du- Display disk usage for files and directories in a UFS1/UFS2 filesystem image, similar to FreeBSD's
du(1).
- Display disk usage for files and directories in a UFS1/UFS2 filesystem image, similar to FreeBSD's
find- Searches recursively for files and directories matching a name pattern within a UFS1/UFS2 filesystem image. Similar to the Unix
find(1)command with-namematching.
- Searches recursively for files and directories matching a name pattern within a UFS1/UFS2 filesystem image. Similar to the Unix
stat- Displays detailed inode information for a file, directory, or symbolic link inside a UFS1/UFS2 filesystem image. Similar to the Unix
stat(1)command.
- Displays detailed inode information for a file, directory, or symbolic link inside a UFS1/UFS2 filesystem image. Similar to the Unix
🌍 New Languages
- Bahasa Indonesia
- Magyar
- Nederlands
- Português (Brasil)
- 中文 (繁體) (Traditional Chinese)
🔧 Fixes
- Core Fixes
- Nullable
_writerfield (Ufs2Image.cs):_writeris only initialized whenreadOnly=falsebut was declared non-nullable, producing CS8618 warnings. - Constructor resource leak (
Ufs2Image.cs): IfReadSuperblock()throws (invalid image), the already-openedFileStream/BinaryReader/BinaryWriterwere never disposed. GetDiskFreeSpacereports wrong free space — was computingFreeBlocks * FSizebutFreeBlocksis free blocks (not fragments), underreporting byBSize/FSize(typically 8x).lscommand ignores[path]argument — always calledListRoot()regardless of user-specified path; now resolves and lists the given directory.- Buffer overread in
Ufs2DirectoryEntry.ReadFrom— corrupt entries withNameLength > nameAreaSizewould index out of bounds. ReadInode()/WriteInode()—totalInodesbounds check usedintmultiplication; changed tolongto prevent overflow bypassing the validation.FsckUfs()— Same overflow intotalInodesused to size per-inode tracking arrays; added explicit overflow guard since arrays requireintlength.AllocateInode()/FsckUfs()Phase 5 —globalIno = cgIndex * inodesPerGroup + ioverflows.
- Nullable
- GUI
- False success message on invalid input: Mode parsing (octal conversion) was inside the
Task.Runlambda. OnFormatException/OverflowException, the lambda returned early but the outer async method still logged "Successfully changed permissions". - Directories inaccessible after recursive chmod:
image.ChmodAll(mode, mode)applied the same mode to files and directories. Setting644recursively stripped execute bits from directories, making them untraversable. AddedAddExecuteBitshelper (matching CLI behavior) to derive directory mode.
- False success message on invalid input: Mode parsing (octal conversion) was inside the
- Reliability
Stream.Readpartial read handling — addedReadFullyhelper that loops until all bytes are read and throwsEndOfStreamExceptionon truncated data.- Bounds validation in
ReadInode/WriteInode— validates inode number against total count and computed offset against stream length before I/O. - Removed redundant
new BinaryReader(_stream)inReadIndirectBlock/ReadDoubleIndirectBlock/ReadTripleIndirectBlock— reuses existing_readerfield.
- Dokan mount error handling
SetEndOfFile: reject negative or> int.MaxValuelengths withInvalidParameter.WriteFile: reject negative offsets; returnInvalidParameteronnewSize > int.MaxValueoverflow.- Explicit
(int)casts on validatedlongvalues for type safety.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- UFS Image Content Browser