Hacking Cannot set archive bit to split NSP on Mac OSX

jebediah

Well-Known Member
OP
Newcomer
Joined
Aug 24, 2015
Messages
63
Trophies
0
Age
39
XP
221
Country
United States
After splitting a large NSP with splitNSP.py successfully, I tried the following chflags commands:

sudo chflags -R arch splitnspfolder.nsp
sudo chflags -R noarch splitnspfolder.nsp
sudo chflags arch splitnspfolder.nsp
sudo chflags noarch splitnspfolder.nsp

However, the folder is still not recognised as archive/file by Tinfoil and I am unable to install. Booting into Windows confirms the archive bit was not set.

I installed mtools to use mattrib, but I get the following error:

sudo mattrib +a SPLITFOLDER.nsp
Drive 'A:' not supported
Cannot initialize 'A:'

For the life of me I don't want to boot into Windows every time I split a large NSP, and I can't understand why we can't do that on OSX.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,884
Trophies
2
XP
29,311
Country
United Kingdom
I haven't had a need to mess with it on mac lately, but what you can do is use NX-Shell to set the archive bit on your Switch. Run NX-Shell from the homebrew menu, find the folder, press X, choose "more..." (I think) then "Set archive bit".
 

jebediah

Well-Known Member
OP
Newcomer
Joined
Aug 24, 2015
Messages
63
Trophies
0
Age
39
XP
221
Country
United States
Thank you so much @hippy dave you saved the day!

People, be aware that you first need to enable Developer options in NX-Shell's settings menu first (hit the menu icon top left, then the settings icon in the left panel). Also I recommend using the controller (not touch screen) to select your split folder because setting the archive bit will only work on a highlighted item (grey background), not by checking its left side box then hitting the 3 dots on top right. So you highlight your split folder using the controller and hit the X button to bring up the Actions menu, select More and then Set archive bit. If you don't use the controller, only the Parent folder will be highlighted and pressing Set archive bit will give no response. This is on NX-Shell 1.2.0.

@stick267 Thanks for the tip but I can't seem to establish a USB connection to my Mac. I'm using a USB-C to USB-C cable and since the Switch isn't detected in USB install mode out of the box I just left this on the side. Happy to read your tips on how to set it up though.
 
  • Like
Reactions: hippy dave

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
Thank you so much @hippy dave you saved the day!

People, be aware that you first need to enable Developer options in NX-Shell's settings menu first (hit the menu icon top left, then the settings icon in the left panel). Also I recommend using the controller (not touch screen) to select your split folder because setting the archive bit will only work on a highlighted item (grey background), not by checking its left side box then hitting the 3 dots on top right. So you highlight your split folder using the controller and hit the X button to bring up the Actions menu, select More and then Set archive bit. If you don't use the controller, only the Parent folder will be highlighted and pressing Set archive bit will give no response. This is on NX-Shell 1.2.0.

@stick267 Thanks for the tip but I can't seem to establish a USB connection to my Mac. I'm using a USB-C to USB-C cable and since the Switch isn't detected in USB install mode out of the box I just left this on the side. Happy to read your tips on how to set it up though.
Glad you found the solution with NX-Shell, it's currently the only work around for macOS users. It's not that macOS cannot set the archive flag (it can), it's that it won't set or keep the flag on a FAT32 volume. Once the folder is copied to the SD card the flags are reset. No idea why this happens but no tool seems to get around it.

As for USB installs, USB-C to USB-C is iffy. Sometimes the Mac mounts the Switch as an accessory and you can do it, other times the Mac tries to charge from the Switch and it won't work. I can't work out a pattern on why which happens or a way to force other than just changing the USB-C I'm using back and forth. This is assuming you installed the required libUSB drivers and such.
 

stick267

Well-Known Member
Member
Joined
Dec 17, 2018
Messages
586
Trophies
0
Age
33
XP
1,171
Country
United States
Thank you so much @hippy dave you saved the day!

People, be aware that you first need to enable Developer options in NX-Shell's settings menu first (hit the menu icon top left, then the settings icon in the left panel). Also I recommend using the controller (not touch screen) to select your split folder because setting the archive bit will only work on a highlighted item (grey background), not by checking its left side box then hitting the 3 dots on top right. So you highlight your split folder using the controller and hit the X button to bring up the Actions menu, select More and then Set archive bit. If you don't use the controller, only the Parent folder will be highlighted and pressing Set archive bit will give no response. This is on NX-Shell 1.2.0.

@stick267 Thanks for the tip but I can't seem to establish a USB connection to my Mac. I'm using a USB-C to USB-C cable and since the Switch isn't detected in USB install mode out of the box I just left this on the side. Happy to read your tips on how to set it up though.
I've heard of issues with USB-C to USB-C cables while doing USB install so if splitting is currently working (minus the archive bit stuff) then it'd probably just be easiest to stick with it.

To answer your original question though, you have to set the archive bit AFTER you transfer the folder to your SD card. If you do it before hand, the archive bit gets wiped out when you transfer it.
 

jebediah

Well-Known Member
OP
Newcomer
Joined
Aug 24, 2015
Messages
63
Trophies
0
Age
39
XP
221
Country
United States
Glad you found the solution with NX-Shell, it's currently the only work around for macOS users. It's not that macOS cannot set the archive flag (it can), it's that it won't set or keep the flag on a FAT32 volume. Once the folder is copied to the SD card the flags are reset. No idea why this happens but no tool seems to get around it.

