Commit graph

24894 commits

Author SHA1 Message Date
Dmitriy Filchenko
ceca7afbc7 Merge "Remove process_name.c" am: e5b7ad1c39 am: 97e3cb7074
am: de9e6fb4b0

Change-Id: I402ab55567532786d61412e7c567e2da5fbc800b
2016-08-19 01:36:31 +00:00
Dmitriy Filchenko
de9e6fb4b0 Merge "Remove process_name.c" am: e5b7ad1c39
am: 97e3cb7074

Change-Id: I8ddeceadedd4ca689d96f3a854ba34f31d16683f
2016-08-19 01:33:31 +00:00
Dmitriy Filchenko
97e3cb7074 Merge "Remove process_name.c"
am: e5b7ad1c39

Change-Id: I8f98f5fe9ff526ed8780971eddef128ed46de271
2016-08-19 01:30:34 +00:00
Treehugger Robot
e5b7ad1c39 Merge "Remove process_name.c" 2016-08-19 01:26:39 +00:00
Dmitriy Filchenko
1bb49f483b Remove process_name.c
BUG: 29824203

Change-Id: I88d67cafb8ec0c4eea3db047bac0671de698ba02
2016-08-18 23:54:46 +00:00
Hung-ying Tyan
1263097328 Merge "Mount /vendor and /odm early" am: 35569e9d68 am: 46bfc918d0
am: d1f49a43fd

Change-Id: I6dc53f60771ad0e660e248efdc1b13734fba3061
2016-08-18 05:10:41 +00:00
Hung-ying Tyan
d1f49a43fd Merge "Mount /vendor and /odm early" am: 35569e9d68
am: 46bfc918d0

Change-Id: Id18c4f3fbfb31dfd15b4fec67cbb959df358f852
2016-08-18 05:07:40 +00:00
Hung-ying Tyan
46bfc918d0 Merge "Mount /vendor and /odm early"
am: 35569e9d68

Change-Id: I9b5360bf3036fa88e770d686ab06b8f4cff80d7c
2016-08-18 05:04:43 +00:00
Treehugger Robot
35569e9d68 Merge "Mount /vendor and /odm early" 2016-08-18 05:01:14 +00:00
Hans Boehm
9bc1ea9666 Merge "Fix reference counting for Assembly" am: 3b6530507b am: 53bfab1f6d
am: 9bbcc891d7

Change-Id: I1ed8d64f56185eec7af0acdaf55912beb331f400
2016-08-18 00:06:22 +00:00
Hans Boehm
9bbcc891d7 Merge "Fix reference counting for Assembly" am: 3b6530507b
am: 53bfab1f6d

Change-Id: I6043b5ded422097f6cc10c7bc4470c43ed4dcd36
2016-08-18 00:03:22 +00:00
Hans Boehm
53bfab1f6d Merge "Fix reference counting for Assembly"
am: 3b6530507b

Change-Id: I4c5b167d34e495a8bd2a373887d0124b8f12c96a
2016-08-18 00:00:23 +00:00
Hans Boehm
3b6530507b Merge "Fix reference counting for Assembly" 2016-08-17 23:56:09 +00:00
Felipe Leme
e965ddd835 Split 'generating' and 'pulling' in 2 messages.
am: 321c21e2df

Change-Id: I0099c4da6f88a9b6804365c81cd28b6b5a9bbdcc
2016-08-17 21:44:01 +00:00
Felipe Leme
3e640afb69 Ignore bugreportz output when it's not supported.
am: b0022b036e

Change-Id: Ifaa590db57ed79cd028237f64b35709a110b22d4
2016-08-17 21:43:58 +00:00
Felipe Leme
ac929349ee Deprecated 'adb bugreport' with flat files.
am: f8d9e4eb00  -s ours

Change-Id: Ifafd463badd39f2a425c2e56b280cd760a22f0b3
2016-08-17 21:43:39 +00:00
Felipe Leme
00a2d7f210 Minor improvements on bugreport generation.
am: 5f6eacaeda  -s ours

Change-Id: I73359b1e29337faf8fe8f3c8ccc2ca85f7f475e2
2016-08-17 21:37:39 +00:00
Felipe Leme
71186a849c Removed extra 'pulling file' message.
am: 33ae849fef  -s ours

