Commit Graph

22150 Commits

Author SHA1 Message Date
Damien Bargiacchi 0ee524de68 Update to new minui text API
Change-Id: Ic753564a397b90a9ba54660c78bec9c1a1ef583d
2016-08-18 17:33:32 -07:00
Felipe Leme e6d0cbb46d Merge changes from topic 'bug_30451114' into nyc-mr1-dev
am: aed7048ce0

Change-Id: I31bda3b9df0ad7c56c3a932287eeaf301af3ba13
2016-08-04 14:51:18 +00:00
Felipe Leme 617cedac2f Deprecated 'adb bugreport' with flat files.
am: 307951e124

Change-Id: I909ae170479cba54338b03426bcee123abececc1
2016-08-04 14:51:17 +00:00
Felipe Leme 7939117c98 Minor improvements on bugreport generation.
am: 80a65d03c9

Change-Id: I5b6036489d1d5094a6e1632a4580b23578d85983
2016-08-04 14:50:53 +00:00
TreeHugger Robot aed7048ce0 Merge changes from topic 'bug_30451114' into nyc-mr1-dev
* changes:
  Deprecated 'adb bugreport' with flat files.
  Minor improvements on bugreport generation.
2016-08-04 14:44:35 +00:00
Josh Gao fbf72d2b00 adb: fix stat on Windows.
am: 29e7e3edb1

Change-Id: If4e69a43806625956152d3f8fd0358d29f2352e1
2016-08-04 00:23:04 +00:00
Josh Gao e1dfdec612 adb: extract Windows bits out of directory_exists test.
am: 89b9767776

Change-Id: I395e8e9a0522b14489922dca34dd733816b56952
2016-08-04 00:23:01 +00:00
Josh Gao 29e7e3edb1 adb: fix stat on Windows.
stat on Windows fails with ENOENT when passed a path with a trailing
slash or backslash, regardless of whether the target is actually a
directory. Emulate the correct POSIX behavior by stripping trailing
path separators and then checking if the target is a directory if
successful.

Bug: http://b/30481559
Bug: https://code.google.com/p/android/issues/detail?id=214633
Change-Id: I1d398d19a9bce1ecb3fdc4aabc31aa98c82c3f93
Test: Relevant adb_tests pass on Linux and Windows 10.
(cherry picked from commit f551ea0f63)
2016-08-03 15:14:59 -07:00
Josh Gao 89b9767776 adb: extract Windows bits out of directory_exists test.
Bug: http://b/30481559
Bug: https://code.google.com/p/android/issues/detail?id=214633
Change-Id: I8f20b3cd5aef6a77c2b4f194b914b4295397d73f
(cherry picked from commit 3bdc76025b)
2016-08-03 15:14:59 -07:00
Ruchi Kandoi 366513fc3f logd: logcat -L takes longer causing vold to timeout.
am: 90a3f81c9e

Change-Id: I9a6a17a8d817f19305c137f11bd400ea24214b7f
2016-08-03 22:11:53 +00:00
Ruchi Kandoi 90a3f81c9e logd: logcat -L takes longer causing vold to timeout.
Temporary fix to prevent device from getting stuck at boot.

Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Bug: 28788401
Bug: 30041146
Bug: 30612424
Bug: 30630936
Change-Id: Ie4246fc3c9eb7a3af2cb909546811c85997515da
2016-08-03 20:27:02 +00:00
Felipe Leme 307951e124 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
2016-08-01 15:28:12 -07:00
Felipe Leme 80a65d03c9 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
2016-08-01 13:31:57 -07:00
James Hawkins 09b26cc3f0 bootstat: Fix a potential unhandled exception for malformed input.
am: f85554e12f

Change-Id: Ieef7d6a359370c16e2473b9fe0251ba133cdda71
2016-07-29 17:04:10 +00:00
James Hawkins f85554e12f bootstat: Fix a potential unhandled exception for malformed input.
In rare cases the hardware storage on the device may be hosed and return
garbage.  Use ParseInt which handles bad input instead of stoi.

BUG: 29334139
Change-Id: I91aedc169df110bea8097775f73dda11def22311
(cherry picked from commit 4dded613b3)
2016-07-29 08:24:28 -07:00
Felipe Leme 0c8f0e83ed Merge \"Improved keychord logging.\" into nyc-mr1-dev
am: a6cb3062ff

Change-Id: I3ec9c843f635e0349bad5b7db1d90dc97f88e6d8
2016-07-29 01:39:06 +00:00
Felipe Leme 4acdde9ef0 Improved keychord logging.
am: c64c982e72

