Linux - Running Payload Injector without root
This section details how to add an udev rule to let you send a payload to your Switch without needing to use sudo.
The following instructions only work if you have a system that implements udev. Most modern distros come with systemd already installed, which includes a udev implementation.
Do the following instructions while your Switch is not connected to your computer.
TIP
For Arch Linux users:
The package android-udev includes rules that will also allow for payload injection to work without root. Do note this also allows Android specific commands such as adb and fastboot to also work without root (as is the intention of it.)
Option I - Manually adding rules and group
The following instructions are not for beginners. Only do this if you understand what you are doing.
Creating a new group
To start, we will create a new group and add ourselves to it. The group the Nintendo Switch device will be owned by on Linux will be set to this group.
Open a terminal.
Enter the following command:
shellsudo groupadd nintendo_switchEnter your password when prompted.
Enter the following command. Make sure that the
Gis capitalized:shellsudo usermod -a -G nintendo_switch $USERClose the terminal.
Adding a udev rule
Next, we will add a new udev rule. udev is a device manager for the linux kernel. The rule we will specify is that if the Switch is connected in RCM, the group the Switch belongs to will be the group we made in the previous section.
Open a terminal.
Change to the root user with the following command.. Enter your password when prompted:
shellsudo -iEnter the following command:
shellmkdir -p /etc/udev/rules.dEnter the following command:
shellecho 'SUBSYSTEMS=="usb", ATTRS{manufacturer}=="NVIDIA Corp.", ATTRS{product}=="APX", GROUP="nintendo_switch"' > /etc/udev/rules.d/10-switch.rulesEnter the following command:
shelludevadm control --reloadEnter the following command:
shelludevadm triggerLogout and log back in.
You should now be able to run the payload sender without having to use sudo.
Option II - Installing a package with the rules
These rules will actually allow ANY user to access your Switch via USB, not only your user.
You may just follow the instructions at nx-udev, or if you're on Ubuntu / Debian:
Download nx-udev_latest_all.deb.
Open a terminal in the same directory as your download.
Run the following command to install the package:
shellsudo dpkg -i nx-udev_latest_all.deb
You should now be able to run the payload injector and homebrew with USB communication without having to use sudo.