Commit Graph

31978 Commits

Author SHA1 Message Date
Mark Salyzyn 0f92fdc5d6 logd: cap out-of-order entry search
Reduce the period we are willing to look back at for out-of-order
entries.  Cap the number of iterations we are willing to look back
for out-of-order entries to 300.

Test: gTest liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Bug: 36875387
Bug: 36874561
Bug: 36861142
Change-Id: Icee289dfc0a37ccab9912dc8ab40a10ef3967b7a
2017-04-04 11:03:26 -07:00
Christopher Ferris de393a5440 Merge "Add overflow checks in Memory objects." am: 856bccbdc3 am: 69b4dfe13e
am: 7c3e179f0f

Change-Id: I0e00217bfb3f7aea22b9a4b75d0166d82457f8f6
2017-04-04 17:46:13 +00:00
Jin Qian 566e63da53 storaged: exit if batteryproperties service is dead.
storaged relies on batteryproperties service (healthd) to provide
charger stats. If healthd is killed, kill storaged as well. Both
will be restarted by init process anyway to restore a correct state.

Test: kill healthd when storaged is running
Bug: 36652060
Merged-In: Ia785bb6f5ea259aa43cd1efab9505ebefaf3db12
Change-Id: Ia785bb6f5ea259aa43cd1efab9505ebefaf3db12
2017-04-04 17:45:41 +00:00
Christopher Ferris 7c3e179f0f Merge "Add overflow checks in Memory objects." am: 856bccbdc3
am: 69b4dfe13e

Change-Id: I8643664cfd8b0738fdcd7ed4c9815307acdd46e8
2017-04-04 17:41:44 +00:00
Christopher Ferris 69b4dfe13e Merge "Add overflow checks in Memory objects."
am: 856bccbdc3

Change-Id: Id9e9c65c724d1ce75cc3cefed06d14f5785d2259
2017-04-04 17:37:15 +00:00
Christopher Ferris 856bccbdc3 Merge "Add overflow checks in Memory objects." 2017-04-04 17:29:49 +00:00
Yabin Cui 5d002b8d6a adb: don't reset usb when connecting it.
Calling libusb_reset_device() resets the usb connection with device
on linux platform. It can interfere with other usb interfaces and only
works on linux.
Removing it only affects when adb server is killed while doing IO with
device, which will be solved in later patches.

Bug: http://b/32952319
Test: none
Change-Id: I19522435eadd938ff95d49cbae3bcaa5c8f6d184
2017-04-04 10:29:21 -07:00
Mark Salyzyn a1c10c01da Merge "logcat: Add -h and --help flags" am: 23e308398f am: d3d3dddd31
am: 83f8d0b5c2

Change-Id: I3fe4e2d27f248bd6e5ed531c2f7602dfcb912460
2017-04-04 17:06:01 +00:00
Tom Cherry 7fbc616e70 Merge "init: use read_file and write_file to implement do_copy builtin" am: 554c1fa234 am: ed73c21658
am: 732245aacb

Change-Id: Ic9164bdf28abe35857047259a6d5cf96d357e34f
2017-04-04 17:05:43 +00:00
Mark Salyzyn 83f8d0b5c2 Merge "logcat: Add -h and --help flags" am: 23e308398f
am: d3d3dddd31

Change-Id: I36e97f7ed9c0a5ee81c8608320574cd44399b4c7
2017-04-04 16:57:26 +00:00
Tom Cherry 732245aacb Merge "init: use read_file and write_file to implement do_copy builtin" am: 554c1fa234
am: ed73c21658

Change-Id: I5ae4531a3ce6c68eac9eba47d2bb15e9a6109891
2017-04-04 16:57:08 +00:00
Mark Salyzyn d3d3dddd31 Merge "logcat: Add -h and --help flags"
am: 23e308398f

Change-Id: Icffb5b13a46f9fe3e1903cf1255b7218948c2db8
2017-04-04 16:54:22 +00:00
Tom Cherry ed73c21658 Merge "init: use read_file and write_file to implement do_copy builtin"
am: 554c1fa234

Change-Id: I4a2a2d86780a34cc3d5b4c17396ebba6681aae8d
2017-04-04 16:50:53 +00:00
Treehugger Robot 23e308398f Merge "logcat: Add -h and --help flags" 2017-04-04 16:50:19 +00:00
Tom Cherry 554c1fa234 Merge "init: use read_file and write_file to implement do_copy builtin" 2017-04-04 16:42:50 +00:00
Mark Salyzyn a073c39616 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-04 08:01:50 -07:00
Mark Salyzyn e74e51ded7 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-04 08:01:11 -07:00
Neil Fuller 1434fbb46c Merge "Update to support staging behavior" into oc-dev
am: e4b2d28b91

