BINDER-CALL(1)
π BINDER-CALL(1) β the user command era π
okay bestie, pull up a chair because we're about to talk to binder services from the actual command line and it's giving main character energy β¨
πΈ NAME πΈ
binder-call β do binder transactions straight from the command line, no C++ required π
β¨ SYNOPSIS β¨
binder-call [OPTION...] NAME CODE [VALUE1 [VALUE2 ...]] [reply [TYPE1 [TYPE2 ...]]]
π¦ DESCRIPTION π¦
so basically binder-call sends a transaction to the binder service called NAME β and yeah, that's the name it was registered with in servicemanager. and the transaction code CODE? it absolutely has to be >= 1. no zeros allowed, we don't do that here π
ββοΈ
the optional VALUE arguments are literally the transaction data parcel. and bestie, these values can be integers, floats, strings, structs, or vectors β all formatted according to the type descriptions down below in ARGUMENT FORMAT, okay? by default everything is interpreted as HIDL, but flip the --aidl switch and boom, you get AIDL semantics instead. slay.
if the transaction expects a reply, you write the keyword reply and then a lil list of type specifiers that describe the reply parcel layout. the reply gets printed out in a human-readable form, no cap. π
you can also pick which binder device you wanna talk to with --device. and if you want a one-way transaction (aka no reply at all, ghosting the service fr fr), just pass --oneway.
π OPTIONS π
-d,--device=DEVICEβ which binder device to use. the default is_/dev/binder_... ok it's literally/dev/binderπ-o,--onewayβ use a one-way transaction, meaning no reply is expected. she said don't text back π-a,--aidlβ treat argument and reply types as AIDL instead of HIDL-v,--verboseβ turn on verbose output, for when you need ALL the tea π-q,--quietβ suppress non-error messages. silence is golden β¨-h,--helpβ show help options. the classic π«Ά
π§ ARGUMENT FORMAT π§
values that come before reply can be written like this:
[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)
and the reply type specifiers β the ones you put 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
not me reminding you that vectors need every single value to share the same type π she's picky but she's valid
π₯ EXAMPLE π₯
let's call the getSensorsList method (transaction code 1, iconic) 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 π
Project repository: https://github.com/mer-hybris/libgbinder
and that's the whole page bestie, you're officially certified in command-line binder transactions πβ¨
this was brought to you by libgbinder, dated 2026-05-07 β go forth and make transactions, mwah π
π¦ where this page comes from
- ubuntu stonking: libgbinder-tools 1.1.54-1 Β· GPL-2.0-only WITH Linux-syscall-note exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms