Commit Graph

19 Commits

Author SHA1 Message Date
Richard Hughes
7a4fa63d0e Add a 'get-report-metadata' command to allow debugging metadata collection 2022-12-14 14:43:52 +00:00
Richard Hughes
09eb3fc7f6 Fix a regression when using fwuptool install-blob with FMAP firmware
Only set _NO_SEARCH when specified, and do not piggy-back on the --force
command line option.

Fixes https://github.com/fwupd/fwupd/issues/5227
2022-11-02 15:01:23 +00:00
Richard Hughes
bfebede490 Add support for platform capability descriptors so devices can set quirks
This feature adds support for platform capability BOS descriptors which allows
the device itself to ship quirk data.

Use `sudo fwupdtool get-devices --save-backends=FILENAME` to save fake backend
devices to a file. This allows easy creation of self tests that do not require
physical hardware.
2022-09-13 12:07:35 +01:00
Richard Hughes
47efacfe5d Remove the firmware builder functionality
We used the firmware builder functionality to either build or modify
firmware images on the end-user system, e.g. copying the MAC address
from the old system image to the new system image.

Unfortunately running fwupd on the command line (e.g. ./src/fwupd)
leaves the tty connected and thus bubblewrap doesn't protect us from
installing malicious signed firmware. The firmware would have to have
been uploaded to the LVFS by a trusted vendor and signed before being
installed, which further decreases the severity of this problem.

As there was only one vendor who asked for this functionality (who have
yet to upload a single firmware to the LVFS...) just rip out this
functionality to reduce our attack surface and completely fix the bug,
and any like it.

Many thanks to Aaron Janse <aaron@ajanse.me> for discovering and
disclosing this issue to us.
2022-07-29 16:52:38 +01:00
Mario Limonciello
5ded4f44fe Add support for reading and writing firmware attributes
This support is comprehensive:
 * Client library support
 * Daemon support
 * plugin support
 * Client tool support (with new commands)
2022-07-28 17:30:57 -05:00
Gaël PORTAY
c73d37fc6f Revert "fu-tool: Save device state to @LOCALSTATEDIR@/lib/fwupd/state.json on actions"
This reverts commit 3143bad0f5.
2022-06-20 12:57:40 -04:00
Gaël PORTAY
97a627b54b Cache list of devices to cache directory 2022-06-20 12:57:40 -04:00
Gaël PORTAY
2cc5449ae8 trivial: Use bash-completion facilities to get arguments 2022-06-20 12:57:40 -04:00
Gaël PORTAY
d893b80bbc trivial: Fix missing bash-completion for firmware-read 2022-06-20 12:57:40 -04:00
Gaël PORTAY
c8987ab100 trivial: Allow mixing modifiers/parameters in bash-completion scripts 2022-06-20 12:57:40 -04:00
Gaël PORTAY
5bdbf0dd0a trivial: Add missing comments in bash-completion scripts
For the sake of consistency.
2022-06-20 12:57:40 -04:00
Gaël PORTAY
4b3352e2f5 trivial: Add bash-completion for device-id
The four commands `get-details`, `install`, `install-blob`, and
`firmware-plugin` use device-id as second command argument but the
fwupdtool bash completion script does not completed it yet.

This calls function `_show_device_ids` to add completion for device-id
if completion the second argument of the commands mention above.
2022-06-20 12:57:40 -04:00
Gaël PORTAY
b670404127 trivial: Fix fwupdtool bash-completion script
The commands `attach`, `detach`, `activate`, `verify-update`,
`reinstall`, and `get-updates` calls `_show_device_ids` but that
function is not defined in the fwduptool bash-completion script.

This defines the function `_show_device_ids` by reusing the function
of the name in the fwupdmgr bash-completion script.

Fixes:

	$ sudo fwupdtool attach
	                        ^-- tabulation
	bash: _show_device_ids: command not found
2022-06-20 12:57:40 -04:00
Richard Hughes
a4906010d6 Add a way to read the device firmware in fwupdtool
In most cases 'fwupdtool firmware-dump' and 'fwupdtool firmware-read'
are going to be the same. This isn't true in all cases, especially when
dealing with composite firmware like archives.

See https://github.com/fwupd/fwupd/pull/4623#issuecomment-1129227133
2022-05-19 09:29:44 +01:00
Richard Hughes
02d8753097 Move the clear-history command to fwupdtool
This is perhaps a useful thing to do when debugging, but isn't the sort
of thing we need users to understand.
2022-01-21 15:25:05 +00:00
Crag Wang
fbcc031ae4 trivial: refresh bash completion to reflect recent changes 2022-01-17 13:41:20 -06:00
Mario Limonciello
b900c09ced trivial: add bash completion for get-plugins 2018-05-22 16:03:14 -05:00
Richard Hughes
c02ee4da46 Allow whitelisting plugins in fwupdtool
When developing code it's really convenient to only run the new plugin. This
means you don't have to wait for the other hardware to initialize and there
are no side-effects from other plugins when installing firmware.

You can specify multiple plugins as globs, for instance:

    fwupdtool get-devices \
        --plugin-whitelist wacom \
        --plugin-whitelist "thunderbolt*"
2018-05-22 16:03:14 -05:00
Mario Limonciello
e7d6cdc843 trivial: Add bash completion for fwupdtool 2018-05-22 05:44:52 +01:00