Wii U:Wupclient

From Hacks Guide Wiki
This is the approved revision of this page, as well as being the most recent.

Wupclient is a python tool used to connect to wupserver. It was originally part of smealum's iosuhax.

Setup

What you need

  • The latest release of Python.
  • The wupclient.py (Right-Click → Save As... → Save the file to a directory on your PC).

Instructions

  1. Install Python.
  2. Replace the IP Address in line 30 with the IP Address of your Wii U. Do not change the Port.
  3. Open a Terminal or Command Prompt in the same directory as the wupclient.py.
  4. Run python -i wupclient.py (On Windows: py -3 -i wupclient.py) to start wupclient in interactive mode.
    Several hexadecimal numbers should be printed to the Terminal on a successful connection.

You can now enter commands in the Terminal.

Usage

Wupclient functions

The functions listed below are part of the wupclient class and can be called using the wupclient instance called w.

cd - Change working directory

Changes the current working directory.

cd(path)

path: A relative or absolute path which will become the working directory

Prints 0 to the Terminal on success

Usage example:

w.cd("usr")
w.cd("/vol/storage_mlc01")

dl - Download files from the console

dl(filename, directorypath, local_filename)

filename: Relative or absolute path to the file which should be downloaded from the Wii U
directorypath: Optional path on the PC where the file should be stored in. If unspecified the current directory where wupclient was started in will be used. The directory will be created if it doesn't exist yet.
local_filename: Optional filename of the file that will be created on the PC. If unspecified the original filename will be used.

Prints the number of transferred bytes in hexadecimal representation after transfer was completed.

Usage example:

w.dl("/vol/system/config/system.xml")
w.dl("/vol/system/config/system.xml", "dumps")
w.dl("/vol/system/config/system.xml", "dumps", "backup.xml")

dump_syslog - Output the current system log

Prints the current system log since boot to the Terminal.

Usage example:

w.dump_syslog()

ls - List files and folders

ls(path, return_data)

path: Optional relative or absolute path. If not specified the current working directory will be used.
return_data: Optional bool. Set to True, if the raw data returned by FSA_ReadDir should be printed as well.

Usage example:

w.ls()
w.ls("/vol/system")
w.ls("usr")

up - Upload files to the console

up(local_filename, filename)

local_filename: Relative or absolute path to a file on the PC
filename: Relative or absolute path of the file created on the Wii U. If unspecified the original filename on the PC and current working directory will be used.

Usage example:

w.up("test.txt")
w.up("test.txt", "/vol/storage_sdcard/test.txt")

Utility functions

The functions listed below are utility functions and are not part of the wupclient class.

flush_mlc - Flush MLC cache

Files on the MLC are not directly written to the eMMC, but cached in RAM and on the SLC instead. This function will flush the changes to the chip.

Usage example:

flush_mlc()

ios_shutdown - Shutdown the console

Usage example:

ios_shutdown()