Hacking Discussion Info on SHA-256 hashes on FS patches

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
I have added the option to reboot and have added the message error @mrdude suggested. If no crash or bugs are being reported the app can be considered done for now
All ES/FS patches generate, but can't generate the IPS Loader patch and causes the switch to freeze and crash while trying to generate the patch.

Also lockpic_rcm generates dev.keys + title.keys + prod.keys in the switch folder, if dev.keys or title.keys is present in the switch folder, any patch generation fails and causes a switch crash - maybe hactool is trying to use those and causing the crash. (keys.dat is not present during the test).
 
Last edited by mrdude,
  • Like
Reactions: impeeza

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,714
Country
Colombia
I have added the option to reboot and have added the message error @mrdude suggested. If no crash or bugs are being reported the app can be considered done for now
Hello, I just finish my workday and could test a little:

For me the program have the next behavior:
  • With ONLY dev.keys file on SD:/switch, Error - Failed to decrypt shows.
  • With ONLY an updated prod.keys file on SD:/switch, All works fine.
  • With an outdated prod.keys file on SD:/switch, Error - Failed to decrypt shows.
  • With an updated prod.keys file on SD:/switch AND an outdated keys.dat on SD:/switch/sigpatches-generator/keys.dat , Error - Failed to decrypt shows.
  • With a outdated prod.keys file on SD:/switch AND an updated keys.dat on SD:/switch/sigpatches-generator/keys.dat , FS & ES patches generate well.
