WindowsDevicePortalWrapper  0.9.0.0
A client library that wraps the Windows Device Portal REST APIs.
Using XboxWdpDriver.exe for testing or production management of consoles

XboxWdpDriver.exe, built from the Samples/XboxWdpDriver project, is used to target WDP on Xbox One to assist in automated testing as well as being useful for production development scenarios.

The app has built in help for most of its operations which can be accessed with the /? flag.

Scripts or other executables could be written to interface with XboxWdpDriver.exe to make simpler command line calls, and can mimic things like the Xb*.exe command line tools that may be familiar to some Xbox developers. An example of such a script is provided in the Tools directory when building the TestAppXbox project (XbUser.cmd).

XboxWdpDriver Parameters

Parameter Purpose
/Ip The system IP address for the Xbox One console (required if no default console is set).
/User WDP username (if required, will be stored after the first connection starting with Windows 8).
/Pwd WDP password (if required, will be stored after the first connection starting with Windows 8).
/CertFile (optional) Path to a certificate file. This allows accepting an untrusted root certificate and allows specifying a proxy cert for a web proxy such as Fiddler
/Thumbprint (optional) Thumbprint for an SSL certificate that we are willing to accept from the console. This is another way to accept an untrusted certificate without providing the entire certificate file
/Op The operation to run. Run XboxWdpDriver without this parameter to get a list of all available operations.

Supported operations (in alphabetical order) are the following:

The app operation

Allows getting the list of applications on the console and performing some basic lifetime management (launch, terminate, etc). Suspend and resume aren't currently supported but will be in the future.

Usage:

1 /subop:list
2  Lists all installed packages on the console.
3 /subop:launch /pfn:<packageFullName> /aumid:<appId>
4  Starts the requested application.
5 /subop:terminate /pfn:<packageFullName>
6  Stops the requested application.
7 /subop:uninstall /pfn:<packageFullName>
8  Removes or unregisters the given application from the console.

Examples:

1 XboxWdpDriver.exe /op:app /subop:list
1 XboxWdpDriver.exe /op:app /subop:launch /pfn:Microsoft.Xbox.DevHome_100.1607.22000.0_x64__8wekyb3d8bbwe /aumid:Microsoft.Xbox.DevHome_8wekyb3d8bbwe!App
1 XboxWdpDriver.exe /op:app /subop:terminate /pfn:Microsoft.Xbox.DevHome_100.1607.22000.0_x64__8wekyb3d8bbwe
1 XboxWdpDriver.exe /op:app /subop:uninstall /pfn:d15692ce-8b27-4bd3-9ceb-81652e9fea54_1.0.0.0_x64__55mw97kmv3wha

The config operation

Allows retrieving and setting some common system settings.

Usage:

1 [/setting:<setting name> [/value:<setting value>]]
2  Gets current settings and their values. If
3  /setting is specified, only returns that value.
4  If /value is also specified, sets the settting to
5  that value instead of returning the current
6  value.

Examples:

1 XboxWdpDriver.exe /op:config
1 XboxWdpDriver.exe /op:config /setting:TVResolution
1 XboxWdpDriver.exe /op:config /setting:TVResolution /value:1080p

The connect operation

The ip parameter is required if no default console is configured. You can set a default console or list the current default console by using the 'connect' operation. Specifying the /thumbprint parameter to connect will cause the thumbprint to be persisted allowing future connections to trust the device without specifying the SLL thumbprint.

Examples:

1 XboxWdpDriver.exe /ip:10.0.0.1 /op:connect

or

1 XboxWdpDriver.exe /op:connect

Persisting the SSL thumbprint:

1 XboxWdpDriver.exe /op:connect /ip:10.0.0.1 /thumbprint:0000111122223333444455556666777788889999

The Fiddler operation

Allows enabling and disabling of a Fiddler proxy for monitoring HTTP traffic on the console.

Usage:

1 /state:<on or off> [/reboot] [/proxyaddress:<proxy address> /proxyport:<proxy port> /certpath:<path to cert file>]
2  Whether to enable or disable Fiddler. Enabling and disabling Fiddler
3  requires a reboot. You can specify the /reboot flag to do the reboot
4  automatically. If Fiddler is being enabled, proxyaddress and proxyport
5  are both required. If Fiddler has not been configured on this console
6  previously, then the cert file is also required.

Examples:

1 XboxWdpDriver.exe /op:fiddler
1 XboxWdpDriver.exe /op:fiddler /state:on /proxyaddress:10.0.0.1 /proxyport:8888 /certpath:FiddlerRoot.cer
1 XboxWdpDriver.exe /op:fiddler /state:off /reboot

The file operation

Allows file operations on some known folders on the console (application specific storage via LocalAppData and development files via DevelopmentFiles).

LocalAppData operations require the package full name be provided.

Usage:

