Commit graph

17259 commits

Author SHA1 Message Date
Adam Lesinski
6f8885bc14 Implement C++11 move semantics for android::FileMap
FileMaps should be movable, thereby not requiring them to be only used
with a unique_ptr as they currently are.

Change-Id: I0fb8013bf398a2ced5420d85ba888c2a7fc5a496
2015-10-01 12:47:49 -07:00
Jorge Lucangeli Obes
0c4ad786f5 am 17cd2c49: Merge "Remove \'seclabel\' option."
* commit '17cd2c49c9234758b76cb7e43d0bd12496ef31fb':
  Remove 'seclabel' option.
2015-10-01 18:58:12 +00:00
Yabin Cui
fb070f3c2b am 7377398b: Merge "adb: fdevent fixes"
* commit '7377398be81a9a8a4256b4c11e7ed25b059c32bb':
  adb: fdevent fixes
2015-10-01 18:57:59 +00:00
Sergio Giro
bdae9bf2ec resolved conflicts for 70808827 to stage-aosp-master
Change-Id: I2de8a63fa5be5423846df4c2e8ccc5f12e843f09
2015-10-01 19:49:22 +01:00
Jorge Lucangeli Obes
17cd2c49c9 Merge "Remove 'seclabel' option." 2015-10-01 18:37:15 +00:00
Jorge Lucangeli Obes
fcbd11f42e Remove 'seclabel' option.
The executable is already labelled in the filesystem.

Bug: 24571067
Change-Id: I2bef76628b08bec299fea4da8a58fe0eb53b1e59
2015-10-01 11:31:10 -07:00
Yabin Cui
7377398be8 Merge "adb: fdevent fixes" 2015-10-01 18:05:52 +00:00
Sergio Giro
70808827a4 Merge "system/core: remove BasicHashtable" 2015-10-01 17:24:01 +00:00
Steve Fung
3f43729a36 am 7c262abe: Merge "crash_reporter: Set Version and Product ID"
* commit '7c262abeac08483d039da29b4dec3ed02abe12bf':
  crash_reporter: Set Version and Product ID
2015-10-01 17:17:03 +00:00
Steve Fung
7c262abeac Merge "crash_reporter: Set Version and Product ID" 2015-10-01 17:11:55 +00:00
Sergio Giro
f84a4906fa system/core: remove BasicHashtable
Towards deprecation of SharedBuffer

Change-Id: Id6d1c8637583df38b6f28398b6804d9c1e96472a
2015-10-01 11:44:47 +01:00
Stephen Hines
cabf610da0 am d29f10cd: Merge "Fix build break due to unknown pragma (on gcc)."
* commit 'd29f10cd271324a70f970bec4379cce880a621b5':
  Fix build break due to unknown pragma (on gcc).
2015-10-01 06:42:30 +00:00
Stephen Hines
d29f10cd27 Merge "Fix build break due to unknown pragma (on gcc)." 2015-10-01 06:37:50 +00:00
Stephen Hines
9466bb2ab6 Fix build break due to unknown pragma (on gcc).
Change-Id: I36bf855769b243139fd45186ac53578448b87a2b
2015-09-30 23:30:38 -07:00
Spencer Low
888a748bf2 adb: fdevent fixes
* fdevent_{set,add,del}()

  * CHECK() that the fdevent is FDE_ACTIVE, otherwise the caller would
    be waiting for events that will never arrive.

  * Remove ~ from "fde->events &= ~events" to keep desired bits instead
    of turning off desired bits.

* fdevent_call_fdfunc()

  * CHECK(FDE_PENDING) since it should always be true if the fdevent was
    on the pending list, or if fdevent_subproc_event_func() is faking
    things. The goal is to try to avoid losing events.

Change-Id: I979c2fffa0b3d6b635488cde11dc544691193018
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-30 23:29:25 -07:00
Stephen Hines
f141312c82 am dc91dafa: Merge "Ignore explicit infinite recursion."
* commit 'dc91dafa3b614b399074a1506ba1684c89ae4eae':
  Ignore explicit infinite recursion.
2015-10-01 05:41:54 +00:00
Stephen Hines
dc91dafa3b Merge "Ignore explicit infinite recursion." 2015-10-01 05:36:40 +00:00
Yabin Cui
4b3ee2666c am ffa866f5: Merge "adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux."
* commit 'ffa866f5caefb13412f1814d0de06cda385feaa4':
  adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux.
2015-10-01 00:10:00 +00:00
Yabin Cui
ffa866f5ca Merge "adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux." 2015-10-01 00:03:50 +00:00
Steve Fung
4818011085 crash_reporter: Set Version and Product ID
Read in the ro.build.id property for version, and
ro.product.product_id for the Product ID.

