Commit graph

26365 commits

Author SHA1 Message Date
Josh Gao
fd12aaa8c1 adb: add tracing to file_sync_service.cpp.
Bug: http://b/31289465
Test: systrace
Change-Id: I186675ca0310ace0e1d35561fa0b910417dcedd7
2016-12-12 12:28:45 -08:00
Josh Gao
e2d9732682 cutils: add adb trace tag.
Bug: http://b/31289465
Test: systrace
Change-Id: I8537731febc6629f055b86f6e19b16104208c4f8
2016-12-12 12:28:45 -08:00
Josh Gao
01937ee2b9 libutils: allow multiple ATRACE_NAMEs in a scope.
Bug: http://b/31289465
Test: m
Change-Id: Iabd97439fa55ea285ce0501dbb4fd9d07149ae61
2016-12-12 12:28:04 -08:00
Treehugger Robot
4173d9b57c Merge "init/service.cpp: fix FD leak for services with consoles" 2016-12-10 22:07:27 +00:00
Nick Kralevich
9596d2b95d init/service.cpp: fix FD leak for services with consoles
When init starts a service with a console, it tests for the presence of
a readable/writable console device. The test results in a leaked file
descriptor.

Use access() instead of open() to avoid leaking file descriptors.

Bug introduced in 70daa67062.

Test: compiles and device boots
Change-Id: I4efcfa0bb2cdb09f0455bc04a3a91e784bda7962
2016-12-10 12:20:11 -08:00
Elliott Hughes
b0aa8b2369 Merge changes from topic 'fsconfig-2'
* changes:
  fs_config: add comment to header
  android_ids: move to bionic
2016-12-10 00:13:05 +00:00
Mark Salyzyn
0f8890d985 Merge "utils: Add FastStrcmp.h" 2016-12-09 23:37:15 +00:00
Mark Salyzyn
0eeb06b932 utils: Add FastStrcmp.h
Move existing fast<str*cmp> templates for general use, pulled from
the implementation used in logd that dealt with speed through cache
locality and subroutine call mitigation.  Rename to fastcmp.

Test: logd-benchmarks and based on manual profiling from the past
Bug: 31456426
Change-Id: Ic62f4a437fc3e06ffdeaae73a6f34e197957a6b0
2016-12-09 12:40:17 -08:00
William Roberts
acdf527c52 fs_config: add comment to header
Add a comment to android_filesystem_config.h
about AID and OEM Range "scraping" done by
build/tools/fs_config.

Test: Build and boot.

Change-Id: I2d4845d91546ae967a1ee5166b73d119938faccc
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-12-08 16:57:17 -08:00
William Roberts
bc56847e84 android_ids: move to bionic
Prevent others from using android_ids and force them
to use grp.h and pwd.h family of functions.

Test: Build and boot, verify services are running properly.
Bug: 27999086

Change-Id: Idcd75cf7e91a49ef07a0ed3bdb514ad61aa82e69
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-12-08 16:57:17 -08:00
Yabin Cui
aece425166 Merge "libbacktrace_offline: support .ARM.exidx." 2016-12-07 20:34:32 +00:00
Yabin Cui
5d991bc351 libbacktrace_offline: support .ARM.exidx.
1. Read .ARM.exidx and .ARM.extab, provides these data to libunwind
through AccessMem.
2. In FindProcInfo, search .ARM.exidx for the idx entry of function
containing ip.
3. Add structures to store .ARM.exidx info in DebugFrameInfo, and
clean up the structure.
4. Add tests to test each unwind information (.eh_frame, .debug_frame,
.gnu_debugdata, .ARM.exidx) separately.

Bug: http://b/30974693
Test: run backtrace_test.
Test: run simpleperf runtest.py.
Change-Id: I9377a54379158bd35860efcf0e011423be7350d4
2016-12-07 10:25:33 -08:00
Bill Yi
a794775592 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD 2016-12-06 15:07:48 -08:00
Josh Gao
3a7637715e Merge changes I1a122235,I6b22ead8
* changes:
  Revert "Revert "adb: extend sync protocol's stat support.""
  Revert "Revert "adb: move adb_strerror to sysdeps/win32/errno.cpp.""
2016-12-06 22:41:40 +00:00
Elliott Hughes
422a5128dd Merge "The "net.change" property is no longer needed."
am: e209ed7c44

