Commit Graph

35943 Commits

Author SHA1 Message Date
Josh Gao 46244a6497 Merge changes I2270cc0a,I55e5dc5a
am: 2066e0585e

Change-Id: I72f3a3272bcce4f0e4f24050e5035810be040ec9
2017-08-21 23:41:53 +00:00
Treehugger Robot 2066e0585e Merge changes I2270cc0a,I55e5dc5a
* changes:
  adb: add track-devices-l service.
  adb: allow selection of a specific transport.
2017-08-21 23:34:30 +00:00
Josh Gao b0c1802615 adb: add track-devices-l service.
Add a way to get the full `devices -l` output on a continuous basis.

Test: manual
Change-Id: I2270cc0a0d7e1384ce19631724ddf2462d963ade
2017-08-21 14:15:07 -07:00
Josh Gao b122b17555 adb: allow selection of a specific transport.
Extend device selection to allow selecting a specific transport via
monotonically increasing identifier (visible in devices -l).

This is useful when using multiple devices (like hikey960...) that
have identical bogus serial numbers like 0123456789ABCDEF.

Bug: http://b/37043226
Test: adb -t {1, 2, 9999999} {get-serialno, shell, features}
Change-Id: I55e5dc5a406a4eeee0012e39b52e8cd232e608a6
2017-08-21 14:15:06 -07:00
Josh Gao 3cf521b16e Merge "fastboot: gracefully handle failure to open a USB device on OS X." am: 11be3e54bd am: 9a1e060dc6
am: 4a84cce540

Change-Id: I1ce89755f815cf81833308279b3a69398fe25787
2017-08-21 18:54:31 +00:00
Josh Gao 4a84cce540 Merge "fastboot: gracefully handle failure to open a USB device on OS X." am: 11be3e54bd
am: 9a1e060dc6

Change-Id: I4cef93d371b3327d063a6a16eb6ae7f6a64f740d
2017-08-21 18:47:32 +00:00
Josh Gao 9a1e060dc6 Merge "fastboot: gracefully handle failure to open a USB device on OS X."
am: 11be3e54bd

Change-Id: I366df52af24947a746fee515a8d16ff728a01deb
2017-08-21 18:42:01 +00:00
Treehugger Robot 11be3e54bd Merge "fastboot: gracefully handle failure to open a USB device on OS X." 2017-08-21 18:29:22 +00:00
Andreas Huber 99ca20c708 Merge "Fix use-after-free of stack-allocated temporary string." am: 4bcccdf998 -s ours am: 7ec963f00b -s ours
am: 3cb9fc6b74  -s ours

Change-Id: I477e4e79a369707f6518a0d9793b9881c7622154
2017-08-21 17:51:59 +00:00
Andreas Huber 3cb9fc6b74 Merge "Fix use-after-free of stack-allocated temporary string." am: 4bcccdf998 -s ours
am: 7ec963f00b  -s ours

Change-Id: I7d2e0c1a96db2bd6d93463258486c25d233e6bcd
2017-08-21 17:45:28 +00:00
Andreas Huber dbd2ac1202 Fix use-after-free of stack-allocated temporary string. am: c41b838baa
am: a5efddda90

Change-Id: Ic0871bfae738d3b1854a7543843c0a9cc72c049d
2017-08-21 17:40:57 +00:00
Andreas Huber 7ec963f00b Merge "Fix use-after-free of stack-allocated temporary string."
am: 4bcccdf998  -s ours

Change-Id: I719a6b2af7dae5d5a2dffffc7309f6adfb687456
2017-08-21 17:39:58 +00:00
Andreas Huber a5efddda90 Fix use-after-free of stack-allocated temporary string.
am: c41b838baa

Change-Id: I3eac4b22b885e7991256e5a7df8f37e6b9a10cce
2017-08-21 17:33:56 +00:00
Andreas Huber 4bcccdf998 Merge "Fix use-after-free of stack-allocated temporary string." 2017-08-21 17:31:02 +00:00
Andreas Huber c41b838baa Fix use-after-free of stack-allocated temporary string.
Bug: 64848081
Test: built and successfully booted again
Merged-In: I93c899249bf2cc5ab8d880c0eaff471518e73121

Change-Id: I93c899249bf2cc5ab8d880c0eaff471518e73121
2017-08-21 09:44:56 -07:00
Andreas Huber f5e0464683 Fix use-after-free of stack-allocated temporary string.
Bug: 64848081
Test: built and successfully booted again
Merged-In: I93c899249bf2cc5ab8d880c0eaff471518e73121

Change-Id: I93c899249bf2cc5ab8d880c0eaff471518e73121
2017-08-21 09:05:13 -07:00
Josh Gao 7f0ced6a19 Merge "crash_dump: print the identity of tracers." am: e67c7b94c2 am: 68f92308ec
am: fa31094545

