Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"crates/6grok-agent",
"crates/6grok-api",
"crates/6grok-qcsuper",
"crates/6grok-samsung-sdm",
]
resolver = "2"

Expand Down
339 changes: 339 additions & 0 deletions LICENSES/GPL-2.0-or-later.txt

Large diffs are not rendered by default.

92 changes: 56 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ The working implementation currently provides:
- capability-aware `signaling`, `radio` and `full` Qualcomm profiles;
- GPL QCSuper interoperability backend for rooted Android `/dev/diag` through QCSuper `adb_bridge`;
- QCSuper-derived signaling and IP/DPL capture profiles with pinned provenance;
- native Samsung Shannon/Exynos SDM capture through `/dev/umts_dm0`, adapted from pinned SCAT source;
- lossless native SDM raw capture/replay plus `signaling`, `radio`, `full`, passive and all-item modes;
- normalized JSONL capture/replay;
- MediaTek 9-byte parser-record ingestion;
- Samsung MIPC-style and raw-PDU ingestion using the parser's synthetic namespaces;
- legacy Samsung MIPC-style and raw-PDU ingestion using the parser's historical synthetic namespaces;
- lightweight MessagePack/TCP agent uplink;
- `6grok-api` aggregation service;
- REST statistics/history and live WebSocket streaming;
Expand All @@ -28,19 +30,19 @@ The working implementation currently provides:
```text
modem / phone
|
| DIAG / QCSuper bridge / SDM / vendor trace
| DIAG / QCSuper bridge / Shannon SDM / vendor trace
v
+----------------+ +-------------+ +------------------+
| 6grok-agent / | --> | 6grok-core | ----> | fivegrok-parser |
| 6grok-qcsuper | +-------------+ +------------------+
+----------------+ | |
| | MessagePack | decoded packets
v v v
raw / JSONL +-----------+ JSON / history
| 6grok-api |
+-----------+
/ | \
REST WS GSMTAP -> Wireshark
+--------------------+ +-------------+ +------------------+
| 6grok-agent / | --> | 6grok-core | ----> | fivegrok-parser |
| 6grok-qcsuper / | +-------------+ +------------------+
| 6grok-samsung-sdm | | |
+--------------------+ | MessagePack | decoded packets
| v v
v +-----------+ JSON / history
raw / JSONL | 6grok-api |
+-----------+
/ | \
REST WS GSMTAP -> Wireshark
```

