WIP Modchip Software: Simple-UF2 with SWITCHBOOT. Save fuses without AutoRCM

Discussion in 'Switch - Backup Loaders & Modchips' started by mattytrog, Dec 18, 2018.

  1. TheSearch

    TheSearch Member

    Newcomer
    1
    Mar 12, 2019
    Germany

    This is very cool, thank you very much :) Looking forward to this version
     
  2. Adr990

    Adr990 To boldly go where no man has gone before!

    Member
    4
    Apr 22, 2007
    Netherlands
    The Netherlands
    I connected my Joycon with pins 10 and 2 or something bridged (anyways, for the RCM "Home button"), I just tried to boot from the Switch being powered off (with all the straps attached of course).

    But it doesn't turn on anymore for some while, again.
    I did turn the Switch off from EmuNAND, but it was after the first time I booted into EmuNAND. I'm not sure what might be happening right now, so I wanted to isolate the issue.

    Does having the RCM Home button pins bridged on your joycon mess up the chip with all straps or Switch it self then when you try to boot form it, from a powered off state?

    I tried charging for a bit, leaving it off the hook for a bit, without the joycons of course.
    Maybe I need to wait a little longer, that seemed to work last time something like this happened. But I just set things up, so I don't know squad about how things are supposed to "react".
     
  3. FromZero

    FromZero Newbie

    Newcomer
    1
    Mar 12, 2019
    United States
    This is kind of the symptoms I had a few pages back before deciding to restore my NAND later today.

    What I did was hook up to TegraRCMSmash to see if it was slipping into RCM successfully or not, then I could push hekate and get in there but not further into CFW or Horizon.

    Granted I don't use EmuNAND.
     
  4. Adr990

    Adr990 To boldly go where no man has gone before!

    Member
    4
    Apr 22, 2007
    Netherlands
    The Netherlands
    Thanks for your suggestion!

    Unfortunately it still hasn't been able to turn on, and it doesn't seem to be in RCM mode.
    No LEDs no screen, no RCM.

    Welp, this is worrisome.
     
  5. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Worrisom indeed. Take me through the exact steps you have been through.

    Oh and OT (ish)

    Is this feature any good to anybody?
    Multiple backup / restores? This is actually from a while ago and I forgot about it.

    Screenshot1. Screenshot2. Screenshot3.
     
  6. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Sounds like a fuse mismatch to me. Feel free to PM me if you are struggling :)
     
  7. FromZero

    FromZero Newbie

    Newcomer
    1
    Mar 12, 2019
    United States
    I'm sure I'll have a fuse mismatch with my restore. What can be done?
     
  8. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Just make sure you boot with Hekate or SXOS if using it. A normal boot is no longer possible. You have to skip the fuse check and remember your sleep library (bso file)
     
  9. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Anyway... Next version will have facility for up to 10 full backups on SD card. Handy if you want to swap between firmwares without a PC. At least until we get proper emunand.

    Ability to write mis-matched sized BOOT0/1 (choi-style) for people who have made a roll-your-own blank boot0/1

    Backups can be of any combination... eg backup 1 could be a rawnand.bin
    backup 2 could be another rawnand.bin or just partitions
    backup 3 could be boot0/1 or something

    and Emergency_EMMC_Fix backup of boot0/1 and PRODINFO is saved somewhere different, so you could treat the emergency fix as just that.

    Anyway... onwards...
     
    Last edited by mattytrog, Mar 14, 2019
  10. noX1609

    noX1609 B9S freak ;)

    Member
    3
    Aug 30, 2016
    Germany
    Hey sorry to ask again but didn‘t get an answer last time or i have missed it.

    Which is the offset for changing the mode that is active in the latest build? Because in source code i found the method which is for mode selection and in the main file i could change the start mode with the one i need. But how do i compile everything so i get an .uf2 File for flashing?
     
  11. feral

    feral Member

    Newcomer
    1
    Feb 24, 2019
    United States
    Easy question for you @mattytrog, any way you might think about reverting the extra spacing in the main menu? It feels a little weird going from the spaced out menu to the sub-menus which don’t have that extra spacing.

    Also, the capitalization in the word “detected” is inconsistent.
     
  12. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    I'm on it. Will look at it shortly.

    — Posts automatically merged - Please don't double post! —

    I just don't like all that screen space empty.

    What do others think? Do I revert it?
     
    peteruk likes this.
  13. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    @noX1609

    to change mode: TRINKET/REBUG offset 4CF0
     
  14. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    OK... Think it is time for v1.0 of this Frankenstein thing I have made.

    Just going to call it Switchboot from now on I think. And the bootloaders, we will call "SWITCHBOOT" bootloaders.

    No particular reason, just fancy a change. I was just going to call it "Hekate Unofficial", but I`ve bolted on various (useless?) stuff that suit my needs better.

    So, without further ado, keep checking the OP for a change.

    New features in "Switchboot V1.0"
    - Backup multiple nands / boot files into different folders.
    - I was going to implement an on-screen keyboard, but lack of space (heading towards stack corruption) and motivation, led this to not happen. I think its pointless anyway.

    - There are maximum 5 folders (with BOOTS sub-folders) that your backups are saved to. These folders are created as they are required. They are called BACKUP_1, BACKUP_2 etc... You will also see a subfolder called "BOOTS". This is where your boot0/1 are backed up to.
    - You will see an option in the tools menu to select your save folder. Default is "0". The currently selected folder is displayed at the bottom.
    - Once you have picked a folder, or use the default, all backup / restore / verify options (apart from "Emmc_Emergency_fix / Quick backup") will be based on that folder.

    So, a scenario...

    You are on 6.2.0 and you want to update to 7.0.1 but you want to backup your 6.2.0 emmc...
    • Choose a folder. In this example, we will choose "1"
    • Backup as normal. Either use rawnand or the partitions or whatever
    • Backup your BOOT0/1
    Your backup is complete...

    Then, lets say you upgrade to 7.0.1. All goes well, you are on 7.0.1. Run Switchboot V1 again and go to tools and choose a different folder. We will choose "2".

    • Backup as normal, however you like
    • Backup BOOT0/1
    You are finished.

    You want to restore your 6.2.0 backup?
    Select folder "1" and then restore / verify / restore BOOT0/1 - do what you need to do. No need to drag / drop anything over from the PC - just restore.
    Your 6.2.0 restore & boot0/1 will be restored.

    Likewise if you want to restore your 7.0.1 backup - restore in the same way, just make sure you have picked "folder 2".

    You can of course use whichever folder you like.

    You don`t need to backup your USER partition if you don`t want. I`ll leave that up to you.
    You can also dump all your keys while you are at it with "Dump All Keys" option.

    Keep checking back if you would like to try this out. I`ll be updating my git with source and UF2s either this evening or tomorrow morning. It is 21:48 here so may not be tonight.

    Thank-you! :)
     
    franky52, feral, felixsrg and 4 others like this.
  15. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Screenshot1.

    Here we go. Not done documentation yet. Its more-or-less the same as Simple-UF2.

    Credit to the bosses... CTCAer for Hekate and Shchmue for Lockpick

    A rename-and-add-a-couple-of-features exercise.

    This "project" whatever it is, is just going to be called SWITCHBOOT from now on. Work in progress getting things updated.

    Two parts...

    Part 1 - The Bootloader that controls the straps - UF2. Will either be "Joycon Only" or "Joycon & Vol Straps". You do NOT need to flash this on every update.

    Part 2 - This is what "Simple-UF2" was. I think I`m plodding far enough along to try and do stuff right.
    Current version: V1.0

    github repo here: https://github.com/mattytrog/Switchboot_PART_2/tree/master/Switchboot-V1.0/Switchboot Part 2 UF2

    If folk want to try it and give me any feedback, I`d be very grateful.
     
    Last edited by mattytrog, Mar 16, 2019 at 12:25 AM
    TheSearch, peteruk, feral and 2 others like this.
  16. feral

    feral Member

    Newcomer
    1
    Feb 24, 2019
    United States
    Things look pretty good on my trinket. I’ll be putting the backup/restore through its paces tomorrow when I chip my son’s Switch.

    The capitalization of the word “detected” is still inconsistent, but that’s just cosmetic.
     
  17. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    Shit! I knew I forgot something.
     
  18. feral

    feral Member

    Newcomer
    1
    Feb 24, 2019
    United States
    Sorry, two other things:

    1. I'm having some issues with settings from hekate_ipl.ini. While running Switchboot and changing options, they seem like they are saved, but after a reboot things like brightness or auto HOS power off show default values and brightness doesn't seem to pull from the file. Stock hekate seems to use the settings properly.

    2. When running stock hekate, there are a few extra tools for fixing the archive bit on the SD card, but those seem to be missing here. Will those options be added at some point?
     
  19. mattytrog
    OP

    mattytrog Not on my watch.

    Member
    11
    Apr 27, 2018
    United Kingdom
    1) Just going over my notes now... They are saved, but the option in the menu shows the original as default. Check the ini file. You will see they are saved. Only if you update the value will the actual ini file be changed.

    2) Yep. Removed them to fit the lockpick / key derivation code in. I figured that to dump keys would be more important than setting the archive bit. The stack is limited to 126296bytes. So something had to go. I will look at it further however.

    — Posts automatically merged - Please don't double post! —

    Hey I appreciate you testing it BTW!

    I think the ini needs a flag / system saying "Is this the first ever boot? If so, load these values. If not, load these values from this file and update menu options accordingly. Else, use the default".

    Next release, consider it done! Together with this "liveRCM" feature I am implementing. Though what good it will do, fvck knows.
     
  20. feral

    feral Member

    Newcomer
    1
    Feb 24, 2019
    United States
    Happy to help! I’ve been super excited about this stuff since I found out I could install a “modchip” instead of using the jig/loader method to play emulators and homebrew.

    The archive bit part isn’t a big deal since one can always chainload into stock hekate, so its a nice-to-have.

    Thanks for the great work!
     
    mattytrog likes this.
Loading...