| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Add required sources files to Android.bp
Signed-off-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
Co-authored-by: LUU QUANG MINH <Minh.LuuQuang@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Since android 12 release (and the introduction of this commit
https://chromium.googlesource.com/aosp/platform/system/
logging/+/b674866203f05957b2ac5db94c3c0fe3d1d36793), the define
ANDROID_LOG_RDONLY and friends have been removed (see the commit
for the explanation). Therefore, dlt-logd-converter can't compile
anymore since this version.
* ANDROID_LOG_RDONLY was a define on O_RDONLY. O_RDONLY is now used
to allow the compilation on android 12 as well as previous versions
* <log/logprint.h> include is removed because we aren't using any
API from this file and moreover, this file shouldn't be included from
vendor application (not part of public API)
* Direct include on "system/core/include" inside Android.bp is removed
because it was previously used to find <log/logprint.h>. This should
be avoided. We should keep android build system providing right
headers path for us :)
Signed-off-by: Sébastien RAILLET <sebastien.raillet@gmail.com>
|
|
|
|
|
| |
* Currently on android, there is no dlt-daemon configuration installed
by default. This change allows to install the dlt.conf along with the
dlt-daemon during compilation phase.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Before this commit, dlt-daemon sockets were created inside
/data/local/tmp. This works but have many drawbacks:
- /data/local/tmp isn't always a tmpfs depending of the android
system you have. Means sockets are potentially created on a
filesystem which binds to a real device
- as the sockets are created by the dlt-daemon itself, this
prevent the usage of specific SELinux labels / contexts as
they will inherit the label / context from its parent
location (e.g the ones from /data/local/tmp). This prevent a
fine control of the SELinux label / context that you would like
to apply on them
* This commit adapts the dlt-daemon in such way:
- application and control sockets are now created inside
/dev/socket which is the standard path for sockets on android
- these sockets are now created by init (see dlt-daemon.rc) and
their fds are recovered by dlt-daemon through a specific android
API (dlt_daemon_unix_android_get_socket). If the fds can't be
recovered, we fallback to the previous mechanism by creating
by ourself the sockets (even if this will prevent SELinux
label / context on this socket)
- all these modifications have been put under compilation flag
for android
Signed-off-by: Sebastien RAILLET <sebastien.raillet@marelli.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For more information about VSOCK, see "man vsock"
( https://man7.org/linux/man-pages/man7/vsock.7.html ).
Makes it possible for processes in a virtual machine to log directly in
DLT running on host without setting up a network connection between
guest and host. It is also probably more efficient. Have not done any
performance measurements (not main reason for patch), but no forwarding
is required as when running DLT in a multi-node setup.
When building dlt-daemon for host, WITH_DLT_DAEMON_VSOCK_IPC should be
enabled for daemon to listen on incoming VSOCK requests. Local
communication method between applications and daemon is still determined
with DLT_IPC. When building for guest, WITH_DLT_LIB_VSOCK_IPC should be
enabled and DLT_IPC will be ignored, which will make libdlt open a VSOCK
socket to the deamon for logging messages.
VSOCK can be tested without a virtual machine. Since VMADDR_CID_HOST is
used by libdlt when connecting, see vsock man page, clients can be run
on host to test VSOCK communication.
Some modifications has been done to be able to handle logging through
FIFO pipe and socket in the same build of dlt-daemon:
- dlt_receiver_init/free_unix_socket() is renamed to
dlt_receiver_init/free_global_buffer() and used for FIFO as well.
Also fixes memory leak since dlt_receiver_free_unix_socket() was used
regardless of whether DLT_USE_UNIX_SOCKET was defined or not.
- Pass type to dlt_receiver_init() instead of dlt_receiver_receive().
And remove preprocessor conditionals for handling
DLT_CONNECTION_APP_MSG in dlt_daemon_process_user_messages(). Also
fixes wrong enum type being passed to dlt_receiver_receive() in
dlt_client.c (DltClient::mode was used as a DltReceiverType enum but
it is a DltClientMode enum).
- Add a flag to DltDaemonApplication to indicate whether file descriptor
is "owned" by the DltDaemonApplication or not. When
dlt_daemon_application_add() is called due to message received on a
socket, fd is passed as an argument (app does not own fd). For FIFO,
a per application FIFO is opened (app owns the fd). Also fixes so that
user handle is reset for both application and all its contexts when
resetting any. Prevents fd from being used by accident after it has
been closed.
dlt_mkdir_recursive() is moved to src/daemon since it is only used in
the daemon. Minimizes use of DLT_USE_UNIX_SOCKET_IPC.
Other bugfixes:
- Call DLT_SEM_FREE() if setting socket to O_NONBLOCK fails in
src/lib/dlt_user.c:dlt_initialize_socket_connection().
- Close socket if dlt_receiver_init() fails in
src/lib/dlt_user.c:dlt_initialize_socket_connection().
Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
|
|
|
| |
Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
|
|
|
|
|
| |
Can not see src/daemon/dlt_daemon_filter.c in history.
Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
|
|
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|