Commit graph

26581 commits

Author SHA1 Message Date
Yabin Cui
0c68953778 base: support logging before enter main function.
Bug: http://b/30974760
Test: run libbase_test.

Change-Id: I3f45fc21e8fe6301b5fef027728ea91f2188911d
2017-01-25 15:50:47 -08:00
Jeff Sharkey
1e7cdf3c7d Merge "Define GID range for external data and OBBs." 2017-01-19 16:16:40 +00:00
Treehugger Robot
c42bd0931f Merge changes Icb8e6290,Iadde7b21,I743ab92c,Ie078fbc2,I2ab3cd46, ...
* changes:
  libsync: tests: redefine PollOnDestroyedTimeline()
  libsync: tests: remove WaitOnDestroyedTimeline test
  libsync: add support to new Sync API
  libsync: open new location of sw_sync file
  libsync: add new Sync kernel API
  libsync: move kernel headers for sync ioctls to sync.h
2017-01-19 00:39:36 +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
Josh Gao
230201dcbf Merge "debuggerd: advance our amazing bet." 2017-01-18 23:04:09 +00:00
Colin Cross
80112f73cd Merge "Export android_filesystem_config.h as a filegroup" 2017-01-18 16:53:26 +00:00
Jorim Jaggi
8e81cd6609 Merge "Revert "init: split property context into platform & non-platform components"" 2017-01-18 16:33:32 +00:00
Jorim Jaggi
328cb5d141 Revert "init: split property context into platform & non-platform components"
This reverts commit 871c306855.

Change-Id: I3e14b71e9fc5f37c9691405ce20031451643f9b4
2017-01-18 15:33:26 +00:00
Treehugger Robot
b8e5553887 Merge "init: split property context into platform & non-platform components" 2017-01-18 06:09:02 +00:00
Colin Cross
1207ba3d5a Export android_filesystem_config.h as a filegroup
bionic/libc/Android.bp needs to reference android_filesystem_config.h,
export it using a filegroup module.

Bug: 34283327
Test: builds
Change-Id: Id7650f3b64d7eb52f945f538d05b691b8b3c3fcb
2017-01-17 18:20:28 -08:00
Treehugger Robot
56098eed3b Merge "init: usb: fix audio_source function typo" 2017-01-18 01:39:39 +00:00
James Hawkins
bde89da5fc Merge "bootstat: Fix false metrics due to soft reboots." 2017-01-17 23:46:58 +00:00
Gustavo Padovan
801492b8a6 libsync: tests: redefine PollOnDestroyedTimeline()
On mainline if the sw_sync timeline is destroyed the fences doesn't not
signal or error. So change the test to check if the fence is still there
by polling the fence with timeout zero and asserting if it is not
signalled.

Test: Sync unit tests still passes.
Change-Id: Icb8e629018eef35074ae91d0f29ed1f12e90492b
2017-01-17 14:29:41 -08:00
Gustavo Padovan
e4682802cb libsync: tests: remove WaitOnDestroyedTimeline test
The mainline Sync File implementation doesn't have wait ioctl anymore.
Only poll is supported now, and we already have a test for that.

Test: Sync unit tests still passes.
Change-Id: Iadde7b2173024af9b8d20316e640297cf214c645
2017-01-17 14:29:18 -08:00
Gustavo Padovan
61ab0d74d2 libsync: add support to new Sync API
Change libsync functions in a way that it can run dynamically on both
APIs.

v2: fix whitespace changes and poll return handling

v3: handle error cases on sync_wait()

Test: Sync unit tests still passes.
Change-Id: I743ab92ce39cbfa75dca41dd0a435efa9f2aab66
hange-Id: Ib56f2c6441b41028bc9f66998676790b7713988a
2017-01-17 14:29:01 -08:00
Gustavo Padovan
ffc687baad libsync: open new location of sw_sync file
sw_sync file for debug was moved to debugfs. Try to open it and if it
fails try to open /dev/sw_sync.

