Not only vendor libs, but also Android libs that are marked as
vendor_available are using SLOG*. Since both pure vendor libs and
Android libs available to vendors are using the same liblog headers for
VNDK, SLOG* needs to be visible via the headers.
Bug: 63088165
Test: BOARD_VNDK_VERSION=current m -j ATFWD-daemon
(or any other vendor modules using SLOG*)
Change-Id: Idfb74887a42d2418d3896bfdf5be3b4fc8e4c27f
Commit 795267d4c7 ("Removed cpusets/schedboost build time dependency.")
turned the cpusets and schedtune options into runtime
decisions.
However the kernel option which is mentioned in the
code comment (CONFIG_SCHEDTUNE) is very misleading
as it doesn't exist (CONFIG_SCHED_TUNE does exist)
and it doesn't describe the real functionality of
the method. schedboost_enabled() will still return
false if CONFIG_SCHED_TUNE is set in the kernel but
CONFIG_CGROUP_SCHEDTUNE is not.
So to clarify this, we need to change the comment
to reflect that CONFIG_CGROUP_SCHEDTUNE, which depends
on CONFIG_SCHED_TUNE, is required.
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Although prctl is declared as a varargs function, in actuality it takes
unsigned long arguments (after the first int argument). This patch
ensures that the slack value passed to prctl is correctly sized.
Without this change, the 32-bit ARM compiler places the 64-bit slack
value in registers r2 and r3, but prctl expects the first argument to be
in r1. For kernel versions < 4.6, set_sched_policy has not been
correctly setting the timer slack value in 32-bit ARM code.
Test: Run on bullhead device. Verified assembly of libcutils.so
Change-Id: Ie0e22cbf74a74ff168b257b2e58d0c252449d6c9
/default.prop may be moved to /system/etc/ and renamed as prop.default.
/{system,vendor,odm}/build.prop may be moved to /{system,vendor,odm}/etc/
and renamed as prop.build.
This patch makes property_service load prop.* from the new locations
first. Also replaces NULL with nullptr for C++ cleanup.
Bug: 37815285
Test: Booted pixel phones, checked the locations of prop.*, verified
symlinks, checked a few properties (via adb shell getprop)
and manually tested a few apps (Camera, Maps etc).
ODM is not tested as it does not exist on the tested device.
Change-Id: Id8eeb3c1a5728dd04005dfad4733b8e6336f9093
The EVS HAL and related software stack will use this id when running
daemons that monitor car state, capture and display video, and interact
with users.
Test: visual inspection
Change-Id: I53404c624933b7f55f1292c041c6c712522ab13b
Instead of requiring aliases, let's report when we see
system/<partition>/ all by itself, or in the company of the alias
<partition>/. Report if we see duplicate entries. Add checking for
overrides as well. Report any simple corruptions in internal table
or in the override files.
Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ia6a7e8c9bc9f553d0c1c313937b511b2073318a9
For the known partitions entrenched in the build system: vendor, oem
and odm only. We will alias entries that reference system/<partition>
and <partition>/ so that if either are specified, the rule will apply
to both possible paths.
Test: gTest libcutils-tests
Bug: 37703469
Change-Id: Ida9405cbed323489a3d0599c1645e9be2c7b9d08
This CL is in support of another CL c/2048848, topic
'Refactor hid command in /frameworks/base/cmds' in
internal master. Adding the permissions for
shell here to access uhid_node as part of the
new 'uhid' group.
Bug: 34052337
Test: Tested on angler, bluetooth mouse works OK.
Change-Id: If9e100aa1262d689fb8adc5c0ce93f157c96399e
The fallback android_filesystem_capability.h doesn't play nicely with
other kernel headers, since it #undef's __user. If we're building with
bionic (either for device or host), we use the same kernel headers, so
just use those.
Bug: 38056396
Test: build with Host_bionic:true
Change-Id: Idc61b6d96d86891164abe71604924638d67aefe2
ashmem buffers start with PROT_EXEC | PROT_READ | PROT_WRITE and can
have bits individually removed (but not added) through the
ASHMEM_SET_PROT_MASK ioctl. Test that removing prot bits more than once
works, and that the kernel blocks adding prot bits.
Also test that the complementary ASHMEM_GET_PROT_MASK ioctl returns the
expected prot mask.
Test: /data/nativetest64/libcutils_test/libcutils_test64 \
--gtest_filter=AshmemTest.* (on hikey)
Test: /data/nativetest/libcutils_test/libcutils_test32 \
--gtest_filter=AshmemTest.* (on hikey)
Change-Id: If7b13672547ec4cf6dfd1886197f40f12b2f1c85
Signed-off-by: Greg Hackmann <ghackmann@google.com>
ashmem has in-kernel handlers for lseek() and read(), but they aren't
currently being tested.
Add tests for various seeks on a buffer containing holes. If we land
inside data, then check that we read() the expected data at that offset.
Test: /data/nativetest64/libcutils_test/libcutils_test64 \
--gtest_filter=AshmemTest.* (on hikey)
Test: /data/nativetest/libcutils_test/libcutils_test32 \
--gtest_filter=AshmemTest.* (on hikey)
Bug: 37254818
Change-Id: I96135a8cea2ce99932e3bc97b5254c95ef6b264a
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Private interface to permit testing only added to fs_config to
expose android_files and android_dirs.
Make sure that both paths to a partition are specified in fs_config
internal tables.
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ida5fccdb786dc6d67325005d4fdd1fa1ffaef396
So a caller of native_handle_clone can trust errno to be relevant.
Bug: http://b/37215366
Test: builds
Change-Id: I0992f38ad559db4a02fce07123842dbad8e3f473
Cover both direct and symlink indirect paths to the referenced
files in the vendor, odm and oem partitions.
Test: compile and hand-verify properties
Bug: 37703469
Change-Id: I5b3a887e904baee2ac193ac4a73aaaee0bbfdb9f
Change set_sched_policy to use prctl PR_SET_TIMERSLACK if setting the policy
for the current thread and /proc/<tid>/timerslack_ns is not supported by the
kernel.
Bug: 32972117
Test: Verified that libcutils SchedPolicy tests pass. See details in
testing done comment in
https://android-review.googlesource.com/381303 .
Change-Id: Id70940ed7f9ed94c3d105213f069bf3e5a8d8824
get_sched_policy will first attempt to get the policy from the "schedtune"
subsystem cgroup and, if not set, attempt to get the policy from the
"cpuset" subsystem cgroup. If neither subsystem has a cgroup set,
SP_FOREGROUND is returned.
Bug: 32972117
Test: Verified that SchedPolicy libcutils test passes and that ps displays
the expected policies. See details in testing done comment in
https://android-review.googlesource.com/379426 .
Change-Id: I586a921a38eea99d65590b07ece96c9808a2e56d
The Bluetooth HAL has threads that process Bluetooth audio. They need
to be scheduled as RT priority, so allow the Bluetooth HAL to set its
threads to RT scheduling.
Bug 37518404
Test: play Bluetooth audio, confirm priority via systrace
Change-Id: I4928cf182a0805c0714e4d073cba15c864fbe328
This reverts commit 5e801e7bd5.
The file permissions don't allow access to the lock on devices
where vendor code runs with UID root and GID radio. They are
no longer necessary because we have a more flexible selinux-based
solution in https://android-review.googlesource.com/#/c/354223/ .
Test: strace -f -e flock -p <netmgrd_pid> on angler shows flock succeeds
Test: strace -f -e flock -p <netmgrd_pid> on marlin shows flock succeeds
Test: netd_unit_test passes on marlin
Test: strace -f -e flock -p <netd_pid> on marlin shows flock succeeds
Bug: 36108349
Bug: 37483189
Change-Id: Ia1bbf8d93ec6777514be66cbd1a32dfc95df95c0
Added todo once usages are fixed.
Bug: 33241851
Test: things with -Werror now compile in VNDK
(cherry picked from commit 81626e48cb)
Merged-In: I6c4a148dca4d4710912fe62a8854cb8077651701
Change-Id: I6c4a148dca4d4710912fe62a8854cb8077651701
By setting vendor_available, the following may become true:
* a prebuilt library from this release may be used at runtime by
in a later releasse (by vendor code compiled against this release).
so this library shouldn't depend on runtime state that may change
in the future.
* this library may be loaded twice into a single process (potentially
an old version and a newer version). The symbols will be isolated
using linker namespaces, but this may break assumptions about 1
library in 1 process (your singletons will run twice).
Background:
This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.
At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.
It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:
https://android-review.googlesource.com/368372
None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.
Bug: 36426473
Bug: 36079834
Test: m -j libcutils
Test: attempt to compile with BOARD_VNDK_VERSION := current
Test: (sanity) boot internal marlin
(cherry picked from commit 9610c548a8)
Merged-In: I76f9b28ef08a26d84d1365881e00696cc1dcfe5d
Change-Id: I76f9b28ef08a26d84d1365881e00696cc1dcfe5d
- moved __android_log_is_debuggable to a new public header
(log_properties.h)
- vendor version of sched_policy uses ALOG* instead SLOG*
Test: (sanity) liblog-unit-tests
Test: (sanity) libcutils_test (noting b/b/32972117, two tests continue
to fail)
Test: system/core as a whole makes with BOARD_VNDK_VERSION := current
now with no problems.
Test: boots/works on internal marlin
Bug: 33241851
(cherry picked from commit 1f83aa424f)
Merged-In: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
Change-Id: I5bc1f348dc0f0c8814bec5b5c3d2c52c825ab640
We can't reuse the GID range for internal cache files, otherwise
we don't have a way to tease apart the difference when deciding if
it's safe to move apps.
Test: builds, boots
Bug: 37193650
Change-Id: I22c4e575cd557636e74c5c73035adb1d4dcbb7f7
Misconfigured systems can have localhost pointing to an address that
isn't 127.0.0.1 or ::1.
adb is the only caller of the libcutils socket_loopback functions, so
move them into adb and switch the implementations over to using
INADDR_LOOPBACK and in6addr_loopback, instead of resolving 'localhost'
when connecting.
Bug: http://b/37282612
Test: `killall adb; adb shell`
Test: `killall adb; ip addr del 127.0.0.1/8 dev lo; adb shell`
Change-Id: I01c1885f1d9757ad0f7b353dd04b4d1f057741c8
tasks in system-background cgroup will be shown as below:
580 580 system 12 -8 1% S 190656K 19408K unk surfaceflinger /system/bin/surfaceflinger
This patch fix this issue.
Change-Id: Ib39ff892010498548d7fbfb4021df62498acd033
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
Strip off trailing / then /system and then add back the appropriate
config directory. This fixes an issue with reading vendor, oem or odm
partitions.
Test: manual build successfully interprets all etc/fs_config_* files.
Test: manual incremental build successfully interprets all etc/fs_config_* files.
Bug: 36071012
Change-Id: Iba363f0731bb8d15e595bb45c56db97722edabc2
private/fs_config.h is required in order to build an independent
test that requires internal binary knowledge of the
etc/fs_config_(files|dirs) files.
Test: compile
Bug: 36071012
Change-Id: I268bcfdbb6d45b7bf6040cbf307a4e34812f5fef
This reverts commit 82f8bb785e.
Sadly, we'd have to extend CAP_SYS_RESOURCE to a bunch of execution
domains to make this work, which isn't feasible.
Bug: 36450358
Change-Id: Iffe88e45d538c044382eb0d0ac24ff11a10d73c3
This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.
Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=libcutils_test
Change-Id: Ie083d1641e4ea226cbf7b82c6fd2c115e15b6bf6