Change-Id: I45a1ce3a1527a72e7ae974fd4dab7b77c6a899ee
2016-12-06 02:49:59 +00:00
Treehugger Robot
e209ed7c44 Merge "The "net.change" property is no longer needed." 2016-12-06 02:46:43 +00:00
Josh Gao
5a1e3fdaf8 Revert "Revert "adb: extend sync protocol's stat support.""
This reverts commit afa4b5d6eb.

Add functions to translate errno to and from the linux asm-generic
values, since mips has different values.

Bug: http://b/33058958
Test: python test_device.py with both old and new adbd
Change-Id: I1a122235f3e793ed10b3bf3ad293388015134150
2016-12-05 17:38:30 -08:00
Josh Gao
a3577e1ac5 Revert "Revert "adb: move adb_strerror to sysdeps/win32/errno.cpp.""
This reverts commit 43c02b27cd.

Test: mma
Change-Id: I6b22ead8a4b964973ee2fdb8deba42bea74880cf
2016-12-05 17:38:30 -08:00
Mark Salyzyn
1f22788f9e Merge "init: service file command only opens existing files"
am: bd3f42016d

Change-Id: Id4c0e6b26e8b3295ebfd5387bfad2e8795531175
2016-12-05 21:37:38 +00:00
Treehugger Robot
bd3f42016d Merge "init: service file command only opens existing files" 2016-12-05 21:32:27 +00:00
Josh Gao
6e2bd60c3c Merge changes Ie7becb64,I02ced540
am: 431e272251

Change-Id: I5a94a5050ba8c9add9319c280136e7c5dca4a05b
2016-12-05 21:23:46 +00:00
Josh Gao
bad5069cc0 Revert "adb: extend sync protocol's stat support."
am: afa4b5d6eb

Change-Id: I5fbf0e936685b320d322d4a8e1b1671f2d0da8cf
2016-12-05 21:23:44 +00:00
Josh Gao
3cad1843f8 Revert "adb: move adb_strerror to sysdeps/win32/errno.cpp."
am: 43c02b27cd

Change-Id: I5a4a050fdbf05910edf2e55dfb8442e30e88464e
2016-12-05 21:23:38 +00:00
Josh Gao
431e272251 Merge changes Ie7becb64,I02ced540
* changes:
  Revert "adb: extend sync protocol's stat support."
  Revert "adb: move adb_strerror to sysdeps/win32/errno.cpp."
2016-12-05 21:19:25 +00:00
Josh Gao
afa4b5d6eb Revert "adb: extend sync protocol's stat support."
This reverts commit d6d5c38469.
2016-12-05 13:16:02 -08:00
Josh Gao
43c02b27cd Revert "adb: move adb_strerror to sysdeps/win32/errno.cpp."
This reverts commit 4fba3d2638.
2016-12-05 13:15:55 -08:00
Elliott Hughes
4f9158119b The "net.change" property is no longer needed.
bionic was the only listener, and it was doing nothing useful when the
property changed, so we've removed that listener.

Bug: http://b/33308258
Test: DNS still works
Change-Id: I15292e8e58e6b87cdad8f73e449ccaf334dff68b
2016-12-05 13:12:48 -08:00
Josh Gao
b96e37353b Merge changes I9df4d6fa,I841123de
am: 97e228e903

Change-Id: I923d6f507cfba689bc714ce2b8a26aa5ba13a4f9
2016-12-05 20:35:42 +00:00
Josh Gao
d5286d376b adb: move adb_strerror to sysdeps/win32/errno.cpp.
am: 4fba3d2638

Change-Id: Ibdfa8ebbcfee5baf459f82fd13e1a0e8167c5053
2016-12-05 20:35:41 +00:00
Josh Gao
4733b631ed adb: extend sync protocol's stat support.
am: d6d5c38469

Change-Id: I26a1518bba4f65c0fdcc7c75d751badd9a3563d3
2016-12-05 20:35:36 +00:00
Josh Gao
97e228e903 Merge changes I9df4d6fa,I841123de
* changes:
  adb: move adb_strerror to sysdeps/win32/errno.cpp.
  adb: extend sync protocol's stat support.
