jshafer817/libhybris — pull request #2 by jshafer817 (2014-09-13 14:49:36+00:00)
Title: Hook __system_property_get

Normally we don't have to wrap __system_property_get (libc.so) as it is only used
through the property_get (libcutils.so) function. However when property_get is used
internally in libcutils.so we don't have any chance to hook our replacement in.
Therefore we have to hook __system_property_get too and just replace it with the
implementation of our internal property handling

This was discovered when debugfs was mounted to /sys/kernel/debug. Once this is done the
internal atrace functionality of Android is activated which sits also in libcutils. It
needs additionally to the mounted debugfs a property set to enable the trace
functionality. As soon as this property was tried to read through bionic the whole
process crashed. With hooking __system_property_get everything works again.

Signed-off-by: Simon Busch