diff --git a/README.md b/README.md index dc863a4..efc1e04 100644 --- a/README.md +++ b/README.md @@ -8,60 +8,35 @@ Exploits the Wii U's USB Host Stack descriptor parsing. Pronounced like "mud pie - One of the devices listed below *Note: Any other linux device capable of USB device emulation should work as well. - Prebuilt releases and instructions are only available for the Pico and Zero. + Prebuilt releases and instructions are only available for tested devices. I will add more devices below which are confirmed to work.* ### Supported devices: -- A Raspberry Pi Pico or Zero -- A Nintendo Switch capable of running [udpih_nxpayload](https://github.com/GaryOderNichts/udpih_nxpayload) +- Raspberry Pi Pico +- Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5 +- Steam Deck +- Nintendo Switch capable of running [udpih_nxpayload](https://github.com/GaryOderNichts/udpih_nxpayload) ## Instructions -### Pico -- Download the latest `udpih.uf2` from the [releases page](https://github.com/GaryOderNichts/udpih/releases). -- Hold down the `BOOTSEL` button on the board and connect the Pico to your PC. - Your PC will detect the Pi as a storage device. -- Copy the `.uf2` file to the Pico. It will disconnect after a few seconds. - -The Pico is now flashed and can be used for udpih. Continue with ["Booting the recovery_menu"](#booting-the-recoverymenu) below. - -### Raspberry Pi Zero (Linux) -> :information_source: To use USB gadgets on the Pi Zero you need to enable the `dwc2` module by running the commands below: -> `echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt` -> `echo "dwc2" | sudo tee -a /etc/modules` -> After running the commands reboot the system. - -- Install the required dependencies: - ```bash - sudo apt install build-essential raspberrypi-kernel-headers - ``` -- Clone the repo: - ```bash - git clone https://github.com/GaryOderNichts/udpih.git - cd udpih - ``` -- Download the latest `arm_kernel.bin.h` from the [releases page](https://github.com/GaryOderNichts/udpih/releases) and copy it to the `arm_kernel` directory. -- Now build the kernel module: - ```bash - cd linux - make - ``` -- You can now run `sudo insmod udpih.ko` to insert the kernel module into the kernel. - -The Zero is now ready to be used for udpih. -Note that you'll need to insert the module again after rebooting the Zero. You will need 2 USB cables, one for powering the Zero and one which can be connected to the Wii U. - -Continue with ["Booting the recovery_menu"](#booting-the-recoverymenu) below. +### Device Setup +Follow the setup guide for the device you want to use below: +- [Raspberry Pi Pico](./docs/setup-pico.md) +- [Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5](./docs/setup-linux.md) +- [Steam Deck](./docs/setup-linux.md) +- [Nintendo Switch](https://github.com/GaryOderNichts/udpih_nxpayload#Instructions) ### Booting the recovery_menu > :warning: Important notes for this to work: -> - Make sure **no** other USB Devices are attached to the console. -> - Only use USB ports on the front of the console, the back ports **will not** work. +> - Make sure **no** other USB devices are attached to the console. +> - Only use USB ports on the **front** of the console, the back ports **will not** work. > - If your console has standby mode enabled, pull the power plug and turn it on from a full coldboot state. - Copy the latest release of the [recovery_menu](https://github.com/GaryOderNichts/recovery_menu/releases) to the root of your FAT32 formatted SD Card. - Insert the SD Card into the console and power it on. -- As soon as you see the "Wii U" logo on the TV or Gamepad plug in your Zero/Pico. - This timing is important. If you're already in the menu, the exploit won't work.. +- As soon as you see the "Wii U" logo on the TV or Gamepad plug in your prepared UDPIH device. + This timing is important. If you're already in the menu, the exploit won't work. + Depending on the device, you might have to plug it in sooner or later. This might take several attempts. + If you get no video output or a distorted screen, your timing was most likely wrong. - After a few seconds you should be in the recovery menu. Check out the [recovery_menu README](https://github.com/GaryOderNichts/recovery_menu) for more information about this menu. diff --git a/docs/setup-linux.md b/docs/setup-linux.md new file mode 100644 index 0000000..da603ac --- /dev/null +++ b/docs/setup-linux.md @@ -0,0 +1,102 @@ +# Linux +## Device specific steps +Some devices require additional setup for UDPIH to work. Click on the device you want to use: + +
+ Raspberry Pi Zero (W) / A / A+ / Zero 2 W / 4 / 5 (Expand) + + > :information_source: For the Pi Zero and Zero 2 W you will need 2 USB cables, one for powering the Zero and one which can be connected to the Wii U. + + > :information_source: For the Pi 4 and 5 you need to provide power through the power headers. Unfortunately the USB-C port handles both power and USB, and the Pi doesn't boot fast enough when plugged into the Wii U. You cannot use any of the USB-A ports in client mode. + + > :information_source: This guide expects that you use Raspberry Pi OS. + + To use USB gadgets you need to enable `dwc2` by running the command below: + > :warning: Prior to Raspberry Pi OS Bookworm, Raspberry Pi OS stored the boot partition at `/boot/`. + + ```bash + echo "dtoverlay=dwc2" | sudo tee -a /boot/firmware/config.txt + ``` + + After running the command reboot the system. + + To install the required dependencies run the command below: + ```bash + sudo apt install git build-essential raspberrypi-kernel-headers + ``` +
+ +
+ Steam Deck (Expand) + + To build and use UDPIH on the Steam Deck, you need to disable the read-only filesystem and initialize the pacman keyring. + If you haven't done this before you can follow [this guide](https://steamdecki.org/SteamOS/Read-only_Filesystem). + + Install the required dependencies by running the command below: + ```bash + sudo pacman -S base-devel + ``` + + Next you need to install the required linux headers. Start with figuring out the kernel version by running the following command: + ```bash + uname -r + ``` + You'll get an output like this: + ```bash + 6.1.52-valve16-1-neptune-61 + ``` + In this case you'd want to install the linux headers for neptune-61: + ```bash + sudo pacman -S linux-neptune-61-headers # replace neptune-61 with your kernel version + ``` + + Next you'll have to enable USB Dual Role Device in the BIOS: + - Power off the Steam Deck. + - Enter the BIOS by holding the Volume Up (+) button and pressing the Power button. + - Select `Setup Utility`. + - Navigate to `Advanced` > `USB Configuration` and select `USB Dual Role Device`. + - Change it from `XHCI` to `DRD`. + - Navigate to `Exit` and select `Exit Saving Changes`. +
+ +## Building the UDPIH gadget +- Clone the repo: + ```bash + git clone https://github.com/GaryOderNichts/udpih.git + cd udpih + ``` +- Download the latest `arm_kernel.bin.h` from the [releases page](https://github.com/GaryOderNichts/udpih/releases) and copy it to the `arm_kernel` directory. + You can also simply run: + ```bash + curl -L https://github.com/GaryOderNichts/udpih/releases/latest/download/arm_kernel.bin.h > arm_kernel/arm_kernel.bin.h + ``` +- Now build the kernel module: + ```bash + cd linux + make + ``` + +## Running the UDPIH gadget + +> :information_source: You need to insert the module again after rebooting the device. + +Run the command below to insert the kernel module into the kernel: +```bash +sudo insmod udpih.ko +``` + +The device is now ready to be used for udpih. + +Continue with ["Booting the recovery_menu"](../README.md#booting-the-recovery_menu). + +## Additional information + +If you want to remove the module from the kernel: +```bash +sudo rmmod udpih +``` + +To show logs and debug information: +```bash +sudo dmesg -w +``` diff --git a/docs/setup-pico.md b/docs/setup-pico.md new file mode 100644 index 0000000..462f53c --- /dev/null +++ b/docs/setup-pico.md @@ -0,0 +1,8 @@ +# Pico +## Instructions +- Download the latest `udpih.uf2` from the [releases page](https://github.com/GaryOderNichts/udpih/releases). +- Hold down the `BOOTSEL` button on the board and connect the Pico to your PC. + Your PC will detect the Pi as a storage device. +- Copy the `.uf2` file to the Pico. It will disconnect after a few seconds. + +The Pico is now flashed and can be used for udpih. Continue with ["Booting the recovery_menu"](../README.md#booting-the-recovery_menu).