Change-Id: Ibcaca038f3efd97249b66cd7566c30129ec37dcb
2017-08-19 01:30:53 +00:00
Josh Gao fa31094545 Merge "crash_dump: print the identity of tracers." am: e67c7b94c2
am: 68f92308ec

Change-Id: Ib4f54ffe1496cbb5195761846bf1be4361e68b60
2017-08-19 01:27:51 +00:00
Josh Gao f806a3c303 fastboot: gracefully handle failure to open a USB device on OS X.
High Sierra restricts opening some USB devices (e.g. the touchbar)
to processes that have specific entitlements. Ignore devices that we
can't open.

Bug: http://b/64292422
Test: manual
Change-Id: I6074b53a365b8d936610bafea60244f8bba1a33f
2017-08-18 18:25:44 -07:00
Josh Gao 68f92308ec Merge "crash_dump: print the identity of tracers."
am: e67c7b94c2

Change-Id: Ic926e668cee9163a3caadcd6313ff4bc76c2768f
2017-08-19 01:25:21 +00:00
Treehugger Robot e67c7b94c2 Merge "crash_dump: print the identity of tracers." 2017-08-19 01:20:24 +00:00
Josh Gao fd13bf0dcd crash_dump: print the identity of tracers.
Instead of printing a useless "ptrace attach failed: strerror(EPERM)"
message, print the name and pid of a competing tracer when we fail to
attach because a process is already being ptraced.

Bug: http://b/31531918
Test: debuggerd_test32, debuggerd_test64 on aosp_angler
Test: strace -p `pidof surfaceflinger`; debuggerd -b surfaceflinger
Change-Id: Ifd3f80fe03de30ff38c0e0068560a7b12875f29d
2017-08-18 16:16:58 -07:00
Tom Cherry bc4a6c49d9 Merge "init: only set ro.boottime.<service> properties once." am: fe0607575d am: a1a6826c59
am: a82cc92437

Change-Id: Id7cda0d04382c78a3978ceb79e087b37da38cd4a
2017-08-18 20:18:10 +00:00
Tom Cherry a82cc92437 Merge "init: only set ro.boottime.<service> properties once." am: fe0607575d
am: a1a6826c59

Change-Id: I7ed7631167f0d65c2a72efe26a727c18007c1c78
2017-08-18 20:12:10 +00:00
Josh Gao f91a9f98ae Merge "adb: fix deadlock in kick_all_transports." am: c2449e871e am: b43479c764
am: 4fd1f04a82

Change-Id: Iacdf180f5315b5436724433cc65ad6419aebea1e
2017-08-18 20:11:46 +00:00
Tom Cherry a1a6826c59 Merge "init: only set ro.boottime.<service> properties once."
am: fe0607575d

Change-Id: I1ef16e0a09803a4b3681227135ce2f1ec17b6401
2017-08-18 20:05:45 +00:00
Josh Gao 4fd1f04a82 Merge "adb: fix deadlock in kick_all_transports." am: c2449e871e
am: b43479c764

Change-Id: Ic7b0b8bcc877f0a482b82280091f60b2f7ec673c
2017-08-18 20:05:45 +00:00
Tom Cherry a74ad8d256 Merge "ueventd: fix subsystem list logic issues" am: edf03e23bb am: 6698195d64
am: b843ae51a4

Change-Id: I2f4002ba13d747db9ee8713b7bb59caaebd36033
2017-08-18 20:05:44 +00:00
Josh Gao b43479c764 Merge "adb: fix deadlock in kick_all_transports."
am: c2449e871e

Change-Id: I2dd6e22a8ad1d819ed47b54071a394f5b64e1ce7
2017-08-18 20:00:19 +00:00
Tom Cherry b843ae51a4 Merge "ueventd: fix subsystem list logic issues" am: edf03e23bb
am: 6698195d64

Change-Id: I4b8e3285645ee956f313e3904c16825460b350e2
2017-08-18 20:00:14 +00:00
Tom Cherry fe0607575d Merge "init: only set ro.boottime.<service> properties once." 2017-08-18 19:59:29 +00:00
Tom Cherry 6698195d64 Merge "ueventd: fix subsystem list logic issues"
am: edf03e23bb

Change-Id: I4ce43385af2376bc7246f25057dd3d7d76ec5dc8
2017-08-18 19:53:48 +00:00
Treehugger Robot c2449e871e Merge "adb: fix deadlock in kick_all_transports." 2017-08-18 19:50:32 +00:00
Tom Cherry edf03e23bb Merge "ueventd: fix subsystem list logic issues" 2017-08-18 19:47:28 +00:00
Tom Cherry fed3373b5b init: only set ro.boottime.<service> properties once.
Currently, init attempts to set ro.boottime.<service> properties
whenever a service starts, however since these properties are ro. this
means that an error is printed whenever a service is restarted.

Since these properties are intended for reporting boottime, these
subsequent writes during restarts are erroneous and therefore this
change stops attempting to write them, thus silencing the error.