Change-Id: I2fb0e62a0dadbfd70920e49e66354be1e8f130c4
2017-04-04 12:08:17 +00:00
Neil Fuller e4b2d28b91 Merge "Update to support staging behavior" into oc-dev 2017-04-04 12:03:08 +00:00
Martijn Coenen 92b49c03b5 Merge "Add /dev/vndbinder to ueventd.rc" into oc-dev
am: 026d17dab3

Change-Id: I8452b72a66f7de09762e051e23a62b09228453f8
2017-04-04 06:36:15 +00:00
TreeHugger Robot 026d17dab3 Merge "Add /dev/vndbinder to ueventd.rc" into oc-dev 2017-04-04 06:33:27 +00:00
Yongqin Liu dbe88e7953 init: use read_file and write_file to implement do_copy builtin
this will make the implementation more cleaner,
and has error message output when failed on some operations

also add the O_TRUNC flag explicitly for the open function
called in write_file.

And add more test on read_file and write_file functions

Bug: 36726045
Test: manual with hikey
Test: boot and init tests on bullhead
Test: cast with fugu, per b/36726045
Merged-In: If3c30a2fff58cfece2fcd27e69c30382146e6808

Change-Id: If3c30a2fff58cfece2fcd27e69c30382146e6808
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2017-04-04 06:21:29 +00:00
Jin Qian 4882eaba25 storaged: use sp<> to keep refcount for storaged_t object
BatteryListener takes sp<> as parameter. Passing raw storaged_t ptr
to BatteryListener will cause the ptr to be freed when BatteryListener
releases the sp<>. Keep a refcount in storaged to prevent this from
happening.

Test: kill healthd while storaged is running
Bug: 36652060
Change-Id: I96bc45a3bedb39eb7158b8f6c86334b5b31c9346
2017-04-03 23:13:26 -07:00
Bowgo Tsai 9f7cab52ad Merge "fs_mgr: removing fs_mgr_read_fstab_with_dt()" into oc-dev
am: 71de1368c0

Change-Id: Iea43d4703cfa23ce44707959fa5aa92d49117fd6
2017-04-04 05:44:12 +00:00
TreeHugger Robot 71de1368c0 Merge "fs_mgr: removing fs_mgr_read_fstab_with_dt()" into oc-dev 2017-04-04 05:36:53 +00:00
Yongqin Liu 246e3c4c7c init: use read_file and write_file to implement do_copy builtin
this will make the implementation more cleaner,
and has error message output when failed on some operations

also add the O_TRUNC flag explicitly for the open function
called in write_file.

And add more test on read_file and write_file functions

Bug: 36726045
Test: manual with hikey
Test: boot and init tests on bullhead
Test: cast with fugu, per b/36726045

Change-Id: If3c30a2fff58cfece2fcd27e69c30382146e6808
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2017-04-03 21:33:59 -07:00
Martijn Coenen c04403fb6e Merge "Restorecon new vndservice_contexts file." into oc-dev
am: 6c2b3e5fd8

Change-Id: Ida2184388171b5d5febd61cd7d6159c3b958d6a9
2017-04-04 03:51:27 +00:00
Martijn Coenen 6c2b3e5fd8 Merge "Restorecon new vndservice_contexts file." into oc-dev 2017-04-04 03:41:48 +00:00
Josh Gao 1895710d4d debuggerd_test: add test for process/thread names.
am: 845a2f9b4a

Change-Id: I63e70f580f0799c123b0c91fc0b5e2af6906d8b1
2017-04-04 03:24:48 +00:00
Tom Cherry 16d14d73a6 Merge "init: Use std::string for write_file()" am: 815578cef2 am: 5ff631620e
am: 5981eae421

Change-Id: I3259e0cc0af1079efd9d8a267e6aaeb34c74695c
2017-04-04 02:42:58 +00:00
Tom Cherry 5981eae421 Merge "init: Use std::string for write_file()" am: 815578cef2
am: 5ff631620e

Change-Id: I340cd41c89c251d03121079df8457a901228d7b2
2017-04-04 02:38:01 +00:00
Tom Cherry 5ff631620e Merge "init: Use std::string for write_file()"
am: 815578cef2

