Commit Graph

802 Commits

Author SHA1 Message Date
Po-Chien Hsueh a030c3340c fs_config: Move hostapd to vendor partition
Move hostapd to /vendor/bin/ because it's only used by WIFI HAL.

Bug: 34236942
Bug: 34237659
Test: Hotspot works fine. Integration test.

Change-Id: I8d9f51ed85a0614bf0141461dabeddae094ad4e0
2017-03-06 14:46:32 +08:00
TreeHugger Robot 68f95f715c Merge "Bluetooth hal: moved to vendor partition." 2017-02-28 01:30:07 +00:00
TreeHugger Robot 390f926140 Merge changes from topic 'remove_cap'
* changes:
  libcutils: remove storaged caps
  storaged: reduce storaged privilege
2017-02-28 00:45:25 +00:00
Greg Hackmann e33adfadcc Merge changes Iede18a00,Ib0fa24fb,Ic4c8a137 am: dfbae6ddbb am: c2e2f36f63
am: af64d87de7

Change-Id: Ie1f120a2b714336fa659a51f25ae4df196cf7e1e
2017-02-28 00:19:19 +00:00
Treehugger Robot dfbae6ddbb Merge changes Iede18a00,Ib0fa24fb,Ic4c8a137
* changes:
  libcutils: build tests with -Wall -Wextra -Werror
  libcutils: fix socket type in SocketsTest.TestGetLocalPort
  libcutils: fix Wsign-compare warnings in multiuser_test
2017-02-28 00:11:07 +00:00
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
Alex Klyubin b914f3f835 Merge "Make secilc accessible by root only" am: e803818832 am: 94259da99f
am: 97c93b48ab

Change-Id: I4cb11522ed51aa08afb3e49976ab765641a1a613
2017-02-27 23:27:58 +00:00
Alex Klyubin 3380927e71 Make secilc accessible by root only
There's no reason for SELinux policy compiler to be accessible by
anybode other than root.

Test: Device boots -- secilc isn't used yet anyway
Bug: 31363362
Change-Id: I26cf34f1412b8dd471f79271c491b473617a6df6
2017-02-27 13:27:58 -08:00
Jin Qian 135f161bae libcutils: remove storaged caps
Test: adb shell dumpsys storaged --force
Bug: 35323867
Change-Id: Ia58e5aa24885dcf56f8c4bec9dc15d0f3b4c3f4f
2017-02-27 12:54:32 -08:00
Greg Hackmann a930af8921 libcutils: build tests with -Wall -Wextra -Werror
Test: mmm system/core/libcutils/tests

Change-Id: Iede18a008df5834b8ecedd6019c4444150748f68
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-02-22 10:58:38 -08:00
Greg Hackmann 7c60ec3029 libcutils: fix socket type in SocketsTest.TestGetLocalPort
With -Wall enabled locally, clang points out that the second parameter
to socket_inaddr_any_server() was accidentally hard-coded:

system/core/libcutils/tests/sockets_test.cpp:103:18: warning: unused variable 'type' [-Wunused-variable]
        for (int type : {SOCK_DGRAM, SOCK_STREAM}) {
                 ^

Bug: 26936282
Test: mmm system/core/libcutils/tests
Test: adb shell /data/nativetest/libcutils_test/libcutils_test32 \
	--gtest_filter=SocketsTest.TestGetLocalPort (on hikey)
Test: adb shell /data/nativetest64/libcutils_test/libcutils_test64 \
        --gtest_filter=SocketsTest.TestGetLocalPort (on hikey)

Change-Id: Ib0fa24fb02a5ee14db0afd6591a62089e43bbec0
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-02-22 10:58:38 -08:00
Greg Hackmann 6d90fdc5e5 libcutils: fix Wsign-compare warnings in multiuser_test
gid_t and uid_t are unsigned ints, so we need to compare against unsigned
constants.

Bug: 26936282
Test: mmm system/core/libcutils/tests
Test: adb shell /data/nativetest/libcutils_test/libcutils_test32 \
	--gtest_filter=MultiuserTest.* (on hikey)
Test: adb shell /data/nativetest64/libcutils_test/libcutils_test64 \
	--gtest_filter=MultiuserTest.* (on hikey)

Change-Id: Ic4c8a137e3f37cb5e95ba925814f201cfd5a06b0
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-02-22 10:58:34 -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