2016-12-05 20:31:55 +00:00
Mark Salyzyn
978fd0ea25 init: service file command only opens existing files
Mixing open or create, along with attribute(MAC) and permissions(DAC)
is a security and confusion issue.

Fix an issue where fcntl F_SETFD was called to clear O_NONBLOCK, when
it should have been F_SETFL.  Did not present a problem because the
current user of this feature does writes and control messages only.

Test: gTest logd-unit-tests and check dmesg for logd content.
Bug: 32450474
Bug: 33242020
Change-Id: I23cb9a9be5ddb7e8e9c58c79838bc07536e766e6
2016-12-05 11:26:39 -08:00
Elliott Hughes
8cf9d66486 Merge "Replace the "coldboot" timeout with a property."
am: e218fc673f

Change-Id: Ibaf1f7ad3a90e5216db04506288df51258e19f4b
2016-12-05 18:04:27 +00:00
Elliott Hughes
e218fc673f Merge "Replace the "coldboot" timeout with a property." 2016-12-05 18:00:25 +00:00
Elliott Hughes
331cf2fb7c Replace the "coldboot" timeout with a property.
Also rename init's existing boot-time related properties so they're
all "ro.*" properties.

Example result:

  # Three properties showing when init started...
  [ro.boottime.init]: [5294587604]
  # ...how long it waited for ueventd...
  [ro.boottime.init.cold_boot_wait]: [646956470]
  # ...and how long SELinux initialization took...
  [ro.boottime.init.selinux]: [45742921]

  # Plus one property for each service, showing when it first started.
  [ro.boottime.InputEventFind]: [10278767840]
  [ro.boottime.adbd]: [8359267180]
  [ro.boottime.atfwd]: [10338554773]
  [ro.boottime.audioserver]: [10298157478]
  [ro.boottime.bootanim]: [9323670089]
  [ro.boottime.cameraserver]: [10299402321]
  [ro.boottime.cnd]: [10335931856]
  [ro.boottime.debuggerd]: [7001352774]
  [ro.boottime.debuggerd64]: [7002261785]
  [ro.boottime.drm]: [10301082113]
  [ro.boottime.fingerprintd]: [10331443314]
  [ro.boottime.flash-nanohub-fw]: [6995265534]
  [ro.boottime.gatekeeperd]: [10340355242]
  [ro.boottime.healthd]: [7856893380]
  [ro.boottime.hwservicemanager]: [7856051088]
  [ro.boottime.imscmservice]: [10290530758]
  [ro.boottime.imsdatadaemon]: [10358136702]
  [ro.boottime.imsqmidaemon]: [10289084872]
  [ro.boottime.installd]: [10303296020]
  [ro.boottime.irsc_util]: [10279807632]
  [ro.boottime.keystore]: [10305034093]
  [ro.boottime.lmkd]: [7863506714]
  [ro.boottime.loc_launcher]: [10324525241]
  [ro.boottime.logd]: [6526221633]
  [ro.boottime.logd-reinit]: [7850662702]
  [ro.boottime.mcfg-sh]: [10337268315]
  [ro.boottime.media]: [10312152687]
  [ro.boottime.mediacodec]: [10306852530]
  [ro.boottime.mediadrm]: [10308707999]
  [ro.boottime.mediaextractor]: [10310681177]
  [ro.boottime.msm_irqbalance]: [7862451974]
  [ro.boottime.netd]: [10313523104]
  [ro.boottime.netmgrd]: [10285009351]
  [ro.boottime.oem_qmi_server]: [10293329092]
  [ro.boottime.per_mgr]: [7857915776]
  [ro.boottime.per_proxy]: [8335121605]
  [ro.boottime.perfd]: [10283443101]
  [ro.boottime.qcamerasvr]: [10329644772]
  [ro.boottime.qmuxd]: [10282346643]
  [ro.boottime.qseecomd]: [6855708593]
  [ro.boottime.qti]: [10286196851]
  [ro.boottime.ril-daemon]: [10314933677]
  [ro.boottime.rmt_storage]: [7859105047]
  [ro.boottime.servicemanager]: [7864555881]
  [ro.boottime.ss_ramdump]: [8337634938]
  [ro.boottime.ssr_setup]: [8336268324]
  [ro.boottime.surfaceflinger]: [7866921402]
  [ro.boottime.thermal-engine]: [10281249924]
  [ro.boottime.time_daemon]: [10322006542]
  [ro.boottime.ueventd]: [5618663938]
  [ro.boottime.vold]: [7003493920]
  [ro.boottime.wificond]: [10316641073]
  [ro.boottime.wpa_supplicant]: [18959816881]
  [ro.boottime.zygote]: [10295295029]
  [ro.boottime.zygote_secondary]: [10296637269]

