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

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States
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,169
Last edited by GameSystem,

yoshimashi

Well-Known Member
Member
Joined
Mar 7, 2016
Messages
136
Trophies
0
XP
238
Country
United States
So I'm having an issue with step 5. Does it have to do with my prod.keys?
When I renamed my keys to prod.keys I get an error with sections and offsets.. It looks nothing like the image above so I feel like I'm not doing something right? I copied and pasted the cmd code to my cmd though. The error I get is "Error: Section 0 is corrupted!" and different offsets rather than what the image you uploaded shows. The image shows that cmd saved and created a romfs folder but it doesn't show that in mine.
But in step 2 you wrote that I should rename my keys to keys.prod so when I renamed it, typed in the cmd prompt, cmd prompt tells me it can't find my key.
What am I doing wrong? I'm using win 10
 

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States
So I'm having an issue with step 5. Does it have to do with my prod.keys?
When I renamed my keys to prod.keys I get an error with sections and offsets.. It looks nothing like the image above so I feel like I'm not doing something right? I copied and pasted the cmd code to my cmd though. The error I get is "Error: Section 0 is corrupted!" and different offsets rather than what the image you uploaded shows. The image shows that cmd saved and created a romfs folder but it doesn't show that in mine.
But in step 2 you wrote that I should rename my keys to keys.prod so when I renamed it, typed in the cmd prompt, cmd prompt tells me it can't find my key.
What am I doing wrong? I'm using win 10
I'm deeply sorry. I just realized that I mistyped it. When you download the keys.txt from online, you rename it to "prod.keys" not "keys.prod." I had them mixed up.

Okay I think I figured out the problem. I downloaded keys off the internet, and some don't have all of the master keys. The one I got, for example, only goes up to Master Key 06. I ran it and also got the Section 0 is corrupted, but when you read the info in CMD, you see this:

Code:
Title ID:                           01003fb00c5a8000
SDK Version:                        7.4.0.0
Distribution type:                  Download
Content Type:                       Control
Master Key Revision:                7 (Unknown)
Since they are using SDK 7 and it says Master Key Revision 7, I think that means you need to have that master key for it to work. I tested this by adding in my personal Master Key 07 into the online prod.keys and it immediately worked. So all you have to do is find that single key and you should be good to go.
 
Last edited by GameSystem,

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States
Oh, I wish NSP installers had the option to disable those requirements, too.

I agree, just for the sake of convenience. For NSP installers to do this, they would have to unpack, edit, then rebuild the NPS before installing. I don't think it's likely those functions will be added.

According to Falo, atmosphere can't redirect Control's romfs currently, so the nca needs to be edited. Falo also said It would be better if atmosphere would allow a layeredfs version of it, as control.nacp has the same format for every switch game. Perhaps in the distant future we won't have to do any of this.
 
Last edited by GameSystem,

yoshimashi

Well-Known Member
Member
Joined
Mar 7, 2016
Messages
136
Trophies
0
XP
238
Country
United States
I'm deeply sorry. I just realized that I mistyped it. When you download the keys.txt from online, you rename it to "prod.keys" not "keys.prod." I had them mixed up.

Okay I think I figured out the problem. I downloaded keys off the internet, and some don't have all of the master keys. The one I got, for example, only goes up to Master Key 06. I ran it and also got the Section 0 is corrupted, but when you read the info in CMD, you see this:

Code:
Title ID:                           01003fb00c5a8000
SDK Version:                        7.4.0.0
Distribution type:                  Download
Content Type:                       Control
Master Key Revision:                7 (Unknown)
Since they are using SDK 7 and it says Master Key Revision 7, I think that means you need to have that master key for it to work. I tested this by adding in my personal Master Key 07 into the online prod.keys and it immediately worked. So all you have to do is find that single key and you should be good to go.