Change-Id: I3ad00f7d7350209d0ba50b1084dbfbb8760184f0
2016-08-17 21:26:08 +00:00
Felipe Leme
234cf3ea8b Show bugreport progress.
am: 97b73a0daf  -s ours

Change-Id: Ieebb19470dc463ecc1514d01afc30ea237786fe9
2016-08-17 21:19:38 +00:00
Felipe Leme
25e2cc4dee Refactored functions that copy sdout and stderr to strings to use a callback.
am: d18854218e  -s ours

Change-Id: I03a8d5d2022fb80527e52aa38b9c3146b049394e
2016-08-17 21:12:39 +00:00
Felipe Leme
f18fbdf008 Split bugreport() into its own file and added unit tests.
am: 218e1ff759  -s ours

Change-Id: I2d0d2fcd60a7ceb0617d48a97cfa826c47830017
2016-08-17 20:34:35 +00:00
Andreas Gampe
55894347d0 Merge "Asan.options: Use abort_on_error" into nyc-mr1-dev am: 0c28557e58
am: 993d56dff9

Change-Id: Ibdc979ef60379d5fb86f673b59c7cbb26f37d81d
2016-08-17 19:05:58 +00:00
Andreas Gampe
bdbe675fa1 Asan.options: Use abort_on_error am: 67b7e85b18
am: 4f31cff93b

Change-Id: I8c06aea3ede9f93493aa905ceb0c363e8abc3c1f
2016-08-17 19:05:56 +00:00
Andreas Gampe
993d56dff9 Merge "Asan.options: Use abort_on_error" into nyc-mr1-dev
am: 0c28557e58

Change-Id: Ic35d962ae98bc4d86a7242bfe7665d338a55a337
2016-08-17 18:13:20 +00:00
Andreas Gampe
4f31cff93b Asan.options: Use abort_on_error
am: 67b7e85b18

Change-Id: I0fc6b677f8bec9ce148ee65ab3c6e3f5165496a8
2016-08-17 18:13:19 +00:00
Felipe Leme
321c21e2df Split 'generating' and 'pulling' in 2 messages.
BUG: 30799929
Change-Id: I0af0ad2478c57ffc5b2c953118e01677f788d14a
(cherry picked from commit 9c0be90528)
2016-08-17 10:52:15 -07:00
Felipe Leme
b0022b036e Ignore bugreportz output when it's not supported.
On devices running M or below, calling 'bugreportz -v' writes
'/system/bin/sh: bugreportz: not found' in the stdout output, which must
be redirected to stderr so it's not shown in the flat-file bugreport,
above the bugreport header.

BUG: 30451114

Change-Id: I942c92fdf6ae85e0cde7b9f94b9eb0b1fecad77a
(cherry picked from commit 9a882a3ef3)
2016-08-17 10:52:14 -07:00
Felipe Leme
f8d9e4eb00 Deprecated 'adb bugreport' with flat files.
Starting on Android N, zipped bugreports contain more information than
flat-file, text bugreports. On N, calls to 'adb bugreport' would still
generate a flat-file bugreport, but with a warning.

With this change, 'adb bugreport' will generate a zipped bugreport in
the current directory, using the bugreport name provided by the
device. Similarly, calling 'adb bugreport dir' will generate a bugreport
with a device-provided name, but in such directory.

BUG: 30451114
BUG: 29448020

Change-Id: Ibc8920dd44a5f62feb15bf3fefdcb0bdbf389a90
(cherry picked from commit 307951e124)
2016-08-17 10:52:12 -07:00
Felipe Leme
5f6eacaeda Minor improvements on bugreport generation.
- Skipped artificial 100/100 message, since pulling will take care of
  the final 100% progress.
- Consolidated unsupported lines in just one message.
- Let user know the bugreport can still be recovered when it could not
  be copied to the destination directory.

BUG: 30451114

Change-Id: Icfce9c1e8e7ed407719728b9874679ac40b21eab
(cherry picked from commit 80a65d03c9)
2016-08-17 10:52:10 -07:00
Felipe Leme
33ae849fef Removed extra 'pulling file' message.
Taking a zip bugreport has 2 phases: generating the bugreport and
pulling the file.