Bug: 22874192
Change-Id: I9a3fbf375d49d04fc7bf6700c5987cb9e435c318
2015-09-30 16:49:15 -07:00
David Pursell
de3faec64d am fd18d9e2: Merge "adb: put legacy shell: service back in."
* commit 'fd18d9e254874557aa44d42bd6d6bdf4352b0e36':
  adb: put legacy shell: service back in.
2015-09-30 23:44:31 +00:00
David Pursell
fd18d9e254 Merge "adb: put legacy shell: service back in." 2015-09-30 23:15:25 +00:00
David Pursell
70ef7b40f9 adb: put legacy shell: service back in.
ddmlib does not use the ADB client, but instead connects directly to
the adb server. This breaks some of the assumptions I previously made
when enabling the shell protocol.

To fix this, the adb server now defaults to no protocol for the
standalone command, and the shell protocol must be explicitly requested
by the client. For example:
  shell:echo foo     -- no shell protocol
  shell,v2:echo foo  -- shell protocol

As long as I was touching the shell service arguments I also changed
them to no longer duplicate the command-line arguments. This allows
more flexibility to change the adb client CLI if necessary and makes
the code more readable.

Bug: http://b/24148636
Change-Id: I28d5ae578cf18cbe79347dc89cea1750ff4571a8
2015-09-30 15:40:09 -07:00
Yabin Cui
aa77e22d73 adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux.
It is possible that the adb server on host has many sockets in
CLOSE_WAIT state. To prevent socket leak, always enable POLLRDHUP
in fdevent.cpp to detect sockets in CLOSE_WAIT state.

Update LocalSocketTest unit tests:
Change half_close_with_packet to read_from_closing_socket, as reading
from a SHUT_WR socket is not needed in adb.
Change close_with_no_events_installed to close_socket_in_CLOSE_WAIT_state,
as the latter is more close to the real situation in use.

Bug: 23314034

Change-Id: Ice4f4036624e5584eab6ba5848e7f169c92f037f
2015-09-30 15:03:26 -07:00
Mark Salyzyn
351c211cc1 am 447356dd: Merge "liblog: logcat: Add year and zone to date on each line"
* commit '447356ddb4a18cc5899009fcdc450675ab9974bf':
  liblog: logcat: Add year and zone to date on each line
2015-09-30 20:04:54 +00:00
Mark Salyzyn
900362c36e am 1b2fb587: Merge changes I42162365,Ia72f1305,I57d1f86c,I026d074e
* commit '1b2fb587eb7db6f9de1dda8663b33d87a2f5a27e':
  logd: klogd deal with nuls in dmesg
  logd: log_strtok_r deal with nuls
  liblog: logprint: printable nul
  logd: klogd: sniff for time correction on Mediatek
2015-09-30 20:04:53 +00:00
Sami Tolvanen
049399e570 am ad2a5a89: Merge "fs_mgr: trigger dm-verity error handling for invalid signatures"
* commit 'ad2a5a89a680804b927fc123e952c5bb5e75b9c8':
  fs_mgr: trigger dm-verity error handling for invalid signatures
2015-09-30 20:04:51 +00:00
Sergio Giro
b5a00d6b2e am e0453334: Merge "system/core: remove methods returning SharedBuffer in String8, String16"
* commit 'e045333445ab3ebb8d602d25ed750169f135baa6':
  system/core: remove methods returning SharedBuffer in String8, String16
2015-09-30 20:04:50 +00:00
Mark Salyzyn
447356ddb4 Merge "liblog: logcat: Add year and zone to date on each line" 2015-09-30 18:56:48 +00:00
Mark Salyzyn
1b2fb587eb Merge changes I42162365,Ia72f1305,I57d1f86c,I026d074e
* changes:
  logd: klogd deal with nuls in dmesg
  logd: log_strtok_r deal with nuls
  liblog: logprint: printable nul
  logd: klogd: sniff for time correction on Mediatek
2015-09-30 18:55:21 +00:00
Sergio Giro
0e7fb13d57 libutils: fix compile error in SharedBufferTest
Change-Id: Ib1185d417457d03efa102989a64b5b5e4eb5c82a
2015-09-30 10:44:17 -07:00
Sami Tolvanen
ad2a5a89a6 Merge "fs_mgr: trigger dm-verity error handling for invalid signatures" 2015-09-30 16:38:11 +00:00
Sergio Giro
e045333445 Merge "system/core: remove methods returning SharedBuffer in String8, String16" 2015-09-30 15:21:48 +00:00
Sergio Giro
282efae9c3 system/core: remove methods returning SharedBuffer in String8, String16
Towards deprecation of SharedBuffer

Change-Id: I3069837db32837bcc0f5d8f1118ccd502c9070dc
2015-09-30 15:42:02 +01:00
Sergio Giro
8e2c820819 am 730fdbb1: Merge "system/core: change LruCache to use unordered_set instead of BasicHashTable"
* commit '730fdbb1ca4c39a4d69868f7a261b023f2bea296':
  system/core: change LruCache to use unordered_set instead of BasicHashTable
