1. DarkMatterCore

    DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    I can't compare ES byte sequences on my own, so I can't really make any automated patches. I don't have a Switch anymore.

    I can, however, provide insight and assist with the process. I'm familiar with all these formats thanks to working on nxdumptool.
     
  2. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    thats great if @mrdude is up for another script for complete patches
     
  3. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,092
    Country:
    I think crckd is looking into it, he says on a previous post he is. If he needs help, then he can post in here and then we can help him. In the meantime, I have bigger fish to fry :-). I do agree with you that it would be good if we also have this ability to make es patches, but I've not really got much time to look into it just now and it takes a long time to do all the 'investigating' before scripts can even be started.
     
    LyuboA and ShadowOne333 like this.
  4. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    since you dont have a switch anymore what does this mean for nxdumptool ??

    when you have time you've already done more then most Thank you and Thanks to @DarkMatterCore and @crckd you guys are great for this community
     
  5. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    i tried installing several NSP games non of them works without ES patches
     
  6. DarkMatterCore

    DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    Nothing at all. I sold it around August - September last year.

    There are people willing to help me by testing stuff - that's all I need.
     
  7. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    thats great thanks btw if you need more testers i have several Switch consoles
     
    Last edited by LyuboA, Jan 27, 2021
  8. ZachyCatGames

    ZachyCatGames GBAtemp Psycho!
    Member

    Joined:
    Jun 19, 2018
    Messages:
    3,135
    Country:
    United States
    kips weren't touched in 11.0.1, they're identical to 11.0.0.
     
  9. Important Posts: For FS patches
    DarkMatterCore

    DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    I updated my scripts to adjust the upper NCA file size limit. I also made them generate a SD card ready directory tree layout for both IPS patches and Hekate patches.
     

    Attached Files:

    FanboyKilla, Tyvar1, LyuboA and 3 others like this.
  10. peteruk

    peteruk GBAtemp Addict
    Member

    Joined:
    Jun 26, 2015
    Messages:
    2,669
    Country:
    United Kingdom
    (I fear I could get shot down here, but am willing to take one for the team)

    Are we likely to see a GUI tool version of this when everything is figured out and finished ? PC / Linux / Mac ?

    Figured I'd ask, thanks in advance.
     
  11. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,092
    Country:
    Yes, that can easily be done. No point in doing it though until we figure out ES the patches though. The program can be used to make loader/fs/es patches. Also there would be no need for python to be installed as we can make python files into stand alone executables. See attached MakeIPS.py has been converted into an exe.
     

    Attached Files:

  12. ShadowOne333

    ShadowOne333 QVID PRO QVO
    Developer

    Joined:
    Jan 17, 2013
    Messages:
    10,406
    Country:
    Mexico
    And we might have an insight into the ES patches, thanks to an anonymous source.
    The source gave quite a lot of neat info, which might be what's required to finalize the set of signature patches to make an open source solution that everyone can run and create the patches from.

    Here's the intel provided:

     
    Tyvar1, peteruk and LyuboA like this.
  13. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,092
    Country:
    It would be handy to know what files are being patched, and how they are extracted from firmware files - can your source also supply that info?
     
    peteruk and ShadowOne333 like this.
  14. DarkMatterCore

    DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    I'm sure they're just unpacking the Program NCA from the ES sysmodule and decompressing its main NSO.
     
    mrdude, peteruk and ShadowOne333 like this.
  15. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,092
    Country:
    Ok maybe I should be clearer - what file in the latest firmware folder (11.0.1) is the ES Sysmodule?

    For example is it: 0a34b913d4cfee8b15ef0c7cd6661697.nca, and how would one unpack it?
     
    peteruk and ShadowOne333 like this.
  16. DarkMatterCore

    DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    @mrdude This info should be handy. I shared it some pages ago.

    The same command we've been using to unpack NCAs should do the trick - just replace "--romfsdir" with "--exefsdir".
     
    Last edited by DarkMatterCore, Jan 29, 2021
    ShadowOne333 likes this.
  17. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,092
    Country:
    I tried unpacking ALL the files, I got thousands of files/folders but none of them were called 'main', so that's where I failed on that info you supplied.

    So I tried a little batch file like this, found the files in about 1 second :-)
    I take it nearly every file has these; main + main.npdm files, these should be dumped into separate folders and then scanned?
    So batch needs to look like this to dump:
     
    Last edited by mrdude, Jan 29, 2021
  18. DarkMatterCore

    DarkMatterCore I like turtles.
    Developer

    Joined:
    May 30, 2009
    Messages:
    1,255
    Country:
    Venezuela
    That's right, yeah. The only way to determine if you're dealing with the right NCA is by peeking into the NCA header or the main.npdm file.
     
  19. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,092
    Country:
    Ok I will try and write a python script to do that as I don't know how to do it in dos command line.
     
  20. crckd

    OP crckd Member
    Newcomer

    Joined:
    Dec 3, 2020
    Messages:
    13
    Country:
    Philippines
    I looped on all files inside the folder until i get the nca with title id 0100000000000033.
    remaining would be finding the addresses.

    Code:
    import os
    import sys
    import subprocess
    
    if len(sys.argv) == 1:
       print("no argv")
       sys.exit(1)
    
    ES_NCA = ""
    FIRMWARE_DIR = sys.argv[1]
    
    print("Checking files in " + FIRMWARE_DIR + " folder.")
    for filename in os.listdir(FIRMWARE_DIR):
       if filename.endswith(".nca"):
     
           outlines = subprocess.check_output(['hactool', '--disablekeywarns', FIRMWARE_DIR + '/' + filename])
    
           for line in outlines.splitlines():
               line = line.decode('ascii').replace(" ","")
               if line.startswith("TitleID:0100000000000033") and not filename.endswith(".cnmt.nca"):
                   print("Found! Filename : " + filename)
                   ES_NCA = filename
                   break
           if ES_NCA:
               print("Using hactool to extract exefsdir")
               subprocess.run(["hactool","-t nca","--exefsdir=.","--disablekeywarns", FIRMWARE_DIR + '/' + filename], stdout=subprocess.DEVNULL)
               if os.path.exists("main"):
                   outlines = subprocess.check_output(['hactool','--keyset=prod.keys','--intype=nso','--disablekeywarns','--uncompressed=main_dec','main'])
                   print("Using hactool to uncompress main")
                   for line in outlines.splitlines():
                
                       line = line.decode('ascii').replace(" ","")
                       if line.startswith("BuildId:"):
                           print("Found Build ID : " + line.replace("BuildId:","")[0:40])
               break
    
     

    Attached Files:

    • es.zip
      File size:
      695 bytes
      Views:
      37
    Last edited by crckd, Jan 29, 2021
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - patches, hashes,