As for USB installs, USB-C to USB-C is iffy. Sometimes the Mac mounts the Switch as an accessory and you can do it, other times the Mac tries to charge from the Switch and it won't work. I can't work out a pattern on why which happens or a way to force other than just changing the USB-C I'm using back and forth. This is assuming you installed the required libUSB drivers and such.
Thanks for clarifying. I've been struggling to find anything else than booting Windows and had no idea that there was a homebrew out there to do the job.

As for the USB-C cabling, I did notice the Mac won't decide on a consistent way to interact, so I just like you I've given up since we do have some reliable workarounds for now.

--------------------- MERGED ---------------------------

I've heard of issues with USB-C to USB-C cables while doing USB install so if splitting is currently working (minus the archive bit stuff) then it'd probably just be easiest to stick with it.

To answer your original question though, you have to set the archive bit AFTER you transfer the folder to your SD card. If you do it before hand, the archive bit gets wiped out when you transfer it.
Yes I had figured that out because I tried to re-use the same file I previously set the archive bit of in Windows and which I had stored externally, and indeed flags got reset as I transferred it again to the SDcard. OSes are what they are I guess, but Tinfoil and other installers should definitely include a way to set the archive bit themselves or to accept the split folder as it is so that everything can be handled from the SDcard directly and at the time of installation.
 

DocKlokMan

Plugin Dev
Member
Joined
Apr 20, 2007
Messages
3,009
Trophies
2
Age
36
XP
4,571
Country
United States
Thanks for clarifying. I've been struggling to find anything else than booting Windows and had no idea that there was a homebrew out there to do the job.

As for the USB-C cabling, I did notice the Mac won't decide on a consistent way to interact, so I just like you I've given up since we do have some reliable workarounds for now.

--------------------- MERGED ---------------------------


Yes I had figured that out because I tried to re-use the same file I previously set the archive bit of in Windows and which I had stored externally, and indeed flags got reset as I transferred it again to the SDcard. OSes are what they are I guess, but Tinfoil and other installers should definitely include a way to set the archive bit themselves or to accept the split folder as it is so that everything can be handled from the SDcard directly and at the time of installation.
Hmmm, not a bad idea. If TinFoil or Goldleaf sees a directory that ends in .nsp then it should list it and if the user selects it, apply the archive bit to it then process it. That would make things a little more seamless.
 
  • Like
Reactions: hippy dave

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,884
Trophies
2
XP
29,311
Country
United Kingdom
My olde Mac doesn't have USB C, but I think I read someone had more success using a USB C-to-A adapter at the Mac end, then a C-to-A cable from the Switch.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Gray zone warfare looks kinda cool
  • Psionic Roshambo @ Psionic Roshambo:
    Ohhh on one episode they could use rings to summon Captain Criminal who is just Obama like a spoof of Captain Planet lol
    +1
  • BigOnYa @ BigOnYa:
    Does look good
  • Psionic Roshambo @ Psionic Roshambo:
    By your powers combined, hmmm where is Epstein?
  • K3Nv2 @ K3Nv2:
    Just another shit fps clone
  • K3Nv2 @ K3Nv2:
    Thought it was some warzone dlc bs
  • Psionic Roshambo @ Psionic Roshambo:
    Looks like an enhanced Far cry 1
  • K3Nv2 @ K3Nv2:
    That's a far cry from it
  • BigOnYa @ BigOnYa:
    Is it a free to play bs, pay to get any good weapon/gear
  • K3Nv2 @ K3Nv2:
    Not free to play but $35
  • K3Nv2 @ K3Nv2:
    Inb4 kiiwii gives it a 0/10
  • BigOnYa @ BigOnYa:
    6/10 rating on steam
  • Psionic Roshambo @ Psionic Roshambo:
    I would like a Predator game "Kill Team" it takes place in the Jungle of the first movie, your team is sent to hunt the predator, using current tech drones and a trained team. Set traps use strategy to hunt and trap or kill the predator.
  • BigOnYa @ BigOnYa:
    Ill stick with my Battlefield. Yea a predator hunting game like that would be cool. Esp if you can be Arnold and say "Get to da choppa"
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Maybe Arnold could do a cameo voice acting, he is the one briefing you on the mission
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Honestly surprised they didn't make a tie in game for Predators that movie was awesome
  • Psionic Roshambo @ Psionic Roshambo:
    I was kinda sad the Yakuza guy died sword fighting a predator lol
  • Psionic Roshambo @ Psionic Roshambo:
    The Russian guy went out like a boss
  • Psionic Roshambo @ Psionic Roshambo:
    Double claymores to the face definitely kill a predator lol
  • BigOnYa @ BigOnYa:
    I went today and looked at a motorcycle someone was selling. I get there and the battery on it was dead, so the guy grabbed a battery charger and hooked it up. He plugged it into the wall, and the motorcycle sparked and started smoking. Come to find out the bike uses a 6 volt battery and the guy had the charger set to 12v. I said sorry to the dude and walked away. I felt bad for him tho.
  • Psionic Roshambo @ Psionic Roshambo:
    Sounds like it would be an exciting ride....
  • Psionic Roshambo @ Psionic Roshambo:
    Not sure I would want something on fire between my legs
    Psionic Roshambo @ Psionic Roshambo: Not sure I would want something on fire between my legs