2015-09-30 13:20:02 +00:00
Sergio Giro
730fdbb1ca Merge "system/core: change LruCache to use unordered_set instead of BasicHashTable" 2015-09-30 13:15:21 +00:00
Sergio Giro
bb58cde899 system/core: change LruCache to use unordered_set instead of BasicHashTable
Towards deprecation of BasicHashTable

Change-Id: I3f3d904636a85a794cccf972f6e4a94e7f3808f5
2015-09-30 13:48:30 +01:00
Stephen Hines
18395cb507 Ignore explicit infinite recursion.
Clang 3.8 warns against this now, and it is tripping up part of a test.
We suppress the warning, since we are trying to actually test that this
behavior is properly handled.

Change-Id: I8705900572e1a6704bbdc001fece3e2d16c7077c
2015-09-29 23:55:14 -07:00
Mark Salyzyn
db364d251f am 8ec2d8fe: Merge "logd: klogd and Mediatek part deux"
* commit '8ec2d8fec6d099d44151b1e29366002e569d3c2a':
  logd: klogd and Mediatek part deux
2015-09-30 00:05:41 +00:00
Mark Salyzyn
8ec2d8fec6 Merge "logd: klogd and Mediatek part deux" 2015-09-30 00:01:48 +00:00
Mark Salyzyn
151beac76d logd: klogd deal with nuls in dmesg
Switch to using string and length in all transactions, treating
trailing nuls the same as spaces.

ToDo: change dumpstate (bugreport) to use logcat -b printable _regardless_

Bug: 23517551
Change-Id: I42162365e6bf8ed79d356e7b689a673902116fdb
2015-09-29 15:51:38 -07:00
Mark Salyzyn
ea1a241107 logd: log_strtok_r deal with nuls
Rename to log_strntok_r and change from dealing with strings
to dealing with a string and an associated length.

Bug: 23517551
Change-Id: Ia72f1305a53f55eeef9861ac378fb8205fd2378e
2015-09-29 15:43:34 -07:00
Mark Salyzyn
faa92e9915 liblog: logprint: printable nul
Change-Id: I57d1f86ce040ad196c558bb72ac0464af793c214
2015-09-29 15:43:34 -07:00
Mark Salyzyn
2d159bf3b5 logd: klogd: sniff for time correction on Mediatek
Need some more flexibility when parsing kernel messages
cluttered with extra fluff. This is the minimal relaxation
we can do to the rules to ensure that we work on all
possible devices and kernels when sniffing for time
correction information.

We want to minimize any future maintenance, keep in mind
klogd is a "userdebug" or "eng" feature and is disabled
in "user" builds. Manage expectations.

Bug: 23517551
Change-Id: I026d074e14fb2550e728683e85a973bd87e78a9c
2015-09-29 15:43:07 -07:00
Mark Salyzyn
47dba71f24 logd: klogd and Mediatek part deux
- switch to an open coded strnrchr
- validity checking on n, taglen and b values.

Bug: 23517551
Change-Id: I568e25c5aa6d8474835454a0e83b19c2921b7986
2015-09-29 15:40:08 -07:00
Spencer Low
677fb43b0f adb: win32: specify socket protocol
Instead of using socket(..., 0), pass IPPROTO_TCP or IPPROTO_UDP. Using
zero wasn't buying us anything and was different than popular apps like
Chrome. We should stick to what everyone else does so that we don't go
down different code-paths and potentially hit Winsock service provider
issues that everyone else is (accidentally) avoiding.

Also CHECK() if send() returns an erroneous value as described in the
Chromium source.

Also add comment about socket buffer sizing and Windows Vista.

Change-Id: I63db8f6de352fe1e9525cbc9cfc040eb02a4b9cd
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-29 15:05:29 -07:00
Bertrand Simonnet
c1799e33c6 am 659f5ade: Merge "metricsd: Fix race condition in the tests."
* commit '659f5ade04a5a07347dfbec9db4ef97636f1ebfe':
  metricsd: Fix race condition in the tests.
2015-09-29 18:10:56 +00:00
Bertrand Simonnet
659f5ade04 Merge "metricsd: Fix race condition in the tests." 2015-09-29 18:07:07 +00:00
Steve Fung
2a186ba25f am 7f16425d: Merge "crash_reporter: Use ro.debuggable for determining developer mode"
* commit '7f16425d43951ddd188ead30c98876e6943bf7d1':
  crash_reporter: Use ro.debuggable for determining developer mode
2015-09-29 17:21:40 +00:00
Steve Fung
8965f5f100 am 8e7209d4: Merge "crash_reporter: determine official image using ro.secure"
* commit '8e7209d498b4130d21af3a9922a934ff54b13c3f':
  crash_reporter: determine official image using ro.secure
2015-09-29 17:21:38 +00:00