Commit graph

977 commits

Author SHA1 Message Date
Mark Salyzyn
b304f6d4e7 bootstat: introduce sys.boot.reason
Adding functionality to bootstat --record_boot_complete and
--record_boot_reason to initialize sys.boot.reason, the canonical
system boot reason.

Filter out ro.boot.bootreason oem noise into sys.boot.reason.  Add
heuristics to determine what the boot reason is, when otherwise would
be defaulting to the blunt and relatively devoid of detail catch-all
reboot reasons ("reboot", "shutdown", "cold", "warm", "hard").

boot_reason_test.sh is also a compliance test.

Test: boot_reason_test.sh all
Bug: 63736262
Change-Id: Ic9a42cccbcfc89a5c0e081ba66d577a97c8c8c76
2017-09-12 09:28:25 -07:00
Mark Salyzyn
73e6b49c0c Switch /data/misc/reboot/last_reboot_reason to persistent property
Switch from /data/misc/reboot/last_reboot_reason to persistent
Android property persist.sys.boot.reason for indicating why the
device is rebooted or shutdown.

persist.sys.boot.reason has a standard as outlined in b/63736262 and
the associated investigation. Made adjustments to the values so that
we did not create a problem even before we started. Compliance is
part of the tests in boot_reason_test.sh.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 64687998
Change-Id: I812c55a12faf7cb7ff92101009be058ad9958d07
2017-08-24 15:13:48 -07:00
Justin Yun
9ca92458e2 Mark the modules as VNDK-SP in Android.bp
As a VNDK-SP module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK-SP formated as follows:
vndk: {
    enabled: true,
    support_system_process: true,
},

VNDK-SP modules will be installed both in system/lib(64) as normal
and in system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I51fe0859f63ad58b7b91909e7d7d4206443228cd
Change-Id: I51fe0859f63ad58b7b91909e7d7d4206443228cd
(cherry picked from commit aeb68e86e4)
2017-08-23 17:56:13 +09:00
Andrew Scull
ef1dd0d279 Merge "Add HSM AID."
am: 4723d7c66d

Change-Id: If7075378ac5a13bbe79a02843d13d34c5f128d2a
2017-08-10 21:35:47 +00:00
Andrew Scull
f73c5e1f84 Add HSM AID.
This is used by resources related to a hardware security module (HSM).

Bug: 64569509
Change-Id: I30d47e1b275e3c4ae0a00f7ceb286a1096d84273
2017-08-10 20:25:11 +01:00
Robert Quattlebaum
4ff32084d5 Merge "Add AID for LoWPAN subsystem"
am: f602dd4ced

Change-Id: Idd091e64fd9cab58f38da67e0b32e0aa9c98fb7d
2017-08-07 23:55:19 +00:00
Robert Quattlebaum
01f7576a3e Add AID for LoWPAN subsystem
Bug: b/64399805
Change-Id: Ida6aa60d8beee9151a723826d99c1e9044dc05be
2017-08-04 16:19:34 -07:00
Earl Ou
08d9cc3744 Merge "libcutils: write trace event into socket in container"
am: 59b33cb01c

Change-Id: Ie59769f5820a8bb5991ba3dca53df83c5e90f795
2017-08-04 01:04:15 +00:00
Treehugger Robot
59b33cb01c Merge "libcutils: write trace event into socket in container" 2017-08-04 00:50:59 +00:00
Yifan Hong
6c2d927c34 Merge changes from topic 'libcutils_private_headers'
am: 472808a570

Change-Id: Ia4963b1b2c50bdcc3d9ccc6a954a465cbf9b5de0
2017-08-03 20:34:31 +00:00
Yifan Hong
472808a570 Merge changes from topic 'libcutils_private_headers'
* changes:
  Remove private headers from libcutils.vendor
  Move android_filesystem_config.h => fs_config.h