1 /subop:knownfolders
2  Lists all available known folder ids on the console
3 /subop:dir /knownfolderid:<knownfolderid> [/subpath:<subpath>] [/packagefullname:<packageFullName>]
4  Lists the directory contents at the given knownfoldid and optionally subpath.
5 /subop:download /knownfolderid:<knownfolderid> /filename:<name of the file to download> /destination:<filepath for storing the file> [/subpath:<subpath>] [/packagefullname:<packageFullName>]
6  Downloads the requested file to the desired destination.
7 /subop:upload /knownfolderid:<knownfolderid> /filepath:<filepath of the file to upload> [/subpath:<subpath>] [/packagefullname:<packageFullName>]
8  Uploads a file to the requested folder.
9 /subop:rename /knownfolderid:<knownfolderid> /filename:<name of the file to rename> /newfilename:<new filename> [/subpath:<subpath>] [/packagefullname:<packageFullName>]
10  Renames a given file.
11 /subop:delete /knownfolderid:<knownfolderid> /filename:<name of the file to delete> [/subpath:<subpath>] [/packagefullname:<packageFullName>]
12  Deletes the given file.

Examples:

1 XboxWdpDriver.exe /op:file /supop:knownfolders
1 XboxWdpDriver.exe /op:file /supop:dir /knownfolderid:DevelopmentFiles /subpath:VSRemoteTools
1 XboxWdpDriver.exe /op:file /supop:download /knownfolderid:DevelopmentFiles /subpath:VSRemoteTools/x64 /filename:dbgshim.dll /destination:c:\temp

The info operation

Lists some basic information about the operating system and device name of this Xbox One console.

Example:

1 XboxWdpDriver.exe /op:info

The install operation

Installs a UWP application from an appx or loose folder.

Usage:

1 /appx:<path to Appx> [/depend:<path to dependency1>;<path to dependency2> /cer:<path to certificate>]
2  Installs the given AppX package, along with any given dependencies.
3 /folder:<path to loose folder> [/depend:<path to dependency1>;<path to dependency2> /cer:<path to certificate> /transfer:<SMB or HTTP, SMB is the default> /destfoldername:<folder name, defaults to the same as the loose folder>]
4  Installs the appx from a loose folder, along with any given dependencies.
5 /register:<subpath on DevelopmentFiles\LooseApps to app to register>
6  Registers a loose folder that is already present on the device.

Examples:

1 XboxWdpDriver.exe /op:install /appx:myappx.appx
1 XboxWdpDriver.exe /op:install /folder:myapploosefolder
1 XboxWdpDriver.exe /op:install /folder:myapploosefolder /transfer:HTTP
1 XboxWdpDriver.exe /op:install /register:myapploosefolder

The processes operation

Lists all processes on the target Xbox One console.

Example:

1 XboxWdpDriver.exe /op:processes

The reboot operation

Reboots the target Xbox One console.

Example:

1 XboxWdpDriver.exe /op:reboot

The sandbox operation

Gets or sets the Xbox Live sandbox for the current Xbox One console.

Usage:

1 [/value:<desired value> [/reboot]]
2  Gets or sets the current Xbox Live sandbox value. Changing the current
3  sandbox requires a reboot, which can be done automatically be specifying
4  the /reboot flag.

Example:

1 XboxWdpDriver.exe /op:sandbox

Example:

1 XboxWdpDriver.exe /op:sandbox /value:MySandboxId /reboot

The Screenshot operation

Allows taking of screenshots of the remote console.

Usage:

1 [/filepath:<filepath> [/override]]
2  Saves a screenshot from the console to the destination file specified
3  by /filepath. This filename should end in .png so the file can be
4  correctly read. If this parameter is not provided the screenshot is
5  saved in the current directory as xbox_screenshot.png. This operation
6  will fail if the file already exists unless the /override flag is specified.

Examples:

1 XboxWdpDriver.exe /op:screenshot
1 XboxWdpDriver.exe /op:screenshot /filepath:c:\temp\screenshot.png
1 XboxWdpDriver.exe /op:screenshot /filepath:c:\temp\screenshot.png /override

The systemPerf operation

Gives a summary of current system performance on the target Xbox One console (memory usage, etc).

Example:

1 XboxWdpDriver.exe /op:systemPerf

The xbluser operation

Controls listing and managing users on the console.

Usage:

1 /subop:list
2  Lists all Xbox Live Users on the console
3 /subop:signin <user identifier (/msa:<msa> or /id:<id>)> [/msapwd:<password>]
4  Signs in the given user, adding them to the console if necessary
5 /subop:signout <user identifier (/msa:<msa> or /id:<id>)>
6  Signs the given user out of the console
7 /subop:addsponsored
8  Adds a sponsored user to the console
9 /subop:autosignin <user identifier (/msa:<msa> or /id:<id>)> <state (/on or /off)>
10  Turns autosignin on or off for a given user
11 /subop:delete <user identifier (/msa:<msa> or /id:<id>)>
12  Deletes the given user from the console

Examples:

1 XboxWdpDriver.exe /op:xbluser /subop:list
1 XboxWdpDriver.exe /op:xbluser /subop:signin /msa:testaccount@testdomain.com /msapwd:SuperSecret
1 XboxWdpDriver.exe /op:xbluser /subop:signout /id:16
1 XboxWdpDriver.exe /op:xbluser /subop:addsponsored
1 XboxWdpDriver.exe /op:xbluser /subop:autosigin /id:16 /state:on
1 XboxWdpDriver.exe /op:xbluser /subop:delete /id:16