e3764d700210aba895be67f123d015537ef9505c
On Android 12, the wire format of stability field is changed to also include so-called "Binder wire format version", which starts at 1 [1]. A 32-bit-sized struct is re-interpreted into a 32-bit integer, with a layout which makes it incompatible with the old version. Interestingly, they reverted this idea in Android 13 [2], which makes the wire format of the stability field the same as Android 11 again (as far as I know). Add a new RPC protocol variant 'aidl4' to account for this difference. Use this protocol on API level 31 through 32 and use 'aidl3' from API level 33 onwards. The only difference from 'aidl3' is `finish_flatten_ binder()` function. Interestingly, there is also a 16-bit-sized struct variant of the field too [3]. However, to the best of my knowledge, this version is not used in any of the released Android versions. [1]:89ddfc5f8c[2]:16a4106cb7[3]:14e4cfae36Origin: vendor Forwarded: https://github.com/mer-hybris/libgbinder/pull/133
GLib-style interface to binder (Android IPC mechanism) Key features: 1. Integration with GLib event loop 2. Detection of 32 vs 64 bit kernel at runtime 3. Asynchronous transactions that don't block the event thread 4. Stable service manager and low-level transaction APIs Android keeps changing both low-level RPC and service manager protocols from version to version. To counter that, libgbinder implements configirable backends for different variants of those, and yet keeping its own API unchanged. Configuration is loaded from [Protocol] and [ServiceManager] sections of /etc/gbinder.conf file. The keys are binder device names or the special Default value, the value is the identifier of the protocol or service manager variant, respectively. In addition to reading /etc/gbinder.conf if it exists, /etc/gbinder.d directory is scanned for .conf files, the file list is sorted, files are loaded one by one, overwriting the entries loaded from /etc/gbinder.conf or from the previously processed file. Known protocol and service manager variants are aidl, aidl2, aidl3 and hidl. This list is expected to expand further in the future. The default configuration is as follows: [Protocol] Default = aidl /dev/binder = aidl /dev/hwbinder = hidl [ServiceManager] Default = aidl /dev/binder = aidl /dev/hwbinder = hidl Alternatively and preferably, one can specify the desired Android API level: [General] ApiLevel = 29 and let libgbinder pick the appropriate preset. Full list of presets can be found in src/gbinder_config.c
Description
Languages
C
97.2%
Makefile
1.8%
Yacc
0.7%
Lex
0.2%
Shell
0.1%