Commit Graph

31978 Commits

Author SHA1 Message Date
Vijay Venkatraman b3ef9022e9 Moved all files from include/system to libsystem/include/system
Bug: 33241851
Test: No changes for modules not using VNDK. For compiling with VNDK,
add libsystem_headers as dependency for using these headers

Change-Id: I1a8a44073424cc0db625e31d44cb16b78c5a9ca1
Merged-In: I2acce0ab771e10ac83461c2f931e2c19e922089e
2017-04-06 10:28:50 -07:00
Dan Cashman 39ffec779a Reflect move of mapping file to /system.
Bug: 36783775
Test: boot device with matching sha256 and non-matching and verify that
device boots and uses either precompiled or compiled policy as needed. Also
verify that mapping_sepolicy.cil has moved.

Change-Id: I9c3df2e7ed3f0eadd98e98529ebed360fec66dba
2017-04-06 09:57:23 -07:00
Liu Changcheng 3492221fcf check send_signal result before further dealing
If send_signal failed, debuggerd_trigger_dump should return
instead of further dealing

Change-Id: I0a1ac4255344d1da7a21917ad559b9de4d5a4fee
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
2017-04-06 22:47:00 +08:00
Mark Salyzyn bc1d2aeff9 logd: test: logd.sepolicy* errors
If setcon fails, try alternate setcon, and then if it still
fails call getcon to confirm if it is an OK sepolicy context
anyways.

Test: gTest logd-unit-tests --gtest_filter=logd.sepolicy*
Change-Id: Iaf20b8a1a4a7312247288e1879884a54893c15ae
2017-04-06 07:40:10 -07:00
Dan Shi 7417cd2f70 Merge "Add test config to bootstat_tests" am: 3d5cd59d73 am: 5358155528
am: 0d3803f3f2

Change-Id: I41c3015bb4048fd526b83487de2c574651ea79e0
2017-04-06 03:16:24 +00:00
Dan Shi 0d3803f3f2 Merge "Add test config to bootstat_tests" am: 3d5cd59d73
am: 5358155528

Change-Id: Ifae2a5b6ca7058d4876a78612bb16c79dc752edc
2017-04-06 03:13:25 +00:00
Dan Shi 5358155528 Merge "Add test config to bootstat_tests"
am: 3d5cd59d73

Change-Id: Ie095ec5e2301fb0fc2db1350b43056b06fd6b617
2017-04-06 03:10:24 +00:00
Treehugger Robot 3d5cd59d73 Merge "Add test config to bootstat_tests" 2017-04-06 03:01:29 +00:00
Tom Cherry c44f6a4073 ueventd: Write tests for the get_*_symlinks() functions
Bug: 33785894
Bug: 36250207
Test: Boot bullhead + new unit tests
Change-Id: Ia0f290542eb1cffce5ae876dfedb453dde960253
2017-04-05 18:21:39 -07:00
Mark Salyzyn a74b51ebaf Merge "libcutils: fs_config: target_out_path assumed /system" am: 66b8491719 am: 27c796b2f7
am: 8ebacb43c5

Change-Id: I9c744e8daa966649c25b8d529512db8dc512c749
2017-04-06 00:20:39 +00:00
Mark Salyzyn 8ebacb43c5 Merge "libcutils: fs_config: target_out_path assumed /system" am: 66b8491719
am: 27c796b2f7

Change-Id: I7039e9a8e7547642fd7a7817ae470fb82ff806bb
2017-04-06 00:17:31 +00:00
Mark Salyzyn 27c796b2f7 Merge "libcutils: fs_config: target_out_path assumed /system"
am: 66b8491719

Change-Id: I399f82026a4b4a77338dbdbbd2c923a9692f9b07
2017-04-06 00:14:29 +00:00
Treehugger Robot 66b8491719 Merge "libcutils: fs_config: target_out_path assumed /system" 2017-04-06 00:03:14 +00:00
Dan Willemsen 28dab34cbb Add LLNDK liblog stub library for the VNDK
This replaces the liblog_vndk_headers with a true stub library that
exports the vndk headers, and exports the vndk-specific set of symbols.

Test: generated NDK stub maps are the same before/after
Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j (with other changes)
Change-Id: I9037241963b3872a3bc7cf7ab36a70dd4ddcf9bc
2017-04-05 16:42:40 -07:00
Tom Cherry c996a8e73e Add android::base::ScopeGuard
Taken from bionic/libc/private/ScopeGuard.h.

Test: New unit tests
Change-Id: If83c1990efbf294aee0b5d40a7a9ac326e5e765e
2017-04-05 16:15:33 -07:00
Christopher Ferris 04c5884b61 Merge "Convert opens to use unique_fd." am: ff93b794b5 am: 906709aa75
am: 59faf612d5

Change-Id: I0068f30953483c54997f9b8cd6b1c4081b2d7b78
2017-04-05 22:56:05 +00:00
Mark Salyzyn ec511ab800 Merge "liblog: worry over resource leaks" am: acc0e98b0f am: 4f2753fd91
am: b670634146