## Build
Expand All @@ -57,7 +59,7 @@ rustup target add aarch64-unknown-linux-musl
cargo build --release --target aarch64-unknown-linux-musl -p sixgrok-agent
```

The primary edge executable is named `6grok-agent`. The GPL QCSuper interoperability executable is `6grok-qcsuper`.
Primary edge executables are `6grok-agent`, `6grok-qcsuper`, and `6grok-samsung-sdm`.

## Qualcomm serial/USB capture

Expand Down Expand Up @@ -103,40 +105,54 @@ cargo run -p sixgrok-agent -- replay capture.bin

`6grok-qcsuper` interoperates with the TCP endpoint created by QCSuper's GPL `adb_bridge`. This is useful on Qualcomm Android devices where `/dev/diag` requires the diagchar setup logic already implemented and tested by QCSuper.

QCSuper's default bridge port is TCP 43555. Once its bridge is running and forwarded by ADB, probe the modem from 6grok:
QCSuper's default bridge port is TCP 43555. Once its bridge is running and forwarded by ADB:

```bash
cargo run -p sixgrok-qcsuper -- probe
cargo run -p sixgrok-qcsuper -- capture --profile signaling
cargo run -p sixgrok-qcsuper -- capture --profile ip
cargo run -p sixgrok-qcsuper -- capture --profile full --server 10.0.0.2:5566
```

Capture QCSuper's established signaling selection:
The backend does not vendor QCSuper's Android executable. QCSuper remains the source of the on-device `/dev/diag` bridge; 6grok speaks its HDLC-over-TCP interface and performs DIAG log configuration itself. The integration is pinned to QCSuper commit `aa555b4f7f25f7a8bf4e5afd4dcb884edf2f6735` and its source-level provenance is recorded in [`THIRD_PARTY.md`](THIRD_PARTY.md).

## Samsung Shannon SDM

`6grok-samsung-sdm` is a native Samsung Shannon/Exynos diagnostic collector adapted from SCAT's Samsung SDM implementation at pinned commit `361ff551a4fbb30789c46750c00586682a7a9b26`.

On devices exposing the conventional Shannon diagnostic node:

```bash
cargo run -p sixgrok-qcsuper -- capture --profile signaling
cargo run -p sixgrok-samsung-sdm -- capture --device /dev/umts_dm0 --profile signaling
```

Capture Qualcomm IP/DPL records:
Other useful modes:

```bash
cargo run -p sixgrok-qcsuper -- capture --profile ip
cargo run -p sixgrok-samsung-sdm -- capture --profile radio
cargo run -p sixgrok-samsung-sdm -- capture --profile full --server 10.0.0.2:5566
cargo run -p sixgrok-samsung-sdm -- capture --passive
cargo run -p sixgrok-samsung-sdm -- capture --all-items
```

Or request the union and send normalized frames directly to a remote API service:
Lossless native SDM capture and replay:

```bash
cargo run -p sixgrok-qcsuper -- capture \
--profile full \
--frame-capture android.jsonl \
--server 10.0.0.2:5566
cargo run -p sixgrok-samsung-sdm -- capture \
--raw-capture shannon.sdm \
--frame-capture shannon.frames.jsonl
cargo run -p sixgrok-samsung-sdm -- replay shannon.sdm
```

For a non-default forwarded endpoint:
Stop an initialized SDM stream:

```bash
cargo run -p sixgrok-qcsuper -- capture --bridge 127.0.0.1:43556 --profile signaling
cargo run -p sixgrok-samsung-sdm -- stop --device /dev/umts_dm0
```

The backend does not vendor QCSuper's Android executable. QCSuper remains the source of the on-device `/dev/diag` bridge; 6grok speaks its HDLC-over-TCP interface and performs DIAG log configuration itself. The integration is pinned to QCSuper commit `aa555b4f7f25f7a8bf4e5afd4dcb884edf2f6735` and its source-level provenance is recorded in [`THIRD_PARTY.md`](THIRD_PARTY.md).
Native SDM is kept distinct from the surviving parser's historical synthetic Samsung IDs. Full SDM packets are preserved under `0x2400 + group`, with actual direction/radio-ID/group/command/timestamp exposed in local JSON. This avoids inventing NAS/RRC labels before a native SDM message has been semantically mapped.

See [`docs/MULTI_VENDOR.md`](docs/MULTI_VENDOR.md) for framing and namespace details.

## Service / remote agents

Expand Down Expand Up @@ -174,37 +190,41 @@ cargo run -p sixgrok-api -- --gsmtap 127.0.0.1:4729

See [`docs/WIRESHARK.md`](docs/WIRESHARK.md).

## MediaTek and Samsung
## MediaTek and imported records

The current vendor boundary supports parser-compatible MediaTek records, Samsung MIPC-style records and extracted raw vendor PDUs. Native device-specific collection transports are being added behind this boundary rather than coupling them to parser internals.
The current generic vendor boundary supports parser-compatible MediaTek records, historical Samsung MIPC-style records and extracted raw vendor PDUs:

```bash
cargo run -p sixgrok-agent -- records capture.bin --format mediatek
cargo run -p sixgrok-agent -- records capture.bin --format samsung
cargo run -p sixgrok-agent -- records pdu.bin --format raw --log 0x2060
```

Native MediaTek collection is still a separate milestone. The pinned SCAT tree does not provide a MediaTek collector, so future `mdlogger`/CCCI work will use MediaTek-specific interfaces and separately reviewed compatible sources such as MobileInsight where applicable.

See [`docs/MULTI_VENDOR.md`](docs/MULTI_VENDOR.md).

## Licensing

6grok intentionally uses a **multi-license architecture**.

- The combined `6grok-agent` application and `sixgrok-qcsuper` backend are `GPL-3.0-or-later`.
- `6grok-agent` and `6grok-qcsuper` are `GPL-3.0-or-later`.
- The SCAT-derived `6grok-samsung-sdm` collector remains `GPL-2.0-or-later` and links reusable 6grok code under its independent MIT option.
- Original reusable `sixgrok-core` and `sixgrok-api` code is available under `MIT OR GPL-3.0-or-later` where indicated by repository metadata.
- Third-party files retain their exact upstream license, copyright and notices.
- QCSuper (`GPL-3.0-or-later`) and SCAT (`GPL-2.0-or-later`) source may be reused/adapted in GPL application components with explicit provenance.
- QCSuper (`GPL-3.0-or-later`) and SCAT (`GPL-2.0-or-later`) source reuse is tracked with immutable upstream revision/path provenance.
- MIT, Apache-2.0 and compatible BSD material may also be incorporated while retaining its original terms.
- `GPL-2.0-only`, AGPL and other licenses outside the reviewed compatibility policy are not imported into the combined application without explicit review.
- `GPL-2.0-only`, AGPL and other licenses outside the reviewed compatibility policy are not imported into incompatible combined components without explicit review.

The root [`LICENSE`](LICENSE) contains the GPLv3 license text. See [`docs/LICENSING.md`](docs/LICENSING.md) for the component model and [`THIRD_PARTY.md`](THIRD_PARTY.md) for import/provenance requirements.
The root [`LICENSE`](LICENSE) contains GPLv3 for the principal GPLv3 application distribution. Standard SPDX texts for both GPLv3 and GPLv2-or-later material are retained under [`LICENSES/`](LICENSES/). See [`docs/LICENSING.md`](docs/LICENSING.md) and [`THIRD_PARTY.md`](THIRD_PARTY.md).

`cargo-deny` and REUSE metadata are used to make license drift visible in CI.
`cargo-deny` and REUSE metadata make license drift visible in CI.

## Next milestones

- native MediaTek mdlogger/CCCI acquisition;
- validated native Samsung Shannon SDM acquisition;
- hardware validation of native Shannon SDM across more modem/ICD generations;
- semantic native-SDM parsing while preserving the raw envelope and avoiding synthetic-ID conflation;
- native MediaTek `mdlogger`/CCCI acquisition from MediaTek-specific compatible sources;
- direct Android diagchar backend where it adds value beyond QCSuper bridge interoperability;
- GPS/NMEA/gpsd synchronized location frames;
- AT-monitor fallback for DIAG-locked devices;
Expand Down
5 changes: 5 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ path = [
SPDX-FileCopyrightText = "2026 mbound"
SPDX-License-Identifier = "GPL-3.0-or-later"

[[annotations]]
path = "crates/6grok-samsung-sdm/Cargo.toml"
SPDX-FileCopyrightText = "2026 mbound"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = "THIRD_PARTY_LICENSES/fivegrok-parser-MIT.txt"
SPDX-FileCopyrightText = "2024 5grok Contributors"
Expand Down
Loading
Loading