How To Read from ESP32 - CLONE/BACKUP Everything

Sdílet
Vložit
  • čas přidán 12. 09. 2024
  • This was kind of a fun one that you might find useful someday like I did.
    Esptool git reference: github.com/esp...
    Flash chip datasheets: www.winbond.co...
    Here's all of those commands you can use as a starting point and note that on windows, things will be slightly different. Just follow the same steps and you should be good:
    Read from Adafruit Huzzah board (4MB):
    /Users/kevindarrah/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py --port /dev/cu.usbserial-01D5ECE0 --baud 921600 read_flash 0 0x400000 adafruit.bin
    Write back to Adafruit Huzzah:
    /Users/kevindarrah/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py --chip esp32 --port /dev/cu.usbserial-01D5ECE0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x0 /Users/kevindarrah/adafruit.bin
    Get Flash ID for size:
    /Users/kevindarrah/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py --port /dev/cu.usbserial-DA00Y7QG --baud 921600 flash_id
    Read trigBoard (16MB):
    /Users/kevindarrah/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py --port /dev/cu.usbserial-DA00Y7QG --baud 230400 read_flash 0 0x1000000 trigBoardbackup.bin
    Write trigBoard:
    /Users/kevindarrah/Library/Arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py --chip esp32 --port /dev/cu.usbserial-DA00Y7QG --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x0 /Users/kevindarrah/trigBoardbackup.bin
    Tindie link to trigBoard: www.tindie.com...
    Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
    / kdarrah
    Twitter: / kdcircuits
    For inquiries or design services:
    www.kdcircuits...

