Commit graph

791 commits

Author SHA1 Message Date
Steven Moreland
d0a19a6487 Bluetooth hal: moved to vendor partition.
Bug: 35328775
Test: works in both binderized and passthrough modes
Change-Id: I61f1ff6b777089d7aad5184c0aee4f653897b32e
2017-02-27 15:41:48 -08:00
Isaac Chen
c44e3b56f3 Merge "Removed cpusets/schedboost build time dependency." am: d3f8d28db2 am: e60efc1b0b
am: a0e845a1b6

Change-Id: I276229340aa8bba013016c6079c28b1a9da8ed62
2017-02-21 18:10:40 +00:00
Isaac Chen
795267d4c7 Removed cpusets/schedboost build time dependency.
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
2017-02-20 20:53:24 +08:00
Elliott Hughes
4cfa8399d1 Merge "Implement android::base::WaitForProperty." am: 01003d40fc am: d96f68ee21 am: 1f6d1c43b3
am: eecb127a22

Change-Id: I279f9b7bc374dd421936656a6fb2bc37658f6db6
2017-02-14 04:01:04 +00:00
Treehugger Robot
01003d40fc Merge "Implement android::base::WaitForProperty." 2017-02-14 03:48:26 +00:00
Steven Moreland
ba2e677615 Merge "fs_config: wifi is now on vendor partition" am: 11d3d4d22a am: c405ad5c43 am: 0d94c26fc9
am: 141b829e72

Change-Id: Ibd47a0775ca2c27579f4ff98ae2e8c5a55fcb5e8
2017-02-14 03:14:18 +00:00
Steven Moreland
b7ca92349e fs_config: wifi is now on vendor partition
Bug: 34135607
Test: pass
Change-Id: I0c9dd9642e780a0303e6aaa6d80e443c59cc0c28
2017-02-13 17:21:17 -08:00
Elliott Hughes
b30769a87a Implement android::base::WaitForProperty.
Also adapt libcutils to the bionic change that was necessary for this.

Bug: http://b/35201172
Test: ran tests
Change-Id: I72a98b70b03d23e958b46778b505fbd5c86c32ae
2017-02-13 11:29:02 -08:00
George Burgess IV
28c05881a2 Merge "cutils: Add clang FORTIFY support" am: f2e615c7b8 am: 9a7f57b909 am: f5a0eeb860
am: 272097bc85

Change-Id: I2f1820b030a4a2626744871748cb0be0b7da97c5
2017-02-10 02:18:19 +00:00
George Burgess IV
67959bceb2
cutils: Add clang FORTIFY support
Bug: 32073964
Test: Builds on angler, bullhead, marlin, sailfish. Bionic CTS tests
pass on Angler and Bullhead.

Change-Id: I3d7f8ff73f92b1deb1e07f08282098e71e2d03a9
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-02-09 20:18:19 +01:00
Todd Poynor
ebda1f9559 android_reboot: move reboot reason file to data/misc/reboot/
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
2017-02-06 15:48:22 -08:00
Josh Gao
0633e1ce75 Revert "Give crash_dump CAP_SYS_PTRACE." am: ac91b0c452 am: c49f8f3e3d am: 3d1ca37b0d
am: f11accb25b

Change-Id: Ifc56a652f63419e72274c725d401f67b6fd86320
2017-02-06 19:07:46 +00:00
Todd Poynor
e40c421b28 libcutils: android_reboot: save reboot reason in file
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
2017-02-02 04:01:05 +00:00
Todd Poynor
061778a8da libcutils: android_reboot: add thermal shutdown command
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
2017-02-02 03:59:30 +00:00
Josh Gao
ac91b0c452 Revert "Give crash_dump CAP_SYS_PTRACE."
This reverts commit 36397cb168.

Bug: http://b/34853272
Test: debuggerd -b `pidof system_server`
Test: debuggerd -b `pidof zygote`
Change-Id: Ibccbccd956779f268d498a52aa737c1959538831
2017-02-01 17:55:22 -08:00
Evgenii Stepanov
2bd3e9cefd Merge "Disable integer sanitization on host." am: afe25958b6 am: ac3cf2ea9d am: ee5a545b7a
am: cad514cdd7

