BINDER-CALL(1)

NAME
binder-call - perform binder transactions from the command line

SYNOPSIS
binder-call [OPTION...] NAME CODE [VALUE1 [VALUE2 ...]] [reply [TYPE1 [TYPE2 ...]]]

DESCRIPTION
binder-call sends a transaction to the binder service NAME (registered with servicemanager). The transaction code CODE must be (>= 1).

Optional VALUE arguments constitute the transaction data parcel. Values can be integers, floats, strings, structs, or vectors formatted according to the type descriptions below. By default, types are interpreted as HIDL; the --aidl switch enables AIDL semantics.

If the transaction expects a reply, the keyword reply is followed by a list of type specifiers that describe the reply parcel layout. The reply is printed in a human‑readable form.

The binder device can be selected with --device. A one‑way transaction (no reply) is used if --oneway is given.

OPTIONS

-d, --device=DEVICE
    Binder device to use (default: /dev/binder).

-o, --oneway
    Use a one‑way transaction (no reply expected).

-a, --aidl
    Treat argument and reply types as AIDL instead of HIDL.

-v, --verbose
    Enable verbose output.

-q, --quiet
    Suppress non‑error messages.

-h, --help
    Show help options.

ARGUMENT FORMAT
Values before reply may be written as:

    [0-9]*:8    8‑bit integer
    [0-9]*    32‑bit integer
    [0-9]*L    64‑bit integer
    [0-9]*.[0-9]*    32‑bit float
    [0-9]*.[0-9]*L    64‑bit double
    "[^"]*"    8‑bit AIDL string
    "[^"]*"u    UTF‑16 AIDL string
    "[^"]*"h    8‑bit HIDL string
    { V1 V2 ... VN }    struct containing the given values
    [ V1 V2 ... VN ]    vector of length N (all values must share the same type)

Reply type specifiers after reply are:

    i8    8‑bit integer
    i32    32‑bit integer
    i64    64‑bit integer
    s8    8‑bit AIDL string
    s16    UTF‑16 AIDL string
    hstr    8‑bit HIDL string
    f or float    32‑bit float
    d or double    64‑bit double
    [ TYPE ]    vector of TYPE
    { TYPE1 TYPE2 ... }    struct with the given member types

EXAMPLE
Call the getSensorsList method (transaction code 1) on the HIDL sensors service and decode the returned vector of sensor structs:

    binder-call -d /dev/hwbinder \
      android.hardware.sensors@1.0::ISensors/default 1 \
      reply i32 "[ { i32 i32 hstr hstr i32 i32 hstr f f f i32 i32 i32 hstr i32 i32 } ]"

SEE ALSO
binder-list(1), binder-ping(1), binder-bridge(1)

Project repository: https://github.com/mer-hybris/libgbinder