How does SX OS Emunand work?

Discussion in 'Switch - Backup Loaders & Modchips' started by json, Sep 23, 2018.

  1. json
    OP

    json MUSCLEMAN

    Member
    9
    Aug 9, 2013
    Burkina Faso
    Since everbody seems to have an idea how Emunand works by just looking at the release notes, I thought I'd try and find out myself how exactly Emunand in SX OS actually works. No bullshit claims, real facts.

    So what I did was create a NAND backup without emunand, and then make another NAND backup after emunand was created.

    Here's what I found out so far:

    - boot0 is unmodified
    - boot1 is modified with EMUNAND0 tacked at the end (some unused area)

    - GPT is UNMODIFIED
    - All partition locations / sizes are UNMODIFIED
    - Everything is unmodified except for the USER partition, in which a few new files have been created (called NAND01.bin, NAND02.bin and so on)

    That means NO resizing has taken place. Only new files have been created, like regular Nintendo OS would do.

    So from what we can conclude so far: OFW mode is actually perfectly safe. Nintendo would need to actively start detecting the EMUNAND0 magic in boot1 or start to detect the new files, which would be hilarious if they would start to do so. This detectable point is actually moot, because with EmuNAND stored on the microSD, Nintendo would be able to detect it too if they actively start to do so.

    The resized partition claims that everyone has been spouting are bullshit.


    Ok so now lets take a look from what exactly is in these NAND bin files?

    As it turns out, it mimics the layout of the Switch eMMC but inside the NAND files! It's layout it split into multiple NAND bin file parts.

    Here's what I found out :
    - boot0 in emunand is 100% exactly the same as the real one
    - boot1 in emunand is 100% the same as the real one (without the EMUNAND0 magic)
    - GPT in emunand is SAME as real one
    - All partitions are the SAME except the USER partition.

    So far everything is the same, and now here comes the difference: The emunand USER partition volume size is 15GB. SMALLER than the real one.
    That's it. That's the only difference.

    I think it is possible to have the USER partition claim it is the same size as the real USER partition, but fill up the FAT table with clusters marked as USED.
    HEY TX ARE YOU LISTENING? This would make it EXACTLY the same as real USER partition from the Switch's standpoint!

    But with that said, I don't see any telemetry sending the USER partition size so it does not really matter for now.
    If I am mistaken on this, let me know what telemetry it is sending and I will amend it here.

    The "NANDTotalSize" telemetry seems something people claim is changed but I have not checked it yet. I will do so later.

    That's it for now what I managed to discover, but I think it is safe to say people are spouting bullshit so far without actual FACTS.



    One more note: Since the NAND bin files are located inside the USER partition, this cannot be supported with trivial changes to the FS sysmodule.

    For this to work you need to actually .. say.. EMULATE the eMMC read/write commands with patches in the FS sysmodule.
     
    Last edited by json, Sep 23, 2018
  2. xabier

    xabier GBAtemp Fan

    Member
    5
    Dec 10, 2006
    United States
    Good to know some real facts
     
    bostonBC and mowsie like this.
  3. SpaceJump

    SpaceJump GBAtemp Psycho!

    Member
    7
    Aug 18, 2005
    Germany
    Zebes
    Finally someone who really took the time to analyze how it works instead of making asumptions.
     
  4. HtheB

    HtheB GBAtemp Advanced Fan

    Member
    7
    May 15, 2006
    Netherlands
    Bize Her Yer Trabzon
    @json Like always, you're the man!
     
    mowsie likes this.
  5. HellaJvke

    HellaJvke Advanced Member

    Newcomer
    3
    Oct 25, 2016
    United States
    In your mind
    thanks for clearing this up as there are tons of posts about the split partitioning and telemetry.

    plz update us on the NANDTotalSize telemetry when you have a chance

    also if thats really you OP in your profile pic, you have a rad beard
     
    mowsie likes this.
  6. JoeBloggs777

    JoeBloggs777 GBAtemp Fan

    Member
    5
    May 30, 2018
    United Kingdom
    someone who has SX OS and knows what they are doing instead of people guessing what it does. good work json
     
    RedHunter and mowsie like this.
  7. alimao

    alimao Advanced Member

    Newcomer
    4
    Mar 26, 2009
    Brazil
    possible ?
    because I thought start emunand with reinx and not sx

    sd with files reinx

    Is emunand a copy of the correct original firmware?
     
  8. SpaceJump

    SpaceJump GBAtemp Psycho!

    Member
    7
    Aug 18, 2005
    Germany
    Zebes
    I don't see the NANDTotalSize parameter being different if the "emuNand" is stored on the storage as files like you described. But keep us updated :)
     
  9. JJTapia19

    JJTapia19 I fight for my friends.

    Member
    9
    May 31, 2015
    Puerto Rico
    Would it be possible in the future to do all the nand redirection stuff to the sd via the payload itself without modifying anything on sysnand?
     
  10. whyyes

    whyyes GBAtemp Regular

    Member
    3
    Sep 20, 2009
    United States
    Legit. Finally something that isn't FUD
     
    mowsie likes this.
  11. Bakugo

    Bakugo Member

    Newcomer
    3
    Dec 28, 2016
    United States
    You could just remove the SD before going back to OFW to avoid this.
     
    SaffronXL and Mouser X like this.
  12. mariogamer

    mariogamer GBAtemp Maniac

    Member
    5
    Aug 12, 2015
    Canada
    Thanks for the info.
     
  13. magico29

    magico29 GBAtemp Maniac

    Member
    6
    GBAtemp Patron
    magico29 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Aug 2, 2017
    United States
    thank you very much for let us know,now the non sense threads started by TX haters will stop. thank you very much again.
     
    Last edited by magico29, Sep 23, 2018
  14. Purple_Shyguy

    Purple_Shyguy GBAtemp Advanced Fan

    Member
    6
    Nov 8, 2008
    Republic of Ireland
    BASED
     
  15. isoboy

    isoboy GBAtemp Advanced Fan

    Member
    6
    Dec 23, 2016
    United States
    "HEY TX, ARE YOU LISTENING?"
     
  16. mowsie

    mowsie Advanced Member

    Newcomer
    2
    May 16, 2018
    United States
    Wow, this post is a breath of fresh air

    You're doing God's work
     
    isoisoiso likes this.
  17. json
    OP

    json MUSCLEMAN

    Member
    9
    Aug 9, 2013
    Burkina Faso
    No you can't remove the microSD before booting because in this scenario your emunand would live on microSD, and pulling it out would mean the system cannot boot.

    EDIT: You're talking about booting OFW. Sorry, you're right. For OFW, you can always remove microSD. But then.. you'd never have microSD in OFW boot. That's really bad.
     
    Last edited by json, Sep 23, 2018
  18. taxco

    taxco GBAtemp Regular

    Member
    3
    Jan 20, 2016
    Netherlands
    NL
    After you create emunand, can you boot to it without autorcm? or payload etc?
     
  19. json
    OP

    json MUSCLEMAN

    Member
    9
    Aug 9, 2013
    Burkina Faso
    Emunand does not change anything regarding autoRCM or non-autoRCM boot up. It's same as before, you either need the jig or have auto-RCM installed to your sysNAND.
     
  20. SpaceJump

    SpaceJump GBAtemp Psycho!

    Member
    7
    Aug 18, 2005
    Germany
    Zebes
    Hm, I would have imagined that this thread would be crowded a lot more just like the other SX OS threads...
     
    RedHunter likes this.
Loading...