These two Soong product_variables were usually controlled by
ENABLE_CPUSETS and ENABLE_SCHEDBOOST in BoardConfig.mk. This change
turns the build time variables into runtime decision by checking if
a special file, "tasks", can be found under the mount points,
/dev/cpuset and /dev/stune, for cpusets and schedboost, respectively.
That special file only exists when the corresponding Linux kernel
configurations, CONFIG_CPUSETS and CONFIG_SCHEDTUNE, are set.
Bug: 34726944
Test: Tested on Sailfish with following configurations
neither cpuset nor schedtune enabled in the kernel
cpuset enabled, but schedtune disabled in the kernel
both cpuset and schedtune enabled in the kernel
Change-Id: I6695b8b32b2fecb4fd995018418bbe2edc5d590f
Also adapt libcutils to the bionic change that was necessary for this.
Bug: http://b/35201172
Test: ran tests
Change-Id: I72a98b70b03d23e958b46778b505fbd5c86c32ae
Move last reboot reason file to new directory data/misc/reboot/ to
require only SELinux permissions specific to this new file.
Bug: 30994946
Test: manual: reboot command, setprop sys.powerctl
Change-Id: I1e067235aa4b06391cff8ab0741a9d317ba5b7da
Save a string identifying the reason for last Android reboot or power
off in file /data/misc/recovery/last_reboot_reason . This file may
be used for informing users of reboot or shutdown reasons at next
boot, and for other diagnostic purposes.
Bug: 30994946
Test: Manual: reboot, setprop sys.powerctl
Change-Id: I01e44473fdd21b33e9e4dced77aba9a66b6d3755
Add ANDROID_RB_THERMOFF command to android_reboot(), denoting a power
off due to thermal limits exceeded. When this command is used, Android
may provide notification to the user about the potentially unexpected
power off at next boot.
Bug: 30994946
Test: Manual: setprop sys.powerctl thermal-shutdown
Change-Id: If2cde1b6a3c281a5750b50295412a4801ed5b2f2
Open with O_CREAT needs mode bits: https://linux.die.net/man/3/open
Found by running clang FORTIFY over AOSP.
Bug: 32073964
Test: Now builds with clang FORTIFY.
Change-Id: Iee4c93c5482f510e0adf8104c27e394b5d87ec88
CAP_SYS_PTRACE is needed to ptrace processes that have capabilities
greater than their bounding set. Eventually, this will still be an
improvement, because we can ptrace attach, and then turn on a seccomp
filter that blocks further attaches.
Bug: http://b/34694637
Test: debuggerd `pidof system_server`
Change-Id: I4b9da164ec1fbb5060fdba590e886ac24b6a0785
Moved headers from include/libcutils and include/liblog to
libcutils/include and liblog/include respectively, so they can be
exported via these libs. They needed to be moved since Soong does
not allow export from external folder.
Added symlink from old locations. They are needed since Soong
includes system/core/include by default. Once all modules are
cleaned up to explicitly add the required libs, the symlinks will be
removed.
Also added liblog_vndk_headers that exports a special log/log.h for
VNDK.
Moved headers of libcutils to libcutils_headers. They should be used
by modules for header-only inlines. Added libcutils_headers as
dependency of libcutils.
Added libcutils_vndk_headers that exports a special cutils/log.h
deprecating usage of the file. A later CL will deprecate the one in
libcutils_headers
Test: Add above libs to shared lib of local module
Change-Id: I6e1f9c5f23d8b6eae13dc3b7e5dfe7fae93b8510
To quickly answer the question of "how much data is a UID using?" we
need a GID range to label files on external storage, similar to
the GID ranges already defined for cached and shared data.
Also define a new GID that will be used to label the OBB files shared
between all users under /data/media/obb.
Test: builds, newly added tests pass
Bug: 34263266
Change-Id: I16fb7d166c3dcdeafbf477162d191d3b73ae8ac2
The following files will be loaded additionally.
- /odm/default.prop and /vendor/default.prop for default props.
- /odm/build.prop for build props.
The props files must follow the following priority order.
- /default.prop > /odm/default.prop > /vendor/default.prop
- /system/build.prop > /odm/build.prop > /vendor/buid.prop
Test: tested default/build prop files with enabling early mount, but
didn't test files of odm partition because odm partition doesn't
exist now.
Bug: 34116668
Change-Id: I946d076dae38f2288865dd986fb16d801d4abcc0
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.
Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
Some of Android componets e.g. init have migrated to use base/logging to get rid
of klog utilities. However, without explicit initilization, the default
klog_level is set to 3 which masks the logwrap output.
This patch sets default klog_level to KLOG_INFO_LEVEL to make
android_fork_execvp_ext log available.
Bug: 34256270
Test: manual
Change-Id: Ibe74707a92c954053cd0e6828a984fbd72b4acae