Change-Id: Icd9e42e6a5043d3403cbd49aaed9bcf204353c37
2017-04-05 22:55:52 +00:00
Christopher Ferris 59faf612d5 Merge "Convert opens to use unique_fd." am: ff93b794b5
am: 906709aa75

Change-Id: I1cd9d50e70e7bad328eee0a30da7e546c2781ab6
2017-04-05 22:53:05 +00:00
Mark Salyzyn b670634146 Merge "liblog: worry over resource leaks" am: acc0e98b0f
am: 4f2753fd91

Change-Id: If73ad6356a1e481aa74af150125dc7bbc780d9ba
2017-04-05 22:52:52 +00:00
Christopher Ferris 906709aa75 Merge "Convert opens to use unique_fd."
am: ff93b794b5

Change-Id: I53278a094a4d96f9bcb32faa311e560728f76e10
2017-04-05 22:50:03 +00:00
Mark Salyzyn 4f2753fd91 Merge "liblog: worry over resource leaks"
am: acc0e98b0f

Change-Id: Ibc6883cd11daa49501f91166830e8e27f66f21ef
2017-04-05 22:49:50 +00:00
Christopher Ferris ff93b794b5 Merge "Convert opens to use unique_fd." 2017-04-05 22:47:25 +00:00
Mark Salyzyn 7130fb345d libcutils: fs_config: target_out_path assumed /system
Strip off /system/ and add appropriate config directory.

Test: manual build successfully interprets all etc/fs_config_* files.
Bug: 36071012
Change-Id: I2563248e91cea10fef3cc2f9e954e4782fdfce4f
2017-04-05 22:32:22 +00:00
Mark Salyzyn acc0e98b0f Merge "liblog: worry over resource leaks" 2017-04-05 22:28:38 +00:00
Mark Salyzyn 191afba9bd liblog: worry over resource leaks
Add comments so that future selves can clearly see there are no file
descriptor resource leaks on normal return.

SideEffects: None
Test: Build
Change-Id: Ieec504fea00fb849cdb69c669655a918d1334e61
2017-04-05 13:02:08 -07:00
Mark Salyzyn 558282bfe4 logcatd: introduce logcatd executable
logcatd is the same as logcat, except that the -L flag, if supplied,
runs once, then the command re-runs itself without the -L flag with
the same argument set.  By introducing a logcatd daemon executable
we can solve the problem of the longish reads from pstore that
sometimes occur when the system is excessively busy, starving this
background cgroup daemon as we absorb the delay in a backgrounded
init "service", rather than in a forgrounded init "exec".  This would
not have been efficiently possible without the introduction of
liblogcat.

There are no doubt many flags that make no sense to run twice with,
and without, the -L flag.  In the general sense we expect the caller
to perform the correct set of operations and not pick these nonsense
operations.  logcatd is only supplied on engineering and debug builds
for logpersist, and is only an automated aid to triage.

Test: gTest logcat-unit-tests
Test: manual confirm logpersist functions as expected, required reboot
Bug: 28788401
Bug: 30041146
Bug: 30612424
Bug: 35326290
Change-Id: I53ba31970749daf37eef42636f039f485932416f
2017-04-05 19:35:07 +00:00
Mark Salyzyn d7fb0a069d logcat: Add -h and --help flags
If -h or --help argument was supplied, logcat would report the help
message but also return an error.  Officially add -h and --help as
recognized flags, report all help with a (zero) success error code.
Adding this, and the associated test, was split off as a stepping
stone to resolving an issue with logcat -L or --last flag operations.

Test: gTest logcat-unit-tests --gtest_filter=*.help
Bug: 28788401
Bug: 30041146
Bug: 30612424
Bug: 35326290
Change-Id: I948e7fa4e92bd23f52717758ffd96bbd068c53d4
2017-04-05 19:34:48 +00:00
Christopher Ferris 48d08c2c9d Convert opens to use unique_fd.
Fixes a potential leak of fds in WriteStringToFile.

Test: I wrote a temporary test that failed the fchmod on host in
Test: WriteStringToFile. I verified this fails with the old code after running
Test: out of fds and passes with the new code.
Change-Id: I168160841e35dd480d59a69bb4aa8176899fbb32
2017-04-05 12:30:12 -07:00
Rubin Xu b4467ac98a Merge "Fix liblog#__security failure" into oc-dev
am: 210be3820f

