Skip to content

Commit

Permalink
Add notice to use sudo on linux + add micro guide for udev rule. (#10)
Browse files Browse the repository at this point in the history
* Add notice of sudo to guide

* Add instructions for udev rules

* Shorter menu item

* Add oreos advice.

* `eudev` isnt `udev`, it's just an implementation of it.
  • Loading branch information
noirscape authored and oreo639 committed Feb 11, 2019
1 parent 5fce0de commit 3c9b458
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
38 changes: 38 additions & 0 deletions docs/extras/adding_udev.md
@@ -0,0 +1,38 @@
# Linux - Run payload sender without root

This section details how to add an udev rule to let you send a payload to the Nintendo Switch without needing to use `sudo`.

!!! tip ""
The following instructions are not for beginners. Only do this if you are confident in what you are doing.

!!! tip ""
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.

There are differing implementations of the following commands on different distros. The commands below are assumed to be ran on Ubuntu. Check your distros manual if you are not running Ubuntu for the equivalent commands.

!!! tip ""
Do the following instructions while your Switch is _not_ connected to your computer.

## 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.

1. Open a terminal.
2. Enter the following command: `sudo groupadd nintendo_switch`.
3. Enter your password when prompted.
4. Enter the following command: `sudo usermod -a -G nintendo_switch $USER`. Make sure that the `G` is capitalized!
5. Close the terminal.

## Adding a udev rule

Next we're gonna add a new udev rule. udev is a device manager for the linux kernel. The rule we're gonna specify is that if the Switch is connected in RCM mode, the group the Switch belongs to will be the group we made in the previous section.

1. Open a terminal.
2. Change to the root user with the following command: `sudo su`. Enter your password when prompted.
3. Enter the following command: `mkdir -p /etc/udev/rules.d`.
4. Enter the following command: `echo 'SUBSYSTEMS=="usb", ATTRS{manufacturer}=="NVIDIA Corp.", ATTRS{product}=="APX", GROUP="nintendo_switch"' > /etc/udev/rules.d/10-switch.rules`.
5. Enter the following command: `udevadm control --reload`.
6. Enter the following command: `udevadm trigger`.
7. Logout and log back in.

You should now be able to run the payload sender without having to use `sudo`.
4 changes: 2 additions & 2 deletions docs/user_guide/sending_payload.md
Expand Up @@ -40,11 +40,11 @@ Now that the device is in RCM, we will need to send it a payload. The methods ar
### Instructions

!!! tip ""
1. Download and run the payload injector
1. Download and run the payload injector (if you are on Linux, you will need to run this program as root or use `sudo`.)
2. Connect your Switch in RCM to your PC using the USB cable
3. Wait for your Switch to be shown as found in the injector
4. Press `Select Payload`, and navigate to and select your hekate_ctcaer `.bin` file
6. Click `Send Payload!` to launch Hekate
5. Click `Send Payload!` to launch Hekate

 

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -21,6 +21,7 @@ nav:
- 'Save Management': 'extras/save_management.md'
- 'Game Modding': 'extras/game_modding.md'
- 'Giving Homebrew More RAM': 'extras/himem_homebrew.md'
- 'Linux injection without root': 'extras/adding_udev.md'
- FAQ: faq.md
- About: about.md

Expand Down

0 comments on commit 3c9b458

Please sign in to comment.