Komentáře • 87

  • @wadefallin
    @wadefallin Před 3 lety +3

    After all the years, I can still follow along with the math. When I was a younger man, serving in the Navy, I used to teach numbering systems to civilan programmers who were writting code for the Navy's Naval Tactical Data System. I taught Decimal to Binary conversion, Binary to Hexidecimal conversion, and assembly and compiling languages. Shortly after I left, they included teaching ForTran and Pascal languages. Gives you an idea just how long ago it was when I was teaching programming.

  • @ClaytonDarwin
    @ClaytonDarwin Před 3 lety +3

    Thanks, Kevin. Very useful. I'll definitely be using this soon. Looking forward to part 2 when you get a chance. 👍

  • @renebrsch
    @renebrsch Před 3 lety +11

    Flash encryption would be really interesting! Thanks for this cool video!

    • @bjornmartin6480
      @bjornmartin6480 Před 3 lety

      sorry to be off topic but does someone know of a tool to log back into an Instagram account?
      I stupidly forgot the password. I love any assistance you can offer me!

    • @landenemmitt3729
      @landenemmitt3729 Před 3 lety

      @Bjorn Martin Instablaster =)

    • @MysteryElectronicz
      @MysteryElectronicz Před 2 lety

      Does this encryption video exist?

  • @tecnologiaoficial
    @tecnologiaoficial Před měsícem

    Great explanation. Helped me to understand how to backup a 128Mbit (16MB) chip successfully.

  • @DarrahValentine
    @DarrahValentine Před 3 lety +1

    How interesting this is, I went a different direction in life, but this is fascinating as in my older years been learning more and more on components ...my IT guy will love this, sharing

  • @pileofstuff
    @pileofstuff Před 3 lety +1

    That may come in very handy in the near future. Thanks.

  • @TomHermans
    @TomHermans Před 2 lety +1

    Thanks, this worked great. Still noobish and messed up a TTGO display ESP32. Bought a new one and recovered the old with this method. 🙌

  • @richardperritt
    @richardperritt Před 3 lety +1

    Timely. Planned to research this tomorrow 😁👍
    Part 2 will be interesting

  • @panoriega
    @panoriega Před měsícem

    Thank you very much, nice example and explanation, I was able to backup the Factory Watchface from my Watchy 2.0

  • @DavidLeeMenefee
    @DavidLeeMenefee Před 3 lety +1

    I just saw your TRIGBOARD on the EEVBLOG, great job! thumbs up.

  • @stevetobias4890
    @stevetobias4890 Před 3 lety +1

    Cool video, I'm still a newbie with the ESP boards so very handy information

  • @reshadrei1788
    @reshadrei1788 Před 10 měsíci +1

    please don't stop making informative video.

  • @emanuelkszenics7689
    @emanuelkszenics7689 Před 2 lety +1

    it's kinda easy to stop you from duplicate their board, just put a condition on esp chip id and done, or perhaps checking the chip id on the server and rejecting the connection if it's not in their list

  • @antoni2nguyen
    @antoni2nguyen Před 2 lety

    I am looking forward to see the part 2, for a looong time :D

  • @sandeepkapare
    @sandeepkapare Před rokem +1

    @Kevindarrah
    Nice video. Were you able to work on the part 2 video of protecting the flash? Please share the link if it is available. Also if you can confirm if flash encryption can be done on ESP12-F as well? Thanks in advance.

  • @nyckid
    @nyckid Před 3 lety +6

    huz·zah : /həˈzä/
    exclamation
    used to express approval or delight; hurrah.
    "someone yelled “Huzzah!”"

  • @NicksStuff
    @NicksStuff Před 8 měsíci +1

    How do you keep your WiFi credentials safe (if you have an IoT module outside)? Is encrypting the flash enough (you mentioned at the end that part 2 would be about encrypting the flash)

  • @stupossibleify
    @stupossibleify Před 3 lety

    Great tutorial. Was researching how to do this only yesterday!

  • @ChaseCares
    @ChaseCares Před 7 měsíci

    This was super helpful, thank you!

  • @avejst
    @avejst Před 3 lety

    Great video as always 👍🙂
    Nice tool to use as a backup
    Thanks for sharing your knowledge to all of us 👍😊

  • @FrankGraffagnino
    @FrankGraffagnino Před 3 lety

    looking forward to a future video about protecting memory contents... if not the entire memory, perhaps just specific variables such as passwords and things. I would imagine that there would be simple mechanisms you could put into your code that would at least make storing passwords not obvious in a dump of the memory and would be simple for most folks to do.

    • @Kevindarrah
      @Kevindarrah  Před 3 lety +1

      yea got it on my list!

    • @dmackle3849
      @dmackle3849 Před 2 lety +1

      @@Kevindarrah sorry to exhibit search laziness but did this follow up happen? Thanks for this video. I had backburnered this chore since before you actually released this solution.

  • @oskimac
    @oskimac Před 3 lety

    I saw your video today. And then i encounter you again on Eevblog video one hour ago! Nice. It's a shame the low effort dave put in his videos nowadays.

    • @Kevindarrah
      @Kevindarrah  Před 3 lety

      either way, I was blow away to see Dave holding a trigBoard!

  • @Sysshad
    @Sysshad Před 7 měsíci

    On Atmel 8bit AVR you can set a fuse to prevent people from reading the flash/eeprom. They would only get zeroes.
    Im surprised the ESP32 doesnt have a similiar feature, being an more advanced MCU and all

  • @espero_dev
    @espero_dev Před 2 lety +1

    I need to get the read circuit reason why is I coded an esp and I didn’t save the code to my laptop please I need help

  • @mansurbhamani3905
    @mansurbhamani3905 Před 9 měsíci

    @Kevin, did you make the part 2 of the video you mentioned. It would be very interesting. Please share the link.

  • @ridwanullahiabdulrauf3224

    Wow, this just save my day................thank you very much

  • @ch0asnature
    @ch0asnature Před 6 měsíci

    Nice Video - quite informative
    Can you share the name or a link to the windows version of the Hex calculator i saw you using?
    regards

  • @leejohannes
    @leejohannes Před rokem

    On Chip last line XX, u can read the flash size

  • @WistrelChianti
    @WistrelChianti Před 3 lety

    Thanks! Some useful stuff learnt

  • @user-em6qj9jz4p
    @user-em6qj9jz4p Před 5 měsíci

    Hi, would like to ask if cloning an ESP32 will also clone it's MAC address ? For example, if you clone three pcs. ESP32, will all three have same MAC address ? Would like to know a good encryption technique using easy to use flashing software . Thanks

  • @chanyorkful
    @chanyorkful Před rokem

    Hello Kevin,
    How can I extract from ESPRESSIF if it does not have a USB Port? I can find the GND TX0 RX0, GND RST, CK and DA port.

  • @imranics1142
    @imranics1142 Před 2 lety

    Nice video interesting ,,, when will be the part 2 video comes for esp32 flash encryption, if any one has part 2 video details plz share in comments thank you .

  • @Od3o_ela_sabil_rabek
    @Od3o_ela_sabil_rabek Před 3 lety

    01:51 waiting for that

  • @michaeldavison9808
    @michaeldavison9808 Před 4 měsíci

    My use-case is that if I have a device that I have bought as part of a solution and I want to try it with my own version of the software I don't want to permanently delete the software it came with. (EG, Specifically a multi relay board with built in ESP01 and I want to temporarily change the ESP SW) So I need to be able to read the flash and restore it afterward.

  • @dpatt6175
    @dpatt6175 Před 9 měsíci

    How can you connect to one of these that has no USB port

  • @charlesmarseille123
    @charlesmarseille123 Před 2 lety

    god that was interesting. thanks a lot

  • @Daniel-ri2ys
    @Daniel-ri2ys Před 3 lety +1

    Please create a video about flash encryption 🙏

  • @permanenthairsystemludhian5143

    29% after heng problem ???

  • @dugy40
    @dugy40 Před 2 lety

    What program did you use? This is no help.

  • @signosvitales7969
    @signosvitales7969 Před rokem

    hi ...how can i write a file with .bin extension

  • @sinezty
    @sinezty Před 10 měsíci

    @kevindarrah Where is the second part? I've had a child now, but I don't think I'll ever find out the gender.

  • @Beatfreak19831
    @Beatfreak19831 Před 3 lety

    Very cool!

  • @HasanJunaid-y8h
    @HasanJunaid-y8h Před 9 měsíci

    wil it work even if its read protected esp32?

  • @TheEmbeddedHobbyist
    @TheEmbeddedHobbyist Před 3 lety

    ESP32 does have a flash encryption function to get around this issue. it uses AES-256 encryption and the key can not be accessed by software. PLuse there is also a secure boot option. So you can protect your firmware if you want, but i expect that somebody could still hack it if they spent enough time and effort.
    It's not uncommon to have memory protection on microcontrollers.

    • @Kevindarrah
      @Kevindarrah  Před 3 lety +1

      thanks yea it's normally pretty easy with uC's, but with the external flash here, takes a couple extra steps.

    • @solidfuel0
      @solidfuel0 Před rokem

      @@Kevindarrah what is uC ? Does it get you the encryption key

  • @lombard-ri7il
    @lombard-ri7il Před rokem

    Hi Kevin, realy useful but not sure if will work with protected Firmware

  • @RobertDickens2002
    @RobertDickens2002 Před rokem

    Do you have any videos for total newbs

  • @espero_dev
    @espero_dev Před 2 lety

    Do I do the same with an esp-12f 12e 12s ?

  • @rainerteschner7597
    @rainerteschner7597 Před 2 lety

    It does not work for me. I get the error A fatal error occurred: Invalid head of packet (0xFF). Any idea how I could fix it?

  • @sevketkarayilan
    @sevketkarayilan Před 9 měsíci

    How to prevent clone my esp code?

  • @Mr_Meowingtons
    @Mr_Meowingtons Před rokem

    man i wish we can just do this with the Arduino software i am so lost and getttiing frustrated...

  • @mikevhx5682
    @mikevhx5682 Před rokem

    Thanks

  • @paulkirchhof9546
    @paulkirchhof9546 Před 3 lety

    I miss the link to part two

  • @MedSou
    @MedSou Před 3 lety

    *"EEVblog Mailbag" brought me here*

    • @Kevindarrah
      @Kevindarrah  Před 3 lety

      whoa, so many people showing up over here - thanks!

  • @DebdutBiswasOnline
    @DebdutBiswasOnline Před 3 lety

    Cooooool

  • @rimbang_
    @rimbang_ Před 2 lety

    can u make tutorial like this but for ESP8266 ?

  • @liroysabah1563
    @liroysabah1563 Před 2 lety

    Hi,
    Does it also copy the EEPROM/SPIFFS/PREFERENCES of the device?

  • @zyghom
    @zyghom Před 2 lety

    very nice. I hopped we could go and dissemble the code to see the wifi password ;-)

  • @databang
    @databang Před 3 lety

    (>^.^)> Dave from EEVBLOG suggested your channel. Sub’d from Bezerkeley!

  • @altitude1039
    @altitude1039 Před 2 lety

    Does anyone know of a discord group related to the ESP32 etc?

  • @leef_me8112
    @leef_me8112 Před 3 lety

    You shouldn't be allowed to show this on video.

  • @ebb2421
    @ebb2421 Před rokem

    Thank you Kevin, very helpful to get a backup bin. Just a note, the PCB under the Antenna PCB will change the resonance frequency a fair bit... See Robert Feranec czcams.com/video/Rke7d9MKOLs/video.html

  • @joelhowell5402
    @joelhowell5402 Před 3 lety

    You should consider using platformio for future projects

  • @leef_me8112
    @leef_me8112 Před 3 lety +1

    5:08 EGAD! Bent pin on the dev board. Please! Spare your user's this horrible view.

    • @Kevindarrah
      @Kevindarrah  Před 3 lety

      nice catch!

    • @leef_me8112
      @leef_me8112 Před 3 lety

      @@Kevindarrah Thanks for the ACK.
      I've seen a lot of bent EPROM pins like that years ago. Now I gently remove parts from sockets or breadboards.
      Thanks again for CARING enough to SHARE with us. Maybe you should write a book?

  • @chicagolandjim2829
    @chicagolandjim2829 Před rokem

    Thanks, Kevin. Tried to use this after a library upgrade cause my Sketch to no longer run. I took an new empty ESP32 Cam, loaded a program and tried to read it. An immediate fatal error of COM port doesn't exist occurs and the IDE never tries to connect. Just wondering if you heard if Arduino IDE has done something to prevent reads. I tried reading a single memory location with the same results. Here is the message when not specifiying a serial port.
    esptool.py v4.5
    Found 1 serial ports
    Serial port COM7
    COM7 failed to connect: Could not open COM7, the port doesn't exist
    I'm an old fogie trying to learn new stuff but find many sketches do not work due to changes made in the library.