Initially adb was printing 2 messages, but since the latter is almost
instantaneously, it could be confusing to have 2 lines...

Fixes: 30451250
Change-Id: I1c6cc6163492c1fb6064667dfdb7aaf6ed4c4c6f
(cherry picked from commit f7c38b4c03)
2016-08-17 10:52:09 -07:00
Felipe Leme
97b73a0daf Show bugreport progress.
adb calls bugreportz to generate a bugreport; initially, bugreportz
would only report the final status of the operation (OK or FAIL), but
now it sends intermediate PROGRESS lines reporting its progress (in the
form of current/max).

Similarly, the initial implementation of 'adb bugreport <zip_file>'
would print an initial 'please wait' message and wait for the full
stdout before parsing the result, but now it uses a new callback class
to handle the stdout as it is generated by bugreportz.

BUG: 28609499

Change-Id: I6644fc39a686279e1635f946a47f3847b547d1c1
(cherry picked from commit cd42d658b2)
2016-08-17 10:52:07 -07:00
Felipe Leme
d18854218e Refactored functions that copy sdout and stderr to strings to use a callback.
BUG: 28609499

Change-Id: I04aea346e18678ea00797f7f659480edba4436c2
(cherry picked from commit 07ac8554b4)
2016-08-17 10:52:06 -07:00
Felipe Leme
218e1ff759 Split bugreport() into its own file and added unit tests.
bugreport() will be soon refactored to track progress, which will
require more comprehensive unit tests.

As such, it's better to move it to its own files, which in turn also
requires moving send_shell_command() and usage() to commandline.h.

Fixes: 30100363
Bug: 30268737

Change-Id: I3cdf114a0b5547293320042ff0749a60886440b0
(cherry picked from commit 78e0963e4b)
2016-08-17 10:51:38 -07:00
Hung-ying Tyan
99c4a8a6b3 Mount /vendor and /odm early
Right now these two partitions are mounted in the fs stage of the init
process. As a result, many vendor/ODM files needed earlier in the boot
process (e.g., init.<hardware>.rc, fstab.<hardware>.rc,
uevent.<hardware>.rc, SELinux policy files etc) can only live on the root
partition.

To prevent vendors/ODMs from polluting the root partition, this patch makes
it possible to mount the vendor and ODM partitions in the first stage of the
init process. The fstab info of both partitions to be mounted early is
composed from new kernel cmdline arguments android.early.prefix and
android.early.fstab.

For example, with:
android.early.prefix=/sys/devices/1010000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/
android.early.fstab=mmcblk0p10+/odm+ext4+ro+verify\nmmcblk0p09+/vendor+ext4+ro+verify

the final fstab string will be:
/sys/devices/1010000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p10 /odm ext4 ro verify
/sys/devices/1010000.msdc0/mmc_host/mmc0/mmc0:0001/block/mmcblk0/mmcblk0p09 /vendor ext4 ro verify

The android.early.prefix is optional. When it is missing, the final fstab
string will be directly converted from android.early.fstab.

This patch also makes sure that the early mounted partitions are dm-verity
enabled so that they are trust worthy to store system files.

BUG=27805372

Change-Id: I3cf32482a5ec65445ba3aedab2164c7ba8f12694
2016-08-17 17:21:35 +08:00
TreeHugger Robot
0c28557e58 Merge "Asan.options: Use abort_on_error" into nyc-mr1-dev 2016-08-17 01:58:53 +00:00
Andreas Gampe
67b7e85b18 Asan.options: Use abort_on_error
Use abort to have debuggerd act and create a tombstone.

Bug: 30775464
Change-Id: I359c7c7c094880b7b55304cd2aa3f4b360b729d8
2016-08-16 15:45:56 -07:00
Hans Boehm
e74dec4a39 Fix reference counting for Assembly
Use correct memory ordering.

Start the reference count at zero instead of one, thus giving us a
chance to actually deallocate something.

Remove remaining (unused) inclusions of cutils/atomic.h from
libpixelflinger.

Bug: 30838047

Change-Id: I3c6fd4a4861b3635cf398ca2aa3e915118100b10
2016-08-16 10:12:43 -07:00
Narayan Kamath
e503729f13 Merge "zip_archive: Improve error message on fallocate failure." am: 704d818ec1 am: 388a65d146
am: 8aa4284b02

