Now that we have the fixed list of whitelisted libraries
there is no longer need to check if java_permitted_path is nullptr.
In fact checking it prevents custom classloaders created by apps
from loading libraries using absolute path.
Bug: http://b/28659864
Change-Id: I1bfc16a573b090f70f078ecccd0e4016939a5dc0
The dm-verity metadata contains the block device path that is given to
the dm-android-verity driver. If the device is using slot A/B, this
path is missing the slot suffix.
This patch makes fs_mgr replace all the block device path reference
with the one including the active slot suffix.
Change-Id: Ib624d0d18b12a8a287cac7f15605a2e0fb7c97c6
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
adb implements its own file descriptor emulation layer on Windows,
which requires the use of adb_close instead of close throughout the
codebase. Add a template argument to unique_fd that allows for this.
Bug: http://b/28347842
Change-Id: I6397261f4973d49f2f8e04257bf67b348585bb63
Currently, ueventd.rc files only support /sys/devices/... paths
and don't support symlinked paths, specifically /sys/class/...
Supporting the class paths is necessary to have non-hardware
dependent paths. Some subsystems like IIO use /sys/bus/iio/, so
support that as well.
Change-Id: I29f3bf67b41664d1d75ac1820c46e13afe336d56
Signed-off-by: Rob Herring <robh@kernel.org>
It's no longer specific to make_ext4fs, will be used for mksquashfs as
well.
BUG: 27467028
Change-Id: I41b8c2b168ada45c8378dee522391edfb8f6b9a6
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
BUG: 28704419
Going too fast can result in the property not being set
and causing an extreme corner case failure being reported
and blamed on is_loggable functionality.
Bug: 25792367
Change-Id: Idda6f67d655d8a84d2809daf695394d5293e7431
fixup_sys_perms does the same matching as the function perm_path_matches
other than the leading '/sys'. Adjust the path and use the common
matching function. Replace the fixed length C strings with std::string.
Change-Id: Ic09d91aa4ac1f1096018617537d782b82ee9ef63
Signed-off-by: Rob Herring <robh@kernel.org>
Passing empty permitted path should result in no-op.
This addresses review comment on CL with commit
f334cbf0e1
Bug: http://b/28639227
Change-Id: I4a4540e522e90a145a374939921932c86f35e88d
(cherry picked from commit d0b1531929)
Apps on sdcard live under /mnt/expand and therefore
this directory should be under linker namespaces
permitted_path.
Bug: http://b/28639227
Change-Id: I462f9f23656c95d9c2a48bb3f513abcd9d08f340
(cherry picked from commit f334cbf0e1)
There is no point in reading/loading the list of public
libraries once public namespace is already initialized.
Change-Id: I5a53c46bb57b8de241ba521a6321c12e94a76476
They are intended for platform use only and we shouldn't have them
in the public header file. This CL moves them to libnativeloader
private header file.
Bug: http://b/28174921
Change-Id: I01cf446d2d8d7cf6f9e31130aa3d4e54fbbbb9fc
This CL adds support to forward or reverse TCP port 0 to allow the
system to automatically select an open port. The resolved port number
will be printed to stdout:
$ adb forward tcp:0 tcp:8000
12345
$ adb reverse tcp:0 tcp:9000
23456
This allows testing to be more robust by not hardcoding TCP ports which
may already be in use.
Forwarding port 0 is a host-only change and will work with any device,
but reversing port 0 requires the device to be updated with a new adbd
binary.
This CL also does a little bit of cleanup such as moving the alistener
class out of adb.h, and adds some error checking and additional tests.
Bug: 28051746
Test: python -m unittest discover
Test: adb_test
Test: `adb forward` and `adb reverse` with tcp:0
Change-Id: Icaa87346685b403ab5da7f0e6aa186aa091da572
When user creates custom classloader which does not extend
BaseDexClassLoader the librarySearchPath gets set to null
by java.lang.Runtime.doLoad().
This patch makes nativeloader correctly handle it.
Bug: http://b/28659864
Change-Id: I1b61c6bc952984d7c49775a9178fc3270948e62a
This is enabled only for builds with ro.debuggable=1
It is intended for use only in tests using dalvikvm
and needing access to platform libraries.
Bug: http://b/28449304
Change-Id: I402457d0da542996ccf265aeaa305f09881e4333
The code for dumping tombstones tries to read the log data. This was
silently failing after the change to drop root privileges. Fix this
by explicitly setting the groups allowed before dropping privileges.
Bug: 28590884
(cherry picked from commit edc2380109)
Change-Id: I225365edccb11f8752027566fd42f3b10ce10260
In the function dump_thread_info, if /proc/<PID>/comm is unreadable, then
threadname will be used in a strncmp causing a crash. The fix is to
avoid the check if threadname is null.
Bug: 28615417
(cherry picked from commit 039976e553)
Change-Id: I1e61431b1549ecfdc49a72cbf193a364069cda79