Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petarov/query-apple-firmware-updates
๐Query firmware updates about Apple devices
https://github.com/petarov/query-apple-firmware-updates
apple dfu firmware-updates ios ios-firmware ipados mdm
Last synced: 11 days ago
JSON representation
๐Query firmware updates about Apple devices
- Host: GitHub
- URL: https://github.com/petarov/query-apple-firmware-updates
- Owner: petarov
- License: mit
- Created: 2022-02-05T08:39:34.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-23T21:07:07.000Z (over 2 years ago)
- Last Synced: 2024-06-20T14:17:13.362Z (5 months ago)
- Topics: apple, dfu, firmware-updates, ios, ios-firmware, ipados, mdm
- Language: Go
- Homepage: https://vexelon.net/qadfu/
- Size: 51.8 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Query Apple Devices Firmware Updates
[![CI Build](https://github.com/petarov/query-apple-firmware-updates/actions/workflows/build.yml/badge.svg)](https://github.com/petarov/query-apple-firmware-updates/actions/workflows/build.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/petarov/query-apple-firmware-updates)](https://goreportcard.com/report/github.com/petarov/query-apple-firmware-updates)A web service that delivers firmware update infos about Apple devices.
This is in fact a caching proxy for [ipsw.me](https://ipsw.me/). Update infos are being stored in a local SQLite database.
# Installation
Download `devices.json` from [SeparateRecords/apple_device_identifiers](https://github.com/SeparateRecords/apple_device_identifiers).
Run `make` to produce binaries in the `dist` folder.
# Usage
To start the service on `[::1]:7095` run:
./qadfu_linux_amd64 -devices devices.json -db database.db
The webapp is available at `http://localhost:7095`.
## Run as systemd daemon
Download the binary and `devices.json` file to `/opt/qadfu/` on your server.
Create a bash `/opt/qadfu/start.sh` startup script:
```bash
#!/bin/sh./qadfu_linux_amd64 -addr localhost -devices devices.json -db database.db
```Create the following file under `/lib/systemd/system/qadfu.service`:
```bash
[Unit]
Description=Query Apple Devices Firmware Updates
After=nginx.service[Service]
Type=simple
Restart=always
RestartSec=5s
Restart=on-failure
WorkingDirectory=/opt/qadfu
ExecStart=/opt/qadfu/start.sh[Install]
WantedBy=multi-user.target
```To enable the systemctl service run:
systemctl reenable /lib/systemd/system/qadfu.service
To start the service run:
systemctl start qadfu.service
# API
List of available API calls:
- `/api` - shows all available junctions
- `/api/devices` - Fetches a list of all Apple devices
- `/api/devices/:product` - Fetches a single Apple device by product name
- `/api/devices/search?key=:key` - Fetches a list of matching devices given the `key` parameter
- `/api/updates/:product` - Fetches device updates by product name# Development
To install deps run:
go get
To run the server:
go run -tags "fts5" main.go -devices devices.json -db database.db
The build tag `fts5` enables the SQLite FTS5 extension in the `mattn/go-sqlite3` lib.
# License
[MIT](LICENSE)