Change-Id: Ifed80b273667fc63b074b11f15cf4b380ce635b2
2016-08-16 09:11:33 +00:00
Narayan Kamath
8aa4284b02 Merge "zip_archive: Improve error message on fallocate failure." am: 704d818ec1
am: 388a65d146

Change-Id: I2d76efca553e73cd1149825a446d2518e04086b7
2016-08-16 09:07:03 +00:00
Narayan Kamath
388a65d146 Merge "zip_archive: Improve error message on fallocate failure."
am: 704d818ec1

Change-Id: Ic1ab5e824dcc2b6a78e8ceb29732185ad5da1987
2016-08-16 09:03:04 +00:00
Narayan Kamath
704d818ec1 Merge "zip_archive: Improve error message on fallocate failure." 2016-08-16 08:55:46 +00:00
James Hawkins
8fae5cd4fb Merge "bootstat: Calculate and log the time_since_last_boot metric." into nyc-mr1-dev am: a7c591ffce
am: 0c316548b7

Change-Id: I44d3036f5076c707fef76b62032f217e1cf5a5bc
2016-08-15 23:44:52 +00:00
James Hawkins
fb4ce798f0 bootstat: Calculate and log the time_since_last_boot metric. am: 16e84cc1e1
am: a057682417

Change-Id: Ifa0171dcb93c0d59be64ebd70b47793ba49c60ab
2016-08-15 23:44:51 +00:00
James Hawkins
0c316548b7 Merge "bootstat: Calculate and log the time_since_last_boot metric." into nyc-mr1-dev
am: a7c591ffce

Change-Id: If6f9dc7be91f3bd42b6fa8e53b82dff065662644
2016-08-15 23:40:57 +00:00
James Hawkins
a057682417 bootstat: Calculate and log the time_since_last_boot metric.
am: 16e84cc1e1

Change-Id: I028ac2a110c07ad142d91e6cf820ba18c4978c6c
2016-08-15 23:40:57 +00:00
TreeHugger Robot
a7c591ffce Merge "bootstat: Calculate and log the time_since_last_boot metric." into nyc-mr1-dev 2016-08-15 23:24:45 +00:00
James Hawkins
16e84cc1e1 bootstat: Calculate and log the time_since_last_boot metric.
Bug: 28163811
Change-Id: I2e1350531f6a0fc891c270cfdfca6c8ad63f8040
(cherry picked from commit 2d8b3e66c6)
2016-08-15 14:52:29 -07:00
Josh Gao
17eced300e Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a am: 7ed0995930 -s ours am: 58dd6f7cba -s ours am: 55259f320b am: 9183477cca am: fdb4cd42f6 -s ours am: 0790936473 am: c0e52f145e am: 2b16e16142 am: c8d2050a52 -s ours am: 9008a5cb80
am: ddaee54b49

Change-Id: I00fae9b9092d6a4123715ce450036dd4887da59f
2016-08-15 20:14:55 +00:00
Josh Gao
239cd1d648 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 8d6ca194ee am: 8f7cc0e387 -s ours am: be9d9fc379 -s ours am: 2071bcfa75 -s ours am: 7fe65ab421 am: b92fecf460 am: 48cd7ddd89 -s ours am: dc83f1839b am: 3e59e93c71 am: a44a3ae938 am: 240289e7e9 -s ours am: 2eecaedcb0
am: 70b82ba594

Change-Id: I0058c83e8abb6331b4874a726967d8d808d11242
2016-08-15 20:14:53 +00:00
Josh Gao
31b82265f2 Merge "DO NOT MERGE: debuggerd: verify that traced threads belong to the right process." into klp-dev am: 23effb07ee am: ac3fbb1a4a am: 7ed0995930 -s ours am: 58dd6f7cba -s ours am: 55259f320b am: 9183477cca am: fdb4cd42f6 -s ours am: 0790936473 am: c0e52f145e am: 2b16e16142 am: c8d2050a52 -s ours am: 9008a5cb80 am: 47a1631f2f
am: 4d250159ac

Change-Id: Ie0e42c43ddda02f02c8d4c75ffeaf90901ad8090
2016-08-15 20:13:13 +00:00