Skip to content

Read current partition scheme / table, download individual partitions or all/some flash. - #164

Draft
tyeth wants to merge 5 commits into
espressif:mainfrom
tyeth:readCurrentPartitions
Draft

Read current partition scheme / table, download individual partitions or all/some flash.#164
tyeth wants to merge 5 commits into
espressif:mainfrom
tyeth:readCurrentPartitions

Conversation

@tyeth

@tyeth tyeth commented Nov 30, 2024

Copy link
Copy Markdown

I'm looking for feedback, I've added the partition reader to esptool-js, along with the ability to download flash data.

Test it here: https://tyeth.github.io/read-partitions-esptool-js/

Ideally I want to have a littlefs and fatfs data explorer incorporated too, but I'm a little ways off (down the rabbit hole of filemanagers, although the fatfs/littlefs stuff should be okay).
I mainly want this for easy editing of secrets in littlefs devices, along with dropping files into the file system with relative ease (without installing anything).

I would really appreciate any suggestion of open source easy to use file manager type components or whatever (typescript/javascript/wasm), along with feedback on whether you think the esptool-js should include the partition/flash reading functionality, and potentially file manager (reading file systems from partition / img / bin and editing the contents through a file explorer).

Before submitting this properly I'd clean up the code along with css / todo comments.

@brianignacio5

Copy link
Copy Markdown
Collaborator

Hi @tyeth thank you for your PR. Will take a look when I have some time.

Regarding the file manager, I wanted to implement it too for the esp-idf vscode extension but the issue is to get the file tree from binaries when you don't really know what is in the image. Required work is a bit out of my scope but I will poke some people about it.

@tyeth
tyeth force-pushed the readCurrentPartitions branch from 9a142ad to e25415f Compare December 10, 2024 14:10
@Jason2866

Jason2866 commented Dec 20, 2024

Copy link
Copy Markdown
Contributor

@tyeth May it helps. Here it is a Platformio Python script which does similar what your PR does for esptool.js.
It downloads the LittleFS partition image and extracts the files from the image.
https://github.com/arendst/Tasmota/blob/development/pio-tools/custom_target.py

For working correctly to extract the files I had to compile the mklittlefs tool myself.
The provided from Platformio registry does not work...
The mklittlefs source and released binarys are here https://github.com/Jason2866/mklittlefs_esp32

P.S I was deep in the rabbit hole ;-)

@tyeth

tyeth commented Dec 20, 2024

Copy link
Copy Markdown
Author

@Jason2866 thanks so much!
Was looking if the Adafruit pure js littlefs version we use to generate partitions could be used for reading (or fixed up to add missing functions). Then I got distracted in this beautiful wasm littlefs simulator, then realised I'd been neglecting my main tasks hehe, hopefully I'll revisit over the holidays

@Jason2866

Copy link
Copy Markdown
Contributor

@tyeth Just tested your tool online. Well done. Love it!

@Jason2866

Jason2866 commented Dec 20, 2024

Copy link
Copy Markdown
Contributor

There is a Python LittleFS implementation https://github.com/jrast/littlefs-python
may this is easier to port

@tyeth
tyeth force-pushed the readCurrentPartitions branch from e25415f to 527d192 Compare January 14, 2025 13:13
@tyeth
tyeth force-pushed the readCurrentPartitions branch from 527d192 to a9d081b Compare January 14, 2025 15:59
@tyeth tyeth changed the title Read current partitions Read current partitions table, display list, download individual partitions Jul 20, 2025
@tyeth tyeth changed the title Read current partitions table, display list, download individual partitions Read current partition scheme / table, download individual partitions or all/some flash. Jul 20, 2025
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.

3 participants