Change-Id: I58b3804b67967514d04a771da5a39efd9de9d218
2017-04-04 02:34:00 +00:00
Treehugger Robot 815578cef2 Merge "init: Use std::string for write_file()" 2017-04-04 02:21:55 +00:00
Christopher Ferris f447c8eb20 Add overflow checks in Memory objects.
Also change one of the reads to be explicitly ReadField instead of an
overloaded Read function.

Bug: 23762183

Test: Passes new unit tests.
Change-Id: Id848f7b632f67df0c5b7318d9e588942cfd2099a
2017-04-03 18:36:33 -07:00
Elliott Hughes ff5e2fa208 Merge "Show install path in "adb --version" and "fastboot --version"." am: d2d8b68f70 am: 8aac990de2
am: dd05434457

Change-Id: Ibc945b167cc59fa744c4516021b946ab96fa69f3
2017-04-04 01:31:31 +00:00
Josh Gao 4c35139eab Merge "debuggerd_test: add test for process/thread names." am: ca8954f7b8 am: 330b6fd878
am: 5a6f589b3d

Change-Id: Ic643800ae9c3bd806342a6e35d36db913937948e
2017-04-04 01:31:19 +00:00
Elliott Hughes dd05434457 Merge "Show install path in "adb --version" and "fastboot --version"." am: d2d8b68f70
am: 8aac990de2

Change-Id: I03ba9fb1e41537a2e058c3375d0698b9699d955f
2017-04-04 01:27:07 +00:00
Josh Gao 5a6f589b3d Merge "debuggerd_test: add test for process/thread names." am: ca8954f7b8
am: 330b6fd878

Change-Id: I93fbfe223941b9e7bb9f599f857ec38007415359
2017-04-04 01:26:56 +00:00
Elliott Hughes 8aac990de2 Merge "Show install path in "adb --version" and "fastboot --version"."
am: d2d8b68f70

Change-Id: I3fac85f01f08c277bdc4ccc8ebbb22ddb9f3397f
2017-04-04 01:23:40 +00:00
Josh Gao 330b6fd878 Merge "debuggerd_test: add test for process/thread names."
am: ca8954f7b8

Change-Id: I13fe3d3715458c41630adc2a221881dd0a8a9ccb
2017-04-04 01:23:26 +00:00
Elliott Hughes d2d8b68f70 Merge "Show install path in "adb --version" and "fastboot --version"." 2017-04-04 01:16:11 +00:00
Josh Gao 845a2f9b4a debuggerd_test: add test for process/thread names.
Make sure that we can get the process/thread names for nondumpable
processes with capabilities.

Bug: http://b/36237221
Test: /data/nativetest/debuggerd_test/debuggerd_test32
Change-Id: Iedd4eae18065c2e64abeebff15e3b9b09a630550
(cherry picked from commit a5199a9e43)
2017-04-03 18:14:50 -07:00
Josh Gao ca8954f7b8 Merge "debuggerd_test: add test for process/thread names." 2017-04-04 01:14:35 +00:00
Christopher Desjardins def2097993 Merge "Make ueventd error messages indicate where the error is in ueventd script" am: fd72bbe91f am: ec2fb683ff
am: 98900f582b

Change-Id: Ia8efa2fe05da73795e4411d2b16dcaf9813f7b30
2017-04-04 00:04:09 +00:00
Martijn Coenen 62c5b47b9f Add /dev/vndbinder to ueventd.rc
Bug: 36052864
Test: vndservicemanager can access /dev/vndbinder
Change-Id: I208ae91e722185f015fe8f0047c54087be6d21a2
2017-04-03 17:04:02 -07:00
Christopher Desjardins 98900f582b Merge "Make ueventd error messages indicate where the error is in ueventd script" am: fd72bbe91f
am: ec2fb683ff

Change-Id: I48b598b16891aca67372e365ae775a42fd2ce4ba
2017-04-04 00:00:20 +00:00
Keun-young Park 873b5c14e3 Merge "add shutdown animation" into oc-dev
am: 49ab678930

Change-Id: I4d7115924034eb882c78ca83f666021cfdf9e67a
2017-04-03 23:59:55 +00:00
Christopher Desjardins ec2fb683ff Merge "Make ueventd error messages indicate where the error is in ueventd script"
am: fd72bbe91f

Change-Id: I5a6637721475e5cc6cef6e1240b8ce753fc983f5
2017-04-03 23:56:49 +00:00
TreeHugger Robot 49ab678930 Merge "add shutdown animation" into oc-dev 2017-04-03 23:51:41 +00:00
Treehugger Robot fd72bbe91f Merge "Make ueventd error messages indicate where the error is in ueventd script" 2017-04-03 23:50:31 +00:00