2017-08-03 18:24:04 +00:00
Earl Ou
e4030384c4 libcutils: write trace event into socket in container
When Android is running in a container, ftrace trace_marker may be
disabled, e.g. Chrome OS verified mode. To enable trace, a socket is
created for everyone to send trace event.

Modify libcutils so apps using it can write trace to the socket.

To achieve this goal without touching code for normal device,
trace-container.c is created for code specific to container. Shared
code between trace-dev.c and trace-container.c is moved to local
trace-dev.h.

Note that to avoid sharing FDs across different processes, Zygote closes
FD and reopen it to /dev/null if it is a socket. Therefore, we need to
manually close FD and reopen it again after forking. This is done in
the atrace_set_tracing_enabled as Zygote also use it to clear flags
during forking.

Related change:
- http://crrev.com/2400163003 (Chromium)
- http://ag/2028075 (Android system/core)
- http://ag/1738271 (Android device/google/cheets2)

Bug: 29776474, 62410809
Test: run chrome://tracing and see data from the host side.
Change-Id: I3fe969e284b972c28e4f32f23cd948aaea61a043
2017-08-03 15:16:44 +08:00
George Burgess IV
f5a677a7d3 Merge "cutils: update property_get to use diagnose_if."
am: 5c655991f5

Change-Id: I7dff3fb2ff288800d72d9c632617639fa7e6bf9e
2017-08-03 02:23:30 +00:00
Treehugger Robot
5c655991f5 Merge "cutils: update property_get to use diagnose_if." 2017-08-03 02:15:54 +00:00
Yifan Hong
b6807125df Remove private headers from libcutils.vendor
Bug: 63135587
Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Test: mma -j
Test: BOARD_VNDK_VERSION=current mma -j

Change-Id: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
Merged-In: I9eecf23c4c311bd8336a5bfaaeb2afb3b51c6513
2017-08-02 16:40:36 -07:00
Yifan Hong
09c89672b6 Move android_filesystem_config.h => fs_config.h
The non AID_ things in android_filesystem_config.h are moved
to fs_config.h. For libcutils.vendor and libcutils_headers.vendor,
fs_config.h is not exported.

An empty system/core/include/private/fs_config.h is placed to
appease the dependency from certain modules (logd, etc.)
that includes system/core/include/private/android_filesystem_config.h
directly.

Test: m -j
Test: BOARD_VNDK_VERSION=current m -j
Bug: 63135587
Change-Id: I95dfb874a426941022b100c0ca26a0576b0f4aa3
Merged-In: I95dfb874a426941022b100c0ca26a0576b0f4aa3
2017-08-02 16:31:19 -07:00
Elliott Hughes
9e1173aa40 Merge "Make sure freeaddrinfo is always called on failure."
am: f914029057

Change-Id: Iff3b186c35bca1f1c7292f5e5567d3ce11037239
2017-08-02 23:10:59 +00:00
George Burgess IV
9bf11c1d05 cutils: update property_get to use diagnose_if.
This lets us redeclare property_get with diagnose_if tagged on it,
so we no longer need to deal with overloads.

Bug: 12231437
Test: m checkbuild on bullhead aosp-master.
Change-Id: Ic55dcfeaa314f83d3713aabac7852cb766330fc8
2017-08-02 15:59:19 -07:00
Elliott Hughes
3ff453aaa0 Make sure freeaddrinfo is always called on failure.
Bug: https://android-review.googlesource.com/#/c/platform/system/core/+/268797/2/libcutils/socket_network_client_unix.c
Test: builds
Signed-off-by: Ivan Maidanski <i.maidanski@samsung.com>
Change-Id: I2d93c8359c3398769d408284f77d56e09713a7f3
2017-08-02 20:32:27 +00:00
Chih-Hung Hsieh
dfaa20c069 Merge "Fix misc-macro-parentheses warnings in system/core."
am: e4bd153e55

