Commit Graph

20430 Commits

Author SHA1 Message Date
Treehugger Robot 90db709a2f Merge "Remove MTD cruft from init." 2016-06-25 02:20:39 +00:00
Elliott Hughes 3195116e97 Remove MTD cruft from init.
Bug: http://b/29250988
Change-Id: I38ab263192944e4ff291fd91b25db163a8848d75
2016-06-24 18:26:30 -07:00
Treehugger Robot aa9f37185f Merge "Remove more obsolete MTD stuff." 2016-06-24 17:19:48 +00:00
Elliott Hughes 01e5a6c971 Remove more obsolete MTD stuff.
Bug: http://b/29250988
Change-Id: Ic2d0514fcdbe26526e87bc681b71efcc90eda678
Test: still builds.
2016-06-24 09:13:51 -07:00
Hung-ying Tyan 66277db8d0 Merge "Add -f to insmod" 2016-06-24 04:34:56 +00:00
Hung-ying Tyan bfa6d75c60 Add -f to insmod
When the flag is on, insmod will bypass vermagic and symbol version
checking in the kernel. This is to make it possible to update kernel
without recompiling kernel modules.

BUG=28803994

Change-Id: Ib4be6999ef52baefd4210ee0d242360e43318907
2016-06-24 11:10:46 +08:00
Treehugger Robot 71d11ade9d Merge "adb: refactor jdwp_service.cpp." 2016-06-23 23:28:25 +00:00
Treehugger Robot a355dd6110 Merge "adb: add test for SIGHUP behavior." 2016-06-23 23:09:06 +00:00
Josh Gao fe50bb713b adb: add test for SIGHUP behavior.
This keeps regressing, so add a test to keep this from happening.

Bug: http://b/23603716
Bug: http://b/25965770
Bug: http://b/29565233
Test: Ran test with/without commit cd5d737, fails before, passes after
Change-Id: I8c431e10fc76da5a9fd404dd70f17bb8a8df24e6
2016-06-23 15:01:50 -07:00
Treehugger Robot 0b47d08303 Merge changes Ia59c6dbe,I13b17bcd
* changes:
  adb: fix fd leak when shell fails to create a thread.
  adb: don't dup local socket fd.
2016-06-23 21:22:54 +00:00
Josh Gao e31a7a4ce4 adb: fix fd leak when shell fails to create a thread.
Bug: http://b/29565233
Change-Id: Ia59c6dbe5ac033425c11739579e85cbcad1170d1
2016-06-23 13:14:49 -07:00
Josh Gao cd5d7376dc adb: don't dup local socket fd.
SIGHUP handling depends on the local socket fd being fully closed in
order to trigger an event on its counterpart. Release the local socket
fd inside of Subprocess when returning it to ensure this.

Functionally, a cherry-pick of internal commit 42afe20.

Bug: http://b/29565233
Change-Id: I13b17bcddf0b396a5f4880f9e410fbbf24d9370d
2016-06-22 19:09:42 -07:00
Treehugger Robot 495541c5bb Merge "Fix misc-macro-parentheses warnings in system/core." 2016-06-22 22:35:02 +00:00
Treehugger Robot cfdd57eed8 Merge "Lose log to toybox." 2016-06-22 21:35:50 +00:00
Chih-Hung Hsieh cdb2ca5d9f Fix misc-macro-parentheses warnings in system/core.
Add parentheses around macro arguments used beside operators.
Bug: 28705665

Change-Id: I9226f319e283be640eddc31687f75b51a8ef0ac6
2016-06-22 14:33:13 -07:00
Elliott Hughes cf75c1bf14 Lose log to toybox.
Change-Id: I42d792e79ed51fcc3c89f77d039d39417ead03c3
2016-06-22 12:33:33 -07:00
Treehugger Robot 3fb358478f Merge "Add support to indicate bitness of public library." 2016-06-22 19:26:51 +00:00
Christopher Ferris 39da84b06c Add support to indicate bitness of public library.
For public vendor libraries, a vendor might have only a 32 bit
or only a 64 bit version of the library. Add a way to indicate this
in the public.libraries.txt files. The new format is:

  library.so 32

This indicates that this is a 32 bit only public library.

  library.so 64

This indicates that this is a 64 bit only public library.

Bug: 29370721
Bug: 29512261
(cherry picked from commit 6664a805ca)

