add stuff
This commit is contained in:
commit
26cd15d899
65 files changed
+4820
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# TV-Modding Skills — Hisense HE40E5600FFWTS (Vidaa U)
|
||||
|
||||
Kompakte, action-first Skills zum Modden dieses TVs. Jede Datei = „ich will X
|
||||
tun → so geht's, inkl. Stolperfallen“. Für Tiefe/Belege siehe `../modding/`
|
||||
und `../root/ROOT-GUIDE.md`.
|
||||
|
||||
| Skill | Datei | Ein-Satz-Zweck |
|
||||
|---|---|---|
|
||||
| File-API & Schreibrechte | `fileapi-permissions.md` | Root-JS-APIs lesen/schreiben, Whitelist, Symlink-Bypass |
|
||||
| Root-Ausführung & Persistenz | `root-execution.md` | Root-Loop, SSH, Boot-Hooks, AM-Steuerung |
|
||||
| Payload-Deploy | `payload-deploy.md` | Dateien/Binaries ohne Package Manager auf den TV |
|
||||
| UI / Launcher / Bloat | `ui-launcher-bloat.md` | App-Tiles, UI-Seite, Services an/aus |
|
||||
|
||||
## Kurz-Cheat-Sheet (die drei wichtigsten Primitive)
|
||||
|
||||
```js
|
||||
// Lesen (Text)
|
||||
fileXHR("file:///3rd_rw/appdata/root_out.txt");
|
||||
|
||||
// Schreiben (Text; binär => EINVAL)
|
||||
HiBrowser.File.write("root_cmd.sh", "id\n", 1);
|
||||
|
||||
// Binär schreiben (byte-exakt, curl)
|
||||
HiBrowser.File.download("http://<host>:9000/pub/x", "x", 1);
|
||||
|
||||
// Root-Befehl ausführen (Loop läuft als root)
|
||||
HiBrowser.File.write("root_cmd.sh", "/bin/sh /3rd_rw/appdata/verify.sh\n", 1);
|
||||
```
|
||||
|
||||
**Whitelist (wichtigste Regel):** Schreiben/Download geht nur relativ zu
|
||||
`/3rd_rw/appdata`, `/dev/shm/shm_tmp`, `/3rd/launcher/data` — oder über den
|
||||
dangling ext4-USB-Symlink-Bypass. Details: `fileapi-permissions.md`.
|
||||
|
||||
**Rettungsweg:** SSH `root@192.168.188.94` (Dropbear, key-only). Nie wegwerfen.
|
||||
@@ -0,0 +1,65 @@
|
||||
# Skill: File-API & Schreibrechte (`HiBrowser.File`)
|
||||
|
||||
## Wo die API läuft
|
||||
|
||||
Zwei Root-Webprozesse, beide UID/GID 0, volle `CapEff`, kein Seccomp:
|
||||
|
||||
- **`hisense_browser`** (Web-Browser, DevTools 9224): `--allow-file-access-from-files`.
|
||||
Hier läuft unser Recon (`recon.html`). Hat `HiBrowser.*`, `Hisense_*`, `File`.
|
||||
- **`hisenseUI`** (TV-UI, DevTools 9223): `--disable-web-security`. Andere Globals
|
||||
(`Hisense_*`/`TVAPI`/`guijs`/`model`), Signaturen im DevTools prüfen.
|
||||
|
||||
## Schreib-/Lese-Primitive
|
||||
|
||||
| Aufruf | Semantik | Binär? |
|
||||
|---|---|---|
|
||||
| `HiBrowser.File.write(name, text, 1)` | Text schreiben (relativ zu Whitelist-Root) | **nein** → `EINVAL` (22) |
|
||||
| `HiBrowser.File.download(url, target, 1)` | Datei byte-exakt holen (curl), auch `file://` | **ja** |
|
||||
| `HiBrowser.File.read(rel, flag)` / global `File.read` | Text lesen | — |
|
||||
| `fileXHR("file://<abs>")` | XHR-GET auf `file://`, liest Datei/Verzeichnis | Text |
|
||||
|
||||
Verzeichnis-Listing: `fileXHR("file://<dir>/")` liefert HTML mit
|
||||
`addRow(name, size, isDir)` → `listDir()` in `recon.html`.
|
||||
|
||||
## Whitelist (`IsSubDentry`)
|
||||
|
||||
Schreiben/Download erlaubt **nur** relativ zu diesen Präfixen:
|
||||
|
||||
```
|
||||
/3rd_rw/appdata
|
||||
/dev/shm/shm_tmp
|
||||
/3rd/launcher/data
|
||||
```
|
||||
|
||||
Prüfung: `realpath` + Präfix-Vergleich, **kein Trailing-Slash**. Pfad außerhalb
|
||||
→ Fehler.
|
||||
|
||||
## Symlink-Bypass (darf überall hin schreiben)
|
||||
|
||||
Ein **dangling Symlink** auf einem **ext4-USB-Stick** durchbricht die Whitelist:
|
||||
|
||||
1. TV mountet den Stick als `/mnt/usb/<dev>` (JS-Sicht) =
|
||||
`/dev/shm/shm_tmp/mnt/usb/<dev>` (real). **Der Elternpfad liegt in der Whitelist.**
|
||||
2. `realpath` scheitert am fehlenden Ziel → Prüfung läuft ins Leere, Präfix passt.
|
||||
3. `fopen` folgt dem Symlink und legt die Zieldatei **als root überall** an.
|
||||
|
||||
```js
|
||||
// plant_payload.js: schreibt libtvsysinfo.so nach /3rd_rw/loglevel/lib/
|
||||
var usb = "/mnt/usb/sda1";
|
||||
var target = "so/../../../../dev/shm/shm_tmp" + usb + "/tvi"; // tvi -> /3rd_rw/loglevel/lib/libtvsysinfo.so
|
||||
HiBrowser.File.download(location.origin + "/pub/libtvsysinfo.so", target, 1);
|
||||
```
|
||||
|
||||
Bedingungen:
|
||||
|
||||
- **ext4**, nicht FAT32 (keine Symlinks). Kernel 3.18: `mkfs.ext4 -O ^64bit,^metadata_csum`,
|
||||
MBR + Partition (kein Superfloppy).
|
||||
- Symlink **muss dangling bleiben** (Ziel existiert noch nicht).
|
||||
|
||||
## Fallstricke
|
||||
|
||||
- `File.write` mit Binärdaten → `EINVAL`. Binär immer `File.download`.
|
||||
- `HiBrowser.loadLibrary` lädt nichts (Dead End) — nicht als API verwenden.
|
||||
- `UNVERIFIED`: exakte `Hisense_*`-Signaturen der UI; `File.read`-Flag-Semantik je Prozess.
|
||||
|
||||
Siehe: `../modding/03-ui.md`, `../modding/06-toolchain-deploy.md`, `../dead-ends.md`.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Skill: Payload-Deploy (Dateien auf den TV)
|
||||
|
||||
Kein Package Manager (kein apt/opkg/…). Binaries/Skripte kommen als
|
||||
**statische ARM-Binaries** (ARMv7, glibc 2.18, Kernel 3.18) auf den TV.
|
||||
|
||||
## Wege
|
||||
|
||||
| Weg | Für | Beispiel |
|
||||
|---|---|---|
|
||||
| `File.download` | Binär (byte-exakt) | `HiBrowser.File.download("http://<host>:9000/pub/x","x",1)` |
|
||||
| `File.write` | Text (Skripte/JSON) | `HiBrowser.File.write("x.sh","id\n",1)` |
|
||||
| Root-Loop | als root ausführen | `root_cmd.sh` → `root_out.txt` |
|
||||
| SSH + base64 | Binär | `base64 -w0 x \| ssh root@TV 'base64 -d > /3rd_rw/bin/x'` |
|
||||
| SSH + tar | viele Dateien | `tar czf - d \| ssh root@TV 'tar xzf - -C /3rd_rw'` |
|
||||
| USB | Dateien auf ext4-Stick | `/mnt/usb/<dev>` |
|
||||
| scp/sftp | nach SFTP-Install | `scp f root@TV:/3rd_rw/...` |
|
||||
|
||||
## Regeln
|
||||
|
||||
- rw-Partitionen: `/3rd_rw`, `/data`, `/perm`. Rootfs & `/3rd` sind squashfs-**ro** →
|
||||
ro-Dateien via `mount --bind` aus `/3rd_rw` ersetzen (kein overlayfs).
|
||||
- `File.download`-Ziel muss in der Whitelist liegen oder Symlink-Bypass nutzen
|
||||
(siehe `fileapi-permissions.md`).
|
||||
- Builds reproduzierbar: `../root/scripts/host/build_dropbear.sh`,
|
||||
`build_sftp_server.sh`, `build_payload.sh`; Checks `sha256sum -c SHA256SUMS`.
|
||||
|
||||
Siehe: `../modding/06-toolchain-deploy.md`, `../modding/01-system-linux.md`.
|
||||
@@ -0,0 +1,45 @@
|
||||
# Skill: Root-Ausführung & Persistenz
|
||||
|
||||
## Root-Loop (Kommando-Kanal)
|
||||
|
||||
`/3rd_rw/appdata/root_loop.sh` läuft als root, pollt `root_cmd.sh`, führt aus,
|
||||
schreibt `root_out.txt`.
|
||||
|
||||
```js
|
||||
HiBrowser.File.write("root_cmd.sh",
|
||||
"id; cat /proc/self/status | grep -E '^(Uid|Gid|CapEff):'\n", 1);
|
||||
// ~2-5 s warten:
|
||||
fileXHR("file:///3rd_rw/appdata/root_out.txt"); // uid=0(root), CapEff=0000003fffffffff
|
||||
```
|
||||
|
||||
Fertiges Snippet: `../root/scripts/host/run_root_cmd.js`.
|
||||
|
||||
## SSH (Rettungsweg)
|
||||
|
||||
- Dropbear, **key-only** root, Port 22. `ssh root@192.168.188.94`.
|
||||
- SFTP/`scp` erst nach `../root/scripts/host/install_sftp.sh` (statischer
|
||||
OpenSSH-sftp-server, Test 2222 → 22). Vorher: `ssh`+`base64`/`tar`/`File.download`.
|
||||
- PTY-Gotcha: `/dev` ist statisch-ro (kein devtmpfs). `mount -t devpts` auf
|
||||
`/dev/shm/pts` + `bind /dev/pts`; `/etc/passwd`-Bindmount nötig (Root-Home `/basic` ro).
|
||||
|
||||
## Persistenz (Boot-Hooks)
|
||||
|
||||
| Hook | Zeitpunkt | Datei |
|
||||
|---|---|---|
|
||||
| Früher Root-Hook | vor ms_service/hisenseUI/app_man/delayrun | `/3rd_rw/developer.sh` (Zeile 90) |
|
||||
| Später Wrapper | nach ~15 s | `/3rd_rw/hamservice/HamService` (`hamservice-wrapper.sh`) |
|
||||
|
||||
Fehler in `developer.sh` kann Boot/UI stören → `set -x`+Log, SSH als Fallback.
|
||||
|
||||
## App-/Service-Steuerung (AM)
|
||||
|
||||
```js
|
||||
HiBrowser.System.startApp(":am,<app>,:start=<val>");
|
||||
HiBrowser.System.startApp(":am,opera4x,:URL=http://<host>:9000/recon.html");
|
||||
HiBrowser.System.startApp(":am,opera4x,:stop=opera4x");
|
||||
```
|
||||
|
||||
- UI-Kontext: `Hisense_StartApp(...)` (Signatur `UNVERIFIED`, im DevTools prüfen).
|
||||
- `startApp` kennt **kein** exec/run/args (Dead End).
|
||||
|
||||
Siehe: `../root/ROOT-GUIDE.md`, `../modding/02-boot.md`, `../modding/06-toolchain-deploy.md`.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Skill: UI / Launcher / Bloat
|
||||
|
||||
Sicherster Einstieg = eigene App-Tile (reversibel, UI bleibt heil). Danach
|
||||
Launcher-Daten, erst zuletzt die UI-Seite selbst.
|
||||
|
||||
## Route A — eigene App-Tile (sicher)
|
||||
|
||||
`/3rd_rw/appdata/launcher/Appinfo.json` (JSON-Array) um ein Web-App-Objekt
|
||||
erweitern; `File.write` (Text) oder SSH. Template: `../modding/templates/custom-app.json`.
|
||||
|
||||
## Route B — UI-Seite ersetzen (riskant)
|
||||
|
||||
`/3rd_rw/UI/index.html` (PIXI-UI). **Vorher Backup**, SSH/Web-Browser als
|
||||
Rettungsweg, `hisenseUI`-Prozess danach neu starten. Templates:
|
||||
`../modding/templates/custom-ui.html` + `start-UI-custom.sh`.
|
||||
|
||||
## Route C — Launcher-Daten / Tiles
|
||||
|
||||
- `preset.txt` — 26 Preset-Tiles
|
||||
- `deletedPresetApp.txt` — JSON-Array ausgeblendeter Tiles (`[]` = alle sichtbar)
|
||||
- `Appinfo.json` — selbst installierte Apps
|
||||
- `data/Category*.xml`, `CategoryList_*.xml`, `PicInfo.xml` — Kategorien/App-Daten
|
||||
|
||||
Template: `../modding/templates/hide-preset.json`.
|
||||
|
||||
## Bloat (kein Flash)
|
||||
|
||||
- Tiles ausblenden: `deletedPresetApp.txt`.
|
||||
- Native Apps/Services: `/basic/am_start.ini`, `/basic/am_config`,
|
||||
`/basic/delayrun.sh`, Stubs in `/3rd_rw/developer.sh` (`../modding/05-bloat.md`).
|
||||
- Was gefahrlos deaktivierbar ist → Matrix in `../modding/05-bloat.md`.
|
||||
|
||||
## Service-Stub
|
||||
|
||||
`../modding/templates/developer.sh` — früher Root-Hook, eigener Service/Binary.
|
||||
|
||||
## Warnung
|
||||
|
||||
`/3rd_rw/patch/opera4x` ist ein **full bind mount** über `/3rd/opera4x` (ersetzt
|
||||
alles). Für Einzeldateien lieber `developer.sh` + Datei-Bind-Mount.
|
||||
|
||||
Siehe: `../modding/03-ui.md`, `../modding/04-modding.md`, `../modding/05-bloat.md`.
|
||||
Reference in new issue
Block a user