A little of background, I have a version of Atmosphère 1.3.2 with the code changed to have a splash screen with a picture full screen, as asked by SciresM the correct way to change the splash is to modify the source code and to compile to a new PACKAGE3 file, so my PACKAGE3 is different to the official release, but i think is that what we need: to generate sigpatches for new versions :D . (All started on https://gbatemp.net/threads/custom-boot-logo-for-switch.569031/post-9755270 and the tutorial about compiling Atmosphère yourself https://gbatemp.net/threads/building-atmosphere-on-windows-using-msys2.613446/)

I have a patches.ini file on SD:/bootloader folder, mine have CR/LF format (0D 0A) on end of each line and have FS patches and Loader patches for almost all Firmware and Atmosphère versions.

With updated prod.keys file on SD:/switch OR updated keys.dat on SD:/switch/sigpatches-generator/keys.dat and selecting "NO" on "Directly copy the generated files?"; Generating Loader IPS, my actual SD:/bootloader/patches.ini is copied to SD:/switch/sigpatches-generator/ with the next changes:
  • Only AFTER the header of the last section BEFORE the first "LOADER" block, the end of line is changed from 0D 0A to 0A
1660881547377.png


1660881619443.png

(right my original file, left the new one)

and at the end of file the block of the new generated patch for Loader is copied:

1660881970082.png

(right my original file, left the new one) (Compilado por mi = my compilation)

you can see the last block is twice, the original mine and the new generated identical :grog:

Running Fs IPS new files are generated:
  • SD:/switch/sigpatches-generator/atmosphere/kip_patches/fs_patches/887AC150806C75CCC40DA0AA98CC09B3E468E6C78F315F927FBEDD91B16DE27A.ips
  • SD:/switch/sigpatches-generator/atmosphere/kip_patches/fs_patches/D488D1F29217355C22ABDA773FDEA582B13D475B74BCB02B998C66AB1B3E4309.ips
  • SD:/switch/sigpatches-generator/bootloader/patches.ini
The strange thing is why Patches.ini file is generated, and why the file contains:
1660883397917.png

the "new loader block" do not have header only the data twice. :wacko:

Running ES IPS and ES NFIM IPS the correct files are generated and no patches.ini file created (as should be).

If you run "Generate everything" all files are generated and the patches.ini file is the same when you run "Loader IPS"

Running any of the options Loader IPS, Fs IPS, Es IP or ES NFIM IPS delete the existing SD:/switch/sigpatches-generator/atmosphere and SD:/switch/sigpatches-generator/bootloader folders I don't think is a good behavior, but could be a mess leave files.

As mentioned by @mrdude when the file SD:/switch/title.keys exist and you run "Loader IPS" you get "The software was closed because an error occurred" for me, the first time do not get error but on the console show no progress even if I left for 10 minutes, the only working key is "Home" and closing the Hombre Loader leads to the error. after removing title.keys all works fine.

Running the individual options, the progress bar get stuck on 0 and jump directly to 100% on finish, some patches took time and seems the console is frozen, will be nice if the progress bar is dynamic.
 

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Hello, I just finish my workday and could test a little:

For me the program have the next behavior:
  • With ONLY dev.keys file on SD:/switch, Error - Failed to decrypt shows.
  • With ONLY an updated prod.keys file on SD:/switch, All works fine.
  • With an outdated prod.keys file on SD:/switch, Error - Failed to decrypt shows.
  • With an updated prod.keys file on SD:/switch AND an outdated keys.dat on SD:/switch/sigpatches-generator/keys.dat , Error - Failed to decrypt shows.
  • With a outdated prod.keys file on SD:/switch AND an updated keys.dat on SD:/switch/sigpatches-generator/keys.dat , FS & ES patches generate well.
A little of background, I have a version of Atmosphère 1.3.2 with the code changed to have a splash screen with a picture full screen, as asked by SciresM the correct way to change the splash is to modify the source code and to compile to a new PACKAGE3 file, so my PACKAGE3 is different to the official release, but i think is that what we need: to generate sigpatches for new versions :D . (All started on https://gbatemp.net/threads/custom-boot-logo-for-switch.569031/post-9755270 and the tutorial about compiling Atmosphère yourself https://gbatemp.net/threads/building-atmosphere-on-windows-using-msys2.613446/)

I have a patches.ini file on SD:/bootloader folder, mine have CR/LF format (0D 0A) on end of each line and have FS patches and Loader patches for almost all Firmware and Atmosphère versions.

With updated prod.keys file on SD:/switch OR updated keys.dat on SD:/switch/sigpatches-generator/keys.dat and selecting "NO" on "Directly copy the generated files?"; Generating Loader IPS, my actual SD:/bootloader/patches.ini is copied to SD:/switch/sigpatches-generator/ with the next changes:
  • Only AFTER the header of the last section BEFORE the first "LOADER" block, the end of line is changed from 0D 0A to 0A
View attachment 323233

View attachment 323234
(right my original file, left the new one)

and at the end of file the block of the new generated patch for Loader is copied:

View attachment 323235
(right my original file, left the new one) (Compilado por mi = my compilation)

you can see the last block is twice, the original mine and the new generated identical :grog:

Running Fs IPS new files are generated:
  • SD:/switch/sigpatches-generator/atmosphere/kip_patches/fs_patches/887AC150806C75CCC40DA0AA98CC09B3E468E6C78F315F927FBEDD91B16DE27A.ips
  • SD:/switch/sigpatches-generator/atmosphere/kip_patches/fs_patches/D488D1F29217355C22ABDA773FDEA582B13D475B74BCB02B998C66AB1B3E4309.ips
  • SD:/switch/sigpatches-generator/bootloader/patches.ini
The strange thing is why Patches.ini file is generated, and why the file contains:
View attachment 323237
the "new loader block" do not have header only the data twice. :wacko:

Running ES IPS and ES NFIM IPS the correct files are generated and no patches.ini file created (as should be).

If you run "Generate everything" all files are generated and the patches.ini file is the same when you run "Loader IPS"

Running any of the options Loader IPS, Fs IPS, Es IP or ES NFIM IPS delete the existing SD:/switch/sigpatches-generator/atmosphere and SD:/switch/sigpatches-generator/bootloader folders I don't think is a good behavior, but could be a mess leave files.

As mentioned by @mrdude when the file SD:/switch/title.keys exist and you run "Loader IPS" you get "The software was closed because an error occurred" for me, the first time do not get error but on the console show no progress even if I left for 10 minutes, the only working key is "Home" and closing the Hombre Loader leads to the error. after removing title.keys all works fine.

Running the individual options, the progress bar get stuck on 0 and jump directly to 100% on finish, some patches took time and seems the console is frozen, will be nice if the progress bar is dynamic.
Create this is the test I needed! Thank you! Is it possible to get your patches.ini for testing?
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
@mrdude is it possible to add a default location for package3 and firmware folder to the config so we don't have to keep browsing for them everytime?
Just drag package3 or the firmware folder on to the Make Patch button, you don't need to use the file browser if you do it like that. Also it would be a waste of time because people put these files in different locations on their computers.
 
  • Like
Reactions: impeeza

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Hello, I just finish my workday and could test a little:

For me the program have the next behavior:
  • With ONLY dev.keys file on SD:/switch, Error - Failed to decrypt shows.
  • With ONLY an updated prod.keys file on SD:/switch, All works fine.
  • With an outdated prod.keys file on SD:/switch, Error - Failed to decrypt shows.
  • With an updated prod.keys file on SD:/switch AND an outdated keys.dat on SD:/switch/sigpatches-generator/keys.dat , Error - Failed to decrypt shows.
  • With a outdated prod.keys file on SD:/switch AND an updated keys.dat on SD:/switch/sigpatches-generator/keys.dat , FS & ES patches generate well.
A little of background, I have a version of Atmosphère 1.3.2 with the code changed to have a splash screen with a picture full screen, as asked by SciresM the correct way to change the splash is to modify the source code and to compile to a new PACKAGE3 file, so my PACKAGE3 is different to the official release, but i think is that what we need: to generate sigpatches for new versions :D . (All started on https://gbatemp.net/threads/custom-boot-logo-for-switch.569031/post-9755270 and the tutorial about compiling Atmosphère yourself https://gbatemp.net/threads/building-atmosphere-on-windows-using-msys2.613446/)

I have a patches.ini file on SD:/bootloader folder, mine have CR/LF format (0D 0A) on end of each line and have FS patches and Loader patches for almost all Firmware and Atmosphère versions.

With updated prod.keys file on SD:/switch OR updated keys.dat on SD:/switch/sigpatches-generator/keys.dat and selecting "NO" on "Directly copy the generated files?"; Generating Loader IPS, my actual SD:/bootloader/patches.ini is copied to SD:/switch/sigpatches-generator/ with the next changes:
  • Only AFTER the header of the last section BEFORE the first "LOADER" block, the end of line is changed from 0D 0A to 0A
View attachment 323233

View attachment 323234
(right my original file, left the new one)

and at the end of file the block of the new generated patch for Loader is copied:

View attachment 323235
(right my original file, left the new one) (Compilado por mi = my compilation)

you can see the last block is twice, the original mine and the new generated identical :grog:

Running Fs IPS new files are generated:
  • SD:/switch/sigpatches-generator/atmosphere/kip_patches/fs_patches/887AC150806C75CCC40DA0AA98CC09B3E468E6C78F315F927FBEDD91B16DE27A.ips
  • SD:/switch/sigpatches-generator/atmosphere/kip_patches/fs_patches/D488D1F29217355C22ABDA773FDEA582B13D475B74BCB02B998C66AB1B3E4309.ips
  • SD:/switch/sigpatches-generator/bootloader/patches.ini
The strange thing is why Patches.ini file is generated, and why the file contains:
View attachment 323237
the "new loader block" do not have header only the data twice. :wacko:

Running ES IPS and ES NFIM IPS the correct files are generated and no patches.ini file created (as should be).

If you run "Generate everything" all files are generated and the patches.ini file is the same when you run "Loader IPS"

Running any of the options Loader IPS, Fs IPS, Es IP or ES NFIM IPS delete the existing SD:/switch/sigpatches-generator/atmosphere and SD:/switch/sigpatches-generator/bootloader folders I don't think is a good behavior, but could be a mess leave files.

As mentioned by @mrdude when the file SD:/switch/title.keys exist and you run "Loader IPS" you get "The software was closed because an error occurred" for me, the first time do not get error but on the console show no progress even if I left for 10 minutes, the only working key is "Home" and closing the Hombre Loader leads to the error. after removing title.keys all works fine.

Running the individual options, the progress bar get stuck on 0 and jump directly to 100% on finish, some patches took time and seems the console is frozen, will be nice if the progress bar is dynamic.
Can you tell me if this release solves your patches.ini issues and if it doesnt crash anymore? Thank you

Edit: forgot to add the case where no patches.ini existed in the first place
 
Last edited by dogcsty,

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
Can you tell me if this release solves your patches.ini issues and if it doesnt crash anymore? Thank you
That's fixed all the crashing issues I was having.

Test 1 - no keyfiles in switch folder, keys.dat in app folder - No crashes all patches are generated.
Test 2 - no keys.dat in app folder, prod,keys in switch folder - No crashes all patches are generated.
Test 3 - no keys.dat in app foder, Used lockpick_rcm to generate all key files are left in switch folder - No crashes all patches are generated.
Test 4 - no key files, No crash - error display. Good fix!

All ips patches look good, patches.ini is also good. (Tested on 11.0.0 and 14.1.2 emunand firmware)
 
Last edited by mrdude,
  • Like
Reactions: dogcsty

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,714
Country
Colombia
Create this is the test I needed! Thank you! Is it possible to get your patches.ini for testing?
Hi sorry, I think about attaching the file this morning, yesterday I was tired and get to bed just after the post, will try the next version, but for now this is my patches.ini file
 

Attachments

  • Impeeza's_patches.zip
    3.2 KB · Views: 39
  • Like
Reactions: dogcsty

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Hi sorry, I think about attaching the file this morning, yesterday I was tired and get to bed just after the post, will try the next version, but for now this is my patches.ini file
I've tested with your file it seems to work. Thank you again for testing this I have completely forgotten to handle CRLF and LF before you tested it.
 

Dragon91Nippon

Well-Known Member
Member
Joined
May 14, 2020
Messages
360
Trophies
0
XP
771
Country
Japan
I've tested with your file it seems to work. Thank you again for testing this I have completely forgotten to handle CRLF and LF before you tested it.
Awesome, do you think you might also make a payload version of it so people can generate signature patches without the need to fully boot into Horizon and just launch it from Hekate?
 

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Awesome, do you think you might also make a payload version of it so people can generate signature patches without the need to fully boot into Horizon and just launch it from Hekate?
That's actually an awesome idea and it shouldn't be too hard to do it since I've seperated the code interface and the actual algorithm. I did all this during my week off it is almost over so I don't know when I have the time to do it but it is definitely on my todo list.
 

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,714
Country
Colombia
I've tested with your file it seems to work. Thank you again for testing this I have completely forgotten to handle CRLF and LF before you tested it.
Hello there, I just make some test:

Put again SD:/switch/title.keys and test, the decryption now works fine.

change the installation folder on the card to SD:/switch/sigpatchesgenerator, and all works fine, the Keys.dat file is found without problem.

With no SD:/bootloader/patches.ini file, When run loader or FS a new patches.ini file is generated using only LF end line.

If I put a SD:/bootloader/patches.ini with CR/LF or LF end lines the generated patches.ini have all end lines with the same format.

Now the only problem is what the new patches.ini generated by loader, lacks of the "." on the section ".nosigchk" even if you have or not patches.ini file on SD:/bootloader/

if my old patches.ini do not have sections for the firmware or the loader, they are created, (the loader section without the ".")

1661043336410.png
left the correct entry, right the generated one.


@dogty have you do think about enable the touch screen on the interface?
 
Last edited by impeeza,

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227
I'm really glad this thread is still alive. Thanks to all the developers and testers. :yayswitch:

You can create a section on the 1st post for your releases on the 1st post if you want.
View attachment 323525
I've just got ftp transfer and pattern override stuff to add (to make the app future proof), and then I'll done. I'll upload the the main page once I'm done. I'll most likely be done this week at some point if nothing else crops up.
 

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Hello there, I just make some test:

Put again SD:/switch/title.keys and test, the decryption now works fine.

change the installation folder on the card to SD:/switch/sigpatchesgenerator, and all works fine, the Keys.dat file is found without problem.

With no SD:/bootloader/patches.ini file, When run loader or FS a new patches.ini file is generated using only LF end line.

If I put a SD:/bootloader/patches.ini with CR/LF or LF end lines the generated patches.ini have all end lines with the same format.

Now the only problem is what the new patches.ini generated by loader, lacks of the "." on the section ".nosigchk" even if you have or not patches.ini file on SD:/bootloader/

if my old patches.ini do not have sections for the firmware or the loader, they are created, (the loader section without the ".")

View attachment 323528left the correct entry, right the generated one.


@dogty have you do think about enable the touch screen on the interface?
Here I have added the dot thank you for noticing.
Adding touchscren is a great addition I looked into it and I know how to add it but I' m at the end of my week off so I' m not going to work on it for now. But it is a great suggestion, thank you.
 
Last edited by dogcsty,

impeeza

¡Kabito!
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,714
Country
Colombia
Here I have added the dot thank you for noticing.
Adding touchscren is a great addition I looked into it and I know how to add it but I' m at the end of my week off so I' m not going to work on it for now. But it is a great suggestion, thank you.
Thanks a lot for your effort. Go and enjoy the rest of your week:grog:
 

TAOKTC

Member
Newcomer
Joined
Sep 13, 2009
Messages
17
Trophies
1
XP
1,493
Country
France
Here I have added the dot thank you for noticing.
Adding touchscren is a great addition I looked into it and I know how to add it but I' m at the end of my week off so I' m not going to work on it for now. But it is a great suggestion, thank you.

Many thanks dogcsty !
I tested your sigmatches-generator and it works great but I have a remark.
When I choose Yes to the question "Directly copy the generated files ?", I remark that it does not create the folders 'exefs_patches' and 'kip_patches', so the ips files are not created. When these folders exist in the folder atmosphere, all works perfect !
 

dogcsty

Well-Known Member
Newcomer
Joined
Dec 2, 2021
Messages
47
Trophies
0
XP
227
Country
United States
Many thanks dogcsty !
I tested your sigmatches-generator and it works great but I have a remark.
When I choose Yes to the question "Directly copy the generated files ?", I remark that it does not create the folders 'exefs_patches' and 'kip_patches', so the ips files are not created. When these folders exist in the folder atmosphere, all works perfect !
Thank you for noticing it! This new release should correct this issue
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=_NTF5_qgH0o