Change-Id: Id52c8b61d5c802ce62edda7e25f2755f6f93d6b7
2016-06-22 11:21:21 -07:00
Treehugger Robot 57bbedc036 Merge "Address old review comments in adb_auth_host.cpp." 2016-06-22 17:09:26 +00:00
Elliott Hughes 625faf0196 Address old review comments in adb_auth_host.cpp.
Comments from:
https://android-review.googlesource.com/#/c/212781/4/adb/adb_auth_host.cpp@107

Bug: http://b/28152031
Change-Id: I27d062f3eeb8db90f94b1b4f5d7204000a7ac73d
Test: manually removed ~/.android/adb* and checked they were recreated correctly.
2016-06-22 08:38:47 -07:00
Elliott Hughes 55d20a7632 Merge "Add timestamps to libbase's stderr logging." 2016-06-22 15:27:51 +00:00
David Turner ed5fd6fd5c Merge "Remove qemu_tracing dependency." 2016-06-22 08:10:07 +00:00
Elliott Hughes 4e5fd111d8 Add timestamps to libbase's stderr logging.
adb is the client that wants this, but I'm not aware of any client that
doesn't.

Bug: http://b/28467098
Test: tested manually with cat.
Change-Id: I82c3f7ddf466a67aedfbb9010e0939a44b71d3e5
2016-06-21 14:27:16 -07:00
David 'Digit' Turner ecc1972fb0 Remove qemu_tracing dependency.
The feature is not implemented anymore (and has been for a very long time).
Moreover, this will allow us to cleanup hardware/ from any QEMU-specific
items.

BUG=25875346

Change-Id: I71488f4128c737dedf2b28433499fa6ffd29dcb5
2016-06-21 20:24:55 +02:00
David Turner 44b7339aa2 Merge "[qemu]: Move qemu_pipe.h from include/system/ directory." 2016-06-21 07:38:02 +00:00
Treehugger Robot e0dfd2a00e Merge "Use __ with attribute __noreturn__ to avoid colliding with noreturn." 2016-06-21 01:52:04 +00:00
Elliott Hughes 665051ca63 Use __ with attribute __noreturn__ to avoid colliding with noreturn.
Change-Id: I5a73ec69b580b2e70b2c68177078fa56b8353c19
2016-06-20 17:21:59 -07:00
Treehugger Robot abf88685e3 Merge changes from topic 'debuggerd_client'
* changes:
  adb: use libdebuggerd_client.
  debuggerd: add libdebuggerd_client.
2016-06-20 20:22:18 +00:00
Treehugger Robot b23e5729a8 Merge "adb: fix fd double close, Subprocess lifetime issue." 2016-06-20 20:15:59 +00:00
Treehugger Robot a617e336dc Merge "batterymonitor: simplify readFromFile and use std::string buffers" 2016-06-20 19:31:12 +00:00
Josh Gao 344778da41 adb: fix fd double close, Subprocess lifetime issue.
This commit fixes two somewhat related issues in shell_service.

  - The fd returned by StartSubprocess is owned by a unique_fd
    contained in the Subprocess object, but also gets closed by the
    caller. Resolve this by duping the returned file descriptor.

  - A Subprocess object can be destroyed immediately after its initial
    construction in StartSubprocess if we're sufficiently unlucky.
    Split up the fork/exec and "start management thread" steps, so that
    we can safely do everything we need to do on the Subprocess before
    handing it over to the thread that'll eventually destroy it.

Bug: http://b/29254462
Change-Id: Id9cf0b7e7a7293bee7176919edc758597691c636
2016-06-20 11:40:16 -07:00
Michael Scott 3217c5c7d9 batterymonitor: simplify readFromFile and use std::string buffers
In readFromFile() when a newline is not found in the data, we reset
the initial character of the buffer to \0, but leave the count as is
(something >0 in this case).

Later in getBooleanField() we could erroneously treat a response as
"true" because count would be >0 and the initial value of buf would
be != '0' (set to \0 in this case).

To fixup error paths such as this, we can simplify readFromFile
by using android::base functions: ReadFromFileString() and Trim().

NOTES:
- Converted char * buffers used with readFromFile to std::string
- Removed unused variable btech from BatteryMonitor::update

Testing Done:
- Build healthd and recovery for angler device
- Confirm that known values are being read correctly from kernel
  sysfs.