Thank you (: I used my own key and it worked!
 
Last edited by yoshimashi,
  • Like
Reactions: GameSystem

OkazakiTheOtaku

no thanks, I don't want a custom title
Member
Joined
Jul 20, 2016
Messages
1,452
Trophies
1
Location
127.0.0.1
XP
2,991
Country
Japan
Does this work for games that don't need the account to launch, but to play multiplayer? Stardew Valley launches just fine without an account but needs it for local multiplayer.
 
  • Like
Reactions: GameSystem

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States
Does this work for games that don't need the account to launch, but to play multiplayer? Stardew Valley launches just fine without an account but needs it for local multiplayer.
I'd probably have to say no, simply because the offset we are editing in the control is called "Startup User Account Flag." However, I'm willing to bet that there might be something we can still do. Sadly, I'm not versed at all in that stuff, as I only wrote the tutorial after getting a ton of help from others, but if you could go through the steps up until getting the control file, you'll be that much closer once someone finds out what to edit.

@Falo, would you have any knowledge pertaining to this question? I read the list of offsets here, but I wouldn't know what to change https://switchbrew.org/wiki/NACP_Format. Maybe 0x3213 0x1 RequiredNetworkServiceLicenseOnLaunchFlag?
 
Last edited by GameSystem,
  • Like
Reactions: OkazakiTheOtaku

Falo

Well-Known Member
Member
Joined
Jul 22, 2012
Messages
656
Trophies
1
XP
2,384
Country
Germany
Does this work for games that don't need the account to launch, but to play multiplayer? Stardew Valley launches just fine without an account but needs it for local multiplayer.

This control flag is only for the home menu / startup of the game
0x00 - None -> the game won't ask you for any profile during startup (but maybe later, example: Dead Cells)
0x01 - Required -> before you can start the game, the game will ask you which profile you will use for this game (the default setting)
0x02 - Required + NNID -> before you can start the game, the game will ask you which NNID profile you will use for this game

If you can start the game, then you are past this check, Stardew Valley is 0x01.
Everything else is handled by the game and sdk runtime, if the game requires a NNID for local wireless, then there is nothing what you can do, except for creating one.
I really don't get why people don't just make one before they hack their switch, NNID has nothing to do with bans.
 

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States
Does this work for games that don't need the account to launch, but to play multiplayer? Stardew Valley launches just fine without an account but needs it for local multiplayer.
Seems we are out of luck for now. I guess I have to redirect you to https://github.com/Povstalez/Kefir-Updater/releases
That injects a fake linked account into your switch. I think you have to backup all of the saves across all of your profiles. Not 100% on it, because I had too many profiles to want to bother doing that. Here is the discussion thread. https://gbatemp.net/threads/kefir-updater.539086/
 
  • Like
Reactions: swutch

OkazakiTheOtaku

no thanks, I don't want a custom title
Member
Joined
Jul 20, 2016
Messages
1,452
Trophies
1
Location
127.0.0.1
XP
2,991
Country
Japan
Seems we are out of luck for now. I guess I have to redirect you to https://github.com/Povstalez/Kefir-Updater/releases
That injects a fake linked account into your switch. I think you have to backup all of the saves across all of your profiles. Not 100% on it, because I had too many profiles to want to bother doing that. Here is the discussion thread. https://gbatemp.net/threads/kefir-updater.539086/
I actually did link an account to the switch so it doesn't affect me personally, but I was just curious. But thank you :)
 

JRoad

Developer
Developer
Joined
May 18, 2018
Messages
1,005
Trophies
0
XP
1,719
Country
Spain

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States

doctordoom

Well-Known Member
Member
Joined
Mar 13, 2017
Messages
145
Trophies
0
Age
37
XP
486
Country
United States
thank you for this. there have been a few games ive been wanting to play but required an account and i just never did it before putting on cfw. this is amazing :D
 
  • Like
Reactions: naddel81

doctordoom

Well-Known Member
Member
Joined
Mar 13, 2017
Messages
145
Trophies
0
Age
37
XP
486
Country
United States
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.
 

GameSystem

Well-Known Member
OP
Member
Joined
Sep 14, 2009
Messages
603
Trophies
0
XP
1,704
Country
United States
So still no way to patch the SNES Online app? :(
Have you tested it with NSC_Builder? If it doesn't work, please let JRoad know so he can add it to the list of not working games.
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.
Do you also have the updates for the DOOM games? I think the latest one patches out the BNET requirement part, but I guess it doesn't hurt to have a save with that linked already. If it's not working at all, you might have to get with JRoad and have him verify it's bad so he can remove it from the list.
 

doctordoom

Well-Known Member
Member
Joined
Mar 13, 2017
Messages
145
Trophies
0
Age
37
XP
486
Country
United States
Have you tested it with NSC_Builder? If it doesn't work, please let JRoad know so he can add it to the list of not working games.

Do you also have the updates for the DOOM games? I think the latest one patches out the BNET requirement part, but I guess it doesn't hurt to have a save with that linked already. If it's not working at all, you might have to get with JRoad and have him verify it's bad so he can remove it from the list.
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
 
General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: Hah lol