Change-Id: I628d4b8630344dab6d417e351fab8f2038093813
2017-04-05 18:10:58 +00:00
TreeHugger Robot 210be3820f Merge "Fix liblog#__security failure" into oc-dev 2017-04-05 18:02:56 +00:00
Adam Lesinski 639814d946 ZipWriter: Do not write DataDescriptor for STORED files
Older implementations of ZIP (Java's ZipInputStream) don't
like a Data Descriptor trailing after an uncompressed entry.

If the FILE is seekable, and the entry is uncompressed, seek
back to the header and write out the crc and sizes.

Bug: 36686974
Test: make ziparchive_tests
Change-Id: I61664515e5afa3e2ba814874eeac847a2aaac319
2017-04-05 10:54:15 -07:00
Steven Moreland 4883150bcc Merge "init.rc: add class_start early_hal" into oc-dev
am: 4b74d05b8e

Change-Id: I548de39fdbf493ab9a2f4641490abb6cfb1e00cc
2017-04-05 17:46:09 +00:00
TreeHugger Robot 4b74d05b8e Merge "init.rc: add class_start early_hal" into oc-dev 2017-04-05 17:39:07 +00:00
Christopher Ferris fd8849221c Merge "Add Symbols parsing." am: 568dc01fdf am: dbd463fc0b
am: 1d5a2a3239

Change-Id: I3390ee0a4179456d776ed5cc25a1369b313bfc82
2017-04-05 17:35:15 +00:00
Rubin Xu e4b3c4cf89 Merge "Fix liblog#__security failure" am: 7887dd8567 am: 3651e52903
am: 4e1533170a

Change-Id: I1ce292fbf498a75eb14331ea0c242bc2b7968992
2017-04-05 17:33:00 +00:00
Christopher Ferris 1d5a2a3239 Merge "Add Symbols parsing." am: 568dc01fdf
am: dbd463fc0b

Change-Id: I2aae05f5dfd8f21f138f8e70bac8854555368b78
2017-04-05 17:32:59 +00:00
Christopher Ferris dbd463fc0b Merge "Add Symbols parsing."
am: 568dc01fdf

Change-Id: I8bf2d09b6bd9b32f8e688d6bbb17b7552acca0de
2017-04-05 17:30:15 +00:00
Rubin Xu 4e1533170a Merge "Fix liblog#__security failure" am: 7887dd8567
am: 3651e52903

Change-Id: I09f2316707ea335b8622cdd7c8ddabe5511fd45c
2017-04-05 17:30:15 +00:00
Rubin Xu 3651e52903 Merge "Fix liblog#__security failure"
am: 7887dd8567

Change-Id: I40443a10f9e59bc8099e4204ffe3ca808c5a1c0b
2017-04-05 17:27:16 +00:00
Christopher Ferris 568dc01fdf Merge "Add Symbols parsing." 2017-04-05 17:26:32 +00:00
Rubin Xu 7887dd8567 Merge "Fix liblog#__security failure" 2017-04-05 17:22:43 +00:00
Dan Shi 0f0cccc102 Add test config to bootstat_tests
This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=bootstat_tests

Change-Id: I3bc2fa19faebe21f6faf8b81e206ea1581918344
2017-04-05 14:49:47 +00:00
Rubin Xu 08c662c762 Fix liblog#__security failure
Update pid and gid value after calling setuid()

Bug: 36480230
Test: cts-tradefed run cts -m CtsLiblogTestCases -t liblog#__security_buffer
Change-Id: I707f7c724d64236ec17f2d978c85883a7b4f180f
Merges-In: I707f7c724d64236ec17f2d978c85883a7b4f180f
2017-04-05 11:30:06 +01:00
Rubin Xu 235cf8d729 Fix liblog#__security failure
Update pid and gid value after calling setuid()

Bug: 36480230
Test: cts-tradefed run cts -m CtsLiblogTestCases -t liblog#__security_buffer
Change-Id: I707f7c724d64236ec17f2d978c85883a7b4f180f
Merges-In: I707f7c724d64236ec17f2d978c85883a7b4f180f
2017-04-05 11:27:48 +01:00
Dan Shi d2cee19333 Merge "Add test config to libcutils_test" am: c1c0de3945 am: 0b842b37f6
am: 6a5c28d5af

Change-Id: Ia86da758ddabdff2126de7758a5ad98a98802d31
2017-04-05 06:47:34 +00:00
Dan Shi 6a5c28d5af Merge "Add test config to libcutils_test" am: c1c0de3945
am: 0b842b37f6

Change-Id: I3a00d4adc6472cdd2a61d1b940e8a7235f77df63
2017-04-05 06:45:04 +00:00
Dan Shi 0b842b37f6 Merge "Add test config to libcutils_test"
am: c1c0de3945

Change-Id: I6db1561c2153df96a7c4faa166963b0d1855e285
2017-04-05 06:42:33 +00:00
Treehugger Robot c1c0de3945 Merge "Add test config to libcutils_test" 2017-04-05 06:39:42 +00:00
Josh Gao 9828fc36f7 debuggerd_test: remove useless pipe.
am: c723138ed2

Change-Id: Iac1c065fdbaccac6e60365a6c4c8a31de314ba51
2017-04-05 06:30:36 +00:00
Josh Gao 750d0d6885 debuggerd_client: fix infinite timeouts.
am: e9a2f8ee8b

Change-Id: Id3dbf2ae46d8ad22f712554e5327ccd7361f9028
2017-04-05 06:30:30 +00:00