Tutorial  Updated

How to edit NSPs to remove Link Nintendo Account Requirement for games

This guide is outdated!

Apparently there has been a really easy way to do this and I just didn't know about it. Just use NSC_BUILDER.

https://gbatemp.net/threads/nsc_bui...lder-game-updates-dlc-in-a-single-xci.522486/
https://github.com/julesontheroad/NSC_BUILDER/releases


#6 - Advanced Mode > Place NSP to be edited > #1 to start processing > #5 to patch linked account requirement.

Adding the list provided from NSC_BUILDER showing which games can be patched. Note that Stardew Valley isn't on that list. Since Stardew Valley only asks about linking when you choose Local Multiplayer, that means it's handled by the game during runtime. More research by someone smart will have to figure out how to fix that.

I believe that this was first done with Bloodstained. Amoo Arash edited a value in the update nsp, and you no longer needed to link an account in order to play. I read around and found out you can do this for all games that have this requirement.

Special thanks to @Falo and @cyberant, as well as the people who created the programs I'm using.

Things you will need:

*To get the keys, a Hacked Switch with latest version of Atmosphere. I'm not exactly sure if you actually need this, as hactool only recognizes a certain set of keys I think up to Master Key 5. Later versions of atmosphere come with the Sept folder which is required to get keys from 7.X and higher using lockpick. You probably could get away with just finding dumped keys on the internet, since I don't think you need any console specific keys.

LockpickRCM

hactool

HxD or your favorite hex editor. I used HxD because that was what was recommended to me.

hacPack

The nsp you want to remove the requirement from. In this example, I'll be using Super Kirby Clash.

Instructions