Change-Id: I238bbff097543767f352aa084bf0acbc1324baca
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2016-06-20 15:01:02 +00:00
Christopher Ferris 863d8e11b9 Merge "Fix race condition updating local map data." 2016-06-17 23:57:14 +00:00
Josh Gao 809607ae28 adb: use libdebuggerd_client.
Bug: http://b/24414818
Change-Id: I177708877488e5c4f99c453498485a2daa9b79b0
2016-06-17 13:11:29 -07:00
Josh Gao 9c02dc5916 debuggerd: add libdebuggerd_client.
Bug: http://b/24414818
Change-Id: I079c534d2c952b6975bf0428eb86cc7a55525737
2016-06-17 13:11:29 -07:00
David 'Digit' Turner c7b098ceb5 [qemu]: Move qemu_pipe.h from include/system/ directory.
The <hardware/qemu_pipe.h> header isn't related to any loadable
hardware module, this patch thus relocates it to <system/qemu_pipe.h>
which is a much more logical location.

Note the following changes:

  - The pipe name must begin with the 'pipe:' prefix to avoid an
    un-necessary snprintf() and buffer copy.

  - Does not probe for the obsolete /dev/goldfish_pipe device, i.e.
    only use /dev/qemu_pipe instead.

  - Use QEMU_PIPE_DEBUG() instead of D() as the debugging macro.

+ Update ADB to use the newest <system/qemu_pipe.h>

+ Add qemu_pipe_frame_send() and qemu_pipe_frame_recv() utility
  functions which replace the obsolete qemud_channel_send() and
  qemud_channel_recv() from the defunct <hardware/qemud.h>
  header.

BUG=25875346

Change-Id: Ic290a5b79d466c2af64b49bd9134643277c11bfd
2016-06-17 09:21:59 +02:00
Christopher Ferris 3a14004c7f Fix race condition updating local map data.
If the underlying local map changes, it's possible for multiple
threads to try and modify the map data associated with the UnwindLocalMap
object. Add a lock when generating the local map to avoid this problem.

In addition, add a read lock whenever any caller gets the maps iterator.
Updated all iterator callers to make this lock.

Bug: 29387050
Change-Id: Ie34822c3d8fd3bdb3dd126aeeb399969c36508c1
2016-06-16 23:28:11 -07:00
Treehugger Robot 2d690a920f Merge "init: report createProcessGroup failure." 2016-06-17 04:12:17 +00:00
Treehugger Robot 81e59ca5a7 Merge "adb: make adb root not wait-for-device." 2016-06-16 22:26:41 +00:00
Josh Gao 05824734ac adb: make adb root not wait-for-device.
`adb root` would hang for devices connected over TCP/IP, because they
never come back. Unfortunately, there doesn't seem to be an easy way to
find out what we're talking to, so replace it with a long sleep for now.

Bug: http://b/27836058
Change-Id: Icd6e6bf817ca9e2124c2961665c37b2f31f7ef29
2016-06-16 14:02:01 -07:00
Vitalii Tomkiv 92774329dd Merge "Set zygote process priority to -20 to speed up VM startup time." 2016-06-16 16:54:43 +00:00
Treehugger Robot edd401e24e Merge "Better diagnostics from "adb sideload"." 2016-06-15 23:18:52 +00:00
Treehugger Robot 35151f49ca Merge "Minor adb style fixes." 2016-06-15 22:41:57 +00:00
Elliott Hughes 14415142c9 Better diagnostics from "adb sideload".
Well, slightly less bad diagnostics, anyway.

Change-Id: Idf5612f7dcb9bdbd7252163889e2612ba197426d
2016-06-15 15:09:47 -07:00
Elliott Hughes ad8e94e017 init: report createProcessGroup failure.
Also directly kill the initial pid for safety, like other libprocessgroup
users.

Change-Id: Ib28936aea19cceaeaa54734759d5ae0c252c7905
2016-06-15 14:49:57 -07:00
Elliott Hughes ffc73a39fd Minor adb style fixes.
Change-Id: Ic4b45828dfdf88ef6c0fc468f66df3e62d2fbe51
2016-06-15 14:46:56 -07:00
Tao Bao 4d34653720 Merge "fs_mgr: Track the bootloader_message struct change." 2016-06-14 16:09:16 +00:00
Elliott Hughes 0f5b6c160c Merge "Lose top to toybox." 2016-06-14 15:45:50 +00:00
Elliott Hughes 4558428ae8 Lose top to toybox.
Change-Id: I625fad2c45a02bbc39125a4a10def8d74dd32cf7
2016-06-13 18:54:01 -07:00
Elliott Hughes 62cc17de8c Merge "Fix the sense of a test in "adb sideload"." 2016-06-13 23:21:29 +00:00