Commit graph

17247 commits

Author SHA1 Message Date
Badhri Jagan Sridharan
ca2a0bdcb5 adbd: Add os descriptor support for adb.
Eventhough windows does not rely on extended os
descriptor for adbd, when android usb device is
configures as a composite device such as mtp+adb,
windows discards the extended os descriptor even
if one of the USB function fails to send
the extended compat descriptor. This results in automatic
install of MTP driverto fail when Android device is in
"File Transfer" mode with adb enabled.

https://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx

BUG=24583401
BUG=chromium:43409

Change-Id: I87341683a9337848cac66daf9055b0d05cedd3d3
2015-10-07 06:04:00 +00:00
Yabin Cui
7f9d4c97c3 Merge "adb: keep file flags in fdevent_install." 2015-10-06 23:28:36 +00:00
Yabin Cui
6dfef255b8 adb: keep file flags in fdevent_install.
Bug: 24615098
Change-Id: Ia791ecbe612f09aca3bbd5787513f121fae54da5
2015-10-06 16:15:30 -07:00
Bertrand SIMONNET
7dc7827107 metricsd: Rename build_target_id to product_id.
We use product_id instead of build_target_id, the protobuffer should
rename that field too to be consistent.
The same change was made on the backend.

BUG: 24712895
Change-Id: Id9492e3debab986c9df7d4ec0caef8730eb14240
2015-10-06 15:27:37 -07:00
Mark Salyzyn
9812fc4bd0 logcat: continue where we left off
Issue introduced as part of new logcatd functionality in
commit f3555d9427

Faulty logic, add a gTest to confirm.

Bug: 19608716
Change-Id: Ic1b97def25e03e69faae4398a3dff2ff0f88545e
2015-10-06 12:46:54 -07:00
William Roberts
468573930d debuggerd: audit pid, uid and gid on SE Linux denial
When debugging SE Linux audit messages from debuggerd, its
unclear what process is triggering the access violation. To
assist in debugging, we also log pid, uid and gid.

Before:
avc:  denied  { dump_backtrace } for scontext=u:r:dumpstate:s0 ...

After:
avc: denied  { dump_backtrace } for pid=198 uid=1019 gid=1019 ..

Change-Id: I8263e6f5e77917139b73c3e84b76f7f97fd98003
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2015-10-06 12:25:27 -07:00
Bertrand Simonnet
d1f8e4dc9a Merge "metricsd: Expose the metrics status through weave." 2015-10-06 18:45:42 +00:00
Bertrand SIMONNET
59890e2db9 metricsd: Expose the metrics status through weave.
metrics_daemon will export _metrics._AnalyticsReportingState containing
"enabled"/"disabled" depending on the current state and two weave
commands (_metrics._{enable,disable}AnalyticsReporting) to update it.

BUG: 24386281
TEST: manual. Enabled and disabled metrics reporting.
  `metrics_client -c` reports the correct answer.

Change-Id: Ic4a5ffc1e9f9cbc0b47ee34d3af83584d95da155
2015-10-06 10:18:54 -07:00
Bertrand Simonnet
a4a479b63b am fcaef687: Merge "metricsd: Don\'t cache the metrics status in the daemon."
* commit 'fcaef687010bc63293087c8232dad2cd0af02b5f':
  metricsd: Don't cache the metrics status in the daemon.
2015-10-05 23:42:40 +00:00
Bertrand Simonnet
fcaef68701 Merge "metricsd: Don't cache the metrics status in the daemon." 2015-10-05 23:35:39 +00:00
Elliott Hughes
8c47bb52c4 am 8a69e031: Merge "Speed up adb sync."
* commit '8a69e0315a3288ca14213602f5bec1173bc3216e':
  Speed up adb sync.
2015-10-05 19:48:00 +00:00
Elliott Hughes
8a69e0315a Merge "Speed up adb sync." 2015-10-05 19:42:03 +00:00
William Roberts
d7aea443d9 property_service: log pid,uid and gid of setprop client
When auditing setprop denials, it is often unclear of who the process is
in a multi-process domain. To help identify the invoker, log the pid, uid,
and gid of the caller.

Before:
avc:  denied  { set } for property=wifi.xxx ...

After:
avc:  denied  { set } for property=wifi.xxx pid=30691 uid=123 gid=345 ...

Change-Id: I5cdcb3d18fbd52e0987b5e1497b9f6620c6c742a
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2015-10-05 11:39:56 -07:00
Bertrand SIMONNET
a5b40d077f metricsd: Don't cache the metrics status in the daemon.
metrics_daemon should never get a stale answer on whether or not the
metrics are enabled.
This is important as metrics_daemon will be the "source of truth" for
other components.

BUG: 24386281
TEST: unit tests.

Change-Id: I573568abe5d1b840683cede2fdf32cdae028a81a
2015-10-05 09:58:16 -07:00
Mark Salyzyn
758058ffd8 logd: object layer format statistics
Simplify table generation by placing the line and header formatting
into each type's (UID, PID, TID) object. Switch to const return
values for the ownership passing functions (*ToName() functions
and methods). Use longer variable names to reduce confusion.

Switch from LINES To NUM for pruned column as that more accurately
reflects what is dropped since one entry can contain several lines.

Bug: 22855208
Change-Id: Ib110dce98a68cf5f844eb30f8a192a1f691eeba2
2015-10-05 09:27:57 -07:00
Mark Salyzyn
f469768887 am bd4f52b2: Merge "liblog: optimize code hotspot"
* commit 'bd4f52b2e2d1f03e77e2bef7b40865b631c8d115':
  liblog: optimize code hotspot