Change-Id: I6b38149a0fa15874eff68cbf7ee62e4acd41c595
2017-08-01 23:26:06 +00:00
Chih-Hung Hsieh
85244e8bc2 Fix misc-macro-parentheses warnings in system/core.
Add NOLINT comment to work around clang-tidy
error in checking macro arguments used in
type expressions.

Bug: 28705665
Test: make with WITH_TIDY=1 WITH_TIDY_CHECKS=-*,misc-macro-* \
      WITH_TIDY_FLAGS=-header-filter=system/core/.*

Change-Id: I7619978c1804e151a11a8b0477e80076bcf21cab
2017-08-01 22:12:57 +00:00
Lennart Wieboldt
f7b315c985 Merge "Remove LOCAL_CLANG and clang: true"
am: 80ec81cf4b

Change-Id: Ia7f79d8e25ee9870fe44d198568d0e5dabdff811
2017-07-25 22:28:56 +00:00
Lennart Wieboldt
cd15fc7ba8 Remove LOCAL_CLANG and clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-07-25 14:29:50 +02:00
Elliott Hughes
09181f3dd9 Merge "Remove more documentation for obsolete board configuration."
am: 73a6512bab

Change-Id: I964c133a654efbc3d40bbebc7247863455e8cb54
2017-06-29 23:59:43 +00:00
Elliott Hughes
73a6512bab Merge "Remove more documentation for obsolete board configuration." 2017-06-29 23:50:37 +00:00
Elliott Hughes
5dc7736f60 Remove more documentation for obsolete board configuration.
Bug: N/A
Test: builds
Change-Id: I0a4ea974a81aadba1a554072ceff9f243a70be0d
2017-06-29 08:52:49 -07:00
Jiyong Park
eacf704a6c Merge "Allow SLOG* to vendors"
am: 6afbd476ab

Change-Id: I56d66068757cd962c237a8292aa481d96b417f17
2017-06-29 03:58:59 +00:00
Treehugger Robot
6afbd476ab Merge "Allow SLOG* to vendors" 2017-06-29 03:53:38 +00:00
Jiyong Park
9ffeab85bf Allow SLOG* to vendors
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
2017-06-29 10:25:25 +09:00
Elliott Hughes
a96d1aebdb Merge "Remove documentation for obsolete board configuration."
am: 3f4cea940d

Change-Id: I61c8310bbca3690e2b7f9764429c118db780c551
2017-06-28 16:40:41 +00:00
Elliott Hughes
76a934a459 Remove documentation for obsolete board configuration.
Bug: N/A
Test: builds
Change-Id: I5afbf2da35a7defb12b98bb5387ab7d3eee6f15a
2017-06-28 07:50:00 -07:00
Ben Fennema
cd3584e90b Merge "libcutils: fs_config: fix "system/<partition>/" aliasing"
am: 449bfd7a93

Change-Id: I9f3d0f0e4dc147d9d2a5a1e41486805ada29d62a
2017-06-26 22:49:41 +00:00
Ben Fennema
acd7b7b0c0 libcutils: fs_config: fix "system/<partition>/" aliasing
Pull prefix checking into fs_config_cmp and make prefix_cmp be a
glorified partial ? strncmp() : strcmp()

Results before:
[ RUN      ] fs_config.system_alias

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: vendor/lib/hw didn't match system/vendor/lib

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/vendor/bin/wifi didn't match vendor/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/odm/bin/wifi didn't match odm/bin/wifi

[ ERROR ] system/core/libcutils/tests/fs_config.cpp:143:: system/oem/bin/wifi didn't match oem/bin/wifi
system/core/libcutils/tests/fs_config.cpp:247: Failure
Value of: check_fs_config_cmp(fs_config_cmp_tests)
  Actual: true
Expected: false
[  FAILED  ] fs_config.system_alias (6 ms)

Results after:
[ RUN      ] fs_config.system_alias
[       OK ] fs_config.system_alias (0 ms)