Change-Id: I71dc02174b0295741268231becdb8ada916ab3dc
2017-02-01 19:49:36 +00:00
Evgenii Stepanov
54c7886c40 Disable integer sanitization on host.
Test: NFC until https://android-review.googlesource.com/#/c/329510
Change-Id: I4d1bb66821b2984bbee12438cfd72b9b63d56605
2017-01-31 16:33:53 -08:00
Elliott Hughes
5881843c59 Merge "Support arbitrary-length properties in property_list." am: c8121ba029 am: 92aab6dbd1 am: be34e5661d
am: d5df20a2f3

Change-Id: I73e01d65fd3df3ae9f64c47e2d4148d2c055fb82
2017-01-27 07:55:56 +00:00
Treehugger Robot
c8121ba029 Merge "Support arbitrary-length properties in property_list." 2017-01-27 03:18:04 +00:00
Elliott Hughes
4eacd70f85 Support arbitrary-length properties in property_list.
Bug: http://b/33926793
Test: visual inspection
Change-Id: Ida84c3aaafa5411a9886f8d3d45679fd60ddc00d
2017-01-26 17:33:12 -08:00
George Burgess IV
c06216f8ac Merge "Add mode bits to a call to open with O_CREAT" am: 294f7312dd am: 990c4c611b am: 88cd8ee286
am: 67878340ca

Change-Id: I0f58bd91565719e1169311e718deb232dc0d2694
2017-01-26 07:06:28 +00:00
George Burgess IV
09175a0264 Add mode bits to a call to open with O_CREAT
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
2017-01-25 17:31:43 -08:00
Vijay Venkatraman
32e3fee0c3 Merge "Revert "Revert "Exporting C headers from system/core""" am: 01678a0c84 am: e6588b4bfa am: 2d37a4ff16
am: 48f756e5aa

Change-Id: I4d63b6e6d4949fb06d60abf755cc9443fd46c23f
2017-01-25 23:48:01 +00:00
Vijay Venkatraman
01678a0c84 Merge "Revert "Revert "Exporting C headers from system/core""" 2017-01-25 23:37:01 +00:00
Josh Gao
17e6df25d2 Merge "Give crash_dump CAP_SYS_PTRACE." am: 9e60a54f67 am: a417d90e36 am: 55cb039f55
am: e5c8e7ddaf

Change-Id: I66c1b0751eada4047e5ce6a19634bc3912924280
2017-01-25 21:40:08 +00:00
Vijay Venkatraman
651f8383e6 Revert "Revert "Exporting C headers from system/core""
This reverts commit a3f2be2b73.

Test: compile
Change-Id: I04b3a8e47e1fa3eb9d80c14ae3a90c68a780e858
2017-01-25 12:50:29 -08:00
Josh Gao
36397cb168 Give crash_dump CAP_SYS_PTRACE.
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
2017-01-25 11:48:23 -08:00
Elliott Hughes
9a617138cc Merge "Remove unused klog_get_level." am: acdb06de6b am: 5ecc8d2439 am: d505d0c747
am: 14f12ddabd

Change-Id: I9cd92641a4df122429e416069638ff5cf2ba3e03
2017-01-25 16:50:13 +00:00
Elliott Hughes
acdb06de6b Merge "Remove unused klog_get_level." 2017-01-25 16:39:11 +00:00
Vijay Venkatraman
7ecee40df5 Merge "Revert "Exporting C headers from system/core"" am: 22b7f76a00 am: 16aac283f4 am: ebc9f4eb58
am: 061ed4de3e

Change-Id: Ic5d71373b0a84dd4bcf75acbc0e745ca4f99de3c
2017-01-25 00:59:42 +00:00
Vijay Venkatraman
a3f2be2b73 Revert "Exporting C headers from system/core"
This reverts commit 3c6763ca21.

Change-Id: If3b3e106478d28a5df927d57649abdca0a99dd0e
2017-01-25 00:44:08 +00:00
Vijay Venkatraman
8786e488c8 Merge "Exporting C headers from system/core" am: 897bc9b2b3 am: e6464ca571 am: e7bbb3c4b0
am: 561ac663a3