2015-10-05 16:25:56 +00:00
Mark Salyzyn
2b5f97cc0d am 88e01661: Merge "logd: optimize code hotspots"
* commit '88e0166123eca72cbfc28e92d8abaa95b9b9ce0e':
  logd: optimize code hotspots
2015-10-05 16:25:54 +00:00
Mark Salyzyn
be162cf236 am 72146b93: Merge "logd: Add LogUtils.h"
* commit '72146b931ca61e942df91407b561f22648a70bf2':
  logd: Add LogUtils.h
2015-10-05 16:25:53 +00:00
Mark Salyzyn
bd4f52b2e2 Merge "liblog: optimize code hotspot" 2015-10-05 14:19:31 +00:00
Mark Salyzyn
88e0166123 Merge "logd: optimize code hotspots" 2015-10-05 14:18:53 +00:00
Mark Salyzyn
72146b931c Merge "logd: Add LogUtils.h" 2015-10-05 14:18:42 +00:00
Elliott Hughes
450b592da5 am 42b8df38: Merge "adb: win32: specify socket protocol"
* commit '42b8df38439b390f9c67eee567717f30143cf64f':
  adb: win32: specify socket protocol
2015-10-03 03:09:08 +00:00
Elliott Hughes
f6d28fcaf0 am e412cc89: Merge "Explain adb client/server version mismatch better."
* commit 'e412cc891ebdbcc64137ef3c91950124ff633d6f':
  Explain adb client/server version mismatch better.
2015-10-03 03:09:07 +00:00
Elliott Hughes
42b8df3843 Merge "adb: win32: specify socket protocol" 2015-10-03 03:06:24 +00:00
Elliott Hughes
e412cc891e Merge "Explain adb client/server version mismatch better." 2015-10-03 03:03:17 +00:00
Elliott Hughes
5b73a10f64 Explain adb client/server version mismatch better.
"Out of date" is only probably true. You might equally well have an older
client talking to a newer server. So tell the truth and include the actual
version numbers.

Change-Id: I821de88f5baf65bf2623363129c60c496b407bff
2015-10-02 19:49:10 -07:00
Mark Salyzyn
ddda212faa logd: optimize code hotspots
Discovered that we had a few libc hotspots. Adjust code to generally
reduce or nullify the number of calls to malloc, free, strlen,
strcmp, strncmp, memcmp & strncasecmp. Total gain looks to be about
3% of logd's processing time. malloc still contributes to 3%, but all
others are now total 0.5%.

Bug: 23685592
Change-Id: Ife721121667969260cdb8b055524ae90f5911278
2015-10-02 16:45:22 -07:00
Mark Salyzyn
5ac5c6b193 logd: Add LogUtils.h
Move prototypes from LogBufferElement.h to LogUtils.h

Change-Id: I55e42e17e6c997e35b2b78b87fd2f84f8f393282
2015-10-02 16:36:41 -07:00
Elliott Hughes
ae5a6c06cd Speed up adb sync.
Sending the SEND/DATA/DONE packets all in one write makes small file and
symbolic link transfer orders of magnitude faster. Transferring all the
symbolic links in /system/bin or all the cacerts in /system/etc goes down
from about 6s in each case to less than 0.5s.

Change-Id: Ia1706cef25535d0b685d3744241a0557a52b22ff
2015-10-02 14:48:58 -07:00
Mark Salyzyn
16e1c9dfdc liblog: optimize code hotspot
strcmp was 1/10 #2 behind find_property in __android_log_level(),
now virtually eliminated from performance profile.

Bug: 23685592
Change-Id: I3978886193af77e489c6d1728d6a26b7f53f8f2f
2015-10-02 13:55:44 -07:00
Gilad Arnold
65475f8cc8 am b955f476: Merge "Add a "tlsdate" AID for unprivileged tlsdate execution."
* commit 'b955f476d3b11da9378d5eedfc569711f625e1ba':
  Add a "tlsdate" AID for unprivileged tlsdate execution.
2015-10-02 18:41:05 +00:00
Gilad Arnold
b955f476d3 Merge "Add a "tlsdate" AID for unprivileged tlsdate execution." 2015-10-02 18:36:20 +00:00
Gilad Arnold
b5fa88955c Add a "tlsdate" AID for unprivileged tlsdate execution.
Bug: 23651876
Change-Id: I7ab1bccdcd2434c4af663a1afb9fe9ad124c4428
2015-10-02 08:42:43 -07:00
Bertrand Simonnet
3fd57f26c1 am 66255db0: Merge "metricsd: Only collect metrics over a short period."
* commit '66255db05d590bcd011fd3f8b687161f737b3aa8':
  metricsd: Only collect metrics over a short period.
2015-10-02 15:40:46 +00:00
Bertrand Simonnet
66255db05d Merge "metricsd: Only collect metrics over a short period." 2015-10-02 15:36:49 +00:00
Adam Lesinski
bda375fa41 am c6c6ab50: Merge "Implement C++11 move semantics for android::FileMap"
* commit 'c6c6ab50bc11d55f3135312ceccbcf0c400b437e':
  Implement C++11 move semantics for android::FileMap
2015-10-02 01:19:25 +00:00
Adam Lesinski
c6c6ab50bc Merge "Implement C++11 move semantics for android::FileMap" 2015-10-02 01:16:05 +00:00
Bertrand SIMONNET
7a9640559b metricsd: Only collect metrics over a short period.
Instead of reporting the metrics over both a long and a short period,
collect and report only over a short period. This makes the code simpler
and the metrics easier to understand.

Also move the collection out of metrics_daemon and into a separate
collector to make it simpler to understand.

BUG: 24464945

Change-Id: I17e52536aaa75321a5e34f42ed488545c2c3efde
2015-10-01 16:45:56 -07:00
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