Bug: 62204623
Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Change-Id: I8282827002816e86ea3014fed29eabf43b837815
Signed-off-by: Ben Fennema <fennema@google.com>
2017-06-26 14:13:52 -07:00
Alex Naidis
234fae2823 Merge "libcutils: Clarify schedboost_enabled()" am: 643b4776b5
am: 7ce1bdec47

Change-Id: Ia1b594ccd71a20d787cb70b2b8750c30158b7ffe
2017-06-20 18:22:26 +00:00
Alex Naidis
2d998ea99b libcutils: Clarify schedboost_enabled()
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>
2017-06-16 21:30:49 +00:00
Elliott Hughes
184fa60c23 Merge "Fix prctl argument type" am: 6cc5927e0d
am: 316b7334b8

Change-Id: Iaaf987d8b996a44a0b11eae3a1f1386adf721f3c
2017-06-12 19:56:56 +00:00
Stephen Crane
f5b8e34660 Fix prctl argument type
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
2017-06-07 17:25:00 -07:00
Elliott Hughes
3e9223f460 Merge "Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"" am: f9259b59e8 am: b2f12e42ca
am: 22cdddecba

Change-Id: I6e41d84c76a0d1f31e54d5422638817905f202f4
2017-05-25 18:18:40 +00:00
Hung-ying Tyan
3346338919 Revert "Load {default,build}.prop from /{system,vendor,odm}/etc/"
This reverts commit 723f1a2b31.

Bug: 62075509
2017-05-25 19:18:17 +08:00
Hung-ying Tyan
a22e004f57 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" am: a9aa77d259 am: 26c4bcfadd
am: 0cd0d52147

Change-Id: Ide638286886cef323e8bb049f5baf4bbe659c47a
2017-05-25 02:46:10 +00:00
Treehugger Robot
a9aa77d259 Merge "Load {default,build}.prop from /{system,vendor,odm}/etc/" 2017-05-25 02:32:37 +00:00
Hung-ying Tyan
723f1a2b31 Load {default,build}.prop from /{system,vendor,odm}/etc/
/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
2017-05-25 08:41:08 +08:00
Scott Randolph
cd6086b298 Merge "Add AID_EVS for use by the Automotive EVS system" am: 58620a8d4a am: 39e0f550b9
am: 8ba873809e

Change-Id: I320848d0ff8ba32d3571110604634656c646a647
2017-05-24 00:05:48 +00:00
Scott Randolph
d5d3276482 Add AID_EVS for use by the Automotive EVS system
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
2017-05-23 12:44:24 -07:00
Mark Salyzyn
940a9a08e5 libcutils: fs_config: remove aliases
Covered by the code automatically now. Dropping duplicate wifi.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: I86e29192e321e1e449d2c30161af69c34b8baa16
2017-05-19 13:30:08 -07:00
Mark Salyzyn
88c04aae1e libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-19 18:16:23 +00:00
Mark Salyzyn
de439332ba Merge "Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."" into oc-dev
am: 6a93fd7e7c

Change-Id: Ifc81c5a2b17176711138c34b1a82ac945e7186a6
2017-05-19 18:12:30 +00:00
Mark Salyzyn
645d62facb Merge changes Iad6ba65e,Ia6a7e8c9,Ida9405cb am: 037d2b71dc am: 219e7200be
am: 7c466b936a

Change-Id: I9da0e906b391b9e4846c534eda77fb33d96e191a
2017-05-19 14:35:34 +00:00
Mark Salyzyn
cb0b5e6753 Revert "Partial revert of "libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate" Revert just the wifi hardware part."
This reverts commit 6db432daf7.

Test: Build
Bug: 37921982
Bug: 37483427
Bug: 37703469
Change-Id: Ie19221f4383a45e317bc0b190e9a70459706fc79
2017-05-19 14:31:41 +00:00
Mark Salyzyn
2cf243528f libcutils: fs_config: remove aliases
Covered by the code automatically now.

Test: gTest libcutils_test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Iad6ba65e023845aaea7a181b277a7383c44bd937
2017-05-18 15:56:54 -07:00