Test: Sync unit tests still passes.
Change-Id: Ie078fbc2eb5294f28b916a9e65b7fcd3a18a8580
hange-Id: I216874964368d939bed2779d98cd89e527a57d45
2017-01-17 14:28:45 -08:00
Gustavo Padovan
6786575d42 libsync: add new Sync kernel API
Add the new API to the internal sync.h file. As there is two different
APIs we will need to discovery dynamically which one to use.

v2: Fix Documentation

Test: Sync unit tests still passes.
Change-Id: I2ab3cd46e48ba5d9c73d54f9583b1a8141566581
2017-01-17 14:28:26 -08:00
Gustavo Padovan
d6bbc5de66 libsync: move kernel headers for sync ioctls to sync.h
This patch moves the legacy API to the internal sync.h header
and add documentation to it.

Test: Sync unit tests still passes.
Change-Id: I9b17eb23af30043b3df5fb9e857affad68ba8521
2017-01-17 14:28:00 -08:00
Winter Wang
60c763ed52 init: usb: fix audio_source function typo
for audio_source function instance, there exist 2 function name here:
    "audio_source.gs2" and "audio_source.gs3"
I believe this usb accessory audio name "audio_source.gs2" is a typo,
as there is no need to create another audio_source instance.

Test: Manual

Change-Id: I70b513db474632eb990131c285c8d5105c17970f
Signed-off-by: Winter Wang <wente.wang@nxp.com>
2017-01-17 14:27:34 -08: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
James Hawkins
800ceb45b1 bootstat: Fix false metrics due to soft reboots.
Use a flag to enable/disable logging metrics, set to false during soft
reboots.

Bug: 32807863
Change-Id: Ib1359327af4e18d40400c29961c454f7be1b8d0c
Test: None
2017-01-17 13:28:17 -08:00
Tao Bao
4c5c9db17b Merge "Revert "init: add ro.boot.init_rc"" 2017-01-17 20:19:23 +00:00
Tao Bao
01519a207c Revert "init: add ro.boot.init_rc"
This reverts commit 7e6d30e5f2.

Bug: 26639863
Bug: 34318089
Change-Id: Ie71d773ee7c6c6a90e8298f8e0798eacba12d0be
2017-01-17 20:16:45 +00:00
Treehugger Robot
c160675a93 Merge "Remove fs_mgr's bogus external/openssl/include LOCAL_C_INCLUDES entry." 2017-01-16 18:10:46 +00:00
Elliott Hughes
ebeaa67c0c Remove fs_mgr's bogus external/openssl/include LOCAL_C_INCLUDES entry.
Bug: N/A
Test: builds
Change-Id: Icaf095f0c25fae5c1175dbb630bc05c63af72d75
2017-01-15 11:52:35 -08:00
Elliott Hughes
89e99f9e0e Merge "bootable/recovery wants EqualsIgnoreCase." 2017-01-14 18:22:32 +00:00
Treehugger Robot
0cf5e36c00 Merge "init: add ro.boot.init_rc" 2017-01-14 08:06:09 +00:00
Elliott Hughes
2140782d24 bootable/recovery wants EqualsIgnoreCase.
Bug: N/A
Test: ran tests
Change-Id: I4a6ee9eba0514b8bb8fb0489f4d370964ce9c1c2
2017-01-13 18:51:32 -08:00
Treehugger Robot
f28f7c8a74 Merge "-e is really about TCP/IP devices, not emulators." 2017-01-14 02:47:21 +00:00
Elliott Hughes
e94deb3a51 Merge "Switch fastboot docs to markdown." 2017-01-14 02:23:44 +00:00
Elliott Hughes
83ab5c29c1 -e is really about TCP/IP devices, not emulators.
Despite the name.