Change-Id: I1084757b245b97845d213005ec8a41faea324bf0
2016-07-29 01:39:05 +00:00
TreeHugger Robot a6cb3062ff Merge "Improved keychord logging." into nyc-mr1-dev 2016-07-29 01:07:09 +00:00
Felipe Leme c64c982e72 Improved keychord logging.
Often a bugreport is accidentally triggered by the combo keys, but there
is nothing in the bugreport to confirm that action because init's
klog level is KLOG_NOTICE_LEVEL.

This change change keychord's INFO messages to NOTICE, and also logs the
case where a service was not launched because ADB was disabled.

BUG: 30440213
BUG: 30345559

Change-Id: I6ccadef1621cb41dcd15e7c1660366f0e147dc7a
2016-07-28 14:11:32 -07:00
Felipe Leme c25802879d Removed extra \'pulling file\' message.
am: f7c38b4c03

Change-Id: Ibd39af1d984e43cca033c62a6e18ad31eca4efa4
2016-07-28 20:54:26 +00:00
Felipe Leme f7c38b4c03 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
2016-07-28 12:13:57 -07:00
Felipe Leme cd42d658b2 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
2016-07-26 16:15:16 -07:00
Felipe Leme 07ac8554b4 Refactored functions that copy sdout and stderr to strings to use a callback.
BUG: 28609499

Change-Id: I04aea346e18678ea00797f7f659480edba4436c2
2016-07-26 16:14:46 -07:00
Felipe Leme 78e0963e4b 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
2016-07-26 16:14:20 -07:00
Mark Salyzyn d211558788 Merge "logd: klogd: deal with htc modified printk" into nyc-mr1-dev 2016-07-21 18:09:10 +00:00
Fyodor Kupolov 1faf57bf0b Merge "Fix permissions for /data/preloads" into nyc-mr1-dev 2016-07-21 16:54:13 +00:00
Thierry Strudel 56efe020b7 Merge changes from topic 'enable_persist_kernel_log' into nyc-mr1-dev
* changes:
  logcatd: trampoline persist.logd.logpersistd to logd.logpersistd
  logcatd: add stop and clear actions
  logcatd: Do not su for setprop
  logcat: allow comma-separate list of buffers
  logcat: clear when specifying file output
  logcat: Adjust help to make it more meaningful
2016-07-21 04:07:25 +00:00
Fyodor Kupolov 13639b46d0 Fix permissions for /data/preloads
Default permission bits are 771. It causes permission denied errors when
MediaProvider tries to scan /data/preloads. We have to allow read for others.

Bug: 29940807
Change-Id: I45645cf1154501ccb64bef08b9ad7bf7709dfd8e
2016-07-20 17:25:12 -07:00
Josh Gao 087ea18caa DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb am: cb4d905c96 -s ours am: e467cced5c am: 174579d6ef am: a3a674ea10 am: ff716c73ea -s ours
am: 77374d698d

Change-Id: I9cdd6842033e57837a6466e8669aaa75f22af53e
2016-07-19 20:55:47 +00:00
Josh Gao 43250c10e8 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e am: 6cb199bf4a -s ours am: 851f840835 am: be484f3f7b am: 1e1eae1992 am: 71908ef2f8 -s ours
am: be2e5ea5a9

Change-Id: I9916a033d3fa29d340ef75e5a7c866415e4ce517
2016-07-19 20:55:47 +00:00
Josh Gao 77374d698d DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb am: cb4d905c96 -s ours am: e467cced5c am: 174579d6ef am: a3a674ea10
am: ff716c73ea  -s ours

Change-Id: I50b3147d6d31c1b8fec7ae4601f72ab9ce71327b
2016-07-19 20:53:21 +00:00
Josh Gao be2e5ea5a9 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e am: 6cb199bf4a -s ours am: 851f840835 am: be484f3f7b am: 1e1eae1992
am: 71908ef2f8  -s ours

Change-Id: I0dda3544e9c6c44b61cd088e1423d42af35ad0e0
2016-07-19 20:53:20 +00:00
Josh Gao ff716c73ea DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb am: cb4d905c96 -s ours am: e467cced5c am: 174579d6ef
am: a3a674ea10

Change-Id: I95414ed03014463d684b64c06b74a2a8616faaa2
2016-07-19 20:50:16 +00:00
Josh Gao 71908ef2f8 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e am: 6cb199bf4a -s ours am: 851f840835 am: be484f3f7b
am: 1e1eae1992

