1. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,100
    Country:
    Just chill dude, there's things going on that you don't know about that are not public. It's more difficult to make an auto patcher because of patch 3 and the amount changes between firmware versions. However I am sure if you wait a little while something will be released. It's better for everyone if ALL the bugs are ironed out and we all fully understand the patches, before anything gets released. There's more than enough info now on this thread now so that quite a few people will know how to make patches, and things have been simplified greatly already. Patience is a virtue!
     
    Tyvar1, ShadowOne333 and LyuboA like this.
  2. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    take all the time you need i was just ask if its possible seen how difficult it is compared to the loader and fs patches
    Thanks for everything you have done
     
    Last edited by LyuboA, Jan 30, 2021
  3. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,100
    Country:
    @crckd:

    Ok thought of a good workaround to fix the patches :-)

    In the batch file you created you can also search for this: SDK Version: xxx, then create a text file with the sdk version, that can then be read by the makeips file.

    Example:
    Firmware 11.0.1
    SDK Version: 11.4.0.0
    Version: 11.0.0-1280 (738198784)

    Firmware 10.2
    SDK Version: 10.4.0.0
    Version: 10.1.0-256 (672137472)

    Then in your makeips file, use 2 sets of patches - 1 set for firmware with SDK version 10 or less use patch set 1, if the SDK version is greater than 10 - use patch set 2. That way if the patches change again on higher sdk, that patch set could also be added to the script easily. That would be an easy way to solve our problem.

    This was added to the end of the python file to check sdk version & create a txt file containing that info:
    Code:
    outlines = subprocess.check_output(['hactool','--keyset=' + keyset,'--disablekeywarns', FIRMWARE_DIR + '/' + ES_NCA])
                for line in outlines.splitlines():
                    line = line.decode('ascii').replace(" ","")
                    if line.startswith("SDKVersion:"):
                        f = open("sdk.txt", "w")
                        f.write((line).replace("SDKVersion:", "").replace(".", ""))
                        f.close()
            
                        #read back file to make sure our file got created properly...
                        f = open("sdk.txt", "r")
                        data = f.read()
                        f.close()
                        print("SDK:" + data)
                break
    
    Output:
    [​IMG]

    Next - read data in makeips file and check if greater than: xxx - example:
    Code:
    f = open("sdk.txt", "r")
    data = f.read()
    f.close()
    
    value =  int(data)
    if value < 11400:
        patterns = patterns2
    else:
        patterns = patterns1
    
     
    Last edited by mrdude, Feb 1, 2021
    Tyvar1, peteruk, Zoria and 2 others like this.
  4. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,100
    Country:
    Done! Got the ES patches bit finished. Don't know If I can share or not as it uses some code that was not made by me + plus it's a bit "hacky", but generates all the right patches for now. If I get the OK from the person that gave me the code, I'll post, but maybe they want to change some stuff first or keep it private. I expect you'll find out soon. But at least that's me done with this now :-)
     
    Tyvar1, Teddie, Homlet and 3 others like this.
  5. peteruk

    peteruk GBAtemp Addict
    Member

    Joined:
    Jun 26, 2015
    Messages:
    2,670
    Country:
    United Kingdom
    fingers crossed that he/she/non binary allows the use of it then, because this will be a real game changer
     
    Tyvar1, mrdude and ShadowOne333 like this.
  6. ShadowOne333

    ShadowOne333 QVID PRO QVO
    Developer

    Joined:
    Jan 17, 2013
    Messages:
    10,433
    Country:
    Mexico
    Agree 100%.
    With these scripts and proper documentation, we won't have to worry as much about sigpatches or Nintendo going after repositories that host them.
    With this, users can easily generate their own patches.
     
    Tyvar1, linuxares, mrdude and 2 others like this.
  7. peteruk

    peteruk GBAtemp Addict
    Member

    Joined:
    Jun 26, 2015
    Messages:
    2,670
    Country:
    United Kingdom
    Mate, I love these kind of threads... where adults work together in harmony to create great software for the benefit of everyone

    It really brings me back to the days just before a9lh with Dark Samus and all the guys working on it on freenode (i think), those were really good days
     
    FanboyKilla, Tyvar1, mrdude and 2 others like this.
  8. Important Posts: Test version for 9.2.0 to 11.0.1
    mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,100
    Country:
    Here you go (for testing), edit run.bat to point to the key file, python location, firmware you want to generate es patches for. Then click on run.bat. Or you can just put keys.dat and a folder called firmware (containing firmware files), into the same folder as you extract these files.

    *Remember though, patches can and do change from time to time so maybe this won't work in the next firmware version...tested from 9.20 - to 11.0.1 and generates proper patches.

    I tried to mod this as best I could with my limited python knowledge, so there's lots of room for improvement, so feel free to update and post as necessary. Thanks to crckd/darkmattercore and all the others that helped on this thread + to unknown for the juicy patches and code....
     

    Attached Files:

    hausa51, FanboyKilla, Zoria and 7 others like this.
  9. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    Thanks man
     
  10. linuxares

    linuxares I'm not a generous god!
    Moderator

    Joined:
    Aug 5, 2007
    Messages:
    8,541
    Country:
    Sweden
    Awesome work you all.

    I put a "Important post" on it, so people that don't wanna scurry through the whole thread can find it easier.
     
    hausa51, Tyvar1, ShadowOne333 and 2 others like this.
  11. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,100
    Country:
    Tyvar1, peteruk and LyuboA like this.
  12. linuxares

    linuxares I'm not a generous god!
    Moderator

    Joined:
    Aug 5, 2007
    Messages:
    8,541
    Country:
    Sweden
    Tyvar1, peteruk, LyuboA and 1 other person like this.
  13. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    mrdude likes this.
  14. mrdude

    mrdude GBAtemp Maniac
    Member

    Joined:
    Dec 11, 2015
    Messages:
    1,100
    Country:
    N
    Now that we know the basics, I think this will be next.

    1: Clean up/mod/improve scripts and write a batch/bash menu to incorporate loader/fw/es patches into 1 tool.
    2: Create a windows standalone GUI program so we use without python.
    3: Maybe some dev with good c++ coding knowledge can make this work directly from the switch?
     
    LyuboA, Zoria and peteruk like this.
  15. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    @Homlet maybe now you can integrate all the scripts in your aio-switch-updater the es patcher works
     
  16. subcon959

    subcon959 teh retro
    Member

    Joined:
    Dec 24, 2008
    Messages:
    3,432
    Country:
    Is this the right output for the latest AMS and 11.0.1? 1xES file, 2xFS files and 1xLoader file?
     
  17. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    yes 1 es file for 1 firmware version 2 FS = 1 FS for Fat32 and 1 for ExFat and 1 for loader
     
  18. subcon959

    subcon959 teh retro
    Member

    Joined:
    Dec 24, 2008
    Messages:
    3,432
    Country:
    Thanks, is it possible to know which is for fat32 and which for exfat? Not really that important but interesting to know.
     
  19. LyuboA

    LyuboA Unknown Entity
    Member

    Joined:
    Jun 1, 2018
    Messages:
    483
    Country:
    Bulgaria
    the script first makes for ExFat and then for Fat32 you can see which is which in the command window

    for 11.0.1 ExFat is

    0BA15BB304B505633B6DA6B2C6E991B6A06EBAFB3378DF02BF6B494075976F06

    and 11.0.1 Fat32 is

    E399156E844EB0AA3CC5152979961C879F5E90696C1224A1BBE0FF1BCDBFD7DC
     
    subcon959 likes this.
  20. linuxares

    linuxares I'm not a generous god!
    Moderator

    Joined:
    Aug 5, 2007
    Messages:
    8,541
    Country:
    Sweden
    Tried on Atmosphere 0.18?
     
Draft saved Draft deleted
Loading...

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