Bug: N/A
Test: N/A
Change-Id: I099222137fabf68f961a6a2e5d11f2904ffd5a0d
2017-01-13 16:58:25 -08:00
Elliott Hughes
84cb36e02d Switch fastboot docs to markdown.
Bug: N/A
Test: N/A
Change-Id: I4713c692f67e1aaba079819a6876d0c7bb94f925
2017-01-13 16:03:13 -08:00
Elliott Hughes
3052d123a8 Merge "Fix libbase file.Readlink test on marlin/sailfish." 2017-01-13 21:12:21 +00:00
Treehugger Robot
5d05d0e74e Merge "Move to .md files for even trivial documentation." 2017-01-13 19:39:26 +00:00
Treehugger Robot
8c301d22e4 Merge "fs_mgr: use std::string for function parameters in fs_mgr_dm_ioctl.cpp" 2017-01-13 17:57:45 +00:00
Treehugger Robot
155d2bcb7a Merge "Check the return value of setuid(2)." 2017-01-13 17:48:08 +00:00
Jorge Lucangeli Obes
f4ae42f6a8 Check the return value of setuid(2).
I'd like to mark setuid() WARN_UNUSED_RESULT to prevent security bugs.
This line would break because the file is compiled with -Werror.

Bug: 34251640
Test: Build, run unit test.
Change-Id: Ibb6fa5e5b899d47f77f2a32da762165de310101d
2017-01-13 15:43:45 +00:00
Mark Salyzyn
dc40813167 Merge "trusty: use log/log.h for ALOG macros" 2017-01-13 15:32:39 +00:00
Mark Salyzyn
5654a887b1 trusty: use log/log.h for ALOG macros
Test: compile
Bug: 34250038
Change-Id: I12e7c6ea5a9ca950751fcf65352889650f198986
2017-01-13 07:30:11 -08:00
bowgotsai
47aa2a7520 fs_mgr: use std::string for function parameters in fs_mgr_dm_ioctl.cpp
Make the code more C++-ish by replacing char* or char** with
std::string&.

Bug: 31264231
Test: check device can boot with dm-verity
Change-Id: Ie3ca3f449b52959d1a7b2887d722eb5ce366c4f9
2017-01-13 17:39:04 +08:00
Treehugger Robot
5e9863bf63 Merge "libcutils: change klog_level to KLOG_INFO_LEVEL" 2017-01-13 08:08:26 +00:00
Elliott Hughes
15f0f504ac Move to .md files for even trivial documentation.
So it's automatically displayed for folks browsing the source.

Bug: N/A
Test: N/A
Change-Id: Ib595ab428054f274a92374728e3e66474ffc5116
2017-01-12 22:40:49 -08:00
Treehugger Robot
a37ff0dd83 Merge "fs_mgr: moves common functions out of fs_mgr_verity.cpp" 2017-01-13 06:21:39 +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
bowgotsai
3de625d109 fs_mgr: moves common functions out of fs_mgr_verity.cpp
This commits moves some common functions out of fs_mgr_verity.cpp to be
reused by other verified boot flows. It includes:
 - Move common functions into fs_mgr.c
 - Move dm_ioctl related functions to a new file: fs_mgr_dm_ioctl.cpp

Bug: 31264231
Test: check device can boot with dm-verity

Change-Id: Iaa0d8031efbaae12aa28f872f62d3fc3d3763b51
2017-01-13 10:52:44 +08:00
Mark Salyzyn
dd9fa24091 Merge "liblog: use log/log.h for ALOG macros" 2017-01-12 23:46:29 +00:00
Mark Salyzyn
51c33b7011 liblog: use log/log.h for ALOG macros
Test: compile
Bug: 34250038
Change-Id: I0f56c563871f377c03380498cd867b916892f1dc
2017-01-12 15:44:06 -08:00
Tomasz Wasilczyk
ae770a4728 Merge "Fix typo in radio_metadata_t definition." 2017-01-12 22:52:58 +00:00
Josh Gao
72d4c42cd5 Merge "adb: remove support for legacy f_adb interface." 2017-01-12 21:24:34 +00:00
Alex Deymo
7e0b322978 Merge changes from topic 'host_suffix_cleanup'
* changes:
  Remove "_host" and "_static" suffix from libsparse definition.
  Remove "_static" and "_host" suffix from libext4_utils.
2017-01-12 21:23:11 +00:00