Change-Id: I2bd7a6994c5d426402ee9d3e2adcc16f603b7c62
2016-07-19 20:50:16 +00:00
Josh Gao a3a674ea10 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb am: cb4d905c96 -s ours am: e467cced5c
am: 174579d6ef

Change-Id: Ie3efaa41bacc640286a3aa6cfe353b16c707f15f
2016-07-19 20:47:10 +00:00
Josh Gao 7500016d8f Merge \\\\\"DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.\\\\\" into mnc-dev am: 73922b82ee am: 8a9e4369f6 am: ba143fd959 am: b1471215a8 -s ours
am: e11ffee38c

Change-Id: Id1459e5c49d640dfbc826e32e1081480353d31f7
2016-07-19 20:44:26 +00:00
Josh Gao 174579d6ef DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb am: cb4d905c96 -s ours
am: e467cced5c

Change-Id: Id5534fddb6ca8c237fbcfd310a6843f03c12a3d3
2016-07-19 20:44:11 +00:00
Josh Gao 1e1eae1992 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e am: 6cb199bf4a -s ours am: 851f840835
am: be484f3f7b

Change-Id: I1c9a4f7cdec227e78910678f05e6232a60f05bb1
2016-07-19 20:43:26 +00:00
Josh Gao e467cced5c DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644 am: 5920345eeb
am: cb4d905c96  -s ours

Change-Id: Ia99e7055a24da12133e48e03b466fe09ebcb811f
2016-07-19 20:42:28 +00:00
Josh Gao e11ffee38c Merge \\\\"DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.\\\\" into mnc-dev am: 73922b82ee am: 8a9e4369f6 am: ba143fd959
am: b1471215a8  -s ours

Change-Id: I6932c59185c0e31e6db27431609a47049caa6dc8
2016-07-19 20:42:12 +00:00
Josh Gao be484f3f7b DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e am: 6cb199bf4a -s ours
am: 851f840835

Change-Id: I4edf38e6bbee8745241329816647d730addc23ea
2016-07-19 20:40:05 +00:00
Josh Gao cb4d905c96 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours am: b9b6ec3644
am: 5920345eeb

Change-Id: I06ba81a4abd04402ef250efebd333b878496cdab
2016-07-19 20:38:46 +00:00
Josh Gao b1471215a8 Merge \\\"DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.\\\" into mnc-dev am: 73922b82ee am: 8a9e4369f6
am: ba143fd959

Change-Id: I7968a0d6d374c140c0b40a866d597dc6ca9ade25
2016-07-19 20:38:43 +00:00
Josh Gao 851f840835 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367 am: 9048b3bb8e
am: 6cb199bf4a  -s ours

Change-Id: I26ed6fa730d66419319a5832b7f011cd15601e03
2016-07-19 20:36:38 +00:00
Josh Gao ba143fd959 Merge \\"DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.\\" into mnc-dev am: 73922b82ee
am: 8a9e4369f6

Change-Id: I7aa9984853f5114aea36d51ea2903b729b60d5e8
2016-07-19 20:35:39 +00:00
Josh Gao 5920345eeb DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 0528829b73 -s ours
am: b9b6ec3644

Change-Id: Iaf40759e124c4a01a9a3d21021939729a73c48e9
2016-07-19 20:35:39 +00:00
Josh Gao 1a0d789268 Merge \"debuggerd: verify that traced threads belong to the right process.\" into nyc-dev
am: d3d04f4d72

Change-Id: Ibe7073dfbb8f35acaf494fca82ac6a855a34c704
2016-07-19 20:34:17 +00:00
Josh Gao 8a9e4369f6 Merge \"DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.\" into mnc-dev
am: 73922b82ee

Change-Id: I36abe7ac6a52b561cfed8dfa689216b166f4df43
2016-07-19 20:34:12 +00:00
Josh Gao 6cb199bf4a DO NOT MERGE: debuggerd: verify that traced threads belong to the right process. am: 36dd144367
am: 9048b3bb8e

Change-Id: I2223884e41d15dabf94df861e28f9392b82678af
2016-07-19 20:33:40 +00:00
Josh Gao b9b6ec3644 DO NOT MERGE: debuggerd: verify that traced threads belong to the right process.
am: 0528829b73  -s ours

Change-Id: I1644cca9d9631f291a3e80b6813e9cc33a8d5833
2016-07-19 20:32:42 +00:00