A RESTful web service that exposes interactions with a connected Firefox OS device
Status message that shows whether the service is running.
List IDs and serial numbers of adb-attached devices. Can optionally specify a
remote host and port for which the device is connected.
Fetch details about the device whose session ID is the parameter id.
Open a tcp connection to the parameter port. Returns a port on the
host machine that is proxied to the device's port.
Close the device tcp connection previously opened on the parameter
port.
List IDs of crash reports on device.
Download the crash dump with the parameter crash crashId.
Trigger a series of sequential low-level touch interactions. The client is
expected to write a JSON array of event objects for which to sequentially
execute. See the syntax for POST /events/:event for event object schema.
Trigger a low-level touch-related interaction. The client is expected to write a JSON object with event-related properties which control the trigger details.
Valid event types and their JSON properties:
doubletap- x, X-axis coordinate
- y, Y-axis coordinate
drag- x, X-axis coordinate to start drag
- y, Y-axis coordinate to start drag
- endX, X-axis coordinate to end drag
- endY, Y-axis coordinate to end drag
- duration, time in milliseconds for drag to elapse
keydown- code, keycode for the key press
keyup- code, keycode for the key release
reset, needs no parameterssleep- duration, time in milliseconds to wait before next event invocation. Useful when triggering many events in a single request.
tap- x, X-axis coordinate
- y, Y-axis coordinate
Example:
curl \
-H 'Content-Type: application/json' \
-X POST \
'http://localhost:8080/devices/abcdef0123456789/events/tap' \
--data-binary '{"x":100,"y":200}'Download a file from device. Use the filepath query parameter to specify the
location of the file to download.
Upload a file to device. Use the filepath query parameter to specify the path
destination of the uploaded file. The uploaded file should sent via
multipart/form-data. A file permissions mode may also be set during upload.
Examples:
# Will upload myfile.txt to /data/local/myfile.txt
curl \
-X PUT
-F 'upload=@myfile.txt'
'http://localhost:8080/devices/abcdef0123456789/files?filepath=/data/local/myfile.txt'# Will upload image.jpg to /data/local/image.jpg with 777 permissions
curl \
-X PUT
-F 'upload=@image.jpg'
-F 'mode=777'
'http://localhost:8080/devices/abcdef0123456789/files?filepath=/data/local/image.jpg'# Will upload script.sh to /data/local/script.sh with executable permissions
curl \
-X PUT
-F 'upload=@script.sh'
-F 'mode=+x'
'http://localhost:8080/devices/abcdef0123456789/files?filepath=/data/local/script.sh'Pipe logs from logcat to the connected client.
Write a log entry to the device. The client is expected to write a JSON object in the request body with the following fields:
- message, required
- priority, optional, defaults to
i - tag, optional, defaults to
DeviceService
Clear all logcat logs on the device.
Stop the process given by pid parameter.
Retrieve a JSON object of all the device properties and their associates values.
Retrieve the value of a device property specified by the property url parameter.
Set the values of a collection device properties. The client is expected to write a JSON object which contains a dictionary of property names to values.
true or 1, then the device will be restarted instead.
Stream the gecko profile from the target device as a tarball (.tar.gz).
Push a gecko profile to the target device. The service expects a gzipped tarball to be sent along as the request body.
