# agesafetch
[![crates.io Version][Version Badge]][crates.io]
[![crates.io Downloads][Downloads Badge]][crates.io]
[![AUR Version][AUR Badge]][AUR Package]
[![License: MIT][License Badge]][LICENSE]
[![REUSE Status][REUSE Badge]][REUSE Status]
[crates.io]: https://crates.io/crates/agesafetch
[Version Badge]: https://img.shields.io/crates/v/agesafetch
[Downloads Badge]: https://img.shields.io/crates/d/agesafetch
[AUR Package]: https://aur.archlinux.org/packages/agesafetch
[AUR Badge]: https://img.shields.io/aur/version/agesafetch
[License Badge]: https://img.shields.io/gitlab/license/BVollmerhaus%2Fagesafetch
[REUSE Status]: https://api.reuse.software/info/gitlab.com/BVollmerhaus/agesafetch
[REUSE Badge]: https://api.reuse.software/badge/gitlab.com/BVollmerhaus/agesafetch
A tool for obtaining your firmware's embedded [AGESA] version on Linux.
[AGESA]: https://en.wikipedia.org/wiki/AGESA
## Installation
### Binaries
Pre-compiled and signed binaries are provided with all [GitLab releases].
[GitLab releases]: https://gitlab.com/BVollmerhaus/agesafetch/-/releases
### From Source
```shell
cargo install agesafetch
```
#### Note
By default, Cargo installs binaries in `~/.cargo/bin`, so that directory
must be in `$PATH` for `agesafetch` to be found. However, not all methods
of privilege escalation preserve the `$PATH` variable, e.g. _sudo_ with a
`secure_path` value.
When in doubt, refer to the complete path: `sudo ~/.cargo/bin/agesafetch`
### From PyPI
agesafetch is available as a pre-built wheel from [PyPI]:
```shell
sudo pipx install --global agesafetch
```
[PyPI]: https://pypi.org/project/agesafetch/
#### Python Bindings
On top of the `agesafetch` command, the Python package also provides basic
bindings to the AGESA search that you can invoke from your own code (which
then also requires elevated privileges or capabilities):
```python
import agesafetch
## Usage
```shell
agesafetch [-h]
```
<sup>
🔒 The AGESA search requires elevated privileges or suitable capabilities.
</sup>
Simply run `agesafetch` to invoke a search for the AGESA version in memory:
```shell
$ sudo agesafetch
:: Searching Reserved region #1 (1667 KiB)...
-> Found AGESA version: CezannePI-FP6 1.0.1.1
```
When run non-interactively, such as in pipes or redirections, `agesafetch`
will automatically suppress all output except for the found version:
```shell
$ sudo agesafetch > found_version
$ cat found_version
CezannePI-FP6 1.0.1.1
```
## Known Working Systems
So far, we have successfully tested agesafetch on the following platforms:
* ASUS ROG STRIX X670E-E GAMING WIFI
* Gigabyte
* B450 AORUS PRO (F66d)
* B550 AORUS ELITE V2 (F17)
* B650 AORUS PRO AX (F32)
* X570 GAMING X (F39)
* Lenovo
* ThinkPad P14s Gen 1 AMD (v1.51)
* ThinkPad P14s Gen 2 AMD (v1.30)
🚀 If you would like to add to this list, get in touch!
Please feel free to [open an issue] if no version is found on your system
even after a minute or two of searching.
[open an issue]: https://gitlab.com/BVollmerhaus/agesafetch/-/issues/new
## License
This project is licensed under the MIT license. See the [LICENSE] file for
more information.
## Author
* [Benedikt Vollmerhaus](https://gitlab.com/BVollmerhaus)
## Thanks To
* [Matthias Bräuer], for feedback and platform testing.
[Matthias Bräuer]: https://gitlab.com/Braeuer
[LICENSE]: https://gitlab.com/BVollmerhaus/agesafetch/blob/master/LICENSE