[b] 2024 Dec 17
[m] 2024 Dec 17
[l] en

Signal CLI

Gathering some info on Signal usage via CLI.

3rd party projects

Internals poking

The official desktop client maintains some SQLite database files which might be of interest:

$ find-sqlite ~/.config/Signal -sp
"/home/xand/.config/Signal/WebStorage/QuotaManager"
    schema
        CREATE INDEX buckets_by_expiration ON buckets(expiration)
        CREATE INDEX buckets_by_host ON buckets(host, TYPE)
        CREATE INDEX buckets_by_last_accessed ON buckets(TYPE, last_accessed)
        CREATE INDEX buckets_by_last_modified ON buckets(TYPE, last_modified)
        CREATE TABLE "buckets"(
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            storage_key TEXT NOT NULL,
            host TEXT NOT NULL,
            TYPE INTEGER NOT NULL,
            name TEXT NOT NULL,
            use_count INTEGER NOT NULL,
            last_accessed INTEGER NOT NULL,
            last_modified INTEGER NOT NULL,
            expiration INTEGER NOT NULL,
            quota INTEGER NOT NULL,
            persistent INTEGER NOT NULL,
            durability INTEGER NOT NULL
        ) STRICT
        CREATE TABLE meta(
            KEY LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY,
            value LONGVARCHAR
        )
        CREATE TABLE sqlite_sequence(name, seq)
        CREATE UNIQUE INDEX buckets_by_storage_key ON buckets(storage_key, TYPE, name)

"/home/xand/.config/Signal/Trust Tokens"
    schema
        CREATE TABLE meta(
            KEY LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY,
            value LONGVARCHAR
        )
        CREATE TABLE trust_tokens_issuer_config (KEY TEXT, proto BLOB, PRIMARY KEY(KEY))
        CREATE TABLE trust_tokens_issuer_toplevel_pair_config (KEY TEXT, proto BLOB, PRIMARY KEY(KEY))
        CREATE TABLE trust_tokens_toplevel_config (KEY TEXT, proto BLOB, PRIMARY KEY(KEY))
        CREATE VIEW MmapStatus (value) AS
        SELECT
            -1

"/home/xand/.config/Signal/Shared Dictionary/db"
    schema
        CREATE INDEX exp_time_index ON dictionaries(exp_time)
        CREATE INDEX isolation_index ON dictionaries(frame_origin, top_frame_site)
        CREATE INDEX last_used_time_index ON dictionaries(last_used_time)
        CREATE INDEX token_index ON dictionaries(token_high, token_low)
        CREATE INDEX top_frame_site_index ON dictionaries(top_frame_site)
        CREATE TABLE dictionaries(
            primary_key INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
            frame_origin TEXT NOT NULL,
            top_frame_site TEXT NOT NULL,
            host TEXT NOT NULL,
            MATCH TEXT NOT NULL,
            match_dest TEXT NOT NULL,
            id TEXT NOT NULL,
            url TEXT NOT NULL,
            last_fetch_time INTEGER NOT NULL,
            res_time INTEGER NOT NULL,
            exp_time INTEGER NOT NULL,
            last_used_time INTEGER NOT NULL,
            size INTEGER NOT NULL,
            sha256 BLOB NOT NULL,
            token_high INTEGER NOT NULL,
            token_low INTEGER NOT NULL
        )
        CREATE TABLE meta(
            KEY LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY,
            value LONGVARCHAR
        )
        CREATE TABLE sqlite_sequence(name, seq)
        CREATE UNIQUE INDEX unique_index ON dictionaries(
            frame_origin,
            top_frame_site,
            host,
            MATCH,
            match_dest
        )