Bug: http://b/31800756
Test: boots
Change-Id: I094cce0c1bab9406d950ca94212689dc2e15dba5
2016-12-03 10:54:26 -08:00
Jeff Sharkey
33d1ec216b Merge "Define GIDs for internal media file types."
am: 4b44753085

Change-Id: I95df8c122f0600e3af6306d800724d1ac9f26040
2016-12-03 04:23:24 +00:00
Elliott Hughes
32ca0ab616 Merge "Remove unused adb_set_transport."
am: b898ce00fa

Change-Id: Ia428922f1a0241b8d7ec97517d360b02596a9781
2016-12-03 04:23:10 +00:00
The Android Automerger
9f9a239ca3 Manually merge commit '61e74d7' into stage-aosp-master
* commit '61e74d7':
  libsparse: add a function to retrieve the data blocks

BUG:33304034wq
2016-12-03 04:05:51 +00:00
Treehugger Robot
4b44753085 Merge "Define GIDs for internal media file types." 2016-12-03 03:29:51 +00:00
Treehugger Robot
b898ce00fa Merge "Remove unused adb_set_transport." 2016-12-03 02:48:03 +00:00
Treehugger Robot
61e74d7a1b Merge "libsparse: add a function to retrieve the data blocks" 2016-12-02 22:48:24 +00:00
Jeff Sharkey
4de27c6a6d Define GIDs for internal media file types.
Currently, all internal media storage files (under /data/media) are
given the same "media_rw" GID.  To support an upcoming optimization
to disk usage calculation, this CL defines three new GIDs that can be
used to quickly identify common types: audio, video, and images.

Test: builds
Bug: 27948817
Change-Id: I8548459c3d3ccbf7d822431c6e2ebd1c2e309d70
2016-12-02 14:17:48 -07:00
Elliott Hughes
de80be39aa Remove unused adb_set_transport.
Bug: N/A
Test: builds
Change-Id: I0824d29c080c47e1002abf3520ebed8996bcbcc6
2016-12-02 12:53:09 -08:00
Mark Salyzyn
18f2b9f4c0 Merge "liblog: switch event_tag_map.c to event_tag_map.cpp"
am: 48dfc220cb

Change-Id: Ifa613fa9909bab3ba634062ef57c90dfa21a24a3
2016-12-02 17:56:09 +00:00
Mark Salyzyn
48dfc220cb Merge "liblog: switch event_tag_map.c to event_tag_map.cpp" 2016-12-02 17:51:36 +00:00
James Hawkins
ebe84bbcd4 Merge "bootstat: Fix the boot complete signal for FBE devices."
am: 6e5f730243

Change-Id: I18a54e10b495434a7a4b78d44d37814a09fbf919
2016-12-02 01:54:54 +00:00
Treehugger Robot
6e5f730243 Merge "bootstat: Fix the boot complete signal for FBE devices." 2016-12-02 01:46:46 +00:00
Mark Salyzyn
ed9dc8abe2 liblog: switch event_tag_map.c to event_tag_map.cpp
NB: recent activities on event_tag_map.c were to allow
    this transition to be unremarkable.

Test: compile
Bug: 31456426
Change-Id: I13e1771a001874244711a5ac3023861c2a5f8c7d
2016-12-01 15:42:03 -08:00
James Hawkins
e4079fbdef bootstat: Fix the boot complete signal for FBE devices.
FBE devices suffice with bootanim=stopped, but must be gated on
ro.crypto.type=file.

Bug: 33049941
Test: adb reboot && adb logcat | grep bootstat < Has output
Change-Id: I346d47aaf9d1d4b40f05906056849630b922a20d
2016-12-01 14:02:17 -08:00
Mark Salyzyn
27123d52fc Merge "liblog: fortify event_log_tags test"
am: de07029ad0

Change-Id: I70b7c3d0bf07c061a04f8770979efd7b87bc6cec
2016-12-01 17:45:58 +00:00