Test: boot bullhead, restart processes, observe no error print
Change-Id: I372f8d5c26590fc0661b92f632410e23e6418841
2017-08-18 10:47:46 -07:00
Tom Cherry 9c8d6dd7de ueventd: fix subsystem list logic issues
1) Check subsystems list before doing usb subsystem logic.  This allows
   developers to handle usb* subsystems in ueventd.rc files.
2) Fix a bug where each subsystem_ instance is not reinitialized, but
   rather only the name_ member was set.

Test: boot bullhead
Test: check that multiple uevent_devname subsystems work when
      specified in ueventd.rc
Change-Id: Ifcac04763afcaf72a3b14ef5f3a6cb89981b51a1
2017-08-18 10:39:48 -07:00
Tom Cherry 18966c55e9 Merge "init: replace panic() with LOG(FATAL)" am: 57a89f3ba0 am: ce2325895f
am: 0ae159a920

Change-Id: Id6f265cd11c133269afc4b4d87370ad14a2fb7a8
2017-08-18 16:09:57 +00:00
Tom Cherry 0ae159a920 Merge "init: replace panic() with LOG(FATAL)" am: 57a89f3ba0
am: ce2325895f

Change-Id: Ia46b3e10ce0280e60c8c8dc289d3c2f01ac472e2
2017-08-18 16:03:57 +00:00
Tom Cherry ce2325895f Merge "init: replace panic() with LOG(FATAL)"
am: 57a89f3ba0

Change-Id: Ib00187f9296ea8afd2bd323a87e290e7424a864e
2017-08-18 15:58:26 +00:00
Tom Cherry 57a89f3ba0 Merge "init: replace panic() with LOG(FATAL)" 2017-08-18 15:49:46 +00:00
Huihong Luo 2f19bbe3e9 Merge "Fix bug #37284906, adb shell crashes on windows with invalid options. For example, "adb.exe shell -list" crashes without this fix. Test: adb.exe shell -list-packages" am: e275043d38 am: 4be54a4622
am: 94574c4f00

Change-Id: I5e2780f291cf533689338e7216e82d2da364057c
2017-08-18 14:53:51 +00:00
Huihong Luo 94574c4f00 Merge "Fix bug #37284906, adb shell crashes on windows with invalid options. For example, "adb.exe shell -list" crashes without this fix. Test: adb.exe shell -list-packages" am: e275043d38
am: 4be54a4622

Change-Id: Ic0d75aae1405badc8021835df498bcdbe0130088
2017-08-18 14:48:21 +00:00
Huihong Luo 4be54a4622 Merge "Fix bug #37284906, adb shell crashes on windows with invalid options. For example, "adb.exe shell -list" crashes without this fix. Test: adb.exe shell -list-packages"
am: e275043d38

Change-Id: Idd5574dc504eaa2b740847c8baed795507b9d180
2017-08-18 14:42:21 +00:00
Huihong Luo e275043d38 Merge "Fix bug #37284906, adb shell crashes on windows with invalid options. For example, "adb.exe shell -list" crashes without this fix. Test: adb.exe shell -list-packages" 2017-08-18 14:35:52 +00:00
Huihong Luo af39885c9f Fix bug #37284906, adb shell crashes on windows with invalid options.
For example, "adb.exe shell -list" crashes without this fix.
Test: adb.exe shell -list-packages

Change-Id: I96be44128ff3ecab7804b70074cbde630b3fc3d1
2017-08-17 22:26:46 -07:00
Tom Cherry 3cbfff1615 Merge "init: fix copy/paste mistake" am: f85404521e am: ad42b33eaa
am: c3398d9e87

Change-Id: Ibafc7fc324cebeeea04f365ee949a2fa9989b37e
2017-08-18 02:20:22 +00:00
Tom Cherry c3398d9e87 Merge "init: fix copy/paste mistake" am: f85404521e
am: ad42b33eaa

Change-Id: I341f0cefac7433737f1c226a39cd3dc818baeed9
2017-08-18 02:07:25 +00:00
Tom Cherry ad42b33eaa Merge "init: fix copy/paste mistake"
am: f85404521e

Change-Id: Id7382a959f5a22e4f4897ad593ea7202aae95c19
2017-08-18 01:55:43 +00:00
Treehugger Robot f85404521e Merge "init: fix copy/paste mistake" 2017-08-18 01:49:40 +00:00
Tom Cherry d8db7ab80d init: replace panic() with LOG(FATAL)
Test: boot bullhead
Test: Introduce LOG(FATAL) at various points of init and ensure that
      it reboots to the bootloader successfully
Test: Introduce LOG(FATAL) during DoReboot() and ensure that it reboots
      instead of recursing infinitely
Test: Ensure that fatal signals reboot to bootloader

Change-Id: I409005b6fab379df2d635e3e33d2df48a1a97df3
2017-08-17 18:16:51 -07:00