Commit Graph
22 Commits
Author SHA1 Message Date
jujuforce 2ef6c992f9 fix: resolve VHD chains via parent/own GUIDs 2026-04-20 20:44:56 +02:00
jujuforce d719125ea3 fix: set file times after writing to preserve source mtime 2026-04-20 14:28:12 +02:00
jujuforce 558c0ecec0 fix: parse exFAT UtcOffset per spec, tolerate bad timestamps 2026-04-20 11:37:53 +02:00
JujuforceandClaude Opus 4.6 068badad7e feat: name output folder after the input .app file
Output directory is now derived from the input .app path (without
extension) instead of the intermediate VHD filename.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 2121b43699 feat: pure Rust VHD merge, remove PowerShell dependency
Replace Set-VHD + Merge-VHD PowerShell cmdlets with a pure Rust
MergedVhdReader that overlays delta blocks on the base VHD using
the sector bitmap to decide which sectors come from which disk.
No actual merge to disk needed — reads directly from both files.

- No admin privileges or UAC prompts required
- No Hyper-V or PowerShell dependency
- Cross-platform (works on Windows and Unix)
- Remove #[cfg(windows)] from merge/extract path

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 65b070adbd refactor: clean up code, use constants, separate concerns
- Move VHD parsing and NTFS extraction to src/vhd.rs
- Replace all hardcoded magic values with named constants
- Extract shared progress bar style to constant
- Simplify main.rs merge/resolve logic with helper functions
- Condense formatting without changing behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 f612c44f19 feat: pure Rust VHD extraction, no admin/Hyper-V needed
Replace PowerShell-based VHD mounting (Set-VHD/Mount-VHD/Copy-Item)
with a pure Rust implementation. New src/vhd.rs module:
- VhdReader<R> parses fixed and dynamic VHD formats
- Handles MBR partition tables and NTFS offset detection
- Dynamic VHD support with BAT (Block Allocation Table) parsing
- Recursive NTFS directory extraction with timestamp preservation
- No elevation, no Hyper-V, works cross-platform

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 96bb605a17 feat: extract VHD contents to folder and delete VHD
After decryption and merging, VHDs are now mounted via Hyper-V,
their contents copied to a same-named folder (excluding system
dirs), then dismounted and deleted. Handles partitions without
drive letters by assigning one temporarily. Uses a temp .ps1
script to avoid nested PowerShell quoting issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 6b06bc4e92 feat: auto-extract base .app when only delta is provided
When no base VHD is found, fsdecrypt now also searches for the base
.app file ({game_id}_*_0.app) in the same directory, extracts its
VHD, and then merges the delta into it automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 371abf4e32 feat: search for existing base VHD in same directory
When only a delta .app is provided without the base, fsdecrypt now
scans the same directory for an existing base VHD matching the
game ID pattern ({game_id}_*_0.vhd) before giving up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
JujuforceandClaude Opus 4.6 c896f362ba feat: auto-merge delta VHD updates for APP containers
When multiple APP files are provided (base seq=0 + delta seq>0),
fsdecrypt now automatically links and merges the differencing VHD
into the parent using Set-VHD + Merge-VHD (Windows/Hyper-V only).
Triggers a single UAC prompt for elevation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:40:18 +01:00
beerpsi 4c3ebd9771 fix IV derivation 2026-01-21 09:26:00 +07:00
beerpsi 362fb91ff7 feat: also extract exfat without saving intermediary exfat image 2026-01-21 09:05:10 +07:00
beerpsi 0c4a521bc2 feat: directly extract VHD for apps and packs 2026-01-20 18:00:19 +07:00
beerpsi 8db2d1e71b port buffering to exfat extraction 2025-11-04 13:05:10 +07:00
莯凛 8c5998a85c perf-buf-size (#2)
Increased IO throughput when laying out VHD file

`std::io::copy` will only setup an 8KiB stack buffer, which results sub optimal performance when passing `File` directly.

Reviewed-on: https://gitea.tendokyu.moe/beerpsi/fsdecrypt/pulls/2
Co-authored-by: 莯凛 <mokurin000@gmail.com>
Co-committed-by: 莯凛 <mokurin000@gmail.com>
2025-11-04 05:53:17 +00:00
beerpsi ece90ebb5b ntfs extraction + add spinner for extracting images 2025-07-17 20:54:53 +07:00
beerpsi 8b34b87732 feat: NTFS support 2025-07-17 19:57:03 +07:00
beerpsi 1d79e96509 feat: set access/modified time from the exfat 2025-07-16 23:36:42 +07:00
5d1e0ca908 feat: exfat content extraction (#1)
Co-authored-by: jujuforce <jujuforce@gmail.com>
Co-authored-by: beerpsi <beerpsi@noreply.gitea.tendokyu.moe>
Reviewed-on: https://gitea.tendokyu.moe/beerpsi/fsdecrypt/pulls/1
Co-authored-by: jujuforce <jujuforce@noreply.gitea.tendokyu.moe>
Co-committed-by: jujuforce <jujuforce@noreply.gitea.tendokyu.moe>
2025-07-16 15:49:11 +00:00
beerpsi 4f445011c3 fix: starhorse broke my shit 2024-07-22 10:12:42 +07:00
beerpsi dbbe287b1c initial commit 2024-07-21 23:59:02 +07:00