initial aubox skeleton: web-UI, kirin DLOAD, firmware library

- FastAPI Web-UI auf 127.0.0.1:8080 mit Geräte-Live-Erkennung,
  sandboxed File-Browser, Firmware-Library (SQLite + Auto-Identifikation)
- Huawei update.app Parser: extrahiert Hardware-ID, Section-Layout,
  BOOT/SYSTEM-Vorhandensein direkt aus den Headern
- Kirin Download-Mode: hisi-idt-Protokoll-Implementation gegen pyusb
- USB-Erkennung für Huawei (DLOAD/Fastboot-D), Google, MediaTek, Qualcomm EDL
- Huawei-P10-Lite-Workflow (eRecovery + Testpoint-DLOAD-Pfade)
- Docker-Compose mit USB-Passthrough (Major 189) für Re-Enumeration
- udev-Regeln + Setup-Script für Debian/Ubuntu/Pi-OS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Stefan Hacker
2026-04-26 12:09:39 +02:00
parent d0386b3c53
commit fb3534553b
35 changed files with 1883 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
{% if not devices %}
<p class="empty">Kein bekanntes Hersteller-Gerät am USB.</p>
{% else %}
<table class="grid">
<thead>
<tr><th>Bus:Addr</th><th>VID:PID</th><th>Hersteller</th><th>Modus</th><th>Hinweis</th></tr>
</thead>
<tbody>
{% for d in devices %}
<tr>
<td>{{ "%03d"|format(d.bus) }}:{{ "%03d"|format(d.address) }}</td>
<td><code>{{ "%04x"|format(d.vid) }}:{{ "%04x"|format(d.pid) }}</code></td>
<td>{{ d.mode.vendor }}</td>
<td><strong>{{ d.mode.label }}</strong></td>
<td>{{ d.mode.notes }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
+27
View File
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>{% block title %}aubox{% endblock %}</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header>
<h1><a href="/">aubox</a></h1>
<nav>
<a href="/">Übersicht</a>
<a href="/devices">Geräte</a>
<a href="/firmware">Firmware</a>
<a href="/browse">Dateien</a>
<a href="/workflows/p10lite">P10 Lite</a>
</nav>
</header>
<main>
{% block content %}{% endblock %}
</main>
<footer>
<small>aubox · lokale Web-UI</small>
</footer>
<script src="/static/app.js"></script>
</body>
</html>
+36
View File
@@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block title %}Dateien · aubox{% endblock %}
{% block content %}
<h2>Datei-Browser</h2>
<p class="muted">Sandboxed auf <code>{{ firmware_root }}</code> — Path-Traversal blockiert.</p>
<nav class="crumbs">
{% for label, p in crumbs %}
<a href="/browse?path={{ p }}">{{ label }}</a>
{% if not loop.last %} / {% endif %}
{% endfor %}
</nav>
{% if not entries %}
<p class="empty">Verzeichnis ist leer.</p>
{% else %}
<table class="grid">
<thead><tr><th>Name</th><th>Typ</th><th>Größe</th></tr></thead>
<tbody>
{% for e in entries %}
<tr>
<td>
{% if e.is_dir %}
<a href="/browse?path={{ e.rel_path }}">{{ e.name }}/</a>
{% else %}
{{ e.name }}
{% endif %}
</td>
<td>{{ "DIR" if e.is_dir else "FILE" }}</td>
<td>{{ e.size|humansize if not e.is_dir else "—" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
+9
View File
@@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block title %}Geräte · aubox{% endblock %}
{% block content %}
<h2>Angeschlossene Geräte</h2>
<p>Aktualisiert sich alle 2 Sekunden.</p>
<div id="devices" data-refresh="/api/devices/html" data-interval="2000">
Lade…
</div>
{% endblock %}
+38
View File
@@ -0,0 +1,38 @@
{% extends "base.html" %}
{% block title %}Firmware · aubox{% endblock %}
{% block content %}
<h2>Firmware-Library</h2>
<p>Quelle: <code>{{ firmware_root }}</code></p>
<form id="scan-form" data-action="/firmware/scan" data-target="#scan-result">
<button type="submit">Library scannen</button>
<span id="scan-result"></span>
</form>
{% if not firmware %}
<p class="empty">Noch keine Einträge. Lege Firmware-Dateien unter
<code>{{ firmware_root }}</code> ab und klicke "Library scannen".</p>
{% else %}
<table class="grid">
<thead>
<tr>
<th>Vendor</th><th>Modell</th><th>SoC</th><th>Region</th>
<th>Format</th><th>Größe</th><th>Pfad</th>
</tr>
</thead>
<tbody>
{% for fw in firmware %}
<tr>
<td>{{ fw.vendor or "—" }}</td>
<td><a href="/firmware/{{ fw.id }}">{{ fw.model or "—" }}</a></td>
<td>{{ fw.soc or "—" }}</td>
<td>{{ fw.region or "—" }}</td>
<td>{{ fw.format }}</td>
<td>{{ fw.size|humansize }}</td>
<td><code>{{ fw.rel_path }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
+23
View File
@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block title %}{{ fw.model or fw.rel_path }} · aubox{% endblock %}
{% block content %}
<h2>{{ fw.model or "Unbekannt" }} <small>{{ fw.format }}</small></h2>
<table class="kv">
<tr><th>Pfad</th><td><code>{{ fw.rel_path }}</code></td></tr>
<tr><th>Vendor</th><td>{{ fw.vendor or "—" }}</td></tr>
<tr><th>Modell</th><td>{{ fw.model or "—" }}</td></tr>
<tr><th>SoC</th><td>{{ fw.soc or "—" }}</td></tr>
<tr><th>Region</th><td>{{ fw.region or "—" }}</td></tr>
<tr><th>Version</th><td>{{ fw.version or "—" }}</td></tr>
<tr><th>Größe</th><td>{{ fw.size|humansize }}</td></tr>
<tr><th>SHA-256</th><td><code>{{ fw.sha256 or "noch nicht berechnet" }}</code></td></tr>
</table>
{% if fw.extra_json %}
<h3>Format-spezifische Daten</h3>
<pre>{{ fw.extra_json }}</pre>
{% endif %}
<p><a href="/firmware">← zurück</a></p>
{% endblock %}
+39
View File
@@ -0,0 +1,39 @@
{% extends "base.html" %}
{% block title %}aubox · Übersicht{% endblock %}
{% block content %}
<section class="cards">
<article class="card">
<h2>Geräte</h2>
<p class="big">{{ devices|length }}</p>
<p>{{ "angeschlossen" if devices else "keins erkannt" }}</p>
<p><a href="/devices">öffnen →</a></p>
</article>
<article class="card">
<h2>Firmware-Library</h2>
<p class="big">{{ fw_count }}</p>
<p>Einträge in der Datenbank</p>
<p><a href="/firmware">öffnen →</a></p>
</article>
<article class="card">
<h2>Dateien</h2>
<p>Sandbox-Browser für die Firmware-Library</p>
<p><a href="/browse">öffnen →</a></p>
</article>
<article class="card">
<h2>Huawei P10 Lite</h2>
<p>FRP-Removal · WAS-LX1 · Kirin 658</p>
<p><a href="/workflows/p10lite">öffnen →</a></p>
</article>
</section>
<section class="info">
<h3>Aktive Pfade im Container</h3>
<ul>
<li><strong>Firmware:</strong> <code>{{ firmware_root }}</code></li>
<li><strong>Loader:</strong> <code>{{ loader_root }}</code></li>
</ul>
</section>
{% endblock %}
+15
View File
@@ -0,0 +1,15 @@
{% extends "base.html" %}
{% block title %}Huawei P10 Lite · aubox{% endblock %}
{% block content %}
<h2>Huawei P10 Lite — FRP-Removal</h2>
<p class="muted">WAS-LX1 · Kirin 658 · EMUI 8.x</p>
<h3>Methode 1: eRecovery + SD-Karte (empfohlen)</h3>
<pre>{{ instructions }}</pre>
<h3>Methode 2: Testpoint + Kirin DLOAD</h3>
<p>Über CLI vorbereitet, Web-UI-Button folgt:</p>
<pre>python -m aubox p10lite frp-remove --method dload-erase</pre>
<p>Voraussetzung: Loader-Files in <code>/loaders/kirin/kirin960_lite/</code>
(siehe Loader-README im Repo).</p>
{% endblock %}