Skip to content

Fix NAND archive path resolution and OLED temp space checks#11

Open
denchik28 wants to merge 2 commits intosthetix:mainfrom
denchik28:fix/partitions-path-and-oled-space
Open

Fix NAND archive path resolution and OLED temp space checks#11
denchik28 wants to merge 2 commits intosthetix:mainfrom
denchik28:fix/partitions-path-and-oled-space

Conversation

@denchik28
Copy link
Copy Markdown

@denchik28 denchik28 commented Apr 22, 2026

Summary

This PR fixes two issues in nandfixpro.py:

  1. NAND archive resolution
    In several flows, archive paths were hardcoded to script_dir/lib/NAND, which could fail depending on runtime context.
    The code now resolves archives consistently via partitions_folder from Settings, with a stable app-directory fallback.

  2. Temp disk space checks for OLED / 64GB NAND
    Space checks were previously static and could underestimate required free space for OLED-sized NAND.
    The required free temp space is now dynamic:

    • 32GB NAND class -> 64GB required
    • 64GB NAND class (OLED) -> 128GB required

What changed

  • Added helper methods:
    • _get_app_base_dir()
    • _get_partitions_folder()
    • _estimate_nand_size_gb()
    • _required_temp_space_gb()
  • Replaced hardcoded lib/NAND path usage in:
    • Advanced USER fix flow
    • Level 2 rebuild flow
    • Level 3 donor NAND preparation + partition extraction flow
  • Updated Level 2/3 to run disk-space check using dynamic required space based on detected NAND size.
  • Added explicit user-facing error when partition archives folder cannot be resolved.

Validation

  • python3 -m py_compile nandfixpro.py passes.

@denchik28 denchik28 closed this Apr 23, 2026
@denchik28 denchik28 deleted the fix/partitions-path-and-oled-space branch April 23, 2026 09:11
@denchik28 denchik28 restored the fix/partitions-path-and-oled-space branch April 23, 2026 13:23
@denchik28 denchik28 reopened this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant