Commit Graph

757 Commits

Author SHA1 Message Date
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
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
Myles Watson e67abec514 libcutils: Use strnlen for default property values
Add unit tests to test the corner cases.

Test: unit tests pass before and after the change.
Change-Id: Idafeb8354cd6c7db2a68cd398dafe153453a3940
2016-12-22 09:21:06 -08:00
Myles Watson 22c0962ab9 Use clang-format to fix up properties.c
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 100

Test: unit tests pass
Change-Id: Ie1a9bf85c001ef1a2dcdafdc5bf696b9267116f7
2016-12-22 09:20:57 -08:00
Nick Kralevich f8eadb6b9c Merge "fs_config.c: make *.prop files 0600" am: ebc39117ee am: e733fac3ef am: ab72558bcb
am: 88f3f8837b

Change-Id: Ib1a3a51ee1e7228cb587400da9fb6eecac4c0783
2016-12-17 01:27:51 +00:00
Nick Kralevich 5f9fa90425 fs_config.c: make *.prop files 0600
Enforce that the only API for reading properties is through the property
server, not by reading the (system|vendor|rootfs) *.prop files.

Test: Device boots and no property errors.
Change-Id: Ibb6ed4e74a80cac00010c707d7574f8e92fc6448
2016-12-16 14:54:02 -08:00
TreeHugger Robot 4769dab866 Merge changes I09b11db0,I774b1a44
* changes:
  libcutils: add file permission for storaged
  storaged: add storaged native daemon
2016-12-16 05:13:39 +00:00
Jeff Sharkey c35144844b Merge "Define range of GIDs for cached app data." am: da94f09e22 am: ac13675071 am: 1ad4090e4e
am: 40717394bd

Change-Id: I74e4e62cd69d3696698609e010bf08ad86daa0f4
2016-12-16 01:15:39 +00:00
Jin Qian 6c9477a244 libcutils: add file permission for storaged
Change-Id: I09b11db0a7a94b51b5b279b3e4ec58ea9f0c12d7
2016-12-15 15:56:39 -08:00
Jeff Sharkey da94f09e22 Merge "Define range of GIDs for cached app data." 2016-12-15 21:46:31 +00:00
Sandeep Patil 9b2e207099 Merge "socket: uevent: use SO_RCVBUF instead of SO_RCVBUFFORCE" am: 0a2080bced am: 571e246983 am: c345388bea
am: e432dc58c1

Change-Id: Iab5bafe3e156dfb2fc75634c8d25b5f67991915e
2016-12-14 19:54:35 +00:00
Jeff Sharkey dff44709cf Define range of GIDs for cached app data.
To support upcoming disk usage calculation optimizations, this change
creates a new GID for each app that will be used to mark its cached
data.  We're allocating these unique GIDs so that we can use
quotactl() to track cached data on a per-app basis.

This change also tightens up the implementation of both the cache
and shared GID calculation to ensure that they stay inside the valid
ranges, and includes tests to verify.

Test: builds, boots, tests pass
Bug: 27948817
Change-Id: Ie4377e5aae267f2da39a165888139228995987cb
2016-12-13 13:28:08 -07:00
Sandeep Patil 5fee496e62 socket: uevent: use SO_RCVBUF instead of SO_RCVBUFFORCE
The SO_RCVBUFFORCE option requires the caller of uevent_create_socket()
to have net_admin capabilities.

Set platform default rcv/snd buffer sizes to 256kb that will always be
overridden by the device/target. However, it will allow
ueventd / healthd to use the uevent_create_socket() API w/o requiring
the net_admin capability.

Note: All devices override the buffer sizes according to the technology
maximum to at least ~8MB. So, the init.rc change here is to make sure
platform code can work w/o any overrides.

Test: no SELinux failures for healthd with 'net_admin' removed.

Bug: https://b/32733887

Change-Id: Ida346468cd550ad07901bf3a78ad508939849906
Signed-off-by: Sandeep Patil <sspatil@google.com>
2016-12-09 15:16:28 -08:00
Elliott Hughes d0de8660a6 Merge "Use hasmntopt(3) rather than reinventing the wheel." am: 769a5a1962 am: 8656ed109b am: 5dd53bf466
am: 4d7fbc3923

Change-Id: I071f430fa4ed033848353fdf59e972eb474be4a4
2016-11-30 23:12:30 +00:00
Elliott Hughes 8656ed109b Merge "Use hasmntopt(3) rather than reinventing the wheel."
am: 769a5a1962

Change-Id: I62541c0ff6961888239a7686bb37115b39fc787b
2016-11-30 22:49:53 +00:00
Elliott Hughes 769a5a1962 Merge "Use hasmntopt(3) rather than reinventing the wheel." 2016-11-30 22:32:44 +00:00
Mark Salyzyn 1f383e910f Merge "libcutils: tests" am: bac388e424 am: 6878cd20e6 am: 2e88b5c803
am: 7df147f3bb

Change-Id: I60fea7cd1e8f9c3e5a0404db3b075469fe827a7a
2016-11-30 17:44:11 +00:00
Elliott Hughes 8c1838823a Use hasmntopt(3) rather than reinventing the wheel.
Bug: N/A
Test: "power off" still works
Change-Id: I11d3dc22f98ac71608c9929a3fd43319c787d49e
2016-11-30 09:37:17 -08:00
Mark Salyzyn 6878cd20e6 Merge "libcutils: tests"
am: bac388e424

Change-Id: I86a00ea257985836400b530c1e60bdc5e070dd00
2016-11-30 17:28:39 +00:00
Mark Salyzyn 678194ddac libcutils: tests
Respect "android" and "not_windows" (linux + darwin). This
means the string test and control support routines were not
being tested on android.

Test: gTest libcutils_test
Bug: 32450474
Change-Id: I9505fefeb0a4a8c5b54aa637812b4f3c07c2893c
2016-11-29 10:08:12 -08:00
Mark Salyzyn 3644309528 Merge "libcutils: sdk(mac) build error (part deux)" am: ed0a48c617 am: 5a411029de am: 01f8f8c586
am: c43b02f2cb

Change-Id: Idea08d579dd3d1bfbd98d6cbe2e67781e731db3a
2016-11-17 17:25:44 +00:00
Mark Salyzyn 60b4a8bc56 Merge "libcutils: sdk(mac) build error" am: 231d1ac640 am: 7bc8810a4a am: 190e9cc65d
am: c03f3c7186

Change-Id: Id65101b9dccdb7ef65bbb96fa1cdef3d3ac38569
2016-11-17 16:53:13 +00:00
Mark Salyzyn 5a411029de Merge "libcutils: sdk(mac) build error (part deux)"
am: ed0a48c617

Change-Id: Id6d3a5568a3383111592fd097ab8c96568783522
2016-11-17 16:43:06 +00:00
Mark Salyzyn 0958b18da0 libcutils: sdk(mac) build error (part deux)
Test: Build
Bug: 32450474
Change-Id: I92cca30217715779a9db6a60e2e4831a20cec3d4
2016-11-17 08:33:26 -08:00
Mark Salyzyn 7bc8810a4a Merge "libcutils: sdk(mac) build error"
am: 231d1ac640

Change-Id: Icca67be8194faa296b93e9bfec2a15002ac06147
2016-11-17 16:19:34 +00:00
Mark Salyzyn 6b652160d1 libcutils: sdk(mac) build error
Surprise surprise, MAC sdk build has F_GETFD & not TEMP_FAILURE_RETRY.
Revert code to original form with the three alternatives for all OSii.

Test: Build
Bug: 32450474
Change-Id: Ia7361d8107675a620968d8395c5e2351ad364d29
2016-11-17 08:05:16 -08:00
Mark Salyzyn 95dbf68245 Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h" am: 8c41e791ed am: 809dee506e am: 26545e3c60
am: 124b7cb732

Change-Id: I575ef1a45746c14b5c01301d8336307f2575a4ba
2016-11-17 16:02:50 +00:00
Mark Salyzyn 809dee506e Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h"
am: 8c41e791ed

Change-Id: Ifbc00285da734859d590153a7c6cfc8e51c014f9
2016-11-17 15:33:02 +00:00
Mark Salyzyn 52bd37e633 libcutils: move cutils/files.h to cutils/android_get_control_file.h
files.[h|cpp] is bound to be abused with junk, replace with
android_get_control_file.[h|cpp]. Plus some sundry cleanup.

Test: gTest libcutils-tests, logd-unit-tests, liblog-unit-tests,
      logcat-unit-tests and init_tests
Bug: 32450474
Change-Id: Ibd4a7aa4624ea19a43d1f98a3c71ac37805d36b5
2016-11-16 15:56:56 -08:00
Mark Salyzyn 325aa70591 libcutils: fs_config.c beautification
surfaceflinger has an odd indent and wrap.

SideEffects: None
Test: compile
Change-Id: I5183ab200dbcd13efb0727cb91db5b12018ae804
2016-11-04 14:12:31 -07:00
Mark Salyzyn d32e7f4703 Merge "libcutils: sockets_test breaks MAC build"
am: 8d339e940f

Change-Id: I4dbc000a63c45f82a32012629eec855c60c17b5a
2016-11-04 19:51:07 +00:00
Mark Salyzyn 44ba139bba libcutils: sockets_test breaks MAC build
- Neuter SOCK_NONBLOCK and SOCK_CLOEXEC if they are not defined.
- F_SETFL O_NONBLOCK after socket() call.
- Correct environment reference (we recently changed handler to
  replace non-ascii and non-numericals with '_' for env tag).

Test: libcutils_test32 --gtest_filter=SocketsTest.android_get_control_socket
Bug: 32450474
Change-Id: I409a8c2c78e5f057af5fd6251cbd8657018be22b
2016-11-04 12:27:43 -07:00
Mark Salyzyn db9ad76576 libcutils: klog inherit android_get_control_file("/dev/kmsg")
am: c377843258

Change-Id: Ic520e605639c879b7bf9f5e5bab8e526c69df395
2016-11-04 14:43:42 +00:00
Mark Salyzyn 4109c433f1 logd: set executable's capabilities in file system
am: 0d2a1dcb49

Change-Id: Icb3fb18ee96be0ae250be153a1600eb4e8cd8408
2016-11-04 14:43:12 +00:00
Mark Salyzyn c020d3fa6e libcutils: add android_get_control_file()
am: 0b034d9d7b

Change-Id: I7d0a58c12839dba59aa43b96e5a920d3c415efcf
2016-11-04 14:42:57 +00:00
Mark Salyzyn 4ffdd5d805 libcutils: add android_get_control_socket() test
am: 547e0dc45a

Change-Id: I34b70a4e1eba070ad58068a851047fe41680a973
2016-11-04 14:42:50 +00:00