Change-Id: I87fcb2ac64d9646093e34ba5c67ab9747e2e66fb
2017-01-24 22:52:19 +00:00
Vijay Venkatraman
3c6763ca21 Exporting C headers from system/core
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
2017-01-22 19:45:38 -08:00
Jaekyun Seok
3e1bddf9dd Merge "Load default/build props from each partition" am: 8dbab358f0 am: 57337e7791 am: ac747ef65a
am: f184d8bf47

Change-Id: I867e61238287e2e76049ef65cfe408b03691c5eb
2017-01-20 05:40:43 +00:00
Treehugger Robot
8dbab358f0 Merge "Load default/build props from each partition" 2017-01-20 03:58:52 +00:00
Jeff Sharkey
84dc96227d Merge "Define GID range for external data and OBBs." am: 1e7cdf3c7d am: d150012349 am: 23b6547230
am: b1e89ec14f

Change-Id: If94a9fd76e895f922f8b5f6ed99b871b5febb3f9
2017-01-19 16:39:37 +00:00
Josh Gao
85401cca56 Merge "debuggerd: advance our amazing bet." am: 230201dcbf am: 11b938e881 am: 787f1b29d0
am: 1b1e416fcc

Change-Id: Id6387b7f7ce6aac7ee1ac68ffcf76e69f5c3a924
2017-01-19 00:45:12 +00:00
Jeff Sharkey
7e5d0b1fae Define GID range for external data and OBBs.
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
2017-01-18 17:11:05 -07:00
Jaekyun Seok
de21de7a42 Load default/build props from each partition
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
2017-01-19 08:45:40 +09:00
Josh Gao
cbe70cb0a8 debuggerd: advance our amazing bet.
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.

Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
2017-01-17 13:57:57 -08:00
Elliott Hughes
e04c3b0533 Remove unused klog_get_level.
Every little helps...

Bug: N/A
Test: builds
Change-Id: Ibcac5cda1619420c95903211ed0b96af81351f9e
2017-01-13 18:14:12 -08:00
Wei Wang
fc453321df Merge "libcutils: change klog_level to KLOG_INFO_LEVEL" am: 5e9863bf63 am: 974dd6291e am: c87d4ce758
am: a06b862257

Change-Id: I83876ce9b0258bc8c5217043f6ea9810a9bfd7a8
2017-01-13 08:22:40 +00:00
Wei Wang
677ba31db2 libcutils: change klog_level to KLOG_INFO_LEVEL
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
2017-01-12 22:18:46 -08:00
Mark Salyzyn
271a1a7cda resolve merge conflicts of a45b1d6f3 to master
Test: compile
Bug: 30465923
Change-Id: I648855539df3cfa176c6ecac19b6a562ba6feaf7
2017-01-11 11:41:38 -08:00
Mark Salyzyn
01e12b4ee7 Merge "liblog: use log/log.h when utilizing ALOG macros" 2017-01-11 19:07:17 +00:00
Mark Salyzyn
30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Andre Eisenbach
511dd3b3b4 Merge "Allow Bluetooth HAL to access /sys/class/rfkill" am: 6ad690dfd4 am: a398921635 am: d969153aad
am: bb5ca97809

Change-Id: I348245df98cc42fb37555bb2fa7b904ff7a53713
2017-01-11 03:13:51 +00:00
Andre Eisenbach
8097210093 Allow Bluetooth HAL to access /sys/class/rfkill
Test: compiles; HAL can write rfkill state
Change-Id: I5815a1f50ef8d09bf83541a6d2389b61bd007306
2017-01-10 23:40:20 +00:00
Myles Watson
8c9ee16294 libcutils: Use strnlen for default property values am: e67abec514 am: 6632536c0d am: f957e56909
am: 9bc7869b79

Change-Id: Iba1796493404418216f4f25078ddebac6e8034d5
2016-12-22 19:51:50 +00:00
Myles Watson
2fd5a6425d Use clang-format to fix up properties.c am: 22c0962ab9 am: 9fdf778dd0 am: 57bbd25bd5
am: b35816288c

Change-Id: Ibe4238bef5428858f59f3dc8f38b09ea12a76cb6
2016-12-22 19:51:43 +00:00