1. Create Directory Path on your computer to put all the files2. Getting keys3. Navigating to the .switch folder using Command Prompt4. Unpacking the nsp to get to the control.nca5. Unpacking the Control.nca6. Editing "Startup User Account Flag" inside of control.nacp7 Using hacpack GUI, NCA tab - Generate a new control nca8. Generate a new meta.cnmt.nca9. Creating the new NSP10. Install using method of choice and Enjoy!


  1. I'm using Windows 10, so I apologize to Mac and Linux people.

    We want to create a folder named ".switch" under your user profile. Once you do, put every file you downloaded in here.

    hactool GitHub said:
    hactool will check for the presence of a keyset file in $HOME/.switch/prod.keys (or $HOME/.switch/dev.keys if -d/--dev is set). If present, this file will automatically be loaded.
    For those who don't know what "$Home" is, that is just the name for your specific profile. For example, I placed everything in C:\Users\HP\.switch. My username is HP.
    Directory-Path.png

    *I have tried using the -k/--keyset argument with hactool and placing the prod.keys directly next to hactool and also having a copy in the above spot, but it just kept breaking, so we will be putting everything in the .switch folder to save us from any headaches.*

  2. Lockpick GitHub said:
    • Launch Lockpick_RCM.bin using your favorite payload injector
    • Upon completion, keys will be saved to /switch/prod.keys on SD
    • If the console has Firmware 7.x or higher, the /sept/ folder from Atmosphère or Kosmos release zip must be present on SD or else only keyblob master key derivation is possible (ie. up to master_key_05 only)
    Alternatively, find keys on the net. They are sometimes named keys.txt, so all you need to do is just rename it to prod.keys. I think some of the newer dumps are already called prod.keys to be Yuzu (Switch emulator) ready, so you can use those as is.

    Once you get your keys, put them in the .switch folder.

  3. Press the Windows Key and type in "cmd" to open the Command Prompt. You don't need to run as Administrator.
    From there type in "cd" for <change directory> and then type in ".switch" to change to the .switch folder.
    Navigating-to-folder.png

    If you do run as Administrator, you'll start in C\WINDOWS\System32 instead. It doesn't change much, as you can still change directory to the .switch folder easily by typing in "cd C:\Users\HP\.switch"


  4. All you need to do now is run hactool through cmd and then specify what you want it to do. In this case we will use the command

    Code:
    hactool -t pfs0 --outdir=Unpacked "Super Kirby Clash.nsp"

    The first word "hactool" is to run the program. The "-t pfs0" is setting the type of file to pfs0 A.K.A. nsp. The --outdir=Unpacked is setting the directory that the nsp will be unpacked to and creating a folder called Unpacked. You can change "Unpacked" to whatever you want if you want a different name. The "Super Kirby Clash.nsp" is the nsp file you chose. You can name it whatever you want to make it easier, like A.nsp or something. You need the quotes around it.

    After you press Enter, hactool should run and create the "Unpacked" folder. Don't worry about [WARN]: Failed to match key, as hactool just doesn't recognize some extra keys that you have.
    tab-4-Copy.png


  5. control.nacp has the same format for every switch game, but of course a newer SDK can add more values.
    Some guides for rom editing ask you to pick the largest nca file which is usually over a GB, but in this case, we will use the 2nd largest nca (1386 KB). I hope that this size difference is the same across all games.

    While still in CMD, type in the following
    Code:
    hactool -x Unpacked\a62cf0016dcf820520ef0078d9e21dd7.nca -t nca --romfsdir=romfs
    the "-x" is for extracting data, the "folder\blah.nca" is the location of the target nca relative to the folder you are starting from (in this case, the .switch folder), the "-t nca" is the type of file, and "--romfsdir=romfs" is telling hactool to extract the romfs to a directory aptly named "romfs."
    You should now have a folder named "romfs" in your .switch folder with the control.nacp inside.
    tab-5-Copy.png


  6. Offset 0x3025 can have three possible values:

    0x00 = None
    0x01 = Required
    0x02 = RequiredWithNetworkServiceAccountAvailable

    What we want to do is edit the 02 into 01.

    Either drag and drop control.nacp onto your hex editor, or open it from within the hex editing program. Once you have it open, go to the offset at 0x3025. For HxD, you click on "Search" and then "Go to..." and enter in "3025" in the Offset entry field. Your mouse cursor will then be automatically placed at that offset. From here, just use your number keys to type in "01." The value will change to a red color to show that it has been edited. Save.

    tab-6-Copy.png


  7. Now that you have edited the control.nacp, head to hacPack folder and open up hacPack-GUI.exe.
    For the Output directory, just put the .switch folder, for Keyset select keys.prod, for the title id: type it from the output in hactool or from finding it on the internet (Google whatever game Title ID and it'll be in the first few spots), for NCA type: select control, and for romfsdirectory, choose .../.switch/romfs
    tab-7-Copy.png

    The name of the control file should be different for everyone.

  8. While still in the hacPack GUI, click on the "Meta NCA" tab.
    Fill in the respective fields with the the Control.nca file you just made, the Program.nca located in the "Unpacked" folder, and the LegalInformation.nca, also from the "Unpacked" folder.
    The program.nca should be the largest .nca file and the LegalInformation.nca should be the smallest. Keep in mind that there is also a xxx.cnmt.nca file that we don't care about, so don't get that confused with the other 3 nca files.
    tab-8-Copy.png


  9. Create a new folder in your .switch folder and place the following files inside:
    The newly created cnmt file
    The new control file
    A copy of the .tik file, .cert file, and the program+control ncas you just used earlier.

    Go to the NSP tab in hacPack GUI and select the directory you just made and put the files in. Build the nsp.
    tab-9-Copy.png

    Your new nsp should have the title ID as its name and is located in the output directory

  10. Install via tinfoil/goldleaf/whatever via usb or direct from switch.
    When you select the game, it will no longer ask you to link an account. That's all there is to it!

 

Attachments

  • Linked_Account_Patchable_Games.txt
    9.4 KB · Views: 1,443
Last edited by GameSystem,

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
I went with the update that the file says is good but it still kept asking for the linking when i tried starting the game. shame too because I love doom
Just clarifying. Did you apply the patch to both the base game and also to the update? I think you can get away with just patching the update file, as I think that's all people had to do with Bloodstained patch v1.02. I'd hope it would be similar for other games with linking.
 

doctordoom

Well-Known Member
Member
Joined
Mar 13, 2017
Messages
150
Trophies
0
Age
40
XP
580
Country
United States
Just clarifying. Did you apply the patch to both the base game and also to the update? I think you can get away with just patching the update file, as I think that's all people had to do with Bloodstained patch v1.02. I'd hope it would be similar for other games with linking.

i applied it to both the base and update. i also did make new copy and apply to original. nothing worked. when i got into the game and hit a button to start it went right to the "link nintendo account". i dont have an account linked and i dont even know how to go back and do it so this is where i am stuck
 

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
Hi sir just wanna ask it keep saying your prod.keys does not exist when I have it already can you help me thanks
Use NSC_Builder instead and put keys.txt (rename your prod.keys) inside the ztools folder. There is a template for which keys it wants. NSC_Builder also has a key checker in configuration mode to make sure it can read them properly.

i applied it to both the base and update. i also did make new copy and apply to original. nothing worked. when i got into the game and hit a button to start it went right to the "link nintendo account". i dont have an account linked and i dont even know how to go back and do it so this is where i am stuck
If you have a lot of free time, could you follow the old tutorial where it asks you to edit the control.nacp and then see what it says at the 0x3025 offset? If you don't have time, then maybe it's best to just uninstall what you have now and then download+install the prepatched version. I just checked online, and I'm having more trouble finding an "unfixed" version of the DOOM games haha.
 
Last edited by GameSystem,

JRoad

Developer
Developer
Joined
May 18, 2018
Messages
1,003
Trophies
0
XP
1,746
Country
Spain
Anyone able to get this to work with Doom and Doom II? I tried and it still asks for a linked account even if i have a save file already loaded. However, the txt file says the program will work with doom and doom II.
I tested my patcher with Doom on it's day and it works fine. The base game used to need the save with the bnet account too but that need was removed with the last update.
 

doctordoom

Well-Known Member
Member
Joined
Mar 13, 2017
Messages
150
Trophies
0
Age
40
XP
580
Country
United States
I tested my patcher with Doom on it's day and it works fine. The base game used to need the save with the bnet account too but that need was removed with the last update.
then i am not sure why it is not working because i patched it and after i hit a button to start the dialogue comes up asking to link an account and if i cancel i get another dialogue saying i need to log in with a bethesda account and it just goes right back to the "press to start" screen
 

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
@phantomrabbit Please immediately edit that post. It contains switch keys. When you get that warning, all it means is that those keys aren't recognized because the program doesn't ask for them. You can ignore it.

For example, on GitHub, hacPack only asks for

Code:
header_key - NCA Header Key
key_area_key_application_xx - Application key area encryption keys
titlekek_xx - Title key encryption key

hactool only asks for
Code:
master_key_##                   : The ##th Firmware Master Key. Obtainable with TrustZone code execution.

package1_key_##                 : The ##th Package1 key. Obtainable with Package1ldr code execution.

package2_key_##                 : The ##th Package2 key. Derivable from master_key_## and package2_key_source.

titlekek_##                     : The ##th Titlekek. Derivable from master_key_## and titlekek_source.

package2_key_source             : Found in TrustZone .rodata.
titlekek_source                 : Found in TrustZone .rodata.
aes_kek_generation_source       : Found in TrustZone .rodata.
aes_key_generation_source       : Found in TrustZone .rodata.
key_area_key_application_source : Found in FS .rodata.
key_area_key_ocean_source       : Found in FS .rodata.
key_area_key_system_source      : Found in FS .rodata.
header_kek_source               : Found in FS .rodata.
header_key_source               : Found in FS .rodata.

header_key                      : Derivable from master_key_##, aes generation sources, and header sources.
key_area_key_application_##     : Derivable from master_key_##, aes generation sources, and key_area_key_application_source.
key_area_key_ocean_##           : Derivable from master_key_##, aes generation sources, and key_area_key_ocean_source.
key_area_key_system_##          : Derivable from master_key_##, aes generation sources, and key_area_key_system_source.

and NSC_Builder only asks for
Code:
aes_kek_generation_source =
aes_key_generation_source =
titlekek_source =

key_area_key_application_source =
key_area_key_ocean_source =
key_area_key_system_source =

master_key_00 =
master_key_01 =
master_key_02 =
master_key_03 =
master_key_04 =
master_key_05 =
master_key_06 =
master_key_07 =
master_key_08 =

header_key =

xci_header_key =
 
Last edited by GameSystem,

JRoad

Developer
Developer
Joined
May 18, 2018
Messages
1,003
Trophies
0
XP
1,746
Country
Spain
then i am not sure why it is not working because i patched it and after i hit a button to start the dialogue comes up asking to link an account and if i cancel i get another dialogue saying i need to log in with a bethesda account and it just goes right back to the "press to start" screen
It work, those messages are in game. For the betesda account you need to install the latest update that removes it or to use a save file with it linked but basically the requirement it patches is the one before boot. For the other message either enter in airplane mode or cancel it.
 

doctordoom

Well-Known Member
Member
Joined
Mar 13, 2017
Messages
150
Trophies
0
Age
40
XP
580
Country
United States
It work, those messages are in game. For the betesda account you need to install the latest update that removes it or to use a save file with it linked but basically the requirement it patches is the one before boot. For the other message either enter in airplane mode or cancel it.

i got the new update 1.02 and it works now. Apparently the earlier update was not being patched correctly and/or my save file fix was bad. not sure which but it works now. thank you. oh and the program patches the new update just fine :D
 
Last edited by doctordoom,

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
can we make this patch... enabled from atmosphere/titles/XXXXXXXXXXX/romfs/???
I think this is the answer to that question

Control contains files and after decrypting whole NCA it cannot be encrypted again. You need to unpack NCA, edit correct file and pack files again to NCA
 
Last edited by GameSystem,

fredward

Active Member
Newcomer
Joined
Apr 16, 2009
Messages
42
Trophies
1
XP
960
Country
United States
Hey guys i patched my bloodstained update file but when i install the update nsp the icon is corrupted. Game will not boot amd thats with the base game and update installed i did base game alone and same thing i install it and it gives me corrupt data. Anyone know how to fix this. Im using sx os and it shows the game icon when im installing the nsp.
 

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
Hey guys i patched my bloodstained update file but when i install the update nsp the icon is corrupted. Game will not boot amd thats with the base game and update installed i did base game alone and same thing i install it and it gives me corrupt data. Anyone know how to fix this. Im using sx os and it shows the game icon when im installing the nsp.
Try getting a different dump. Most of the time when there are problems like this, it's because it errored during the download. What firmware are you on? Are you using SX installer for the nsp? From what I heard, SX Installer will install the games onto a lower firmware, but you won't be able to launch them unless you update to the required version.
 
Last edited by GameSystem,

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
606
Trophies
1
XP
1,733
Country
United States
Will this work with the Super Nintendo Online?
I haven't checked, but I think for just the regular SNES Online app you need to check-in via online once a week for it to even work. There is a patched version of the app on the net where you never need to be connected for it to work. I think that might be the better option. I didn't check what they did to make it work. I also think that you need to edit that one again to allow playing without a linked account, so if you test it with whichever one you got and it still won't let you play, try downloading the other version and also patch that one to not ask for linking.
 
Last edited by GameSystem,
  • Like
Reactions: Robert McCoy

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: https://gbatemp.net/profile-posts/163064/