History log of /frameworks/native/cmds/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1572f9b60ed2bedc16c2a534da9f8cb7cc512524 31-May-2018 Bowgo Tsai <bowgotsai@google.com> Otadexopt: removing bootdevice from /dev/block/bootdevice/by-name/*

We should switch to use /dev/block/by-name/<partition> because there is
no requirement to have a single 'bootdevice' for Android. The symlink is
created in the following change:

https://android-review.googlesource.com/c/platform/system/core/+/674989

Bug: 80466341
Bug: 78613232
Test: m -j otapreopt_chroot
Test: Successful go/manual_ab_ota on walleye

Change-Id: I26fbf67e72cc2ee93909e95b0254ba1602e6ae8e
Merged-In: I26fbf67e72cc2ee93909e95b0254ba1602e6ae8e
(cherry picked from commit 19d2d08bfbc3840a93762011d6a2763bd37be05a)
nstalld/otapreopt_chroot.cpp
31419e7ac873051e9adbd89fe8c3d085997f28a8 25-May-2018 David Sehr <sehr@google.com> Disable dex2oatd for release background compiles

Use dex2oat rather than dex2oatd for release versions of
userdebug builds to get more soak time.

Bug: 73769503
Test: adb shell cmd package bg-dexopt-job
Change-Id: Id66777e8e49885cf4579d41364d10808df49b63e
nstalld/dexopt.cpp
56f68366f006d5b17dca9f53f34da511c0b3c85b 23-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Atrace: Add the debug.atrace.user_initiated property." into pi-dev
65ecfbba620e4710331b26db4ebf087ca6d92a2b 22-May-2018 Carmen Jackson <carmenjackson@google.com> Atrace: Add the debug.atrace.user_initiated property.

This will ensure that, when we're tracing, the
debug.atrace.user_initiated tracing property will be set to 1.
We can then reliably use that property to determine whether an atrace
trace is in progress. Previously, we were using the
debug.atrace.tags.enableflags property, which is only set to a value
when a userspace tracepoint is being traced.

Bug: 79998861
Test: Took traces of only the 'sync' tag and verified with logging
that Traceur was representing the trace state correctly when entering
and exiting the app.
Test: Took a trace using the default category list and saw other
userspace tracepoints in the output (such as activityStart).

Change-Id: Iaf807f14ee65dc14e85d3d8d2ba489fcf742e3cc
trace/atrace.cpp
996fe51a15fa3416494dc81cbea8252f72741200 22-May-2018 Sooraj Sasindran <sasindran@google.com> Merge "Add non platform services to telephony bugreport" into pi-dev
a0829e7e1427d101046b33f8fb2ac752b94927f3 20-May-2018 Sooraj Sasindran <sasindran@google.com> Add non platform services to telephony bugreport

Add non platform services to telephony bugreport

Bug: 79400204

Test: Tested telephony bugreport and confirmed existence of
Location service
Tested the size difference. Here is the final results
Without the change: 3MB
With the change: 5 MB
Full bugreport:10 MB

Change-Id: If128a33106d70e827c7c26f0195c84e5722f6f3d
umpstate/dumpstate.cpp
267883d23d0891e7d9a1305c8f0977e0923c215d 18-May-2018 Carmen Jackson <carmenjackson@google.com> Add permissions for sync and fence tracepoints on user builds.

Bug: 79696988
Test: Took traces using 'sync' in user builds and saw the tracepoints
being saved.
Change-Id: Id6b6a1f85452c2a766ce08ad0eecebed58bc2be6
trace/atrace.rc
trace/atrace_userdebug.rc
ae001a33fbfeb30f91ab33e675de7c3efa49111c 15-May-2018 Jesse Hall <jessehall@google.com> atrace: map 'sync' to linux >= 4.9 fence tracing

Before Linux 4.9, sync was an Android staging driver. In Linux 4.9,
this was upstreamed to be part of the dma-buf framework. Many of the
details changed, including the uapi and tracing events.

Atrace now handles enabling both old and new event systems. But the
events traced differ, so any downstream software that has special-case
handling of sync/fence events will need to be updated.

Bug: 79696988
Test: adb shell atrace --list_categories
Change-Id: Idb4e4efa848f04bf77080414578c3fb7c8805782
trace/atrace.cpp
7dbedde3d351d4a0e29689960923bea25d0b59ee 05-May-2018 android-build-team Robot <android-build-team-robot@google.com> Merge "atrace: add priority inheritance trace point" into pi-dev
ca49dfccbadab5ac57d4f8bb31b2a6a0a51c0fb2 04-May-2018 Wei Wang <wvw@google.com> atrace: add priority inheritance trace point

Task's prio can be changed in rt_mutex_setprio to avoid priority
inversion.

Test: Take a trace and check the new trace point
Bug: 78480031
Change-Id: I2989bfdeeec658300fb73c020bb447970b23bcf7
trace/atrace.cpp
trace/atrace.rc
b5878649620ab682c58a5050f5cbfd761f8c9fee 04-May-2018 Chris Fries <cfries@google.com> atrace.rc: Move tracefs permissions to late-init

init needs to be the first process to touch /sys/kernel/debug/tracing,
so let's enforce that by moving these chmod's earlier.

tracefs is an automounting filesystem, so the first consumer needs to
have permissions to do the mount.

Bug: 78460200
Change-Id: I15ff0be2ca046d44f8b3ad4abf845cf14c1bad23
trace/atrace.rc
59f7ab836f023ae68ce87031e55b5608bbe7df4d 28-Apr-2018 Calin Juravle <calin@google.com> Always pass --dex-location to profman

Pass --dex-location when updating profiles and taking snapshots. This
avoids reading the links from /proc/self/fd to infer the locations.

Test: adb shell cmd package snapshot-profile com.android.vending
Bug: 77922323
Change-Id: I392871bd2cfff78eaaee1d0bd7d4862b805019db
nstalld/dexopt.cpp
e8d9891b85c5e65888157d60b1d166d124e14b31 20-Apr-2018 Sooraj Sasindran <sasindran@google.com> Make batterystats logging readable

Make batterystats logging readable

Bug: 74146897
Test: verified by running telephony bugreport
Change-Id: Ic638af786d7674067af804cf4105b99380bd4edb
umpstate/dumpstate.cpp
e43650d2d567736bf6c5b5af8221a9a9f5634568 24-Apr-2018 Wei Wang <wvw@google.com> Merge "dumpstate: Kill vendor dumpstate HAL and grab partial dump in timeout" into pi-dev
b6dc4034bf7ea750875c0e3c41c9039f8dec6371 20-Apr-2018 Tianjie Xu <xunchang@google.com> Merge "Collect update_engine logs in dumpstate" into pi-dev
1b34605e92179f2b1c37cc9f101d985750838d9d 12-Apr-2018 Tianjie Xu <xunchang@google.com> Collect update_engine logs in dumpstate

The update_engine logs before reboot maybe useful to debug the OTA
failures.

Bug: 78201703
Test: Capture a bugreport and check the entries.
Change-Id: I3a7a48e524adf338c4a9f9525c98f9703e220100
(cherry picked from commit 75d53363bd1a3826d9673bc6617cd17b247e0f50)
umpstate/dumpstate.cpp
e63a117eb7640cf7dce6bcadf0dc8456d4f1f9b6 20-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "atrace.rc: make gfx tracing point available for non-root" into pi-dev
f277a7ea5c62c7b115ce2c11cd25c23a6983dde5 19-Apr-2018 Wei Wang <wvw@google.com> atrace.rc: make gfx tracing point available for non-root

Bug: 73168288
Bug: 78162216
Test: Build and take trace
Change-Id: I3fb9a64534668db1b5829493db6d697d3559cec6
trace/atrace.rc
6078098adadbdacd21f247fef0f88d9c02e26bac 17-Apr-2018 Makoto Onuki <omakoto@google.com> Split provider / service dumpsys into platform and non-platform

Also extend the timeout to 60 seconds.
- Because each provider / service dump may time out, the total time should relatively be large.

Bug: 78017892
Fix: 78017892

Test: Manual test with the following dumpsys commands:
dumpsys activity provider all
dumpsys activity provider all-platform
dumpsys activity provider all-nonplatform
dumpsys activity provider com.android.providers.contacts/com.android.providers.contacts.VoicemailContentProvider
dumpsys activity provider com.android.providers.contacts/.VoicemailContentProvider
dumpsys activity provider contacts
dumpsys activity provider voicemail
dumpsys activity provider 4d45a78

dumpsys activity service all
dumpsys activity service all-platform
dumpsys activity service all-nonplatform
dumpsys activity service bluetooth

Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/DumpTest.java
Test: atest /android/pi-dev/frameworks/base/core/tests/coretests/src/com/android/internal/util/ParseUtilsTest.java

Test: Manual test with "adb bugreport" with adding sleep(10s) to ProviderMap.dumpProvider()
Change-Id: If1639e6961e49265f7f9e59b1e370acdff584989
umpstate/dumpstate.cpp
fbab0c6e9990114b8d4d7752043b4146fe503ad7 14-Apr-2018 Andreas Gampe <agampe@google.com> Otadexopt: Attempt to mount product partition

Attempt to mount the product partition to give postinstall dexopt
access to those APKs.

(cherry picked from commit b87a1c7956de5b71193d487f631521b637a14875)

Bug: 78032768
Test: m
Test: manual
Merged-In: Ic74e2580a01d0fba3e217158e0d50ba1270f7806
Change-Id: Ic74e2580a01d0fba3e217158e0d50ba1270f7806
nstalld/otapreopt_chroot.cpp
ce764fa870ed9ad0da745fe446d260ad1a4d37c8 12-Apr-2018 Jeff Sharkey <jsharkey@android.com> Disable APPLY_HARD_QUOTAS in favor of "resgid".

We're now using the "resgid" filesystem feature to protect users
against abusive apps, so we no longer need to apply hard quotas.

Bug: 77862961
Test: builds, boots
Change-Id: I6877ff93afe9bda3e6039898787240a2b06cdb55
nstalld/InstalldNativeService.cpp
nstalld/utils.h
1f0622ed9717f9b6f9735e4b9634f182a0d79b4d 12-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "lshal: allow 10s for passthroughManager()->debugDump" into pi-dev
af5821901a06cf98c5c80a7262370afd56d15105 11-Apr-2018 Yifan Hong <elsk@google.com> lshal: allow 10s for passthroughManager()->debugDump

debugDump takes more time because of reading /proc for PIDs.
Allow more time for it to run on slower devices because
this information is useful for debugging.

Test: lshal
Test: lshal_test
Fixes: 77824684

Change-Id: I99e01b556e5ae3f84666ea6b10d7a93e4bee7294
shal/ListCommand.cpp
64fc7a4b0c262332057b50bafb9172f7f1b319fe 10-Apr-2018 Jeff Sharkey <jsharkey@google.com> Merge "Check /mnt/expand paths as if /data." into pi-dev
8fa803a1f1d351cf65b5350e57797ecff20fe45a 10-Apr-2018 Jeff Sharkey <jsharkey@android.com> Check /mnt/expand paths as if /data.

The layout of adopted storage devices is identical to the internal
userdata partition, so we should re-use the same logic to determine
if a given path is legitimate.

Bug: 77654971
Test: adb shell /data/nativetest64/installd_utils_test/installd_utils_test
Change-Id: I856788a8e9910f618a4f259a20a264e14b46e079
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
222c3fc5d6bff3cea0c220765e9e6d9bdad79667 23-Mar-2018 Daniel Colascione <dancol@google.com> Remove ATRACE_TAG_APP from atrace's control

We control app tracing via the -a option, which system properties that
early app startup code inspects. This startup code ATRACE_TAG_APP
internally depending on the value of the properties derived from the
-a space, so letting users control the global value of ATRACE_TAG_APP
from atrace provides a false sense of control.

This CL removes the ability to set the global tag, directing user
attention to the -a option instead.

Test: code inspection
Bug: 77814899
Change-Id: If981ba302db27da1c9f1942cf54d400bd4672b73
(cherry picked from commit a5d41e659acc691c6352d1c739e4f5c4ff2be3a7)
trace/atrace.cpp
587eac9815d8994f0d9f0b7584402aae353bcb2c 05-Apr-2018 Wei Wang <wvw@google.com> dumpstate: Kill vendor dumpstate HAL and grab partial dump in timeout

dumpstate_board should not block forever but it is also a valuable
source for debugging system problems. In timeout case, we should kill
dumpstate HAL in case it hangs (e.g. cat from a pipe or so), so the
following calls can be served by HAL service.

Bug: 77489941
Test: simulate delay in dumpstate HAL and get BR, see partial content
from dumpstate_board.tx and below log from dumpstate_log.txt
dumpstateBoard timed out after 10s, killing dumpstate vendor HAL
dumpstateBoard failed: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: '
Change-Id: Iadfd0c234c26714b6a2f1aa2941a85d4e01d2cbc
umpstate/dumpstate.cpp
4f1ad408b8b830e2b8dc852f65031e504b036a36 03-Apr-2018 Mathieu Chartier <mathieuc@google.com> Pass in new flag DEXOPT_GENERATE_APP_IMAGE to test cases

Test cases that expect an app image pass this flag down.

Bug: 72696798
Test: adb shell /data/nativetest64/installd_dexopt_test/installd_dexopt_test

Change-Id: I2845488bf3c3012d67120503219400cfcf7da716
nstalld/tests/installd_dexopt_test.cpp
ef4c9b64adb5926976813519c42d0ff9c0593861 03-Apr-2018 Amruth Ramachandran <amruthr@google.com> Merge "Add Wifi stats to telephony bugreport" into pi-dev
d08eab114a67343780e625fe7518d6f63f273c38 03-Apr-2018 Mathieu Chartier <mathieuc@google.com> Merge "Add flag for controling app image generation" into pi-dev
1b584d062ea998cb17f424a47bbebd27f0258529 03-Apr-2018 Jie Song <jies@google.com> Increase DumpstateBoard timeout to 30s

Bug: 77494218
Test: adb bugreport # dumpstate_board.* generated with no error
Change-Id: Iabaa46ea1f74e9c275d0394702bfe46ece3ef28a
umpstate/dumpstate.cpp
d25a914cd3d54dfa8760a928cf2b19d53bee27f4 03-Apr-2018 Amruth Ramachandran <amruthr@google.com> Add Wifi stats to telephony bugreport

Test: Verified through bugreports
Bug: 77489797
Change-Id: I868fe004b6b605b7c10e24c64ab400d5aaf45e27
umpstate/dumpstate.cpp
8f5982fddb5f741acdda9c6d5189b7597230b24c 31-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add a 10s timeout to DumpstateBoard" into pi-dev
7aecd381d74c4acfecdcd8fa03fda4debf5adfff 19-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Add a 10s timeout to DumpstateBoard

This change adds a timeout to DumpstateBoard so that it does not hang.

Bug: 34764308
Test: adb shell bugreportz # With a 0s timeout, didn't crash.
Test: adb shell bugreportz # Without an IDumpstateDevice impl, didn't crash.
Change-Id: Ib35fe3b3a1185afd15b0f228cb0cf868cc1eed65
umpstate/dumpstate.cpp
0d5aac13b1d0cab7837f03ec7cfe4bc73152e7b4 30-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "installd: update per fs-verity kernel uapi change" into pi-dev
6039fb714785dee1c668028656f467559c88dbbf 28-Mar-2018 Florian Mayer <fmayer@google.com> Migrate filesystem ftrace events from userdebug.

This is to complement the change in http://aosp/631805, which changes
their SELinux policy from debugfs_tracing_debug to debugfs_tracing.

Bug: 74584014
Cherry-picked from commit 557343b00c94722edefa1f77e4c20c227390e78a
Change-Id: I99a6177bfb38dd888037016a5f49250959d6c141
Merged-In: I99a6177bfb38dd888037016a5f49250959d6c141
trace/atrace.rc
trace/atrace_userdebug.rc
18ac0279c2ea52c72a539cae340502ca0dddcbc4 13-Mar-2018 Victor Hsieh <victorhsieh@google.com> installd: update per fs-verity kernel uapi change

- Update per format change.
- FS_IOC_ENABLE_VERITY now requires fd to be O_RDONLY.
- installApkVerity now also takes a content length.

Test: adb install a new priv app, see sucessful fs-verity log in dmesg.
Read the whole file successfully.
Bug: 76024439
Change-Id: I20cc56fb0c7a44a45c2a84b73159fba8403a1b8c
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
558e1ef07fb6169a1501a9b8637387abef611f34 22-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Let dumpstate die a normal death when receiving a singal

Having dumpstate not generate a crash report / tombstone makes
diagnosing crashes a bit harder. This change avoids calling _exit(3)
when receiving a signal, except for SIGPIPE which we just SIG_IGN.

Bug: 76120715
Test: dumpstate
Change-Id: I7bd986251f7174de77bdcfd4ff3ee26a1ef4afc7
umpstate/dumpstate.cpp
f7a23bd97a8ea900f9bf023c57f812855cfbf539 26-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Avoid crashing in RunDumpsysProto when not zipping" into pi-dev
0bc21a6b52ca5f321c0e9a117e497ca1fd31edd5 24-Mar-2018 Yifan Hong <elsk@google.com> Merge "lshal: uses instances API for --init-vintf" into pi-dev
1e27b08c1c96926f88c782b047214e09f29d57d2 22-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Avoid crashing in RunDumpsysProto when not zipping

When a .zip file is not being generated, RunDumpsysProto will segfault
while trying to get the last ZipWriter::FileEntry because ds.zip_writer_
is nullptr. This change avoids running the method altogether if not
zipping.

Bug: 76120715
Test: dumpsys
Change-Id: I184dd7b72564408e313f32f3045e2fe0e4521b5b
Merged-In: I184dd7b72564408e313f32f3045e2fe0e4521b5b
umpstate/dumpstate.cpp
8b6ee076b0aab91e22f0679e493f969a3e9f8ff0 22-Mar-2018 Yifan Hong <elsk@google.com> lshal: uses instances API for --init-vintf

Use the legacy <interface><instance> API.
Test: lshal_test
Test: lshal --init-vintf
Bug: 73738616

Change-Id: I7b3b01e45735bcf35f78e429da211e68c9654901
Merged-In: I7b3b01e45735bcf35f78e429da211e68c9654901
shal/ListCommand.cpp
47791e972a0127399808e429361e99c8a3a50c38 09-Mar-2018 Martijn Coenen <maco@google.com> atrace: support new AIDL trace tag.

So we can request AIDL traces.

Bug: 74416314
Test: inspect atrace output
Change-Id: Ifd5366080923fcb285849767672e9ef475e3de5d
trace/atrace.cpp
550b18cac578fd4faa9addaf172a21ecd99839dd 08-Mar-2018 Hector Dearman <hjd@google.com> Atrace: Add commandline flags to enable/disable userland tracing

Adds a commandline flag to Atrace for Perfetto: --only_userspace.

When --only_userspace is passed atrace does everything atrace
would normally do to set up/tear down tracing (set various system
properties, poke services etc) but doesn't modify any ftrace
settings, doesn't clear read or otherwise touch the ftrace buffer,
and doesn't start or stop tracing.

Perfetto allows recording and collection of ftrace kernel events
(as systrace/atrace does for local devices). We currently integrate
with atrace to collect non-kernel events using the async_start and
async_stop command line arguments. These cause atrace to poke
binder/hal services and apps then Perfetto scrapes the print ftrace
events from the kernel ring buffer.

There are two downsides:
1. Atrace attempts drain the ftrace buffer after Perfetto has already
done so.
2. Any time Atrace starts/stops it modifies the global ftrace settings and
clears the ring buffer.

The second is especially unfortunate as otherwise Perfetto supports
multiplexing multiple simultaneous traces.

This flag would make it much easier to integrate atrace and Perfetto.

To test:

atest cts/hostsidetests/atrace

external/chromium-trace/systrace.py input sched

First enable ftrace:
$ adb shell 'echo 2048 > /d/tracing/buffer_size_kb'
$ adb shell 'echo > /d/tracing/trace'
$ adb shell 'echo 1 > /d/tracing/tracing_on'

Next turn on the input category.
$ adb shell atrace --async_start --only_userspace input
Touch the screen a bunch.
$ adb shell cat /d/tracing/trace
Now you should see many events.

Next turn off the input category.
$ adb shell atrace --async_stop --only_userspace
Clear tracing.
$ adb shell 'echo > /d/tracing/trace'
Touch the screen a bunch.
$ adb shell cat /d/tracing/trace
You should see no events.

Ftrace settings should not have been touched:
$ adb shell cat /d/tracing/tracing_on
Should be 1 still.
$ adb shell cat /d/tracing/buffer_size_kb
Should be 2048 still.

Bug: 73625407
Test: see above.
Change-Id: Ia43ab689c4f93280315eb984581187c1582c2b07
Merged-In: Ia43ab689c4f93280315eb984581187c1582c2b07
trace/atrace.cpp
68b39240e53f77dd59f69a7443d0ac1c83bce2c9 16-Mar-2018 Elliott Hughes <enh@google.com> Always prefer poll over select.

Even with the fd leak fixed, we were still calling this code with fds
greater than 1024. From a tombstone from a dumpstate crash:

open files:
fd 0: /dev/pts/0
...
fd 18: /dev/stune/rt/tasks
fd 1806: /data/anr/anr_2018-03-15-15-39-43-990
fd 1807: /data/anr/anr_2018-03-15-15-39-43-991
fd 1808: /data/anr/anr_2018-03-15-15-39-43-992
fd 1809: /data/anr/anr_2018-03-15-15-39-43-993
fd 1810: /data/anr/anr_2018-03-15-15-39-43-994
fd 1811: /data/anr/anr_2018-03-15-15-39-43-995
fd 1812: /data/anr/anr_2018-03-15-15-39-43-996
fd 1813: /data/anr/anr_2018-03-15-15-39-43-997
fd 1814: /data/anr/anr_2018-03-15-15-39-43-998
fd 1815: /data/anr/anr_2018-03-15-15-39-43-999

Bug: http://b/73140330
Test: filled /data/anr/ with 2000 fake anrs, ran `dumpstate`

(cherry picked from commit ec616bc96e742d9f526d5594d077f8bff0ded835)

Change-Id: Id3265e86fd987853e59261ae5f8e3bd03d618374
umpstate/DumpstateInternal.cpp
5f6ee4a11de1de262cea6465c2f991834b2e4792 14-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Clean up DumpData-related functions

This change cleans a few DumpData-related functions:

* Makes GetDumpFds return the std::vector<DumpData> by value instead of
by pointer.
* Makes Dumpstate own the list of open tombstone and ANR files.
* Removes two more globals.
* Prevents a potential FD leak.

Bug: http://b/73140330
Test: `adb bugreport` succeeded

(cherry picked from commit 91c2ae50d57149366d5ab8ee9c763b4c4c6c9e0b)

Change-Id: I5ceb9e4fc1e123dfd6823a7626492ce0b63cf822
umpstate/dumpstate.cpp
umpstate/dumpstate.h
0a8c8f5399b2e9eb714267d9a4b744daa0ae9523 15-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make DropRootUser more container-friendly" into pi-dev
4eec17a87383ee27286eda7ce8fe1fd51d0fa9ef 15-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Avoid crashing when a directory does not exist" into pi-dev
b370a9b83d32982a9ef1325d74a250ceaf969b05 15-Mar-2018 Yifan Hong <elsk@google.com> Merge "Use ManifestHal constructor." into pi-dev
05d74917546ee1bfb8d45e6b79c6c433874d6e77 14-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Make DropRootUser more container-friendly

When Android is running as a container, it might not have CAP_SYSLOG
(since all the checks in the kernel are performed against the init
namespace). This change makes DropRootUser not raise CAP_SYSLOG if it
wasn't present to begin with.

Bug: 74568776
Test: DropRootUser no longer returns false when run in a container
Change-Id: Ia54ea81f51cc602c6304a81f50a55b2ccde7df36
umpstate/DumpstateInternal.cpp
d05127172ce1f113230b1774119b6d54475dc158 14-Mar-2018 Luis Hector Chavez <lhchavez@google.com> Avoid crashing when a directory does not exist

This change adds a null-check for the DIR* object to avoid a crash when
the directory cannot be opened for any reason.

Bug: 74568776
Test: calling dumpstate early in the boot sequence no longer crashes
Change-Id: I6c80f38dcf7890e607ce73e25a8ec0e16ba92586
umpstate/dumpstate.cpp
8263b0d17d478ad2950085a807633191190a7cdb 14-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "lshal: mention subclasses for third section" into pi-dev
a834a5d958fa96ce5edee07151498fe77822de15 13-Mar-2018 Yifan Hong <elsk@google.com> Use ManifestHal constructor.

ManifestHal has private fields and cannot use
aggregate constructor.
Test: builds
Bug: 73556059

Change-Id: Ia2fa0a7011794f61c28b5553e132baf4fcb37cdc
Merged-In: Ia2fa0a7011794f61c28b5553e132baf4fcb37cdc
shal/ListCommand.cpp
692794d74c4e4c9372fd9234d745d75555b96e2f 14-Mar-2018 Steven Moreland <smoreland@google.com> lshal: mention subclasses for third section

Third section of lshal shows installed passthrough
services. I've updated the comment to show that
these aren't necessarily the actual classes available
at runtime. This is based on an offline issue raised
by a vendor that thought the current text was confusing.

The actual check that the correct passthrough services
are served is done by vts_treble_vintf_test.

Bug: 74407622
Test: lshal
Change-Id: Ie314c7a4bd9abe9d52ca36cad1bf8da80493b3eb
shal/ListCommand.cpp
ad45a1b89bc3b6ec84ac32c4200be3d3c1d056fa 13-Mar-2018 Mathieu Chartier <mathieuc@google.com> Add flag for controling app image generation

So that package manager service can control this.

Bug: 72696798
Test: manual
Change-Id: I15fa74aff24ef14d22541117408840f80b7d300f
nstalld/dexopt.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/tests/installd_otapreopt_test.cpp
963b04fa5c8f30e01e648bb1f1b37c0a8ac1a964 09-Mar-2018 Sooraj Sasindran <sasindran@google.com> Add battery stats to telephony bugreport

Add battery stats to telephony bugreport

Test: verified by triggering telephony bugreport
Bug:74211680
Change-Id: I2d2dfc144fd6f0faa81583808d5f7cc3bf9841e8
umpstate/dumpstate.cpp
69f7bfe5f3d2bdf2f2697511f61923322f0d5676 09-Mar-2018 Mathieu Chartier <mathieuc@google.com> Merge changes from topic "cdex_commands" into pi-dev

* changes:
Add otapreopt logic for CompactDex version bump
Add new dexopt flag to control CompactDex generation
190cb7dd5e14e586916da51fdecaf446697633ef 08-Mar-2018 Wei Wang <wvw@google.com> atrace: only start trace when starting trace

Bug: 74396309
Test: atrace --async_stop > trace
Change-Id: I50a2bc224d6c48aa7cecf69a57b30c8ccc88b9e0
trace/atrace.cpp
a3a18bee9da74037eca0cca7aa63a85ef4ca2901 07-Mar-2018 Mathieu Chartier <mathieuc@google.com> Add otapreopt logic for CompactDex version bump

For old versions, or in the flag.

Bug: 63756964
Bug: 74245837
Test: adb shell /data/nativetest64/installd_otapreopt_test/installd_otapreopt_test

(cherry picked from commit dbc4ce6f9a60b5e4d7e7bcbb4c3fac8a71b7984c)

Merged-In: Ie316f5327ca479f55b34a3ddb7cd6640043116cd
Change-Id: If8442870c85330005ceea52bad07a07c9105091a
nstalld/otapreopt_parameters.cpp
nstalld/tests/installd_otapreopt_test.cpp
351bc94ede0f9b8d187bf09b3392621432c9a61b 06-Mar-2018 Mathieu Chartier <mathieuc@google.com> Add new dexopt flag to control CompactDex generation

Add a new flag to control CompactDex generation, this allows more
flexibility regarding when compact dex is generated.

The goal is to generate it for cmd package compile.

Bug: 63756964
Bug: 74245837
Test: adb shell /data/nativetest64/installd_dexopt_test/installd_dexopt_test

(cherry picked from commit f69c2f7f64e873049f66cfbed1aaad539bf0e063)

Merged-In: I0674f50bbb7413b67e6fbab3199f5c7e78ec875c
Change-Id: I8ed2e41ab94960ca8ac75008a74d5abd14e9ec97
nstalld/dexopt.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
5ce418dc5eca354acb5c66dcbb47e7c0aa369ce8 06-Feb-2018 Kweku Adams <kwekua@google.com> Creating dumputils library.

This moves methods and variables needed for stack trace dumps to a
separate library so that incidentd can also get dumps without
duplicating too much code.

Bug: 72177715
Test: flash device and collect a regular bug report
Change-Id: I68f367c32cbcac99f43305f73bb504ba7a1e4437
umpstate/Android.bp
umpstate/utils.cpp
43343c6917f33521b4d98ab3506a9d2242571c2d 02-Mar-2018 Andreas Gampe <agampe@google.com> Merge "Installd: Check for dex2oatd before running it" am: a4d8dae190 am: 7a37fb6d9a
am: 745f59516c

Change-Id: I6aca90786fd793a1696c87570b3ab813aea8caf4
e87fe0a1c2d48800b70ad33babf5296a5ce589aa 02-Mar-2018 Andreas Gampe <agampe@google.com> Installd: Check for dex2oatd before running it

Only select dex2oatd when it is actually available. Moves
a check to be a conditional.

Test: mmma frameworks/native/cmds/installd
Test: installd_dexopt_test
Change-Id: I4c5a8de68d0b4874632518733aeada22e1e6290c
nstalld/dexopt.cpp
5d6a8455e7d0b1d8e4e9da09999e9581460c3271 02-Mar-2018 Andreas Gampe <agampe@google.com> Merge changes Ie795897d,I86e1cfed,I840ecbca am: 1636f41a45 am: c77adfad4d
am: e31c1e0aac

Change-Id: I0a01a5f9662843822823708783645256ac4e0042
123a045feee71e071f807ce02299e542685fb38e 02-Mar-2018 Andreas Gampe <agampe@google.com> Merge "Installd: Add error message to dexopt" am: 0edada736b am: a6a9fe2b33
am: e79be50fa5

Change-Id: I360b3fd9f9d42b1c9595140f8c8cd88306fd2b5f
3008bbefaa4719cbbf5aad6dc3f3934c50668da5 01-Mar-2018 Andreas Gampe <agampe@google.com> Installd: Amend dexopt binder logging

Separate dexoptanalyzer validation errors into different return
codes and add specific error messages. Also fix name style.

Test: mmma frameworks/native/cmds/installd
Test: installd_dexopt_test
Change-Id: Ie795897d112ded630de65c2ac7d7ee1a4b2a20a5
nstalld/dexopt.cpp
nstalld/tests/installd_dexopt_test.cpp
194fe428447c657c78347032040f872756f3283d 01-Mar-2018 Andreas Gampe <agampe@google.com> Installd: Amend dexopt binder logging

Add a bit more specific logging for secondary dexopt. Refactor
constants to enum to aid in adding more cases.

Test: mmma frameworks/native/cmds/installd
Test: installd_dexopt_test
Change-Id: I86e1cfed4b092ffe0a47553309451ad6fa077473
nstalld/dexopt.cpp
nstalld/tests/installd_dexopt_test.cpp
fa2dadd64b42c6c24d1cda007ce59a33696517e2 01-Mar-2018 Andreas Gampe <agampe@google.com> Installd: Amend dexopt binder logging

Add an enum for all exit codes used inside dexopt.cpp. Use the dex2oat
return-codes enum for dex2oat exec results. Add a function to map
these enum cases to small string snippets.

Test: mmma frameworks/native/cmds/installd
Test: installd_dexopt_test
Change-Id: I840ecbcaeb3ec1dcd9bd37dff9bdea35202b4731
nstalld/Android.bp
nstalld/dexopt.cpp
nstalld/dexopt_return_codes.h
nstalld/tests/installd_dexopt_test.cpp
023b22415ba9ce046f649817da27e40db8893451 01-Mar-2018 Andreas Gampe <agampe@google.com> Installd: Add error message to dexopt

To give better messages to the binder call, add an out parameter.
This is only the start, threading things further into the calls
dexopt makes, and formatting according to exit codes, will be in
a follow-up CL.

Test: installd_dexopt_test
Change-Id: I0271212c5cddf3a6317d6b597e97537865723fdc
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/tests/installd_dexopt_test.cpp
1468e8cb33660914f915bd2b5a6401b85290aa87 01-Mar-2018 Andreas Gampe <agampe@google.com> Merge "ART: Fix LOG_FATAL" am: 1330e553cc am: 4a4636369a
am: 30721b3a02

Change-Id: I094fa848eb623b60d3343415781636cd5bf31300
d32eec2d9b37c57bc1b5491a63a04a356a7f8dd7 01-Mar-2018 Andreas Gampe <agampe@google.com> ART: Fix LOG_FATAL

Really use LOG(FATAL), which actually isn't disabled under NDEBUG. Fix up
other uses.

Test: installd_dexopt_test
Change-Id: Ib06f5f7e158a451fd2bf7ddf24b800373e72c570
nstalld/dexopt.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
5adbc5bec49f6d4cc9e1f232dc32c3128e3f6508 28-Feb-2018 Chih-hung Hsieh <chh@google.com> Merge "Revert "Use arm instruction set with clang 7.0 LTO""
1ebe77f1520fbbd7f633eef42c867fe79b672c1d 27-Feb-2018 Jeff Sharkey <jsharkey@android.com> Use absolute paths in tests.

Test: /data/nativetest64/installd_cache_test/installd_cache_test
Test: /data/nativetest64/installd_dexopt_test/installd_dexopt_test
Test: /data/nativetest64/installd_otapreopt_test/installd_otapreopt_test
Test: /data/nativetest64/installd_service_test/installd_service_test
Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 73950947

(cherry picked from commit 8e9bf35a8089e152af3d75e1819d9112cea0c07c)

Change-Id: I4dd99b270ce02ba78794841b30542a9e37ae7b81
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_dexopt_test.cpp
b87b86134cc86628a520c59781dc7c70dc18ec97 27-Feb-2018 lingfan <lingfank@google.com> Merge "added usage of dumpstateService to bugreportwear option" am: 361f2e0366 am: 55d7a1cbdf
am: 5f96cb6159

Change-Id: Ie3f614d7ca408d37ecec0858f498f56c50a689fb
e817d49c90ceb413535fa53f38ad31aae18983e1 27-Feb-2018 Jeff Sharkey <jsharkey@google.com> Merge "Use absolute paths in tests."
e242bdf15d25545d7962b530949afe52665efb29 27-Feb-2018 Andreas Gampe <agampe@google.com> Merge "Installd: Add context to test errors" am: acbad287a9 am: f6ef48e878
am: 197156a622

Change-Id: I4fd2e80bfe6bf1bb446f1aed8e02bf9acedcdefd
446125176065d1d253583f455d1e708044004352 27-Feb-2018 lingfan <lingfank@google.com> added usage of dumpstateService to bugreportwear option

Bug: 72459868

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push $OUT/system/lib/* /system/lib/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test

Change-Id: Ic7c89cf241a651a4ad0e979aa658e1260a39d07b
umpstate/dumpstate.cpp
8e9bf35a8089e152af3d75e1819d9112cea0c07c 27-Feb-2018 Jeff Sharkey <jsharkey@android.com> Use absolute paths in tests.

Test: /data/nativetest64/installd_cache_test/installd_cache_test
Test: /data/nativetest64/installd_dexopt_test/installd_dexopt_test
Test: /data/nativetest64/installd_otapreopt_test/installd_otapreopt_test
Test: /data/nativetest64/installd_service_test/installd_service_test
Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 73950947
Change-Id: I68c9d5a750d6528aadac40230182602f8222ed5d
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_dexopt_test.cpp
f6a93b1969c18d92e3c218ed7856cb5d9c872fcd 27-Feb-2018 Andreas Gampe <agampe@google.com> Installd: Add context to test errors

Print binder return status message.

Bug: 73950947
Test: mmma frameworks/native/cmds/installd
Change-Id: Ie2ff166f42a957f0e34315c6c3623bc546d986e1
nstalld/tests/installd_dexopt_test.cpp
08300cf571a45404d712cb366b88f75b8841fff0 27-Feb-2018 Chih-hung Hsieh <chh@google.com> Merge "Revert "Use arm instruction set with clang 7.0 LTO""
4b15646e9da780c18648d91e58ac00a054233231 27-Feb-2018 Chih-hung Hsieh <chh@google.com> Revert "Use arm instruction set with clang 7.0 LTO"

This reverts commit ffb5375c37804f84750a2092779ced5b986850a3.
Clang 7.0 LTO shouldn't need arm instruction set,
if we revert one LLVM recent change.

Bug: 72619014
Change-Id: I513fc78b2fde7ee95cd1bf2153dd647d2fbd196e
Merged-In: Ic1ee146b823602ae419891f5e0956640109dd397
urfacereplayer/proto/Android.bp
9da3732eea7cf32fb12cc08f03e9b16a588d0d96 27-Feb-2018 Chih-hung Hsieh <chh@google.com> Revert "Use arm instruction set with clang 7.0 LTO"

This reverts commit 94574f271fe8730d841a286069c198c6e74fc9e5.
Clang 7.0 LTO shouldn't need arm instruction set,
if we revert one LLVM recent change.

Bug: 72619014
Change-Id: Ic1ee146b823602ae419891f5e0956640109dd397
urfacereplayer/proto/Android.bp
5359430a97127786e37ad8b8cda897064063c04e 25-Feb-2018 Jeff Sharkey <jsharkey@android.com> Sanity check paths coming into installd.

Since installd is an extremely privlidged execution domain, we should
be as paranoid as possible about any incoming raw text input.

To that effect, this change asserts that incoming paths are absolute
and aren't trying to play any weird shenanigans. (This borrows the
same logic used over in vold.)

Also fix subtle bugs where AID_SYSTEM wasn't being checked, and the
installd lock wasn't being acquired. (If a lock isn't needed, we
always want a comment block explaining why.)

Test: builds, boots, new apps install/uninstall fine
Bug: 71871109
Change-Id: I8ad0aafa794b0ebb9e7cc4831004fc0022acd747
nstalld/InstalldNativeService.cpp
9a633012eaf3b022bda12e7ad65558d05f3a9e38 23-Feb-2018 Narayan Kamath <narayan@google.com> Merge "Fix broken time comparison." am: e9f6953dea am: 658c49b55f
am: f4392dbd37

Change-Id: I5635ee7dd701286027bd103b87accec40cf3d0ff
e9f6953dea90f262e3c22e90001ee458b3ea40c2 23-Feb-2018 Narayan Kamath <narayan@google.com> Merge "Fix broken time comparison."
3f31b6319f88ba81470c21711dacfb0b8bf11bee 22-Feb-2018 Narayan Kamath <narayan@google.com> Fix broken time comparison.

This change fixes a broken check that excludes all recent tombstones
and ANRs and only preserves old ones. Luckily, limit_by_mtime is only
true for flat (non-zipped) bug reports so we haven't seen this too
often in practice.

Test: manual
Bug: 73759506
Change-Id: Ic7856a4a1f5af3b1d5c5becb7bc83d2def4a71ea
umpstate/dumpstate.cpp
391efc2e4a00e6e408d5a21c138ef8bcba90eb90 22-Feb-2018 Wei Wang <wvw@google.com> Add clk tracing to freq category

Upstream has clk_* in `/trace/events/clk.h' and clock_* `/trace/events/power.h'
for reporting clock events, and individual driver may pick either.

Bug: 73775767
Test: collect systrace
Change-Id: Id187e448a414cb2420b40d65ecf6219296d45172
trace/atrace.cpp
c1d316f4edfa8a91aafe51d9ac2c8cd2199b8f76 21-Feb-2018 Wei Wang <wvw@google.com> Merge "atrace.rc: enable schedstats by default" am: 7a8270d1ea am: 58e422c17e
am: bf78e271ce

Change-Id: Ibaa95205c960b20d14992cc5b482bab1962f7bcb
7a8270d1ea3931efeb965ce6472b0cafe14e5c8f 21-Feb-2018 Wei Wang <wvw@google.com> Merge "atrace.rc: enable schedstats by default"
85d806934b70e79694ca0bc7010402e445dc8771 20-Feb-2018 Daniel Colascione <dancol@google.com> Merge "Lift atrace restriction of 16 traced apps" am: 79aa906eb6 am: 0ab150caa9
am: f6b8ccff82

Change-Id: I0fc956b4fded2e99e6aebd17730c2c3fd4f74750
79aa906eb6ad4d9a59efeacdc7338f7cb4376248 20-Feb-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "Lift atrace restriction of 16 traced apps"
14681db0b2938809b8cc37185d4d6b717e3f3906 20-Feb-2018 Wei Wang <wvw@google.com> atrace.rc: enable schedstats by default

Scheduler tracepoints stat_sleep, stat_iowait, stat_blocked and
stat_runtime require the kernel parameter schedstats=enable

Bug: 73652288
Test: build
Change-Id: I9e40742d7e328561aca00fd4989f3513382a747f
trace/atrace.rc
eb7d56760522c0033a460eba99909953d73fe606 20-Feb-2018 Chris Morin <cmtm@google.com> Merge "have patchoat take directories instead of filenames" am: a92749ebae am: 6853290fcb
am: 82d2d092bc

Change-Id: I7e31caa95ecafa05a153b90bafe9c89bed72fd46
a92749ebae493aa81526f306db407fa980cc3ff7 20-Feb-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "have patchoat take directories instead of filenames"
f738ad3d938d2812061bf8fa5df2c805a5f67442 19-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add tracing tags to vibrator"
2efc402a934d4d4d755d91d8bef5fdc3192084c3 14-Feb-2018 Calin Juravle <calin@google.com> [installd] Pass --compilation-reason to dex2oat

Test: installd_dexopt_test, installd_otapreopt_test
Bug: 73102540

Change-Id: I22854f040c08ea3207860f29b374c66fe2f21750
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_otapreopt_test.cpp
dcccd832b4a3df77bac551a118b2a35fd6f65d9b 14-Feb-2018 Calin Juravle <calin@google.com> [installd] Pass --compilation-reason to dex2oat

Test: installd_dexopt_test, installd_otapreopt_test
Bug: 73102540

Change-Id: I22854f040c08ea3207860f29b374c66fe2f21750
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_otapreopt_test.cpp
0c609c25d69e57e2cf906039d2a7b69de5f78bde 13-Feb-2018 Calin Juravle <calin@google.com> Fix otapreopt parameters reading

The code was missing a break in the switch statement and was always
failing the default CHECK.

Also, move the logging to standard error to make it obvious the test
failed (instead of relying on the exit code which can be easily missed).

(cherry picked from commit fd0c5b1aef5814b91f656341089d11291762a250)

Test: installd_otapreopt_test
Bug: 71993124
Merged-In: Iaf29ebc9b930981bf3b75c33e63e940139421e1d
Change-Id: Iaf29ebc9b930981bf3b75c33e63e940139421e1d
nstalld/otapreopt_parameters.cpp
nstalld/tests/installd_otapreopt_test.cpp
40b5f46cafa02d48d58b3d5a458df5aceaba52e9 07-Feb-2018 Calin Juravle <calin@google.com> Fix profileSnapshot test in installd.

We need to pass the apk path to profman when generating the
expected profile.

(cherry picked from commit 989fc50a1a52c57c218c9ccc681847c6c120d892)

Test: installd_dexopt_test
Bug: 73053897
Merged-In: I86bb30170a722b1917235daf1c98b478d412c5c3
Change-Id: I86bb30170a722b1917235daf1c98b478d412c5c3
nstalld/tests/installd_dexopt_test.cpp
5bd1c7251a6a3a4318d24c1f89edebfecb98836d 01-Feb-2018 Calin Juravle <calin@google.com> Allow public profile compilation for primary apks

It is ok to perform a "public" compilation with
profiles comming from dex metdata files.

The PackageManager is responsible to set the is_public flag for
primary apks; so we no longer check it in installd.

(cherry picked from commit 0b386e03f83d9a308aecaebb6c7c1d6f36b79e27)

Test: installd_dexopt_test
Bug: 30934496
Merged-In: I72519c6a05aa318985396c6f93176624fe76c4be
Change-Id: I72519c6a05aa318985396c6f93176624fe76c4be
nstalld/dexopt.cpp
nstalld/tests/installd_dexopt_test.cpp
62c5a373fccf94cb3c125514aaff033d36fc101e 01-Feb-2018 Calin Juravle <calin@google.com> [installd] Pass .dm files to dexopt

(cherry picked from commit cc3b8aeff19f39afb8d4f2c198ee6cd2ec132d22)

Test: installd_otapreopt_test installd_dexopt_test
Bug: 30934496
Merged-In: I3cb5b3f96205688203a134023492d8ff80524ab6
Change-Id: I3cb5b3f96205688203a134023492d8ff80524ab6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_otapreopt_test.cpp
f63d479fe67ea9da8baa755d499e6457221b89d9 30-Jan-2018 Calin Juravle <calin@google.com> Replace profman invocation for prepareAppProfiles

Instead of using the default merging path, use the dedicated
copy_and_update_profile_key path which will also update the
profile key to the actual apk path.

(cherry picked from commit b7eecae060ac625c38dd56b064a44391a569dcf6)

Test: installd_dexopt_test
Bug: 30934496

Merged-In: Ib268be534e3832598d55cacf0aad1c723772cc6c
Change-Id: Ib268be534e3832598d55cacf0aad1c723772cc6c
nstalld/dexopt.cpp
315d1f54388acc6881c190f8cf78f53c90ec329d 01-Feb-2018 Calin Juravle <calin@google.com> Refactor argument parsing in ota preopt

Unify the parsing of all the versions. This will make it much
easier to extend the interface to accept new arguments.

(cherry picked from commit 7707aeaa92171bc34718ceaf0554e982d2e92729)

Test: installd_otapreopt_test
Bug: 30934496
Merged-In: Idf945d3f4078b4ef86e2c2532b321768d2868fa7
Change-Id: Idf945d3f4078b4ef86e2c2532b321768d2868fa7
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
dff4729abb051bebd05b2e520b9c43dee0d332ab 01-Feb-2018 Calin Juravle <calin@google.com> Extract the otapreopt parameters in their own class and add tests

This is in preparation to get rid of the annoying
ReadArgumentV1..5 pattern and to be able to write
unit tests.

(cherry picked from commit c9e76799ef0dc4358fb5e2a815c42311aac6b81b)

Test: installd_dexopt_test
Bug: 72666394
Merged-In: I0ad438ee69aa82d9ff2ad2f94d465dcc78ea8c28
Change-Id: I0ad438ee69aa82d9ff2ad2f94d465dcc78ea8c28
nstalld/Android.bp
nstalld/Android.mk
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
nstalld/tests/Android.bp
nstalld/tests/installd_otapreopt_test.cpp
c4f6a0b6333980a069900e2afff2c755f30fe09c 01-Feb-2018 Calin Juravle <calin@google.com> Fix profile guided compilation for secondaries and add more tests

The method signature for opening the reference profile was wrong
and did not account to the fact that the profile name can be
null for secondary dex files.

Also, add infrastructure to test dexopt for primary apks and add
an initial set of tests.

(cherry picked from commit 2372d12577540bd41c74f2d1cd6f604a0390d726)

Test: installd_dexopt_test
Bug: 72666394
Merged-In: I537a3f52a1449a8edb070643500a4d241728cb9a
Change-Id: I537a3f52a1449a8edb070643500a4d241728cb9a
nstalld/dexopt.cpp
nstalld/tests/installd_dexopt_test.cpp
0d0a49205ff08bdf23124455b6b31ace81edd4f6 24-Jan-2018 Calin Juravle <calin@google.com> [installd] Create profile snaphots for boot image

Create the profile snapshot for the boot image by aggregating all primary
profiles. During aggregation data that does not belong to the boot image
is filtered out. The matching is done based on the dex files provided in
the classpath argument.

(cherry picked from commit e61189e0ad2104360a188d36210bd1ee43803a64)

Test: installd_dexopt_test
Bug: 30934496
Merged-In: Ib980ab3feb9f9838dff81a3861693cd08b1df9ab
Change-Id: Ib980ab3feb9f9838dff81a3861693cd08b1df9ab
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/utils.cpp
nstalld/utils.h
408cd4ab394ce6640f43665639bc3fb0ac296ca6 21-Jan-2018 Calin Juravle <calin@google.com> [installd] Extend profile operations to take the profile name

Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

(cherry picked from commit 562de815339bedd29206f5f98be44c824945b627)

Test: installd_dexopt_test
Bug: 30934496
Merged-In: I5847d35fe4d3caa5a2b32293426a24683af42030
Change-Id: I5847d35fe4d3caa5a2b32293426a24683af42030
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/tests/installd_dexopt_test.cpp
c3b049e0294a5884b18f0f29f3af14e6de0803c7 19-Jan-2018 Calin Juravle <calin@google.com> [installd] Prepare profiles for app code paths

Implement profile preparation for individual application code paths.

The preparation is:
- create the current profile
- merge the profile from the dex metadata file (if present) into the
reference profile.

Note: currently the current profile is created as part of
InstalldNativeService::createAppData for the entire package. That logic
does not support dex metadata or individual code paths and will be removed
once the PackageManager switches over the new method.

(cherry picked from commit bc5ab878b56bcd3a300cc5fc0facc864421dfcb6)

Test: installd_dexopt_test
Bug: 30934496
Merged-In: I2aeddcda7b78017bd46838985bef5f92a79d4573
Change-Id: I2aeddcda7b78017bd46838985bef5f92a79d4573
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
824a64db8db2e9bf5c601f2568544ea1c3b4dd3e 19-Jan-2018 Calin Juravle <calin@google.com> Prepare installd to handle profiles per code path

Transform each profile operation to accept the pair
(package_name, profile_name). This will allow installd to get the profile
name from the PackageManager instead of assuming a predefined name. The
PackageManager will compute and assign unique profile names for each code
path.

The end goal is to support installation and extraction of profiles per
code path.

Also, add a few extra tests for merging the profiles.

(cherry picked from commit cfcd6aa28593a227d39868f6f567264fca1360a1)

Test: installd_dexopt_test, installd_utils_test
Bug: 30934496
Merged-In: I580f037d9d3e5537032e815dc803b9ddeff343cb
Change-Id: I580f037d9d3e5537032e815dc803b9ddeff343cb
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
a25d90ce8da7d6e70d0ea18a50134bb0122c4017 16-Oct-2017 Alan Stokes <alanstokes@google.com> Add Installd IPC to compute the SHA256 of a seconday dex file.

(cherry picked from commit 753dc71734927f86c277991be9326cb9a82202b1)

Bug: 63927552
Test: Exercised manually. Added unit tests in installd_service_test.

Merged-In: If9df7a88f3a3039aab69ed5f200d14cb19794cb3
Change-Id: If9df7a88f3a3039aab69ed5f200d14cb19794cb3
nstalld/Android.bp
nstalld/Android.mk
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/Android.bp
nstalld/tests/installd_service_test.cpp
522491627cc6ec4036ed5a5f95b80e04063590aa 13-Feb-2018 David Brazdil <dbrazdil@google.com> Refactor runtime hidden API flag from negative to positive

There are only two situations in which we want to enable hidden API
access flag checks. Turning the flag from DISABLE_ to ENABLE_
simplifies logic in ART and reduces the number places where the flag
had to be passed down to ART.

Bug: 64382372
Test: boot device, install and run apps, check log messages
(cherry picked from commit 22cce5a179a1dd47cf402fbff9170df2e4703264)

Change-Id: I468df458e9dd9e6a9b5ec56c03d1ba56c850c4dc
nstalld/dexopt.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
d079f373da44601f44a27438827f998d9f3162b1 14-Feb-2018 David Brazdil <dbrazdil@google.com> Merge "Refactor runtime hidden API flag from negative to positive"
77c48751b5a80143b44d070b415892836c63fb19 14-Feb-2018 Chris Morin <cmtm@google.com> have patchoat take directories instead of filenames

patchoat was already ignoring the basename part of the filename passed
to it for both --output-image-file and --output-image-relocation-file.
We can therefore just pass in the directories instead.

Bug: 72828459
Test: make test-art-host-gtest-patchoat_test
Change-Id: Ie4f035b9953f8d79cd57b6239dd0d703b78505c9
nstalld/otapreopt.cpp
784a20f5d776797c8e63ea1adb0d2bca658541ab 13-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add SDE tracing to gfx category"
e2c104625d60ee2be3d727f7074fe649c3fed377 13-Feb-2018 Wei Wang <wvw@google.com> Add SDE tracing to gfx category

Bug: 73168288
Test: Ran systrace, verified sde shows up with just gfx tag
Change-Id: I9a97bf279409cd710e784e08a9ec309c12f09213
trace/atrace.cpp
c6fbec9a287c2c5ca1ae4fcf73999346b3c10720 13-Feb-2018 Chih-hung Hsieh <chh@google.com> Merge "Use arm instruction set with clang 7.0 LTO"
22cce5a179a1dd47cf402fbff9170df2e4703264 13-Feb-2018 David Brazdil <dbrazdil@google.com> Refactor runtime hidden API flag from negative to positive

There are only two situations in which we want to enable hidden API
access flag checks. Turning the flag from DISABLE_ to ENABLE_
simplifies logic in ART and reduces the number places where the flag
had to be passed down to ART.

Bug: 64382372
Test: boot device, install and run apps, check log messages
Change-Id: Iae603ff3988057269b3011a4d32bc6031b323653
nstalld/dexopt.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
fd0c5b1aef5814b91f656341089d11291762a250 13-Feb-2018 Calin Juravle <calin@google.com> Fix otapreopt parameters reading

The code was missing a break in the switch statement and was always
failing the default CHECK.

Also, move the logging to standard error to make it obvious the test
failed (instead of relying on the exit code which can be easily missed).

Test: installd_otapreopt_test
Bug: 71993124
Change-Id: Iaf29ebc9b930981bf3b75c33e63e940139421e1d
nstalld/otapreopt_parameters.cpp
nstalld/tests/installd_otapreopt_test.cpp
ffb5375c37804f84750a2092779ced5b986850a3 12-Feb-2018 Chih-Hung Hsieh <chh@google.com> Use arm instruction set with clang 7.0 LTO

* surfaceflinger.so uses LTO.
clang 7.0 LTO inlined more code and some references
are too far away to use thumb instructions.

Bug: 72619014
Test: build with Forrest
Merged-In: Ia09931e93a170ac58007f80da2d580bb9b9635a6
Change-Id: I2cbb652a9a8d908d9444a267e6d234b135c279b5
urfacereplayer/proto/Android.bp
94574f271fe8730d841a286069c198c6e74fc9e5 08-Feb-2018 Chih-Hung Hsieh <chh@google.com> Use arm instruction set with clang 7.0 LTO

* surfaceflinger.so uses LTO.
clang 7.0 LTO inlined more code and some references
are too far away to use thumb instructions.

Bug: 72619014
Test: run Forrest
Change-Id: Ia09931e93a170ac58007f80da2d580bb9b9635a6
urfacereplayer/proto/Android.bp
808b51c4b9df05001618e9462876343f8f537b69 10-Feb-2018 Alexey Kuzmin <alexeykuzmin@google.com> Add tracing tags to vibrator

Now all somewhat time-consuming methods of the VibratorService
are surrounded by traceBegin/traceEnd blocks.
The vibration itself is surrounded with asyncTrace block.

Test: Run "systrace vibrator" and see the time consumption report.
Bug: 73000045
Change-Id: I68cfc4d856e9c0944c3af6c350d3fd690fd3401e
trace/atrace.cpp
519a0790d7039ee9ed52ae057de30db0fddaee59 10-Feb-2018 Daniel Colascione <dancol@google.com> Lift atrace restriction of 16 traced apps

Test: works?
Change-Id: Ica6d0e5c050a3417bf2485dc0ac084ec91b72ebb
trace/atrace.cpp
989fc50a1a52c57c218c9ccc681847c6c120d892 07-Feb-2018 Calin Juravle <calin@google.com> Fix profileSnapshot test in installd.

We need to pass the apk path to profman when generating the
expected profile.

Test: installd_dexopt_test
Bug: 73053897
Change-Id: I86bb30170a722b1917235daf1c98b478d412c5c3
nstalld/tests/installd_dexopt_test.cpp
7e16da0eb98afb65425b392d43c73ff1a363f93f 07-Feb-2018 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_init_vintf_type" am: 73c392450d am: e1f7a97f0c
am: 60752b9be1

Change-Id: I687e7c418e39fd186c31d829aaaf28c0e47ce04c
f31aa05f9c3df1d278f55fd6f4ab742542e77c80 03-Feb-2018 Yifan Hong <elsk@google.com> lshal --init-vintf: can specify manifest partition

lshal --init-vintf [--init-vintf-partition=vendor] generates
device manifest.

lshal --init-vintf --init-vintf-partition=system generates
framework manifest.

lshal --init-vintf --init-vintf-partition=odm generates odm manifest.

Test: the above commands
health/backup is in system manifest
IBase is not in any manifest
graphics.composer/vr is in system manifest

Test: lshal_test

Fixes: 71802285
Change-Id: Ie16c8914218ece5c3cd698c93f2bada1be3ee29f
shal/Android.bp
shal/ListCommand.cpp
shal/ListCommand.h
shal/TableEntry.h
shal/test.cpp
1cd975c011fbf7940a8ab156da43ffc388783ddb 05-Feb-2018 Yifan Hong <elsk@google.com> lshal: add libprocpartition

... that determines the partition of a process.

Bug: 71802285
Test: lshal_test
Test: vts_treble_vintf_test

Change-Id: I7aa0b773be65a3111c0417de1f0e79c8e12ef6fb
shal/libprocpartition/Android.bp
shal/libprocpartition/include/procpartition/procpartition.h
shal/libprocpartition/procpartition.cpp
64afc024d760e31f3f41e0c5cb8fc543c9392ef1 02-Feb-2018 Vishnu Nair <vishnun@google.com> Flip bugreport version to 2.0

- Adds support for proto dumps
- Adds support for priority service dumps
- Change order of arguments when dumping Normal priority services
- Adds a new DEFAULT priority for services which is treated the same as NORMAL priority but dumpsys does not send "--dump-priority" arguments to the service.
Bug: 67716082, 27429130
Test: Manually generate bugreport (default version) and check for any issues
Test: Load bugreport on ABT
Test: mmm -j56 frameworks/native/cmds/dumpstate && \
adb sync data && adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test && \
adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: Ie8761a2dd0425574b0d905752e1562196a1f7426
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
umpsys/dumpsys.cpp
umpsys/tests/dumpsys_test.cpp
c503c41770575d53c99fe7a2593b463600088795 02-Feb-2018 Jiwen Cai <jiwen@google.com> Merge changes Ie10034db,I26ba18f2

* changes:
Update buffer_transport_benchmark to use DVR API
Build libbufferhubqueue and libpdx_default_transport as shared library
538ae802a6277c5e7194123556c810da020c58d4 02-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "installd: change fsverity ioctl"
b866116c9477d63d9cba4d0a05bc7540df9253fb 02-Feb-2018 Victor Hsieh <victorhsieh@google.com> installd: change fsverity ioctl

The previously allocated numbers are out of range (8 bits).

Test: both ioctl returns correctly with the kernel change
Bug: 30972906
Change-Id: Ib252c522d11cfc819c46a573fa4c579aaca692f0
nstalld/InstalldNativeService.cpp
0b386e03f83d9a308aecaebb6c7c1d6f36b79e27 01-Feb-2018 Calin Juravle <calin@google.com> Allow public profile compilation for primary apks

It is ok to perform a "public" compilation with
profiles comming from dex metdata files.

The PackageManager is responsible to set the is_public flag for
primary apks; so we no longer check it in installd.

Test: installd_dexopt_test
Bug: 30934496
Change-Id: I72519c6a05aa318985396c6f93176624fe76c4be
nstalld/dexopt.cpp
nstalld/tests/installd_dexopt_test.cpp
cc3b8aeff19f39afb8d4f2c198ee6cd2ec132d22 01-Feb-2018 Calin Juravle <calin@google.com> [installd] Pass .dm files to dexopt

Test: installd_otapreopt_test installd_dexopt_test
Bug: 30934496
Change-Id: I3cb5b3f96205688203a134023492d8ff80524ab6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_otapreopt_test.cpp
ad87a6900094bbd4cf1d01f979ae6611543f76dc 02-Feb-2018 Calin Juravle <calin@google.com> Merge "Refactor argument parsing in ota preopt"
b6db090f6510375dde9770614941d5a84efd92bd 02-Feb-2018 Calin Juravle <calin@google.com> Merge "Extract the otapreopt parameters in their own class and add tests"
037f35aea612c0b4f3976e9e27cf68a0b8913e2f 26-Jan-2018 Jiwen 'Steve' Cai <jwcai@google.com> Build libbufferhubqueue and libpdx_default_transport as shared library

Now that we are moving BufferHub into libgui, these two libraries are
being linked into libgui.so and libdvr.so respectively as static
lib. This is cauing issues when a binary/app depends on both, i.e. two
copies of the static lib will live in the same binary. We can avoid this
issue by building these two as shared library.

Test: Build system
Bug: 72763929
Change-Id: I26ba18f2b84d43cbd62b26dbb9ee0574c2974f7d
trace/Android.bp
b7eecae060ac625c38dd56b064a44391a569dcf6 30-Jan-2018 Calin Juravle <calin@google.com> Replace profman invocation for prepareAppProfiles

Instead of using the default merging path, use the dedicated
copy_and_update_profile_key path which will also update the
profile key to the actual apk path.

Test: installd_dexopt_test
Bug: 30934496

Change-Id: Ib268be534e3832598d55cacf0aad1c723772cc6c
nstalld/dexopt.cpp
7707aeaa92171bc34718ceaf0554e982d2e92729 01-Feb-2018 Calin Juravle <calin@google.com> Refactor argument parsing in ota preopt

Unify the parsing of all the versions. This will make it much
easier to extend the interface to accept new arguments.

Test: installd_otapreopt_test
Bug: 30934496
Change-Id: Idf945d3f4078b4ef86e2c2532b321768d2868fa7
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
c9e76799ef0dc4358fb5e2a815c42311aac6b81b 01-Feb-2018 Calin Juravle <calin@google.com> Extract the otapreopt parameters in their own class and add tests

This is in preparation to get rid of the annoying
ReadArgumentV1..5 pattern and to be able to write
unit tests.

Test: installd_dexopt_test
Bug: 72666394
Change-Id: I0ad438ee69aa82d9ff2ad2f94d465dcc78ea8c28
nstalld/Android.bp
nstalld/Android.mk
nstalld/otapreopt.cpp
nstalld/otapreopt_parameters.cpp
nstalld/otapreopt_parameters.h
nstalld/tests/Android.bp
nstalld/tests/installd_otapreopt_test.cpp
644d9438a69b260024627d9ea44ffda452912bee 01-Feb-2018 Calin Juravle <calin@google.com> Merge "Fix profile guided compilation for secondaries and add more tests"
2372d12577540bd41c74f2d1cd6f604a0390d726 01-Feb-2018 Calin Juravle <calin@google.com> Fix profile guided compilation for secondaries and add more tests

The method signature for opening the reference profile was wrong
and did not account to the fact that the profile name can be
null for secondary dex files.

Also, add infrastructure to test dexopt for primary apks and add
an initial set of tests.

Test: installd_dexopt_test
Bug: 72666394
Change-Id: I537a3f52a1449a8edb070643500a4d241728cb9a
nstalld/dexopt.cpp
nstalld/tests/installd_dexopt_test.cpp
246bd9b6ab1e7c07d5779e325dd35c4c82745380 29-Jan-2018 Takuya Ogawa <Takuya.Ogawa@sony.com> Merge "dumpstate: disable vibration when -q option is set" am: 266790e13c am: 935061dd82
am: 746846e849

Change-Id: I30e346f3206c07d072def7f15225911dac1763c8
266790e13c68c0cf6b9ef7dde14034619ed74916 29-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: disable vibration when -q option is set"
68c082bd014f5292d895c0cda8add415ceddf05a 26-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix typo in comments"
165f1ab3bd73abc9191980d04c60137eb01a7f40 26-Jan-2018 Andreas Gampe <agampe@google.com> Merge "Dumpstate: Add statsd to interesting processes" am: 1eea3d77dc am: 74d0b36b5b
am: 44cd7b8bbc

Change-Id: I0f901cc90ca8c2f5be745d2f2c28857f9fcce5d5
1eea3d77dc4d1823bf935fef6b8a8eb2fe8b7afe 26-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "Dumpstate: Add statsd to interesting processes"
e705c9f9f12201d7dfa9f2254885deb4ba28efc7 26-Jan-2018 Yifan Hong <elsk@google.com> Merge "lshal --init-vintf: do not put empty <sepolicy> tag" am: 3cbc5893c6 am: 38de280b59
am: 0a81b908d7

Change-Id: I420eef165473edf9be54f5c947639934d46c11f0
3cbc5893c64aa3b79acb4841cfab84fe95eef82e 25-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "lshal --init-vintf: do not put empty <sepolicy> tag"
5b5589df88882aa087598aa17725d0e833b7f461 25-Jan-2018 Calin Juravle <calin@google.com> Merge "[installd] Create profile snaphots for boot image"
e292a930f4b82e570cd708cf7c011a536e1c319d 25-Jan-2018 Calin Juravle <calin@google.com> Merge "[installd] Extend profile operations to take the profile name"
acc12128e1c237f5c44b711edb5660da9ff21c21 25-Jan-2018 Yifan Hong <elsk@google.com> lshal --init-vintf: do not put empty <sepolicy> tag

Test: lshal --init-vintf
Change-Id: Id742ddbd9e79abe7cfaea5d89d184a8e36943e66
shal/ListCommand.cpp
47f644e774a13c81bf8bda5166e65cd5c5171ef3 20-Dec-2017 Takuya Ogawa <Takuya.Ogawa@sony.com> dumpstate: disable vibration when -q option is set

Current dumpstate -q option is valid only for start timing
but end timing is not cared

It should disable the vibration for both case

Change-Id: Ia3cee01771c85a9ad4fa4b79084c072aa5d12dd0
umpstate/dumpstate.cpp
cd50f3430c5612f12983048e34ca45ea521a47ef 25-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "installd: fix bugs installApkVerity"
a3127a7b7d823747abaa02dce0e64ef33e8697ce 25-Jan-2018 Andreas Gampe <agampe@google.com> Dumpstate: Add statsd to interesting processes

Dump statsd stacks in dumpstate.

Bug: 72461610
Test: m
Change-Id: Ifddd122bac5eb182deac98e721d476b2b3572358
umpstate/utils.cpp
e61189e0ad2104360a188d36210bd1ee43803a64 24-Jan-2018 Calin Juravle <calin@google.com> [installd] Create profile snaphots for boot image

Create the profile snapshot for the boot image by aggregating all primary
profiles. During aggregation data that does not belong to the boot image
is filtered out. The matching is done based on the dex files provided in
the classpath argument.

Test: installd_dexopt_test
Bug: 30934496
Change-Id: Ib980ab3feb9f9838dff81a3861693cd08b1df9ab
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/utils.cpp
nstalld/utils.h
93a9805ffd41b77894191708c04e387b5b8d92cc 24-Jan-2018 Victor Hsieh <victorhsieh@google.com> installd: fix bugs installApkVerity

Test: ioctl is issued, saw correct fsverity magic in dmesg
Bug: 30972906
Change-Id: I5ef5216602ff41f208628c886874a02d16890b0f
nstalld/InstalldNativeService.cpp
0d2e3ad35296eb8342dd10ec4dbe50304969caad 25-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: add support for wifi-specific bug report"
562de815339bedd29206f5f98be44c824945b627 21-Jan-2018 Calin Juravle <calin@google.com> [installd] Extend profile operations to take the profile name

Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Test: installd_dexopt_test
Bug: 30934496
Change-Id: I5847d35fe4d3caa5a2b32293426a24683af42030
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/tests/installd_dexopt_test.cpp
bd854e7bf65e306728d2edd02b59527e034e1ef5 24-Jan-2018 Calin Juravle <calin@google.com> Merge "[installd] Prepare profiles for app code paths"
6071725b1cc8a223d5440ff708ce0bb723f86b36 24-Jan-2018 Calin Juravle <calin@google.com> Merge "Prepare installd to handle profiles per code path"
253dad4af7ed9df588d5b1403f7c95f9610c72ef 24-Jan-2018 mukesh agrawal <quiche@google.com> dumpstate: add support for wifi-specific bug report

Under certain (limited) conditions, we would like to
automatically trigger a bug report to help diagnose
Wifi problems.

The regular bugreport can't be used for this purpose,
as it takes a long time to generate. To support
lightweight auto-bug generation, add a Wifi-specific
bugreport.

Bug: 69934148
Test: manual

Manual test
-----------
- boot walleye
- enable wifi
- connect to googleguest
$ adb root
$ adb shell pkill -f 'wifi@'
- notice "Bug report #1 captured" notification
$ adb pull '/data/user_de/0/com.android.shell/files/bugreports
$ unzip bugreports/*.zip
$ grep "was the duration of 'DUMPSTATE'" bugreport*.txt
-> ------ 1.548s was the duration of 'DUMPSTATE' ------

Change-Id: I9320a9ef0ca841508538f58dbbcb02eeca290001
umpstate/dumpstate.cpp
bc5ab878b56bcd3a300cc5fc0facc864421dfcb6 19-Jan-2018 Calin Juravle <calin@google.com> [installd] Prepare profiles for app code paths

Implement profile preparation for individual application code paths.

The preparation is:
- create the current profile
- merge the profile from the dex metadata file (if present) into the
reference profile.

Note: currently the current profile is created as part of
InstalldNativeService::createAppData for the entire package. That logic
does not support dex metadata or individual code paths and will be removed
once the PackageManager switches over the new method.

Test: installd_dexopt_test
Bug: 30934496
Change-Id: I2aeddcda7b78017bd46838985bef5f92a79d4573
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
cfcd6aa28593a227d39868f6f567264fca1360a1 19-Jan-2018 Calin Juravle <calin@google.com> Prepare installd to handle profiles per code path

Transform each profile operation to accept the pair
(package_name, profile_name). This will allow installd to get the profile
name from the PackageManager instead of assuming a predefined name. The
PackageManager will compute and assign unique profile names for each code
path.

The end goal is to support installation and extraction of profiles per
code path.

Also, add a few extra tests for merging the profiles.

Test: installd_dexopt_test, installd_utils_test
Bug: 30934496
Change-Id: I580f037d9d3e5537032e815dc803b9ddeff343cb
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
7ebd5130c67b5a77ff0c96ca1146f30aa78fed94 23-Jan-2018 Victor Hsieh <victorhsieh@google.com> Fix typo in comments

Test: None
Bug: 30972906
Change-Id: Ifb3b4ed9b1164490fe23da5688f86f48bd4a3167
nstalld/InstalldNativeService.cpp
c6d738a320a612454e6c7588affcfb1f8886dd8c 21-Jan-2018 Victor Hsieh <victorhsieh@google.com> installd: implement measureFsverityRootHash

Test: Observed to ioctl, will soon integrate with the actual ioctl
Bug: 30972906

Change-Id: I30729abbdc540093d2b33d0451a29c5bbf0fb83d
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
57188c67b60d7d97fd5908ea08d5d558fe3b3abf 23-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "installd: implement installApkVerity"
d864fc59339297f2218a4c43fac002767e37cb71 23-Jan-2018 Alan Stokes <alanstokes@google.com> Merge "Delete some unused code."
c599076873a478a2e95817ba681bf3d70c751702 23-Jan-2018 Vishnu Nair <vishnun@google.com> Merge "Add support for proto dumps in dumpstate"
3f16dd688b159757202316955c9ddaed49ac89ca 13-Jan-2018 Victor Hsieh <victorhsieh@google.com> installd: implement installApkVerity

This API read from an ashmem-backed fd and append the content to the end
of the given apk, then issue an ioctl to enable fsverity.

Note that the ioctl constants are not yet in upstream (thus the feature
is behind a flag), so we can't have them in the common header in
bionic/libc/kernel. As the result, the constants are snapshot into the
file at this point.

Test: observed that ioctl is called (still waiting for kernel to ready)
Bug: 30972906

Change-Id: Ie05881e1e03d1b9a4d7faafa501420f0e22948ef
nstalld/InstalldNativeService.cpp
955c59272ef41738023489c4588642d9ed68932d 22-Jan-2018 Alan Stokes <alanstokes@google.com> Delete some unused code.

Test: Builds
Change-Id: Ie1a6cd592a18fc5cb937fc5baf5a7ef7645bb4f2
nstalld/InstalldNativeService.cpp
747d55cce0ad713dab9f477f228716d316a1b537 20-Jan-2018 Yao Chen <yaochen@google.com> Merge "Add STATS LOG section to dumpstate/bugreport"
72952360f8f46d92b716e8d6b05d6edb7de723a6 20-Jan-2018 David Brazdil <dbrazdil@google.com> Merge "Add new dexopt flag to control hidden API restrictions" am: 37ea948a17 am: 6a278f573f
am: 7405487885

Change-Id: I35cc017cabcd384969b8e01e37155533e6231db0
37ea948a172df14dcef7e39302a4d50443aa729e 20-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add new dexopt flag to control hidden API restrictions"
e97d6127dd73f8c9f4a60e33dd9a701ece47716d 18-Jan-2018 Vishnu Nair <vishnun@google.com> Add support for proto dumps in dumpstate

- Call dumpsys library directly from dumpstate.
- Send section generation status (name, size and duration) via section
progress reporter.
- Add end to end smoke test for bugreport:
- Checks if zipped bug report was generated without errors within a
reasonable time of a reasonable size.
- Checks if zipped bug report contains version file, main entry and
some selected files from the device file system.
- Checks if all sections in the bug report were generated without
errors.
- Checks if some sections were generated with a reasonable size.
- Changes are gated by Bugreport version. Version will be updated in a
subsequent cl.

Bug: 67716082, 70154685
Test: Manually generate bugrepot (default version) and check for any issues
Test: mmm -j56 frameworks/native/cmds/dumpstate && \
adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
adb sync data && adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_smoke_test/dumpstate_smoke_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: If036699d0588f74ef8e84c56323126214857dbdd
umpstate/Android.bp
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_smoke_test.cpp
umpsys/dumpsys.cpp
umpsys/dumpsys.h
a8d1d7895604197dfc62ab9ac71d41cd01f78cbe 20-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dumpstate: don't dump HAL super classes."
0cc1febdc672a7a4d11c159f2a426ee6e303fb1c 19-Jan-2018 Steven Moreland <smoreland@google.com> Merge "Add 'exclude parent' option to debug." am: 7fb0aa5f97 am: 078d9bb83e
am: 7c41e701ab

Change-Id: Ie6d5199cc551e05895ecdad7a86a1205be669366
7fb0aa5f979380b3ca6f76e7bd37ca1c0e84547b 19-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add 'exclude parent' option to debug."
8730fded8dbd0e38da6b2e9ef0dc7edef572696a 19-Jan-2018 Zach Riggle <riggle@google.com> Merge "Prevent otapreopt_chroot from crashing with no arguments" am: aaf2c87e2a am: 7cc6cd771b
am: 27de5b1db1

Change-Id: I217549967ab3c5e4bcea99b43eceac43c3ab7a1f
aaf2c87e2a45412e355d5fc540ea90bda30e1bff 19-Jan-2018 Zach Riggle <riggle@google.com> Merge "Prevent otapreopt_chroot from crashing with no arguments"
be3bbc17db0fd09de2b2134a2a9c32ea7357db0e 18-Jan-2018 Yao Chen <yaochen@google.com> Add STATS LOG section to dumpstate/bugreport

"stats" is a new logd buffer for computing android metrics by statsd (go/westworld-design).
The default size of stats buffer is 64K.

Bug: 72123656
Test: manual

Change-Id: I71611b26458b77deb39954d27da1c5f4cf3bcfb0
umpstate/dumpstate.cpp
7fcbb816bcedac25e3e0cbf43e8dd715ff759cee 17-Jan-2018 David Brazdil <dbrazdil@google.com> Add new dexopt flag to control hidden API restrictions

Allow PackageDexOptimizer to select which APKs should be exempt
from hidden API restrictions by creating a new DEXOPT_ flag and
passing a suitable command line argument to dex2oat if it is set.

Bug: 64382372
Test: installd_dexopt_test
Change-Id: I86917c357ced7fa04d8bb500669b76bbd4c08f2c
nstalld/dexopt.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
b984999cfcb9f600403e4730eb7bba1870c4b724 19-Jan-2018 Carmen Jackson <carmenjackson@google.com> Merge "Update filesystem permissions in atrace.rc to give selinux control." am: bf5e6b1a99 am: 2cffba66f3
am: 0ee727d91a

Change-Id: I33cff50f908b3b7d038deb19c2745aa6dd9130d8
bf5e6b1a99020960886c1bd090e8b920e10e1ebd 19-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "Update filesystem permissions in atrace.rc to give selinux control."
78bf5ed0d51425f35b2d82efc65565516534160a 19-Jan-2018 David Brazdil <dbrazdil@google.com> Merge "Fix number of arguments in otapreopt v4" am: 7c7a04c934 am: cfb6267fb7
am: 522cb480b1

Change-Id: Ifde44b813aa2b2109dc38004a7db59c7dad85912
318853aadc367e09f09260e7cf63ad80c9c9c15d 19-Jan-2018 Zach Riggle <riggle@google.com> Prevent otapreopt_chroot from crashing with no arguments

Currently, it crashes with a NULL dereference when invoked directly

Fixes: commit 0ba073ce81fbe544592e0a3cd526b274e83fdf9f
Change-Id: I8f4c6b986333f27c2e0cc641b684656a213ce131
nstalld/otapreopt_chroot.cpp
d9024ef11fb77bdea3e816e0d0d35de31695c17d 18-Jan-2018 David Brazdil <dbrazdil@google.com> Fix number of arguments in otapreopt v4

V4 of otapreopt arguments adds a new argument, but previous CL
I5de64e96043404df39f09d3d16b575ee39951fcb did not increase that
value.

Bug: 64382372
Test: go/manual-ab-ota
Change-Id: I8139a0608f377a516d803e28d3b47a97b3b84f94
nstalld/otapreopt.cpp
c81cd3c115443fdd162446992e040ca45e7e4c51 18-Jan-2018 Steven Moreland <smoreland@google.com> Dumpstate: don't dump HAL super classes.

Previously, if 'a.h.f@1.2::IFoo' was registered, dumpstate
woudl dump it three times as 1.0, 1.1, 1.2.

Fixes: 72123369
Test: bugreport

Change-Id: I121cf5b6ca5d3fe65e3922b07883320975fe5e0c
umpstate/dumpstate.cpp
5f328892a84418825bbfb5a2c074fc1a13e4eb7a 18-Jan-2018 Steven Moreland <smoreland@google.com> Add 'exclude parent' option to debug.

We could add this to list in the future if it seems useful.

This allows someone to call debug on all registered hal instances
without dumping subclasses multiple times.

Bug: 72123369
Test: w/ bugreport using this and manual
Change-Id: Ib201194a9f81ae1aded7105d123ac6399c847494
shal/DebugCommand.cpp
shal/DebugCommand.h
shal/ListCommand.cpp
shal/Lshal.cpp
shal/Lshal.h
385f7ee9643bb8e5bc53a3dcbcfa91f5237cc490 11-Jan-2018 Carmen Jackson <carmenjackson@google.com> Update filesystem permissions in atrace.rc to give selinux control.

These were previously restricted to shell user, but now that some apps
that require access, such as Traceur, are no longer running as the shell
user, these permissions must be loosened.

Selinux will now control access rights to these files completely, rather
than using a combination of unix permissions and selinux permissions.

- Removed chown sections because they're not necessary with chmod 666
- Included both debug and non-debug directory structures in
atrace_userdebug.rc

Bug: 68126425
Test: Traceur (outside of shell user) and command-line atrace both function.
Change-Id: Ie1ba4328a5cb3b9647acf9ef6e8aeeba61cb4961
trace/atrace.rc
trace/atrace_userdebug.rc
2b6e2ef2695d44abb6a37e3c35872894c82e5cd1 18-Jan-2018 Andy Hung <hunga@google.com> Merge "dumpstate: add media.metrics" am: 372362556f am: 8fb5d8939b
am: 9182f83543

Change-Id: I326c12a102a28139eb16624ce2510081bf7fcc60
372362556fbda103c9f663cc76fb2ea41114b2f1 17-Jan-2018 Andy Hung <hunga@google.com> Merge "dumpstate: add media.metrics"
5ff7719f22c75dd0f0625ba321f8d4d3f7e7d8af 17-Jan-2018 David Brazdil <dbrazdil@google.com> Merge "Pass targetSdkVersion to dex2oat" am: 54bcf1c194 am: 772beadee8
am: 791789b1bb

Change-Id: I851cd11dcb85bce59d29b0fa7b113ea1fcb46442
570d398770a12613461408b767ae97b549393157 16-Jan-2018 David Brazdil <dbrazdil@google.com> Pass targetSdkVersion to dex2oat

Dex2oat now accepts targetSdkVersion as a parameter to determine
whether ART should treat the app as "legacy" and allow or restrict
access to private APIs.

We bump the otapreopt argument version to v4 due to the new value.

Bug: 64382372
Test: manual
Change-Id: I5de64e96043404df39f09d3d16b575ee39951fcb
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
nstalld/tests/installd_dexopt_test.cpp
f80d2686d7e209794d52f7736e243507f882480c 16-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactor dumpsys to expose helper apis"
74fade7754069d13d65894a7341173abb9d536e8 12-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use logcat -b kernel for bug reports"
4a0a877c6d9b8aa2225a791329c2da0f7e8bdbe9 06-Dec-2017 Siarhei Vishniakou <svv@google.com> Use logcat -b kernel for bug reports

One of the main advantages of the kernel log buffer is that _spammy_
selinux violations are suppressed there, and instead land in events and
main log buffers for all to view. This gives the kernel log buffer a
longer logspan and better signal to noise ratio than an equivalently
sized dmesg buffer. The other advantage is the CLOCK_REALTIME usage,
that makes it easier to correlate kernel and user
space activities in the bugreport.

Bug: 30736473
Test: 1) adb bugreport 2) adb shell setprop ro.logd.kernel false
3) adb bugreport
Then compare the two resulting bug reports (open both in Android
Bug Tool). Observe that timestamps are seconds since bootup
in the second bugreport, and actual time (human-readable) in the first
bugreport.

Change-Id: I968de323833dda97ded4ecc454e12220d4bd3021
umpstate/dumpstate.cpp
ae8223b380ce870a0712f43b8a4bb9c71c01f323 12-Jan-2018 Victor Hsieh <victorhsieh@google.com> Merge "Installd: new interface to enable apk verity" am: 33f00971da am: 4105db6661
am: cc1c081d07

Change-Id: Iea8daf7c546b4a8bbbbd28fb7b95f1ff1756b23b
99de51619db9d23a1019354276c1385d63aa05dc 06-Oct-2017 Victor Hsieh <victorhsieh@google.com> Installd: new interface to enable apk verity

Note that file-based verity can be enabled only with CAP_SYS_ADMIN.

The implementation is dummy at the moment and waiting for kernel
implementation to be ready. Having the interface ready first allows our
iteration on the caller side in Package Manager.

Test: Saw logs on install if ro.apk_verity.mode is 1
Bug: 30972906
Change-Id: I5fb03d745111028bafbff1029f480b0386906e8a
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
c4257d2731286626e816044e3f4ba754c93fd2f6 11-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add bugreport section progress reporter"
a5de1cfe0d42f181fde2e2d611a2e69579bd1662 10-Jan-2018 Mathieu Chartier <mathieuc@google.com> Merge "Disable cdex for non background dexopt" am: 4f9ecc63cf am: 756b441357
am: cac33ec6a4

Change-Id: Ida33e9587f00f2a5ec4d0ea38f6bb602b1ebbd1b
1fb463eb936b9476f27c6ced41dd150895499e72 10-Jan-2018 Mathieu Chartier <mathieuc@google.com> Disable cdex for non background dexopt

Avoid regressing app install until there are enough benefits to
justify the tradeoff.

Test: make
Bug: 63756964
Change-Id: I1c5b3c097a456b6c8e18c34a228122b976d62da5
nstalld/dexopt.cpp
1c6012512107612426511a8fc13560b581b0d81f 09-Jan-2018 Mathieu Chartier <mathieuc@google.com> Merge "Disable compact dex for input fd == output fd" am: 69acdd7512 am: 90c7467239
am: 419f9a3782

Change-Id: Ic50a036fd41c8d07c8c54720920452ac28253b28
e7fcfbcb556cb44ade0f332693f33bb8b1c2a5cf 09-Jan-2018 Steven Moreland <smoreland@google.com> Merge "lshal: debug checks fqname" am: 9c3769fd66 am: 734c12c0df
am: b0a2d2cdf3

Change-Id: I575c3dedb303d99a67452667bfd821447fdddc80
b41ffcc92bb91a68947bf715bca9ddab617795bf 09-Jan-2018 Mathieu Chartier <mathieuc@google.com> Disable compact dex for input fd == output fd

In the case where compact dex is enabled by default, we must
explicitly disable it for the unsupported case where update input
vdex is true.

Test: make
Bug: 63756964
Change-Id: Ie2bed45d6206f557c20c147cb21e4a0adf72176e
nstalld/dexopt.cpp
f29a3bc7a921473afe2b882b7c989e3aeaa79c44 08-Jan-2018 Jeff Sharkey <jsharkey@android.com> Skip hard quotas when reserved has our back.

If the filesystem has reserved blocks set aside for system critical
services, then we don't need to enable or set hard quotas.

Test: builds, boots
Bug: 62024591
Change-Id: I2b4d2fb644ad5d2e2a789c7f42f968bc717cfead
nstalld/InstalldNativeService.cpp
756655cf54b7182b5a6df695de7b31b7d92b03c5 04-Jan-2018 Andy Hung <hunga@google.com> dumpstate: add media.metrics

Test: adb bugreport
Bug: 71483452
Change-Id: I2331367a552aebd349cc2708668a38ac9b34939f
umpstate/utils.cpp
20cf5036c1f373c1acfbb95295f118b7ff6c2227 05-Jan-2018 Vishnu Nair <vishnun@google.com> Add bugreport section progress reporter

- Allow dumpstatelisteners to monitor section size and duration and errors while the
bugreport is generated. Data will be used to write smoke tests for bugreport.
- Refactor main function to allow test to call dumpstate main function. Required until
bugreport api is completed
- Restore stdout and stderr fds before exiting dumpstate

Bug: 70154685
Test: mmm -j56 frameworks/native/cmds/dumpstate && \
adb sync data && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: I7e0938baf6e055f14dce2348d0fe99f261870bf1
umpstate/Android.bp
umpstate/DumpstateSectionReporter.cpp
umpstate/DumpstateSectionReporter.h
umpstate/DumpstateService.cpp
umpstate/DumpstateService.h
umpstate/binder/android/os/IDumpstate.aidl
umpstate/binder/android/os/IDumpstateListener.aidl
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/main.cpp
umpstate/tests/dumpstate_test.cpp
44cd9480005ed5a5b1b3530f44335ba400055de3 05-Jan-2018 Steven Moreland <smoreland@google.com> Break up hal debug files into multiple files.

Full list of hals installed on the device is preserved in
the main bugreport file. Now, for hals which implement
IBase::debug, their debug data is saved in one file
per hal. This is required so that hals can dump a
substantial amount of data (this change in particular
is motivated by wifi).

Fixes: 71597580
Test: bugreport on walleye shows data in the main list
and in individual files.

Change-Id: I0bab88b2a98ec50f0c03eafd7e1e20a223e14bcc
umpstate/dumpstate.cpp
3481c9a54213f2ad708aa2eaff2c327002b77072 05-Jan-2018 Steven Moreland <smoreland@google.com> lshal: debug checks fqname

Lshal debug now checks that the argument is the fully-qualified name.
Without this, it just complains that it can't connect to the hal
which is misleading.

Test: manual w/ lshal debug
Change-Id: Ia4aad1a306ba8f411132c44a7331123b463ad50c
shal/DebugCommand.cpp
e85d368c4e61b2b8a860d833d28d85e2922396f8 04-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Increased minimum logcat timeout from 20s to 50s..."
3a74e1428a75fdc6c519523a0da5ffd86e3001d1 22-Dec-2017 Steven Moreland <smoreland@google.com> Merge "Remove sys/class/leds from dumpstate." am: 28b48f29d5 am: a9a6aa3637
am: a02f40c4b0

Change-Id: I1e97a00ead1c9824a74a6ae077a23890d356e264
28b48f29d5c76f1ef097904d3bc3c5c0cd5dadb2 22-Dec-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove sys/class/leds from dumpstate."
93b263755d3c5d4d081571c071a84ec0b770841c 21-Dec-2017 Elliott Hughes <enh@google.com> Merge "StartsWith/EndsWith allow std::string prefixes/suffixes now." am: 2aa4cc4f36 am: af24c0d246
am: 3601d3af3a

Change-Id: Ib8547528ba82613b192fd1967af170739d79bbe5
e4f617485463ae35c7e2474c4f725ddf824ebfbb 21-Dec-2017 Vishnu Nair <vishnun@google.com> Refactor dumpsys to expose helper apis

- allow dumpstate to interact with services without executing dumpsys binary
- Remove "NORMAL" priority from section name for backwards compatibility when switching to version 2.0

Bug: 67716082

Test: mmm -j56 frameworks/native/cmds/dumpsys && \
adb sync data && \
adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Test: manual tests with "adb bugreport"
Change-Id: I4198333a58ffe6cb521b5cb7066520c7a3ef0675
umpsys/dumpsys.cpp
umpsys/dumpsys.h
umpsys/tests/dumpsys_test.cpp
b76406024ec452da3719aef56a3e89cc38b454aa 20-Dec-2017 Steven Moreland <smoreland@google.com> Remove sys/class/leds from dumpstate.

These are device specific. Moving to lights hal.

Bug: 70846424
Test: bugreport
Change-Id: If79154f9482a99a8c886b9f8608a7fa3c2104846
umpstate/dumpstate.cpp
969e4f8b21148db61413abaea788d67f126cde58 20-Dec-2017 Elliott Hughes <enh@google.com> StartsWith/EndsWith allow std::string prefixes/suffixes now.

Bug: N/A
Test: builds
Change-Id: I502f7ff687ac164ae9c2c639b4c8eab13291ea62
nstalld/dexopt.cpp
nstalld/otapreopt.cpp
5ec5888cf406e206bbffa9fed01202a80606f2b4 18-Dec-2017 Felipe Leme <felipeal@google.com> Increased minimum logcat timeout from 20s to 50s...

...as 20s is often not enough when the device has larger logcat buffer sizes.

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb sync && \
adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
printf "\n\n#### GOOD NEWS, EVERYONE: ALL TESTS PASSED! ####\n"

Fixes: 70597931

Change-Id: Ie302f46ed405d33bc7411dce28a93949183d4bac
umpstate/dumpstate.cpp
c3596c32071920e020f016e6fc38b69ba4f1b38a 05-Dec-2017 Calin Juravle <calin@google.com> Rename snapshotProfile to createProfileSnapshot for better consistency

Test: installd_dexopt_test
Bug: 30934496

(cherry picked from commit c41dac27c540971d8877911d6a3908af2046c9eb)

Change-Id: I5ef302ef714d47150790e3a97a9d0c0bbf36adc3
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
43c64c3f0366cffa1c329a14c89528951d7f74ae 07-Dec-2017 Ivan Lozano <ivanlozano@google.com> Merge "Keystore and gatekeeper not working when servicemanager crashed" am: c81d9b84c3 am: d32d93125c
am: 6780e1a578

Change-Id: Id42b9431c97bebd3fb308a455db6d07df66c19bd
d32d93125ce32ac5fc8d77c16564a0b50ee0ed82 07-Dec-2017 sj.cha <sj.cha@lge.com> Merge "Keystore and gatekeeper not working when servicemanager crashed"
am: c81d9b84c3

Change-Id: Id2fd642d95ac548f02122ccbb6cda013438457d7
4ae4b9c66fb0e8b7db789b41586379b2ad008963 07-Dec-2017 Xin Li <delphij@google.com> Merge "DO NOT MERGE: Merge Oreo MR1 into master"
da7a507a77405c53eeaaa7889017dedf88fac337 06-Dec-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Rename snapshotProfile to createProfileSnapshot for better consistency"
c81d9b84c3592341d29f817d14702d6d6c387abe 06-Dec-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Keystore and gatekeeper not working when servicemanager crashed"
cb9e282ae74efd9590a3e9ac5df52c811ee2d55e 06-Dec-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added -p to uptime command on header (and changed it to run always)"
72a9a362358a5dc9716b8e002b16cf66fd450629 06-Dec-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds/cmd"
am: 68686bd151

Change-Id: I690f234edece16c44c359c9aefbe1dc2c7494846
c41dac27c540971d8877911d6a3908af2046c9eb 05-Dec-2017 Calin Juravle <calin@google.com> Rename snapshotProfile to createProfileSnapshot for better consistency

Test: installd_dexopt_test
Bug: 30934496
Change-Id: I051b29e7b545ed8d9a177b6e70d653eb0ae8e020
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
b2a90b6ba618a3dd53aca11322afc1c045302105 05-Dec-2017 Chih-Hung Hsieh <chh@google.com> Use -Werror in frameworks/native/cmds/cmd

* Ignore return value of getfilecon?

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ic7d67907a1cf0ba415aa0753bbd55bde06c8dd06
Merged-In: I341e6047dbb5b49a92f69df74b073d2f54a7754d
md/Android.mk
md/cmd.cpp
f463e180e5a69b4a43acd41c41c8518fa8c22b2d 05-Dec-2017 Chih-Hung Hsieh <chh@google.com> Use -Werror in frameworks/native/cmds/cmd

* Ignore return value of getfilecon?

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I341e6047dbb5b49a92f69df74b073d2f54a7754d
md/Android.mk
md/cmd.cpp
7709f8a5e62a67c6df06f68bddcc2a1036bd62bb 05-Dec-2017 Felipe Leme <felipeal@google.com> Added -p to uptime command on header (and changed it to run always)

Test: manual verification
Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb sync && \
adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
printf "\n\n#### GOOD NEWS, EVERYONE: ALL TESTS PASSED! ####\n"

Bug: 65205261

Change-Id: Ide1aa2dc9f3446f9597433867445dd07731ae563
umpstate/dumpstate.cpp
dd2dae9cde2aaaa72c450ceb9f476f735170eb3f 14-Nov-2017 Colin Cross <ccross@android.com> Export AIDL files as a filegroup for framework.jar

Put AIDL files into a filegroup so they can be imported as sources
for framework.jar.

Bug: 69917341
Test: m checkbuild
Change-Id: I1aeb65b651f9097fa72212ca5cce9fb679b5a779
Merged-In: I1aeb65b651f9097fa72212ca5cce9fb679b5a779
(cherry picked from commit 21c210ec5ce370a2d73332be48372d16dd789a08)
nstalld/Android.bp
f89ee1a09e11faf526c8979d61c202617a291235 14-Nov-2017 Colin Cross <ccross@android.com> Export AIDL files as a filegroup for framework.jar

Put AIDL files into a filegroup so they can be imported as sources
for framework.jar.

Bug: 69917341
Test: m checkbuild
Change-Id: I1aeb65b651f9097fa72212ca5cce9fb679b5a779
Merged-In: I1aeb65b651f9097fa72212ca5cce9fb679b5a779
(cherry picked from commit 21c210ec5ce370a2d73332be48372d16dd789a08)
nstalld/Android.bp
a391ebe98e953a1209e1ba75baca4c8e46b69ae9 03-Dec-2017 Colin Cross <ccross@android.com> Merge "Export AIDL files as a filegroup for framework.jar"
652cc80fcffda5a80b468b822cdddd69b28696a3 01-Dec-2017 Vishnu Nair <vishnun@google.com> Fix dumpsys timeout regression

Bug: 69974956
Test: adb bugreport ~/tmp.zip
Change-Id: I833937de55c780773d946ef36a5105e544940bfa
umpstate/dumpstate.cpp
b6568d73b90d9030f5ed509f557e59c1696eda17 30-Nov-2017 Calin Juravle <calin@google.com> Merge "Fixup existing profile directories during upgrades" am: 3367b569bf am: d87138a5d1
am: 7a3e5af2b9

Change-Id: I756aa95832ac1a461da1392c1788c71fa8daa8b3
d87138a5d186fd008b5c7b6b205dbc68601410a4 30-Nov-2017 Calin Juravle <calin@google.com> Merge "Fixup existing profile directories during upgrades"
am: 3367b569bf

Change-Id: Ie15663754ea25023ce63ed37e939c85301e3dda9
79346f85a6963bfdbaa94c67d7dcf63e5d3cc3e1 30-Nov-2017 Calin Juravle <calin@google.com> Merge "Refactor profile dir creation" am: dd6b71dfaa am: 9ab618a487
am: 5d87e2fde3

Change-Id: I883295c9fd163befe536ead873010f9470344a8e
9ab618a48794f7f8651e066c552e707ed3dda2ea 30-Nov-2017 Calin Juravle <calin@google.com> Merge "Refactor profile dir creation"
am: dd6b71dfaa

Change-Id: I7ec295c7764f287202ccd4e981e2410c86f05241
6f06eb679ae105a9d1bb8910dbd1f734bd62435b 29-Nov-2017 Calin Juravle <calin@google.com> Fixup existing profile directories during upgrades

If the profile directory exists we need to fixup the owner and
permissions. The owner of the directory is set to AID_SYSTEM.
This allows the system to access the profiles while restricting the search
capabilities for others.

Test: installd_dexopt_test
Bug: 30934496
Bug: 69678790
Change-Id: I621c95e24cc85a2797724f6ac448c9f8a8d00a53
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_dexopt_test.cpp
d2affb8601630fe682b03407fc907f2439ff5370 29-Nov-2017 Calin Juravle <calin@google.com> Refactor profile dir creation

Extract the preparation of profile directories in its own method.
Add tests to check it works as expected.

Test: installd_dexopt_test
Bug: 30934496
Bug: 69678790

Change-Id: I16b0e086d4933e6cfb233b005b7bb0b6fbf7490c
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_dexopt_test.cpp
21c210ec5ce370a2d73332be48372d16dd789a08 14-Nov-2017 Colin Cross <ccross@android.com> Export AIDL files as a filegroup for framework.jar

Put AIDL files into a filegroup so they can be imported as sources
for framework.jar.

Bug: 69917341
Test: m checkbuild
Change-Id: I1aeb65b651f9097fa72212ca5cce9fb679b5a779
nstalld/Android.bp
ffaf53ec6e37e90992f024b8da4b12bee550cd67 29-Nov-2017 Calin Juravle <calin@google.com> Merge "Add snapshotProfile APIs to installd" am: 98ad260f6b am: 5a49d45535
am: 7d4ec11b69

Change-Id: I19d456c9a1196cb6338ed963d9f1ae5d855b9911
5a49d45535eabf043b87f02d3c7b7b926645b912 29-Nov-2017 Calin Juravle <calin@google.com> Merge "Add snapshotProfile APIs to installd"
am: 98ad260f6b

Change-Id: Ida70cc249dd2c12718345026dc80e7b8211361aa
29591736958a7ed45f4b5982ca9a46756baa0f6d 21-Nov-2017 Calin Juravle <calin@google.com> Add snapshotProfile APIs to installd

Add APIs that will snapshot the profile information of packages
in a well known location.

The snapshot ownership is given to AID_SYSTEM. The location is
next to the application reference profile:
/data/misc/profiles/ref/pkg_name/primary.prof.snapshot.

The intended flow for snapshotting profiles is:
mInstaller.snapshotProfile(appId, packageName, codePath);
// open profile snapshot
mInstaller.destroyProfileSnapshot(packageName, codePath);

The reference profile directory is made searchable by others
(in order for the system to be able to open the snapshot profile).

Test: installd_dexopt_test installd_utils_test
Bug: 30934496
Change-Id: Ic4973d5c67243d7724ecd24a238ed0ae8baadcc6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/tests/test_utils.h
nstalld/utils.cpp
nstalld/utils.h
a7ffd7520d9e2fc1d91a7412d562cc87f90169f9 28-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Support dumpsys timeouts in milliseconds"
6921f80f26cb779d2982d2e37e14aeadbc8230b7 22-Nov-2017 Vishnu Nair <vishnun@google.com> Support dumpsys timeouts in milliseconds

- add new dumpsys argument to specify timeouts in milliseconds
- use milliseconds to define timeouts in dumpstate
- minor dumpsys output format changes:
"SERVICE '<service_name>' DUMP TIMEOUT (1s) EXPIRED" ->
"SERVICE '<service_name>' DUMP TIMEOUT (1000ms) EXPIRED"

Bug: 27429130
Test: mmm -j32 frameworks/native/cmds/dumpsys && \
mmm -j32 frameworks/native/cmds/dumpstate && \
adb sync data && adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: Ibc96ad030bb2c6d880b8201c9b6241fce20b284f

Change-Id: I6ef2ff19787f2b6d940d56e453a1a7462a8c854a
umpstate/DumpstateUtil.cpp
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
umpsys/dumpsys.cpp
umpsys/tests/dumpsys_test.cpp
8e6d72aaa5c2c6f02ea6034c34ce501aedcf5da9 21-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add more debugging to cmd."
228f2f66318e97da7c9d13fdc9f28ebddaa1fb46 14-Nov-2017 Dianne Hackborn <hackbod@google.com> Add more debugging to cmd.

Test: manual

Change-Id: Ibb6c6dd99446504452921cb148d64461a6f0ef85
md/cmd.cpp
8f258042f15a859b6100795fdc27703e4c2af39d 20-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add extra logging for A/B dexopt"
b3591f68c560f9fe71fd69ffdd9cabe1d320360e 18-Nov-2017 Calin Juravle <calin@google.com> Add extra logging for A/B dexopt

Log the packages for which we skip dex2oat because they are already
preopted.

Bug: 68949006
Test: make
Change-Id: Ia8983886bd130405dedeec79f7ad03aeab7090a6
nstalld/otapreopt.cpp
36b4cdb2ddec610e52ab60ae1f6497ae3739f496 17-Nov-2017 Vishnu Nair <vishnun@google.com> Add window and surface trace files to bug report

- rename surface trace path to use common location

Bug: 64831661
Test: adb shell su root service call SurfaceFlinger 1025 i32 1 >/dev/null && adb shell su root service call SurfaceFlinger 1025 i32 0 >/dev/null && adb bugreport ~/tmp.zip
Change-Id: I0b166a1098158a12c1da192e38c4d3cf011710a6
umpstate/dumpstate.cpp
63f1be59721c38841c30b8940776a80563cf2c6a 15-Nov-2017 Alan Stokes <alanstokes@google.com> Merge "Add Installd IPC to compute the SHA256 of a seconday dex file."
1e79b2e298c552acc8425bf929af7d6a25d36f73 15-Nov-2017 Jiyong Park <jiyong@google.com> Merge changes I082e9bb7,Ib35fe4fc,Ibc2726e1 am: 22975f3ef9 am: 53c06d4d23
am: ad06c85c4e

Change-Id: Ic767e4dfb17b72956582989984b0adb9be98208d
53c06d4d23033fc3ba6b24e69c9dae269b4d6158 15-Nov-2017 Jiyong Park <jiyong@google.com> Merge changes I082e9bb7,Ib35fe4fc,Ibc2726e1
am: 22975f3ef9

Change-Id: I0ce21b519ed456322f8532e34c800c08bdec3d7a
22975f3ef97bddda83b6890a13093f285f79f9b3 15-Nov-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes I082e9bb7,Ib35fe4fc,Ibc2726e1

* changes:
merge dumpstate_headers into libdumpstateutil
Use getpwnam()/getgrnam() instead of AID_* macros (dumpstate)
Mark libbinder and libdumpstateutil as VNDK in Android.bp
4994440faf5924da9987bb8f30b1193f3d8090be 14-Nov-2017 Xin Li <delphij@google.com> Merge commit '2fc42a279697a847d5b6961914f6f6afbed49a48' from
oc-mr1-dev-plus-aosp into stage-aosp-master.

Change-Id: I754fe8c1ec11f047e58694a2fdc8d9ab1b85cab5
753dc71734927f86c277991be9326cb9a82202b1 16-Oct-2017 Alan Stokes <alanstokes@google.com> Add Installd IPC to compute the SHA256 of a seconday dex file.

Bug: 63927552
Test: Exercised manually. Added unit tests in installd_service_test.

Change-Id: If9df7a88f3a3039aab69ed5f200d14cb19794cb3
nstalld/Android.bp
nstalld/Android.mk
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/Android.bp
nstalld/tests/installd_service_test.cpp
7d7654646abb84bbae6b245de270ac087cdc8a95 05-Sep-2017 Calin Juravle <calin@google.com> Move secondary dex files processing in the app process

Run the validation and processing of secondary dex files with the app
process capabilities. This drops the need to validate/use real paths since
all file tests and accesses is done now with lower privileges.

The oat files and profiles are now created relative to the given path
instead of using realpath. This allows us to always know where the
compiler artifacts are even if the original dex file was deleted. It
enables a straightforward clean up during reconciliation.

The validation will accept /data/user/0 as a valid secondary dex path
since for user 0 this is the location that will be used most of the times.

This CL also adds a test framework for dexopt related functionality.
The current tests only cover the secondary dex files with more to come.

Bug: 64460009
Test: adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox (after removing some files)
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox
adb shell /data/nativetest64/installd_utils_test/installd_utils_test

(cherry picked from commit 46e27bcc773f1c1df3a0ae8df67b49ab20e39b43)

Merged-In: I0d49cd7f3c089bc5156178680bb29b75ab82092c
Change-Id: I1c1feec6bc475ac5fd6e1339737626f5404ca6c9
nstalld/dexopt.cpp
nstalld/tests/Android.bp
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/tests/test_utils.h
nstalld/utils.cpp
nstalld/utils.h
972fa30fc42d0a914e4b45e12b92c374b15ef806 14-Nov-2017 Calin Juravle <calin@google.com> Merge "Move secondary dex files processing in the app process"
46e27bcc773f1c1df3a0ae8df67b49ab20e39b43 05-Sep-2017 Calin Juravle <calin@google.com> Move secondary dex files processing in the app process

Run the validation and processing of secondary dex files with the app
process capabilities. This drops the need to validate/use real paths since
all file tests and accesses is done now with lower privileges.

The oat files and profiles are now created relative to the given path
instead of using realpath. This allows us to always know where the
compiler artifacts are even if the original dex file was deleted. It
enables a straightforward clean up during reconciliation.

The validation will accept /data/user/0 as a valid secondary dex path
since for user 0 this is the location that will be used most of the times.

This CL also adds a test framework for dexopt related functionality.
The current tests only cover the secondary dex files with more to come.

Bug: 64460009
Test: adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox (after removing some files)
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox
adb shell /data/nativetest64/installd_utils_test/installd_utils_test

Change-Id: I0d49cd7f3c089bc5156178680bb29b75ab82092c
nstalld/dexopt.cpp
nstalld/tests/Android.bp
nstalld/tests/installd_dexopt_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/tests/test_utils.h
nstalld/utils.cpp
nstalld/utils.h
4d55997a193827675ff1eee7ffe5d23f3772c985 10-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove "vdc" commands from bugreports."
f3700c39eda134651b609f6f38173b7636d14330 09-Nov-2017 Jeff Sharkey <jsharkey@android.com> Remove "vdc" commands from bugreports.

We moved vold to Binder, and it no longer has a "dump" command.

Test: builds, boots
Bug: 69116075
Change-Id: Iff8cdf45e15acac9207a3d2eafaed6cb144d26e1
umpstate/dumpstate.cpp
bd2495931a2b1c05fc2fc5c326cce1b95f5f49b8 09-Nov-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds/surfacereplayer/proto" am: 0f897ac6fa am: e6e626df07
am: 7bc779383a

Change-Id: Ie7d68a69490ef5c05d67c78eba26f5856b075f9e
7bc779383a3601031da1c85c80dea701a6f9cd47 09-Nov-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds/surfacereplayer/proto" am: 0f897ac6fa
am: e6e626df07

Change-Id: Ic98f1924f22b55caa908289be0f0d06f0cd0e350
c16c2dbc0fc0f4aca9bfcfd4ebb7328cc61262b3 08-Nov-2017 Chih-Hung Hsieh <chh@google.com> Use -Werror in frameworks/native/cmds/surfacereplayer/proto

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: If39d101b1c4000360ea0230d4fce193fb2d9f757
urfacereplayer/proto/Android.bp
e36e7be0fe446320fe86b0825f902439fdd1bda7 07-Nov-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds" am: ea6c6b9f85 am: f27645c993
am: 0c328734f5

Change-Id: I75c23bf84de1158e9c3105f23c18c33251552bac
0c328734f56d716794f31527b5fd96871f5f88c2 07-Nov-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds" am: ea6c6b9f85
am: f27645c993

Change-Id: I3f79d715c5eaa08b0d4e139fdb056efb24ad3d15
1642dc6860489ed474135aa5bf925e9ec0ed8490 07-Nov-2017 Chih-Hung Hsieh <chh@google.com> Use -Werror in frameworks/native/cmds

* Remove unused variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ifde10b651abbdb2ab1e236ebe47e25bf6c4c9b23
latland/Android.mk
latland/Main.cpp
p-up-vpn/Android.mk
awbu/Android.mk
awbu/backup.cpp
9ebab104ddb09f52850c80517689ab67032146e2 07-Nov-2017 pengzhicai <pengzhicai@xiaomi.com> Merge "Put uptime into bugreport header" am: 7938fa4bb0 am: c9287b7231
am: a34bb42274

Change-Id: Ib2c46b11a2818fc54ecb2159f76bb48b79563b44
a34bb422743ed02ed34e50c60314eeae58ae52e1 07-Nov-2017 pengzhicai <pengzhicai@xiaomi.com> Merge "Put uptime into bugreport header" am: 7938fa4bb0
am: c9287b7231

Change-Id: If973200321c88c555596bd58fd9137c05f938556
24ae8192d4a8f6292c581eac7b50167907c9aa41 25-May-2017 pengzhicai <pengzhicai@xiaomi.com> Put uptime into bugreport header

The previous uptime position is not obvious and is not easy to find

https://issuetracker.google.com/issues/62214821
Bug: 62214821
Test: Manual

Change-Id: I975640c707424a3e93c7af96110bb541f3bf6c84
Signed-off-by: pengzhicai <pengzhicai@xiaomi.com>
umpstate/dumpstate.cpp
afc2f970e479dca5f9676474879b0b8d4beac82a 03-Nov-2017 Kevin DuBois <kevindubois@google.com> Trace clock_enable and clock_disable events.

We track changes in peripheral clock frequency with 'freq' events, but
not if the clock turns on or off. Logging clock_enable and clock_disable
events lets us get a better picture of the peripheral clocks from the
systraces.

Test: see clock_enable/disable events from 'adb shell atrace freq'.
Change-Id: I572a5cf87af8f37b22b5ffb726eb5c2c49886af1
trace/atrace.cpp
259775cf8bd97feebc2c55d0331c7430b2eb086a 03-Nov-2017 Jiyong Park <jiyong@google.com> merge dumpstate_headers into libdumpstateutil

The header lib is used nowhere outside of this .bp.

Test: build with aosp_arm64_ab
Change-Id: I082e9bb7139051cb47b76e411f86d54ed89b6fbc
umpstate/Android.bp
522ae9a1f75d0291eb33bf66bd1db4c45e3722bc 23-Jun-2017 Jiyong Park <jiyong@google.com> dumpstate/Android.mk is converted to Android.bp

Converted to soong. And libdumpstateutil is marked as
vendor_available:true.

Bug: 37342627
Test: BOARD_VNDK_VERSION=current m libdumpstateutil.vendor -j
Change-Id: Id1594d9aa2a7035aaad901d4c3881bd6128c431e
Merged-In: Id1594d9aa2a7035aaad901d4c3881bd6128c431e
umpstate/Android.bp
umpstate/Android.mk
umpstate/DumpstateInternal.cpp
umpstate/DumpstateUtil.cpp
umpstate/dumpstate.h
dc3cb6422406b59b1ca421289c589a394a599a3b 26-Jul-2017 Yifan Hong <elsk@google.com> Use getpwnam()/getgrnam() instead of AID_* macros (dumpstate)

AID_* values are defined in libcutils private headers and hence
is not exported. Use getpwnam() instead to get these values.

Test: device boots
Test: bugreport
Test: dumpstate_test
Bug: 63135587
Merged-In: Ib35fe4fc4524eb1885616a9a1403ceb09f713777
Change-Id: Ib35fe4fc4524eb1885616a9a1403ceb09f713777
(cherry picked from commit 8ded50cc0df099ce1e573cb9af870260180bea67)
umpstate/DumpstateInternal.cpp
7fdc66009a27ce11604bd5359cf2286477a8001a 02-Aug-2017 Justin Yun <justinyun@google.com> Mark libbinder and libdumpstateutil as VNDK in Android.bp

As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: Ib1d9469ad0aead4cbec7c2548438d44608f36819
(cherry picked from commit b367ff4fd9e332d8ff4bd45bf54778851f06f941)

Change-Id: Ibc2726e1e1c98c8787fea41c1b01d07ea6a0a488
umpstate/Android.bp
165232b2e9f43a5bdbb55dfa9eb1bb35016510dd 03-Nov-2017 Andreas Gampe <agampe@google.com> Merge changes I0ff0c4f4,I6bdfa2f5 am: a63eab4f6c am: ac2645b1c3
am: a901a93d1f

Change-Id: I7358c8b541e4c76056b68dc5a8a03429cd0415f5
a901a93d1f68196a8ae301386e66ff0e317eaf99 03-Nov-2017 Andreas Gampe <agampe@google.com> Merge changes I0ff0c4f4,I6bdfa2f5 am: a63eab4f6c
am: ac2645b1c3

Change-Id: Ieb73606fd2f92f491d83e08f84a277d8c25af857
2a2d7ba87707b3c83e05542657728473eb2ca518 03-Nov-2017 Andreas Gampe <agampe@google.com> Installd: Emit minidebug-info

If globally enabled, pass --generate-mini-debug-info to dex2oat
when dalvik.vm.dex2oat-minidebuginfo is set to annotate compiled code
with unwind information.

Test: m
Test: adb shell setprop dalvik.vm.dex2oat-minidebuginfo false && adb shell cmd package compile -f -a
Test: adb shell setprop dalvik.vm.dex2oat-minidebuginfo true && adb shell cmd package compile -f -a
Change-Id: I0ff0c4f40d2cb8a14816b4a967e5707170845080
nstalld/dexopt.cpp
a73a0cbcc07640c3656b5648979affd2ff44e4de 03-Nov-2017 Andreas Gampe <agampe@google.com> Installd: Rename try_debug_for_background

Rename to background_job_compile to signal broader future use.

Test: m
Test: manual test - install
Test: adb shell cmd package bg-dexopt-job
Change-Id: I6bdfa2f591733f3340e2a385cb207ab2839772c5
nstalld/dexopt.cpp
ab4b230b9e83a3c8768623b6ee5276af82f48aa3 02-Nov-2017 Shubham Ajmera <shubhamajmera@google.com> Merge "Use fds for dexoptanalyzer from installd" am: 729c847625 am: 03e1ed0101
am: ceeb154b9f

Change-Id: Iecca04c0c998511d473048a20fedcbe6a668343d
ceeb154b9f3d2179c10c95a2c94701f4c99a85ac 02-Nov-2017 Shubham Ajmera <shubhamajmera@google.com> Merge "Use fds for dexoptanalyzer from installd" am: 729c847625
am: 03e1ed0101

Change-Id: I8fa0505c8b5722a240768c71d9ae70bf1199d159
b6bcd220e412b0b304690fdddcd658f5c6392c86 19-Oct-2017 Shubham Ajmera <shubhamajmera@google.com> Use fds for dexoptanalyzer from installd

Test: adb shell cmd package --secondary-dex -m speed-profile <package-name>
(cherry-picked from commit aa6999b366615993f59d813ab43905ef7ac215c8)
Bug: 67111829
Change-Id: Ia6fffb89ccefb073ad79c448287b0c458786292e
nstalld/dexopt.cpp
c834ab809920c0f7efcdc8011d2df43ef7161a77 02-Nov-2017 David Sehr <sehr@google.com> Merge changes from topic "bgdex2oatd_cherry_pick" am: e1dfc74b1a
am: ea03927cea

Change-Id: Iba12335e4aefa6dfba7d03dc15baa51253be2108
fabb4125729a22bc7d6dca26c8913a384d552c18 02-Nov-2017 Calin Juravle <calin@google.com> Fix argument passing to dexoptanalyzer am: 9150107bac
am: 506c09f55d

Change-Id: I0cc934f095107b807570ea3d4496da50b6e8c02f
af56613c88ac2cd139d69bfb48d16b1c5eeb4d08 01-Nov-2017 Calin Juravle <calin@google.com> Merge "[installd] Add check that classpath is up to date to getDexOptNeeded" am: 074635249a
am: 57cae5a3ea

Change-Id: Ice6c5f2012b9e7daffacafc7f01e1b32f77fa061
9150107bacdc19eb99ef92c0adad936972e90f8f 27-Oct-2017 Calin Juravle <calin@google.com> Fix argument passing to dexoptanalyzer

(cherry picked from commit 56891f864c97c6b211cb31f356a175d9e471052f)

Test: adb shell cmd package compile --secondary-dex com.google.android.gms
Bug: 68340214

Merged-In: I7b7372bfb62144a51a9f2fd4c8525f6a53a27410
Change-Id: I7b7372bfb62144a51a9f2fd4c8525f6a53a27410
nstalld/dexopt.cpp
a3b5ab625512d9f58eb7a237677be722a7b00d8e 25-Oct-2017 David Sehr <sehr@google.com> Use dex2oatd when available on debug builds

Enable use of dex2oatd for background dexopt service for eng and userdebug builds.
This allows us to have more extensive checking on dogfood devices.

(cherry picked from commit 0ff5f3c694464a3d791b0e435a595965e37767b7)

Bug: 68025088
Test: adb shell cmd package bg-dexopt-job
Merged-In: If346c27594542b1e6a058369170f38b6ae24462f
Change-Id: If346c27594542b1e6a058369170f38b6ae24462f
nstalld/dexopt.cpp
nstalld/installd_constants.h
58cab07761f71deee028bbaf9c402abd8e564bce 12-Sep-2017 Calin Juravle <calin@google.com> [installd] Add check that classpath is up to date to getDexOptNeeded

Pass the class loader context argument to dexoptanalyzer when analyzing
secondary dex files.

(cherry picked from commit ef81ec21e8ea059875295597e3acc9f6af3a96ec)

Bug: 62269291
Test: manual, compile secondary dex files
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox

Merged-In: I25ae93cadd12441a13ff54bb3da5a198085c6f3d
Change-Id: I25ae93cadd12441a13ff54bb3da5a198085c6f3d
nstalld/dexopt.cpp
33d48abe37ca532779561a6f7aeef2120e00d663 01-Nov-2017 Narayan Kamath <narayan@google.com> resolve merge conflicts of a0f796f20 to oc-mr1-dev-plus-aosp

Test: I solemnly swear I tested this conflict resolution.
Change-Id: I514907d92d4b0e83350f0b49147d70d6693f9db6
d3badbae427022aeb3fdd537805ff8ae13347ac5 27-Oct-2017 Narayan Kamath <narayan@google.com> dumpstate: always include last ANR as a separate entry.

For consistency, as well as to make tooling easier.

Most of this change is an extended yak-shave to try and close DumpData
FDs in a consistent manner. Several layers of abstraction were assuming
that it was their job to close input FDs, leading to double closes in some
cases. These double closes are benign prior to this change to dump a
given DumpData twice, given that dumpstate is single threaded.

Bug: 68188758
Test: adb bugreport

(cherry picked from commit 6b9516ced325e93880e9c8ef2793380866a1c579)

Merged-In: I6302f4cb553139c0c26defb4859c4eca5b18ec93
Change-Id: I54ba5e11135b6aefa97d95b287e00325b5867c8a
umpstate/DumpstateInternal.cpp
umpstate/DumpstateUtil.cpp
umpstate/dumpstate.cpp
umpstate/utils.cpp
a349943547b352a1f012ed993c6eebb4d5582246 01-Nov-2017 Andreas Gampe <agampe@google.com> resolve merge conflicts of 367503146 to oc-mr1-dev-plus-aosp

Test: I solemnly swear I tested this conflict resolution.
Change-Id: I1e5948e994791f4727ab5fa49c0b885551c208dc
4cd0b6bddf0fbcaa249eba4365e11ecaf1a1cbda 01-Nov-2017 Arthur Eubanks <aeubanks@google.com> Merge changes I06bea24c,I8e2e24af am: c7cbe12cfd
am: 53c1004bf0

Change-Id: Icba545975b51e8ea76baeb6cfb6681fd27664c89
172fac04a69bf9d978205bd392a156bb819ccd60 06-Oct-2017 Jeff Sharkey <jsharkey@android.com> Fix bug in directory depth counting.

The path "dir//file" has the same depth as "dir/file". Also verify
with local unit tests.

(cherry picked from commit b92de07b63bbcb05ff15a32dda8644ee763acc5d)

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 67471251
Merged-In: Iab35b4fe5591ddd42a7121b630cffcd94ad23c40
Change-Id: Iab35b4fe5591ddd42a7121b630cffcd94ad23c40
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
e1d9b28ae57649a7568e35ea7832b94b2bb4827f 17-Aug-2017 Arthur Eubanks <aeubanks@google.com> Change log libraries in tests to be statically linked

32-bit versions of the log libraries aren't flashed on the phone, so we
need to statically link them.

(cherry picked from commit d438af0a09866cdeeb9f4c0f17543a23be513998)

Test: build and run the 3 installd tests (32-bit and 64-bit)
Test: on walleye/bullhead
Merged-In: I06bea24c6c52ffdb34045449e0b40eb2ac146410
Change-Id: I06bea24c6c52ffdb34045449e0b40eb2ac146410
nstalld/tests/Android.bp
7e01b2b17947ddeb5a26004ac6870c12caf52257 27-Sep-2017 Andreas Gampe <agampe@google.com> Otapreopt: Fix property handling

Follow-up to commit 1b9d9a6006f4159e2cc2c41330f316b1fdc53fe1.

In the previous CL, a strncpy was translated incorrectly to a
strlcpy. Fix the glitch.

(cherry picked from commit 5696e6353b4f349b316097fcb783b4cfcb5511ef)

Bug: 36655947
Bug: 66996038
Test: manual A/B OTA
Merged-In: I387ff8436de351a3cec5458b3ef013e15905a046
Change-Id: I387ff8436de351a3cec5458b3ef013e15905a046
nstalld/otapreopt.cpp
4f7be17266046b255dd65ea1d9e244b34e37c3ec 11-Aug-2017 Jeff Sharkey <jsharkey@android.com> Fix casting bug, add control for hard quotas.

(cherry picked from commit bdd4de8a98d57110befb0c29f662e8a3e4cfc275)

Bug: 64160395, 63255278
Test: /data/nativetest/installd_service_test/installd_cache_test
Merged-In: I8e2e24afd88da4dc13afdf05927e59c268e69825
Change-Id: I8e2e24afd88da4dc13afdf05927e59c268e69825
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_cache_test.cpp
nstalld/utils.cpp
nstalld/utils.h
c1149c9797e42f10c82cdcc8d1e69861e0114c02 21-Sep-2017 Jeff Sharkey <jsharkey@android.com> Enable clang-tidy for sensitive domain.

Since installd has broad access to lots of sensitive data, enable
as many security-related tidy checks as possible to help avoid bugs.

This change provides a default implementation of create_cache_path(),
calculate_odex_file_path(), and calculate_oat_file_path(), along
with tests to verify behavior against old code.

Replace "dir_rec_t" with std::string, since that's really what it's
been all along. Increase paranoia of path checking to reject any
paths containing "..", regardless of where it occurs in path string.
Stricter checking of instruction set values.

Remove now-unused char* manipulation utility methods; people should
be using std::string instead.

(cherry picked from commit 1b9d9a6006f4159e2cc2c41330f316b1fdc53fe1)

Test: adb shell /data/nativetest/installd_cache_test/installd_cache_test
Test: adb shell /data/nativetest/installd_service_test/installd_service_test
Test: adb shell /data/nativetest/installd_utils_test/installd_utils_test
Bug: 36655947
Merged-In: Ib706f0b8c1878be64710c00f56dccdfbe215570f
Change-Id: Ib706f0b8c1878be64710c00f56dccdfbe215570f
nstalld/Android.bp
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/globals.cpp
nstalld/globals.h
nstalld/installd.cpp
nstalld/otapreopt.cpp
nstalld/tests/installd_service_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
3760ad3c254968c16f99356b5c5e2b7bef7da722 28-Jul-2017 Calin Juravle <calin@google.com> Change the location of current profiles for secondary dex files

Update the installd code to handle the new location for secondary dex
profiles.

Tighten up the validation code and add tests.

Counter part for frameworks commit
a07ca21f9727325d76d2ddbfa119513f47f0b45f.

(cherry picked from commit 1c809c7068f610ff22174dbe96b49f1b8ada9c1e)

Bug: 62336157
Test: adb shell cmd package compile -r bg-dexopt --secondary-dex
com.google.android.googlequicksearchbox
adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox

Merged-In: Ib7af091a35fe53e7f6bb5f30a09911188caff88f
Change-Id: Ib7af091a35fe53e7f6bb5f30a09911188caff88f
nstalld/dexopt.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
e2cff6afae7c6777dfbd0714ec805cb6dd20cf90 21-Sep-2017 Jeff Sharkey <jsharkey@android.com> Skip children in fixupAppData() when parent shady.

If we find a directory with a shady GID, skip traversing into child
directories (if any), since we'll probably end up spamming the log
with every single item inside.

(cherry picked from commit 6b63b91febc595ff67ef45b3c4bd56c8268899e9)

Test: builds, boots
Bug: 65852352
Merged-In: I8f03864adef572fc277e34e9f1589d9664fc75b3
Change-Id: I8f03864adef572fc277e34e9f1589d9664fc75b3
nstalld/InstalldNativeService.cpp
0e1f4ceb356b14bb3178842c9c50e91e740df9ef 04-Aug-2017 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy performance warnings in frameworks/native.

* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.
* Use const reference type for loop index variables to avoid unnecessary copy.

(cherry picked from commit cb057c2e6bf23b43df49282c0db26b663e4535f7)

Bug: 30407689
Bug: 30411878
Bug: 30413223
Test: build with WITH_TIDY=1

Merged-In: I75ed62e2cb9939878b8932ed512ceb7e241edd6f
Change-Id: I75ed62e2cb9939878b8932ed512ceb7e241edd6f
trace/atrace.cpp
umpstate/dumpstate.cpp
umpsys/dumpsys.cpp
umpsys/tests/dumpsys_test.cpp
nstalld/CacheTracker.cpp
nstalld/InstalldNativeService.cpp
urfacereplayer/replayer/Replayer.cpp
ec0afbfa7bdeeb6d8585071a5944ab8b13cd9345 14-Sep-2017 Shubham Ajmera <shubhamajmera@google.com> Fix up error message in installd::prepare_app_cache_dir

Fix log when actual_mode and target_mode of the app_cache_dir
mismatch.

Current log - Mismatched cache GID/mode at <path>: found 10021 but \
expected 10021
New log - Mismatched cache GID/mode at <path>: found 10021/target_mode \
but expected 10021/actual_mode

(cherry picked from commit 347ac5dfff256ba71a0abd242edb49b9f5dadfdb)

Test: make

Merged-In: I0f9041ed5d436ccf8265cbab3852ae8d1b17a74a
Change-Id: I0f9041ed5d436ccf8265cbab3852ae8d1b17a74a
nstalld/utils.cpp
e761ac3710d2b28dc88ca32d367d4d76ddf3781b 29-Jul-2017 Jerry Wong <jerry.wong@broadcom.com> Installd: Fix math overflow on quota calculation

On 32-bit devices, the hard quota size calculation could overflow that
would cause the hard quota limit size to be much lower than intended.

b/64160395

(cherry picked from commit bcb8747bcb6ab45dfefc425ca6889ebf02ae5f26)

Bug: 64160395
Test: m
Merged-In: If7b0f2a40f77bb5e5957c663999544f4ab2e69be
Change-Id: If7b0f2a40f77bb5e5957c663999544f4ab2e69be
nstalld/InstalldNativeService.cpp
dd42e278aa2e5fd504901798aad064e102ee4a61 11-Sep-2017 Calin Juravle <calin@google.com> Adjust the validation code for secondary dex paths

Do not validate the package path when reconciling secondary dex files. If
the file does not exist we cannot resolve the system sym links (e.g.
/data/user/0 -> /data/data) and the validation will fail leaving oat files
behind.

(cherry picked from commit 9cd45602a89b2af5d4b8086cbb806b64ff6b78a4)

Bug: 64460009
Test: adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox (after removing some files)
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox
adb shell /data/nativetest64/installd_utils_test/installd_utils_test

Merged-In: I9734ad18a579d44088180326661d8cf8288e90be
Change-Id: I9734ad18a579d44088180326661d8cf8288e90be
nstalld/dexopt.cpp
nstalld/utils.cpp
nstalld/utils.h
52c4582e9c0088cbf43ff60d108df72fcb298885 14-Jul-2017 Calin Juravle <calin@google.com> Replace dexopt shared libraries with class loader context

Pass the class loader context to dex2oat with --class-loader-context
instead of using the runtime -cp argument.

(cherry picked from commit 1d66761379b54ff71094a7c722f131c591f3f897)

Test: adb shell cmd package compile a_split_test_apk
Bug: 38138251
Merged-In: I2e483969af8adf97291aa94f42e6da9ee5f1716b
Change-Id: I2e483969af8adf97291aa94f42e6da9ee5f1716b
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/dexopt.cpp
nstalld/dexopt.h
e6d7ad52db6d14019ebb20a7f7491d752ffe7b0b 25-Aug-2017 Shubham Ajmera <shubhamajmera@google.com> Drop capabilities in reconcileSecondaryDexFiles

... while unlinking oat files.

(cherry picked from commit e5afdb57e970f5813691ce9b0b5c7dd23faacfa0)

Test: adb shell cmd package reconcile-secondary-dex-files \
com.android.google.gms

Bug: 64461549
Merged-In: Ib2c59686233faab22088fc40a706736feb9964ee
Change-Id: Ib2c59686233faab22088fc40a706736feb9964ee
nstalld/dexopt.cpp
54ef8626be7b2351eb8482e21951ddb00a3b39d6 22-Jun-2017 Shubham Ajmera <shubhamajmera@google.com> Check dexopt needed for secondary dex while downgrading

Test: make otapreopt
Test: manual
* Remove the check in the code that allows downgrade only when
the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
in dalvik_cache

For secondary dex:
* compile googlequicksearchbox to everything.
* run background dexopt service for secondary dex.
* verify the compiler filter for the corresponding odex files.

(cherry picked from commit 45c8743428e0c9445430995ba395b3b5ebf82b3e)

Bug: 36598475
Merged-In: I6ad40e2c53433326f83c2589646d94ba555400b2
Change-Id: I6ad40e2c53433326f83c2589646d94ba555400b2
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
3f94b5e2d830c1c9000b8c391041a07776de3696 07-Jul-2017 Andreas Gampe <agampe@google.com> Revert "Otapreopt: Work around bug 38186355"

This reverts commit 12375069e753adea6c123fca7706b1018d358c92.

(cherry picked from commit efd53f88635840fe2a77fc836db57c4ecd94ed45)

Bug: 38186355
Bug: 38199123
Test: m
Test: manual OTA
Merged-In: Ie5b66d6ca5c3bc6af590bc7685234e75cc4d1ce4
Change-Id: Ie5b66d6ca5c3bc6af590bc7685234e75cc4d1ce4
nstalld/otapreopt.cpp
682e57b845a46c02bebd194a2689831f1b2b5948 07-Jun-2017 Luis A. Lozano <llozano@google.com> Clean up possible null dereference warning.

Added a runtime check for the value of the pointer.

(cherry picked from commit 88a69ded4ba00393e3865ccdfe65f964e58467b6)

Bug: b/27101951
Test: verified warnings are gone.
Merged-In: Ia1004ca6fdc0937450a72d680c02a79aab22a739
Change-Id: Ia1004ca6fdc0937450a72d680c02a79aab22a739
nstalld/CacheTracker.cpp
15b519ba6d498e6ed7fd4e6fac61bb0b3eb7324c 31-Oct-2017 Dianne Hackborn <hackbod@google.com> Merge "Update shell open command to have a mode."
4d03ee606982d01e2acee9bb06cb65c89eab8028 06-Jul-2017 Jeff Sharkey <jsharkey@android.com> Change storage migration to use quota APIs.

New quota APIs are much faster than trying to measure manually, and
removing this last user of calculateDirectorySize() means we can
remove it once and for all.

(cherry picked from commit a01369893823ee3d62ea79c422a76fe810f8a5cb)

Bug: 36056324
Test: builds, boots
Merged-In: I60bb197ffc161ed24fe4aa8093495c8874095cdb
Change-Id: I60bb197ffc161ed24fe4aa8093495c8874095cdb
nstalld/InstalldNativeService.cpp
597d268744dfdd2539e03d56e9a18de2104d8c6b 31-Oct-2017 Narayan Kamath <narayan@google.com> Merge "dumpstate: always include last ANR as a separate entry."
4217f8ecfe8f884288104262000275c1633b983e 30-Oct-2017 Dianne Hackborn <hackbod@google.com> Update shell open command to have a mode.

We need to open files for reading sometimes, so now
we can.

Test: manual

Change-Id: If089c1e7a4aac1d85784e070d2fccb04b9d84391
md/cmd.cpp
6b9516ced325e93880e9c8ef2793380866a1c579 27-Oct-2017 Narayan Kamath <narayan@google.com> dumpstate: always include last ANR as a separate entry.

For consistency, as well as to make tooling easier.

Most of this change is an extended yak-shave to try and close DumpData
FDs in a consistent manner. Several layers of abstraction were assuming
that it was their job to close input FDs, leading to double closes in some
cases. These double closes are benign prior to this change to dump a
given DumpData twice, given that dumpstate is single threaded.

Bug: 68188758
Test: adb bugreport
Change-Id: I6302f4cb553139c0c26defb4859c4eca5b18ec93
umpstate/DumpstateInternal.cpp
umpstate/DumpstateUtil.cpp
umpstate/dumpstate.cpp
umpstate/utils.cpp
026bb7e036acdeb32e2a1d6bcd90f7031299aee5 27-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: zip bugreport when bugreportwear is in the extra_options."
0ff5f3c694464a3d791b0e435a595965e37767b7 25-Oct-2017 David Sehr <sehr@google.com> Use dex2oatd when available on debug builds

Enable use of dex2oatd for background dexopt service for eng and userdebug builds.
This allows us to have more extensive checking on dogfood devices.

Bug: 68025088
Test: adb shell cmd package bg-dexopt-job
Change-Id: If346c27594542b1e6a058369170f38b6ae24462f
nstalld/dexopt.cpp
nstalld/installd_constants.h
d087b8d249b43d5ec4d353f91e10bb05d0b6d089 27-Jul-2017 Narayan Kamath <narayan@google.com> dumpstate: Add historical ANRs as separate entries in the zip file.

ANRs now show up as separate entries in the bugreport zip file, like so:

-rw---- 0.0 fat 516946 bl 48779 defN 17-Jul-27 10:47 FS/data/anr/anr_2017-07-27-10-47-45-798
-rw---- 0.0 fat 520627 bl 48995 defN 17-Jul-27 10:47 FS/data/anr/anr_2017-07-27-10-47-30-328

Bug: 32470528
Test: adb bugreport ./bugreport.zip; zipinfo -l ./bugreport.zip | grep anr

(cherry picked from commit 8cbab7c3c93c1bc9364a81726f02eeacc4a9356b)

Change-Id: Ia3a2fc12fb7de8e503b90f849dd4c7927d109581
umpstate/dumpstate.cpp
46edde3cd8d4bb4eb3765ba5760591127f2e57fd 26-Oct-2017 Alain Vongsouvanh <alainv@google.com> dumpstate: zip bugreport when bugreportwear is in the extra_options.

BUG: 67464962
Change-Id: Ic95c558a425c2ad64b33b519cd6b0b21b0fd15e7
(cherry picked from commit 50a79132548ff57be5f0e1e03e12e507fe207314)
umpstate/dumpstate.cpp
dd1ba6e2b191fa3281ded8e0ec4833873397f3ea 27-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix argument passing to dexoptanalyzer"
56891f864c97c6b211cb31f356a175d9e471052f 27-Oct-2017 Calin Juravle <calin@google.com> Fix argument passing to dexoptanalyzer

Test: adb shell cmd package compile --secondary-dex com.google.android.gms
Bug: 68340214

Change-Id: I7b7372bfb62144a51a9f2fd4c8525f6a53a27410
nstalld/dexopt.cpp
6a40853e06f5274d84b0fc66e349a36510d1497f 24-Oct-2017 Vishnu Nair <vishnun@google.com> Add proto dump flag to services (1/2)

Adds new PROTO flag which requests services to dump sections
in proto format. Modifies dumpsys to take in proto argument
and pass on proto flags to services which support proto
dumps. Modify PriorityDumper helper class to parse proto
arguments and set asProto flags.

Bug: 67716082

Test: mmm -j56 frameworks/native/cmds/dumpsys && \
mmm -j56 frameworks/native/services/utils && \
adb sync data && \
adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest/prioritydumper_test/prioritydumper_test && \
adb shell /data/nativetest64/prioritydumper_test/prioritydumper_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: I42c2a6a8876efbf9a7d792d68572499b16985147
umpsys/dumpsys.cpp
umpsys/tests/Android.bp
umpsys/tests/dumpsys_test.cpp
0c0da3814ef72a5986e927ebfd06e4e5ca380433 20-Oct-2017 Jiyong Park <jiyong@google.com> Merge "Remove libselinux_vendor" am: cd4895df08 am: 016e9504ae am: ad119fd2ad
am: 886d5976b4

Change-Id: I5b610cd06b89c14a34b5d42ad7270cf1b8c45a6c
886d5976b401c6b35786bbfc0b338abd94164606 20-Oct-2017 Jiyong Park <jiyong@google.com> Merge "Remove libselinux_vendor" am: cd4895df08 am: 016e9504ae
am: ad119fd2ad

Change-Id: I9de9eb1bf40b03f8e6e4bee96028f599b4d9cd7c
016e9504aeedc412a794139e9956d6d2634c1065 20-Oct-2017 Jiyong Park <jiyong@google.com> Merge "Remove libselinux_vendor"
am: cd4895df08

Change-Id: I461e1ffd3d2f3b7e1ac4027b2a280eb9fc33a047
a6974e9e50fe0e7b41c5e71174eed1b8dbe73ac5 13-Oct-2017 Jiyong Park <jiyong@google.com> Remove libselinux_vendor

libselinux now becomes a vendor_available:true library.

Bug: 66914194
Test: lunch aosp_arm64_ab-userdebug; m vndservicemanager

Change-Id: I9885c8656f42f79cf218d978feff79a47d16e1b3
ervicemanager/Android.bp
34f7b808f781f38835f89f3062ca5b5c197f75fb 15-Oct-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds" am: afee092bee am: f037948524 am: ea5bc92ba3
am: 5ffd474255

Change-Id: I0d15f6d4a0340e846f87bbbf01236785db344a89
5ffd474255d83838f3dfa895f2596d3f97c7f89d 15-Oct-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds" am: afee092bee am: f037948524
am: ea5bc92ba3

Change-Id: I9a3f0b5db423af1ec2925f0a0ca7307bda9b6f3a
f037948524c695d2954b74892f76ed00086a4f61 15-Oct-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds"
am: afee092bee

Change-Id: I6572f26af281f1df5148a2d21469494093a71bdf
ef81ec21e8ea059875295597e3acc9f6af3a96ec 12-Sep-2017 Calin Juravle <calin@google.com> [installd] Add check that classpath is up to date to getDexOptNeeded

Pass the class loader context argument to dexoptanalyzer when analyzing
secondary dex files.

Bug: 62269291
Test: manual, compile secondary dex files
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox

Change-Id: I25ae93cadd12441a13ff54bb3da5a198085c6f3d
nstalld/dexopt.cpp
afee092bee459332c8d577163794581c3128df4f 13-Oct-2017 Chih-hung Hsieh <chh@google.com> Merge "Use -Werror in frameworks/native/cmds"
13377a5dfb40287f5f1a0a7f5ae904d96be5ca8b 13-Oct-2017 Rob Carr <racarr@google.com> Merge "SurfaceFlinger Transactions as distinct objects."
5e931d888832f02384f9e16d46637ac745a688cd 12-Oct-2017 Dan Albert <danalbert@google.com> resolve merge conflicts of e221e0131 to oc-mr1-dev-plus-aosp

Test: I solemnly swear I tested this conflict resolution.
Change-Id: I9a210220bffd2c3e77f503413946c35fc0d36ffb
fb23ba2142685463cf770e44f677c1e263aa8c97 12-Oct-2017 Dan Albert <danalbert@google.com> Merge "Add missing includes."
am: 2df3edeae6

Change-Id: Idc165da50e14971fdd0e193bb789ebfe09af9ca5
ed8bd9a711383e4ceb24fce052ab4ddce17bba09 12-Oct-2017 Corey Tabaka <eieio@google.com> Add missing transitive dependency to atrace. am: c9f1c322da
am: 7f7170372b

Change-Id: I1b7a309c04bc36c63273c1ca9facf7939bf2085c
7f7170372be9d21c02b0f9289051984abfd68a76 12-Oct-2017 Corey Tabaka <eieio@google.com> Add missing transitive dependency to atrace.
am: c9f1c322da

Change-Id: Ia7cedd6ef2478a4c017d4123655b8b20857de06c
4cdc58f6840d15b4952149d2b345ec1f97d505bc 23-Aug-2017 Robert Carr <racarr@google.com> SurfaceFlinger Transactions as distinct objects.

Essentially a process global singleton for transactions is not so useful once
we make surface control public API as process isn't something an app developer
is really thinking about. It's also nice that we get to delete two of the plumbing layers.

Test: Boots
Change-Id: I8864bd7e2f5865e3c0a425cf82f9928211911774
latland/GLHelper.cpp
urfacereplayer/replayer/Replayer.cpp
urfacereplayer/replayer/Replayer.h
3c9c33aca29eb276776330b295685c2ae5716a0a 11-Oct-2017 Dan Albert <danalbert@google.com> Add missing includes.

Test: mma
Bug: None
Merged-In: I27d0860770f40b0d210277fbbf0242db450e0e0d
Change-Id: I27d0860770f40b0d210277fbbf0242db450e0e0d
umpstate/DumpstateInternal.cpp
9f93afecb6e3467e43f919e8f20f3ab3d11f45b2 11-Oct-2017 Dan Albert <danalbert@google.com> Add missing includes.

Test: mma
Bug: None
Change-Id: I27d0860770f40b0d210277fbbf0242db450e0e0d
umpstate/DumpstateInternal.cpp
c9f1c322da71c20c018b8d16c22b3552e9f143e8 11-Oct-2017 Corey Tabaka <eieio@google.com> Add missing transitive dependency to atrace.

This is the proper fix for the revert in ag/3048738.

Bug: 65455724
Test: lunch full-eng && make -j30
Change-Id: I88d37fca2d1f71a46595dd74b5fd6749fa4b477d
trace/Android.bp
bdacb1dce4a17cfaa6629e287565c5f68f8f4f62 11-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: dump IO perf history from storaged"
f334d669dcd9ce322dd5a997c3b5a392b9152d3b 10-Oct-2017 Jin Qian <jinqian@google.com> dumpstate: dump IO perf history from storaged

Test: adb bugreport
Bug: 63629306
Change-Id: I3126ce30e263bcb6e7760aa913b3461954a3719d
umpstate/dumpstate.cpp
780b1283e6d219e1ef3cb061f5096dcb359d88ca 10-Oct-2017 Vishnu Nair <vishnun@google.com> Add priority based dumpsys support to dumpstate

Adds a new version of dumpstate which calls dumpsys with different
priorities. Current version will remain INITIAL_VERSION (1.0) until tools
support the new version and services register with supported priorities.
Modified dumpsys to pass prioirty args to services.

BugReport format changes:
- removed service specific dumps and dump order changed
- Start of dumpsys section changed to
DUMPSYS CRITICAL/HIGH/NORMAL
- Start of service dump changed to
DUMP OF SERVICE CRITICAL/HIGH/NORMAL <servicename>

Bug: 27429130

Test: adb shell setprop dumpstate.version "1.0" && \
adb bugreport ~/tmp_old.zip
Test: adb shell setprop dumpstate.version "2.0-dev-split-anr" && \
adb bugreport ~/tmp_anr.zip
Test: adb shell setprop dumpstate.version "2.0-dev-priority-dumps" && \
adb bugreport ~/tmp_new.zip

Change-Id: I9fd0f2d0e6d73b36cc8ee0f8239092ce83da9560
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
umpsys/Android.bp
umpsys/dumpsys.cpp
734e378a7387b2d51f40f4e4cba8887703bd1839 05-Oct-2017 Chih-Hung Hsieh <chh@google.com> Use -Werror in frameworks/native/cmds

* Remove or comment out unused variables/functions.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I15a463eb9a20bc12787c104f671063ceeafaa1cc
trace/Android.bp
trace/atrace.cpp
ugreport/Android.bp
umpsys/tests/Android.bp
nstalld/tests/Android.bp
shal/Android.bp
shal/Lshal.h
shal/PipeRelay.cpp
shal/PipeRelay.h
ervice/Android.bp
45c99f6b7b084c731b4c5d1c2604d4df3f845702 09-Oct-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add sensor HAL process into dump list"
b317c751930f0c33b795fac7833492c2d061ae63 12-Jul-2017 Peng Xu <pengxu@google.com> Add sensor HAL process into dump list

Test: adb bugreport contains native stack trace for
/vendor/bin/hw/android.hardware.sensors@1.0-service

Bug: 63096400
Change-Id: I2c24d4fd2fab7ed52dbd12b5324ae03aeaec3cda
Merged-In: I2c24d4fd2fab7ed52dbd12b5324ae03aeaec3cda
umpstate/utils.cpp
eaabf0eac9dd5acaadfe466b0e27cc3b4bc3c84a 09-Oct-2017 Yohei Yukawa <yukawa@google.com> Merge "dumpstate: dump CPU time consumed for each thread"
b92de07b63bbcb05ff15a32dda8644ee763acc5d 06-Oct-2017 Jeff Sharkey <jsharkey@android.com> Fix bug in directory depth counting.

The path "dir//file" has the same depth as "dir/file". Also verify
with local unit tests.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 67471251
Change-Id: Iab35b4fe5591ddd42a7121b630cffcd94ad23c40
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
591a72da3ec97e986f9149d0b0d851bf27f6665d 06-Oct-2017 Yohei Yukawa <yukawa@google.com> dumpstate: dump CPU time consumed for each thread

This should be useful to diagnose battery drain bugs due to
accidental semi-infinite busy-loop in processes that merely
get killed by the system (e.g. IMEs).

Bug: 67330309
Fixes: 67482875
Test: Manually verified by checking 'adb bugreport report.zip'
Change-Id: I1fedaf2518dd65dac105b29a74d50b51eb633cd7
umpstate/dumpstate.cpp
18650c76e9ed39a3ae3436aab2ecb8a33439b541 05-Oct-2017 Ryuki Nakamura <ryuki.nakamura@sony.com> Merge "Remove code_cache info from parent's inode when code_cache is removed" am: 301fb1333f am: 68ff008ee8 am: 8871e8ed90
am: 41f9f15780

Change-Id: Icf808673b4a90d84f5cb1118bda1c13091d28c1a
41f9f15780ea3648fc4e358110104f9627a35ac0 05-Oct-2017 Ryuki Nakamura <ryuki.nakamura@sony.com> Merge "Remove code_cache info from parent's inode when code_cache is removed" am: 301fb1333f am: 68ff008ee8
am: 8871e8ed90

Change-Id: Ibd45b49fc72adbd5e93afb00e682c3ed8de8f055
68ff008ee8659dd69a458b1088134b8ee3ff71c3 05-Oct-2017 Ryuki Nakamura <ryuki.nakamura@sony.com> Merge "Remove code_cache info from parent's inode when code_cache is removed"
am: 301fb1333f

Change-Id: I5782c6f52fca59de6e54d70dcfcafcac581cd109
301fb1333fbb87bf16abcc83403e1bac242abaa8 05-Oct-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove code_cache info from parent's inode when code_cache is removed"
0ad0f3059ffca0c6e1de680ca7e68d5150b8b14f 31-Aug-2017 Joel Fernandes <joelaf@google.com> atrace: preempt and irq disable section tracing

IRQ and preempt disabled sections can be visualized in systrace, add the
trace categories to enable these events.

Currently only root users who have permissions to write to these file
will be allowed to run this. At a future time, we can add other users
once we decide on security aspects.

Bug: 67425309

Change-Id: I389c3ab5624a775d310d90b7cb4edf47407aa614
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
37841495295efaf1e633e05fabd6b9aaeac41f65 04-Oct-2017 Yifan Hong <elsk@google.com> Merge "Dumpstate: lshal runs in non-root in user build" am: 0c47ec9a82 am: 223a1cf193 am: cab71c3ffe
am: f3b4c29209

Change-Id: Ic27fa5b2e660b231250413f29d70a77801e8e99c
f3b4c29209e471f56ffc0cf5540a721b8a39954c 04-Oct-2017 Yifan Hong <elsk@google.com> Merge "Dumpstate: lshal runs in non-root in user build" am: 0c47ec9a82 am: 223a1cf193
am: cab71c3ffe

Change-Id: Id4c256b1b9f70ff3bf1a19d0dd5c851b02512724
223a1cf193043e85944c6593e1751f52d5f76c13 04-Oct-2017 Yifan Hong <elsk@google.com> Merge "Dumpstate: lshal runs in non-root in user build"
am: 0c47ec9a82

Change-Id: I8bb21edc60bc8df3e89cfd766584e2cafaf12a38
48e83a152179d5fe45dbef2ec7efc509f5f3adc4 03-Oct-2017 Yifan Hong <elsk@google.com> Dumpstate: lshal runs in non-root in user build

lshal output is still useful even without root permission,
so include it in user build as well.

Test: lshal in user build
Test: dumpstate_test
Test: DumpstateTest.RunCommandAsRootIfAvailableOnUserBuild
Test: DumpstateTest.RunCommandAsRootIfAvailableOnDebugBuild
Test: DumpstateUtilTest.RunCommandAsRootIfAvailableOnDebugBuild
Test: DumpstateUtilTest.RunCommandAsRootIfAvailableOnUserBuild

Change-Id: Ie8ba9206feb6c2947ed38159ec9893e85d0e020d
Fixes: 66476950
umpstate/DumpstateUtil.cpp
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/tests/dumpstate_test.cpp
354b29975ecd535c64a796b8b3c69c50917efb9c 03-Oct-2017 Jiyong Park <jiyong@google.com> Merge "Change UniquePtr to std::unique_ptr"
am: 625d6a8cd8

Change-Id: I82038cecd58de96f234095f9483419cc0627df8e
429d2117b44a76dad2b37f7ee66bc122e73273d3 07-Aug-2017 Jiyong Park <jiyong@google.com> Change UniquePtr to std::unique_ptr

UniquePtr.h in libnativehelper/include is deprecated and will be removed
soon. Switching to the standard std::unique_ptr.

(cherry picked from commit 4e7d18a72f72967a881bcdf78167011a836538ef)

Bug: 63686260
Test: builds, cmd works in the device.
Merged-In: Ib008acd1dd7dba2305b0797c9dc7bab1aa747e7d
Change-Id: Ib008acd1dd7dba2305b0797c9dc7bab1aa747e7d
md/cmd.cpp
c7342f8e3b317dcae128e21bb6a9ecf21856a678 30-Sep-2017 Ryuki Nakamura <ryuki.nakamura@sony.com> Remove code_cache info from parent's inode when code_cache is removed

Symptom:
After FOTA, shared_prefs directory of app is cleared.

Root cause:
PackageManager clears code_cache directory of all apps during first
boot after FOTA.
PackageManager saves inode number of code_cache directory to xattr of
app data directory in advance and accesses to code_cache directory by
saved inode number because app data stored in CE directory are encrypted
during boot for FBE.

However before FOTA, code_cache directory was deleted and shared_prefs
directory which has the same inode number as deleted code_cache
directory was created.
As a result PackageManager clears shared_prefs directory which has
inode number of code_cache directory.

Solution:
Remove inode number from xattr of app data directory when clear app
data.

Bug: 67140392
Change-Id: Ic7a6268a417aa41e2712499f397e6ec217b7cb3e
nstalld/InstalldNativeService.cpp
nstalld/utils.cpp
nstalld/utils.h
3cd671e868a3648a4ca00c3e0b063e983d34b702 28-Sep-2017 Jin Qian <jinqian@google.com> dumpstate: dump iotop to show io threads

Also fix title for storaged -u.

Test: adb bugreport
Bug: 63629306
Change-Id: I31a6225c19cd86bfe1c55d71c2ef3f02802c3b93
umpstate/dumpstate.cpp
5696e6353b4f349b316097fcb783b4cfcb5511ef 27-Sep-2017 Andreas Gampe <agampe@google.com> Otapreopt: Fix property handling

Follow-up to commit 1b9d9a6006f4159e2cc2c41330f316b1fdc53fe1.

In the previous CL, a strncpy was translated incorrectly to a
strlcpy. Fix the glitch.

Bug: 36655947
Bug: 66996038
Test: manual A/B OTA
Change-Id: I387ff8436de351a3cec5458b3ef013e15905a046
nstalld/otapreopt.cpp
ae3142116b5d50b4ce02ee34681c37dbaf8122c1 26-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Pass dumpsys priority to IServiceManager"
f56042d6a496fca2e5cfc1f598251f77a9bc7986 20-Sep-2017 Vishnu Nair <vishnun@google.com> Pass dumpsys priority to IServiceManager

Modify IServiceManger to accept supported dumpsys priority as a bitmask
with NORMAL being the default priority. Change listServices to return
a list of services filtered by the priority or all services when the
priority is set to ALL.

BUG:27429130

Test: mmm -j32 frameworks/native/cmds/dumpsys && \
adb sync data && adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Change-Id: Ibccba63035ace9970c2967a621ee2ad8d15cbeea
umpsys/dumpsys.cpp
umpsys/tests/dumpsys_test.cpp
ervicemanager/service_manager.c
2261f1cdb228b9c7281d63d8d8fab0e094adbac8 22-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Enable clang-tidy for sensitive domain."
1b9d9a6006f4159e2cc2c41330f316b1fdc53fe1 21-Sep-2017 Jeff Sharkey <jsharkey@android.com> Enable clang-tidy for sensitive domain.

Since installd has broad access to lots of sensitive data, enable
as many security-related tidy checks as possible to help avoid bugs.

This change provides a default implementation of create_cache_path(),
calculate_odex_file_path(), and calculate_oat_file_path(), along
with tests to verify behavior against old code.

Replace "dir_rec_t" with std::string, since that's really what it's
been all along. Increase paranoia of path checking to reject any
paths containing "..", regardless of where it occurs in path string.
Stricter checking of instruction set values.

Remove now-unused char* manipulation utility methods; people should
be using std::string instead.

Test: adb shell /data/nativetest/installd_cache_test/installd_cache_test
Test: adb shell /data/nativetest/installd_service_test/installd_service_test
Test: adb shell /data/nativetest/installd_utils_test/installd_utils_test
Bug: 36655947
Change-Id: Ib706f0b8c1878be64710c00f56dccdfbe215570f
nstalld/Android.bp
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/globals.cpp
nstalld/globals.h
nstalld/installd.cpp
nstalld/otapreopt.cpp
nstalld/tests/installd_service_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
6b63b91febc595ff67ef45b3c4bd56c8268899e9 21-Sep-2017 Jeff Sharkey <jsharkey@android.com> Skip children in fixupAppData() when parent shady.

If we find a directory with a shady GID, skip traversing into child
directories (if any), since we'll probably end up spamming the log
with every single item inside.

Test: builds, boots
Bug: 65852352
Change-Id: I8f03864adef572fc277e34e9f1589d9664fc75b3
nstalld/InstalldNativeService.cpp
a3861b2141984260fcb6621dbcfd7786b73fd846 19-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix up error message in installd::prepare_app_cache_dir"
c7f0d756fb029176e1c9d4bd618e3c20d37f66e2 15-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_released" am: 136c4bc7ab am: 3985d37c0d am: 0cc634548c
am: 1776f7562e

Change-Id: If83d5343b4c1eee91940874cc4cc8fc4d0bdb04b
1776f7562e612f85a861a15af6572ec1927ec705 15-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_released" am: 136c4bc7ab am: 3985d37c0d
am: 0cc634548c

Change-Id: Id981ebb3ec61209a4e4fe264ef6b1a193ebc0836
3985d37c0d141ea6f69e3bb89729536352562653 15-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_released"
am: 136c4bc7ab

Change-Id: I76d847e108f9826573202218fcf595b199856ec7
fee209dda24dc94277df020fee3d91f1194e5ea1 15-Sep-2017 Yifan Hong <elsk@google.com> lshal: add Released column.

Example output:

$ lshal --neat -lis
...
Y android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default 7f5fe8f4f8a24037153c504d8b4d3313c2ce33d81c8c69fe5194ddd2d4080e72
android.hardware.configstore@1.1::ISurfaceFlingerConfigs/default 0000000000000000000000000000000000000000000000000000000000000000
...

Bug: 65123158
Test: lshal_test
Test: lshal
Test: lshal -ils
Test: lshal --help

Change-Id: I18e52eb977461d68909057583be8223d53f6748b
shal/Android.bp
shal/ListCommand.cpp
shal/TableEntry.cpp
shal/TableEntry.h
shal/test.cpp
shal/utils.h
931dc01ad7c2d3eb1de276a7174cd55928d463aa 15-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_released" am: 757fd44b93 am: 880df0f744 am: 163a64a339
am: ffd8c0c8bd

Change-Id: I5bd96af50a56a54dc91ae3498c13137cbfc3d0ef
5095111399264fdc4ff976ec25a93b64d390fcfe 15-Sep-2017 Steven Moreland <smoreland@google.com> Merge "Revert "Add runpath to lshal_test"" into oc-mr1-dev am: 9c2336c0b3
am: f07ca33810

Change-Id: Ie15711cc0faa06889e59ffe1b51dd8884cdf1118
ffd8c0c8bd9c9b9ca24622550ae9280e08525266 15-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_released" am: 757fd44b93 am: 880df0f744
am: 163a64a339

Change-Id: I25478f2bcb117ce916e83ae51f4ef0dabc87b72e
f07ca33810b459cb435274fdcbb78a37d3f97247 15-Sep-2017 Steven Moreland <smoreland@google.com> Merge "Revert "Add runpath to lshal_test"" into oc-mr1-dev
am: 9c2336c0b3

Change-Id: Ic205bc9b525a9b6ae9396257fd855b6b3c11f835
22ea7b851dbe753eda2a703952bbc803c1dcfc1f 15-Sep-2017 Yifan Hong <elsk@google.com> lshal: clean up ListCommand::fetchBinderized

Refactor fetchBinderized. Move logic for each TableEntry to
a separate fetchBinderizedEntry function.

* Change allDebugInfos to allTableEntries to contain more information.
* Use getPidInfoCached instead of allPids for cache.
* TableEntry can be default constructed.

Test: lshal_test
Change-Id: Iceea7296b7fd4f3fa268daa74bd3b89360294124
shal/ListCommand.cpp
shal/ListCommand.h
shal/TableEntry.h
1243ddeac9e35eaf1ca8f665eff24a89226b2f01 15-Sep-2017 Yifan Hong <elsk@google.com> lshal: ListCommand::getPidInfo should be cached.

The function parses a big file and its result should be cached.
Add ListCommand::getPidInfoCached, which is a cached version
of this function.

Test: lshal_test
Change-Id: I03d8f149bf67b1512be431a3c4c29e83f7743a2f
shal/ListCommand.cpp
shal/ListCommand.h
shal/test.cpp
7a3b46c2f5622759aeffaf4c2f0f867973469efd 15-Sep-2017 Yifan Hong <elsk@google.com> lshal: fix tests on implementation

Fix tests on the implementation of ListCommand. This makes
the tests hard to maintain.

Test: lsahl_test
Change-Id: Iae137fad102f5298c5ff19fc8498a4591df9ce00
shal/test.cpp
93b8bfffba852a9048f0445143eb6252bd5a7467 15-Sep-2017 Yifan Hong <elsk@google.com> lshal: omit description text in tests.

There is no point on testing on the exact description text.
Test: lshal_test

Change-Id: Ieb7caaf992c62b772357a67e9e2abeba525c4bce
shal/ListCommand.h
shal/test.cpp
880df0f7440e7a5897907d85e433abc8381e23ce 15-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_released"
am: 757fd44b93

Change-Id: Id1459c0576a5b016ed1b83ee482b96b57bfddb1e
347ac5dfff256ba71a0abd242edb49b9f5dadfdb 14-Sep-2017 Shubham Ajmera <shubhamajmera@google.com> Fix up error message in installd::prepare_app_cache_dir

Fix log when actual_mode and target_mode of the app_cache_dir
mismatch.

Current log - Mismatched cache GID/mode at <path>: found 10021 but \
expected 10021
New log - Mismatched cache GID/mode at <path>: found 10021/target_mode \
but expected 10021/actual_mode

Test: make

Change-Id: I0f9041ed5d436ccf8265cbab3852ae8d1b17a74a
nstalld/utils.cpp
9c2336c0b3032de472bdf35cb5f69efcdc3b4aa9 15-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Add runpath to lshal_test"" into oc-mr1-dev
8a03aa91f179bb34b53dcc3cacaa793e6ef1f7b2 14-Sep-2017 Steven Moreland <smoreland@google.com> Revert "Add runpath to lshal_test"

This reverts commit 864c07077b0283ecf9bd36a0381951a19ec8c3df.

No special behavior for tests.

Reason for revert: b/65603915
Bug: 64776708

Change-Id: Ib64d4f6ef5ea59afa1d3c408c792685a3d025c0a
shal/Android.bp
e3f88f11197521a451cdd40fd97a662262dee071 14-Sep-2017 Yifan Hong <elsk@google.com> lshal: add docs to Status.

Test: pass
Change-Id: I860c10057e4415665bc3b4093f1efb4e6063823b
shal/utils.h
d43d705ce3edf4b5af5f72dfd3f073eaf5d560e1 14-Sep-2017 Yifan Hong <elsk@google.com> lshal: remove unused "break".

Test: pass
Change-Id: I5947b9cfb766c3c80345147dad94d5e5ed5a5be4
shal/TableEntry.cpp
a6b93f0d61201b0318b65a8ffeb2b9cfeea0c9ea 14-Sep-2017 Yifan Hong <elsk@google.com> lshal: register options for ListCommand.

ListCommand parseArgs() and usage() uses a list of RegisteredOption's
instead of hardcoding all options.

Test: lshal_test
Change-Id: I94418b22791fbff7a17756c4266252a76570fb84
shal/ListCommand.cpp
shal/ListCommand.h
795b6ec89541879d7c11d20842ab5e854bfc4caa 13-Sep-2017 Yifan Hong <elsk@google.com> lshal: Lshal register commands

Register commands to the controller class Lshal to autogenerate
help messages and select the correct Command.

Test: lshal_test
Change-Id: I846aef13d77bcee328c8410dc61f2e8b4c0e0d69
shal/Command.h
shal/DebugCommand.cpp
shal/DebugCommand.h
shal/HelpCommand.cpp
shal/HelpCommand.h
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/Lshal.h
a8bedc6ae3f6d610aa634445809835c26aaf16bc 09-Sep-2017 Yifan Hong <elsk@google.com> lshal: add HelpCommand

Add *Command::usage() function for each Command and let
Lshal class to call them.

Suppress output from getopt_long and write our own
error message to customized error stream (for testing).

Test: lshal_test
Test: lshal --help

Change-Id: I8f5847c84a3e01af29fa85871479cab3baeb5312
shal/Android.bp
shal/Command.h
shal/DebugCommand.cpp
shal/DebugCommand.h
shal/HelpCommand.cpp
shal/HelpCommand.h
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/Lshal.h
shal/test.cpp
shal/utils.h
ded398e5b6530c4ced5bd42f9b75ca2caa527239 07-Sep-2017 Yifan Hong <elsk@google.com> lshal: Add class Command.

Command is the base class for all *Command classes.

Test: lshal_test

Bug: 35389839
Change-Id: I9aca19e66824536d13e618ffd0f012ac3da9880d
shal/Command.h
shal/DebugCommand.cpp
shal/DebugCommand.h
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/Lshal.h
91e655dc2be238fafcf832c73e62166d7b69c848 14-Sep-2017 Yifan Hong <elsk@google.com> lshal: DISALLOW_COPY_AND_ASSIGN needs to be in private

Test: pass
Change-Id: Ic2abdbe0309957f1a72ca4a788bb09dd660c746c
shal/ListCommand.h
b9bf49629c115749fcd4451786afa8ef0a71cd5d 14-Sep-2017 Yifan Hong <elsk@google.com> Merge "Add runpath to lshal_test" into oc-mr1-dev am: 3f3fe12c05
am: b8cdfee8a2

Change-Id: I08fd1a7cede3a8275080d1557dbfaae7a34aed17
65730a58db9b30c069d8ddf3fd40e4d62f19e665 14-Sep-2017 Calin Juravle <calin@google.com> Merge "Adjust the validation code for secondary dex paths" into oc-mr1-dev am: 495157b05c
am: 12ea24c31c

Change-Id: I6724cbe100fb0c2469bd8d02728c2850868e2c2d
b8cdfee8a25b50753cdbc9b876efbfd82be10704 14-Sep-2017 Yifan Hong <elsk@google.com> Merge "Add runpath to lshal_test" into oc-mr1-dev
am: 3f3fe12c05

Change-Id: Ide67a9d9c9f52d6f99e45962b2776fdda30a6bfd
12ea24c31cdf3b67c99d3d3239f59fbd2e6f3d80 14-Sep-2017 Calin Juravle <calin@google.com> Merge "Adjust the validation code for secondary dex paths" into oc-mr1-dev
am: 495157b05c

Change-Id: I241735ef8fa01a0210582c145b26b4d50a713855
3f3fe12c0527f8701653caadbc4ce4b84e4ea260 14-Sep-2017 Yifan Hong <elsk@google.com> Merge "Add runpath to lshal_test" into oc-mr1-dev
9cd45602a89b2af5d4b8086cbb806b64ff6b78a4 11-Sep-2017 Calin Juravle <calin@google.com> Adjust the validation code for secondary dex paths

Do not validate the package path when reconciling secondary dex files. If
the file does not exist we cannot resolve the system sym links (e.g.
/data/user/0 -> /data/data) and the validation will fail leaving oat files
behind.

Bug: 64460009
Test: adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox (after removing some files)
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox
adb shell /data/nativetest64/installd_utils_test/installd_utils_test

Change-Id: I9734ad18a579d44088180326661d8cf8288e90be
nstalld/dexopt.cpp
nstalld/utils.cpp
nstalld/utils.h
864c07077b0283ecf9bd36a0381951a19ec8c3df 13-Sep-2017 Jiyong Park <jiyong@google.com> Add runpath to lshal_test

android.hardware.test.baz@1.0.so is installed to /data/nativetest(64),
and no longer to /system/lib(64) or /system/lib(64)/vndk, because the
interface library is only for testing.

Set runpath so that lshal_test can find the interface library in the
non-standard directory.

Bug: 65603915
Test: m -j lshal_test
adb push out/target/product/<name>/data/nativetest* /data
adb shell /data/nativetest/lshal_test/lshal_test

Change-Id: I854b08acb6442990ed369bfbc517ad1a93c94584
shal/Android.bp
12d83eaf6a54e6e9fd23c5c1a729fb30d21a3fc2 12-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_pretty" am: 303322f06a am: e1111eb11d am: 655da33570
am: 424b40487a

Change-Id: Ic64ba89bde54489955c1cd5a97ea8440c2edaef3
424b40487a6fb7fc7043bdd727622bf3e8cddaa0 12-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_pretty" am: 303322f06a am: e1111eb11d
am: 655da33570

Change-Id: I11a78b12e3b20dadb48dc0703e8ac26ba1074867
e1111eb11df289f44be3ba452dd50433e1439fb5 12-Sep-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_pretty"
am: 303322f06a

Change-Id: Id11633ecd807d5318593fcd94173b11b0880475e
8bf7316ebc75f9e5b3a6349bbc9c7140e6e90234 08-Sep-2017 Yifan Hong <elsk@google.com> lshal: add tests for ListCommand::fetch* and dumpVintf

Test: lshal_test
Change-Id: I9e519ec93709ba4dfa7f95e4c5fff60cbda36134
shal/Android.bp
shal/ListCommand.cpp
shal/ListCommand.h
shal/TableEntry.cpp
shal/TableEntry.h
shal/test.cpp
b2a2ecb642d1dad620bd91f6b875521a55b08224 08-Sep-2017 Yifan Hong <elsk@google.com> lshal: Add tests for ListCommand::parseArgs

Test: lshal_test
Bug: 35389839
Change-Id: Iaef39b048b0e7c06e70e21c96448c2f2e24d3128
shal/ListCommand.h
shal/Lshal.h
shal/test.cpp
ca3b6609625c838cfc0975e00bbbc7386f618874 08-Sep-2017 Yifan Hong <elsk@google.com> lshal: fix file streams for testing.

* If a file is specified for list, the file is opened and
closed within the ListCommand::dump() function.

* Add a missing break in ListCommand::parseArgs, case
for '--init-vintf'

Test: lshal_test
Test: lshal --init-vintf
Test: lshal --init-vintf=/data/data/a.xml ; adb shell cat \
/data/data/a.xml
Test: lshal -d
Test: lshal --debug=/data/data/d.txt ; adb shell cat \
/data/data/d.txt

Change-Id: I1acee5878638d25257a13244713dc416e9d8d6b2
shal/ListCommand.cpp
shal/ListCommand.h
76ac14a10d9c7bc095d5029928033478f29fdf3c 08-Sep-2017 Yifan Hong <elsk@google.com> lshal: fix output streams for testing.

ListCommand does not keep a reference to output
and err streams (for easier mock in testing). Instead,
ListCommand uses out() and err() that calls into
Lshal::out() and err().

Test: lshal
Test: lshal_test
Change-Id: Ie6720833ad513ba5cb1246e34ef96afed5d4373c
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
bf20a261f0ff11dad5f55009de04895953cca8ff 07-Sep-2017 Yifan Hong <elsk@google.com> lshal: clean up tests

Refactored duplicated code.
Test: lshal_test
Bug: 35389839

Change-Id: I181fa2122b88e2b7932581f1c63b30decd7c3ddf
shal/test.cpp
d4a77e8a1a9bcb778c01738b0dce640ff7d4e8a5 07-Sep-2017 Yifan Hong <elsk@google.com> lshal: remove ListCommand addLine

Remove obnoxious addLine(...) in ListCommand.cpp by moving
the feature of selecting columns into the "Table" class.

Test: lshal
Test: lshal -m
Test: lshal -d (shows debug info for context hub)
Test: lshal_test
Bug: 35389839
Change-Id: Ieb4a6e544ef39c9f1a63b046a44b6a8e1416ea62
shal/Android.bp
shal/ListCommand.cpp
shal/ListCommand.h
shal/TableEntry.cpp
shal/TableEntry.h
shal/TextTable.cpp
shal/TextTable.h
30556fc7e7e62ff55ad10b63e735cbb012ed6571 01-May-2017 Sandeep Patil <sspatil@google.com> vndservicemanager: remove static dependency on libselinux

libselinux_vendor is part of VNDK. No need to statically link
to it anymore.

Bug: 37343404
Test: Build and boot
Test: 'vndservice list' to ensure all services are listed as before

Change-Id: I5b3151f44f7b77ce0f2ff4bba38550a3d7e35375
Signed-off-by: Sandeep Patil <sspatil@google.com>
Merged-In: I5b3151f44f7b77ce0f2ff4bba38550a3d7e35375
ervicemanager/Android.bp
4d8ed917a8977822aedd8224929a5465941ed240 03-Sep-2017 Felipe Leme <felipeal@google.com> Merge "Fixed dumpstate_test_fixture so it runs on 64 bits as well." into oc-mr1-dev am: a2639d47ee
am: 83a4bd5ce8

Change-Id: I51e626ee874009a95eb1e03b6c8af9313fc8db9a
83a4bd5ce88179e60b4be324c01fb3c5dd489713 03-Sep-2017 Felipe Leme <felipeal@google.com> Merge "Fixed dumpstate_test_fixture so it runs on 64 bits as well." into oc-mr1-dev
am: a2639d47ee

Change-Id: I6b34107fb6de6b4bc183a4485458248b5e10a259
a2639d47ee2b0706c8714f9af55177a6b8940cb2 03-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed dumpstate_test_fixture so it runs on 64 bits as well." into oc-mr1-dev
7ded841365bdc77520d97c6771c777d9381b5210 03-Sep-2017 Shubham Ajmera <shubhamajmera@google.com> Merge "Drop capabilities in reconcileSecondaryDexFiles" into oc-mr1-dev
am: c40416d0a1

Change-Id: Id693d25dddfe197a9cb4ec6b3fefff09da08f2f0
c40416d0a14a67640952a37733796ead314fd3a9 03-Sep-2017 Shubham Ajmera <shubhamajmera@google.com> Merge "Drop capabilities in reconcileSecondaryDexFiles" into oc-mr1-dev
9a40fe13882753b9ae9210d357f34b30affec143 02-Sep-2017 Felipe Leme <felipeal@google.com> Merge "Temporary fix for memory leak on DumpRunningServiceTimeout." into oc-mr1-dev am: f2e446abe5
am: 215bcdcc28

Change-Id: I51bcb78f4a4c6d4e26721d46f3fbccd4a97d0d4d
215bcdcc2881eee96a8a887bbba56de40eadde66 02-Sep-2017 Felipe Leme <felipeal@google.com> Merge "Temporary fix for memory leak on DumpRunningServiceTimeout." into oc-mr1-dev
am: f2e446abe5

Change-Id: I3ed1b7943492eb358164b4a6ce75d9532c020f26
f2e446abe593130a88f665dbb8bcb78615c786cb 02-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Temporary fix for memory leak on DumpRunningServiceTimeout." into oc-mr1-dev
9ebb7346c4c4033b5937f6ab91d9f006347a7c87 01-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Drop capabilities in reconcileSecondaryDexFiles"
f0b632a2101d6988c8edc13b8695a5ea3aa47ffe 25-Aug-2017 Shubham Ajmera <shubhamajmera@google.com> Drop capabilities in reconcileSecondaryDexFiles

... while unlinking oat files.

Test: adb shell cmd package reconcile-secondary-dex-files \
com.android.google.gms

Bug: 64461549
Change-Id: Ib2c59686233faab22088fc40a706736feb9964ee
(cherry-picked from commit 5a9ef99046e7324f5e821b05ad956e5e953a1e84)
nstalld/dexopt.cpp
e5afdb57e970f5813691ce9b0b5c7dd23faacfa0 25-Aug-2017 Shubham Ajmera <shubhamajmera@google.com> Drop capabilities in reconcileSecondaryDexFiles

... while unlinking oat files.

Test: adb shell cmd package reconcile-secondary-dex-files \
com.android.google.gms

Bug: 64461549
Change-Id: Ib2c59686233faab22088fc40a706736feb9964ee
nstalld/dexopt.cpp
f069ca8f6915400c17693d5f1ea1374d616fbd7f 31-Aug-2017 Yifan Hong <elsk@google.com> Merge "lshal: fix potential out-of-range error." am: cb82bdbf10 am: 7cd89ffb8b am: 149e4b61d6
am: 6fc9b3efc5

Change-Id: Ia504b3e79cc27945c8a544dc0881e7d9918fd65c
6fc9b3efc54dea7fb2d270d5707d68a3d479babb 31-Aug-2017 Yifan Hong <elsk@google.com> Merge "lshal: fix potential out-of-range error." am: cb82bdbf10 am: 7cd89ffb8b
am: 149e4b61d6

Change-Id: Id746ddf6ca8113d2d67867869799eed55a7b2295
7cd89ffb8b779c9b9c1df25a2ecb1758b6a614da 31-Aug-2017 Yifan Hong <elsk@google.com> Merge "lshal: fix potential out-of-range error."
am: cb82bdbf10

Change-Id: I315218a2cfb6af694ffdbf35b8997bd60ce01864
7249a538b30fb2ff4fe41fd396491b1cb3e2abf5 31-Aug-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_pretty" am: 7971ad7fd7 am: 54b6e675b5 am: 47f87262d6
am: 1538a00ccf

Change-Id: I5117a3aa59f49cf449e828f1f4913b05e5ba9a97
1538a00ccfc0d1070339497ac18ad8a04ba0215a 31-Aug-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_pretty" am: 7971ad7fd7 am: 54b6e675b5
am: 47f87262d6

Change-Id: I82a365d61e283cd13c0f9e540b927f8917a6d798
223388253658ff5b726690056d3f433db6a5f3e6 31-Aug-2017 Yifan Hong <elsk@google.com> lshal: fix potential out-of-range error.

Test: lshal
Test: lshal --neat
Test: lshal_test

Bug: 35389839
Change-Id: I6c479986b96ec818155b0c5f310f9849d2b4fed8
shal/TextTable.cpp
54b6e675b5ca5337dde03498ddf2b1eb953527c3 31-Aug-2017 Yifan Hong <elsk@google.com> Merge changes from topic "lshal_pretty"
am: 7971ad7fd7

Change-Id: I77bbe967eb911d687013c6e202d44546fd0f4e5a
05494a552269b9b9d102bb4f65ef37f4b2557057 30-Aug-2017 Yifan Hong <elsk@google.com> lshal: table columns affected by arg order.

Test: lshal
Test: lshal -pita

Bug: 35389839
Change-Id: I845a13b8d7cdf483f4d269e5c33626f6013b42d7
shal/ListCommand.cpp
shal/ListCommand.h
shal/TableEntry.h
1bc1e9ffe224e4938d667a567a99619d7dd66229 30-Aug-2017 Yifan Hong <elsk@google.com> lshal: pretty print table.

Table column length is not hardcoded, but computed
from length of each cell.

Without --neat, table column length varies for each
table.

As an effect, --neat does not emit debug info. Update
warning messages to reflect this.

Test: lshal
Test: lshal_test
Test: lshal --neat

Bug: 35389839

Change-Id: Id1d626a10ba58e20d2799854432dba74cfeaae6f
shal/Android.bp
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/TextTable.cpp
shal/TextTable.h
dfd4ea3d9b0c62d30ec8bfb1099a4c169337ef38 29-Aug-2017 Andreas Gampe <agampe@google.com> Merge "Dumpstate: Add tombstone filtering" into oc-mr1-dev
am: 4d8a26a9e6

Change-Id: I2378d352d1b545eaab8c27698d934b5fcf50829e
85e0c9c30c6a1ae67352ea4c517fd04709c22c96 29-Aug-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Unconditionally unlink image."
am: 74a871ae12

Change-Id: Ib5bf81382687eb418dbbfb7caa864c88822fa1a1
aa17ab41eb13d24f0f17ce07cdda1f141a82f037 15-Aug-2017 Nicolas Geoffray <ngeoffray@google.com> Unconditionally unlink image.

In case there is a stale one. Useful when doing:
adb shell cmd package compile --reset ...

bug: 64708178
Test: adb shell cmd package compile removes the app image

(cherry picked from commit 775cdd9b94ad0094944fa8df64a52a5e43440a68)

Change-Id: Ic85eeecedd7dd762e01e943a74349b7da6063d6d
nstalld/dexopt.cpp
5c8a98f725debfc38ec95c5ee9312891aabfd2d2 25-Aug-2017 Felipe Leme <felipeal@google.com> Temporary fix for memory leak on DumpRunningServiceTimeout.

Test: mmm -j32 frameworks/native/cmds/dumpsys && \
adb sync && adb shell /data/nativetest/dumpsys_test/dumpsys_test && \
adb shell /data/nativetest64/dumpsys_test/dumpsys_test && \
printf "\n\n#### ALL TESTS PASSED ####\n"

Bug: 65056227
Change-Id: I328806e9edf8e156039fb5dd963c3750c67c98d9
umpsys/tests/dumpsys_test.cpp
7fb8dee8e4a52771790b8e94a020579168615872 25-Aug-2017 Felipe Leme <felipeal@google.com> Fixed dumpstate_test_fixture so it runs on 64 bits as well.

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb sync && \
adb shell /data/nativetest/dumpstate_test/dumpstate_test && \
adb shell /data/nativetest64/dumpstate_test/dumpstate_test

Fixes: 64954094

Change-Id: I47fa6a6dcee0c3386c5a9b574583d84b20d30661
umpstate/Android.mk
umpstate/testdata/empty-file.txt
umpstate/testdata/multiple-lines-with-newline.txt
umpstate/testdata/multiple-lines.txt
umpstate/testdata/single-line-with-newline.txt
umpstate/testdata/single-line.txt
umpstate/testdata/stats-invalid-1st-NAN.txt
umpstate/testdata/stats-invalid-1st-negative.txt
umpstate/testdata/stats-invalid-1st-too-big.txt
umpstate/testdata/stats-invalid-2nd-NAN.txt
umpstate/testdata/stats-invalid-2nd-negative.txt
umpstate/testdata/stats-invalid-2nd-too-big.txt
umpstate/testdata/stats-invalid-both-NAN.txt
umpstate/testdata/stats-one-run-no-newline.txt
umpstate/testdata/stats-two-runs.txt
umpstate/tests/dumpstate_test.cpp
umpstate/tests/testdata/empty-file.txt
umpstate/tests/testdata/multiple-lines-with-newline.txt
umpstate/tests/testdata/multiple-lines.txt
umpstate/tests/testdata/single-line-with-newline.txt
umpstate/tests/testdata/single-line.txt
umpstate/tests/testdata/stats-invalid-1st-NAN.txt
umpstate/tests/testdata/stats-invalid-1st-negative.txt
umpstate/tests/testdata/stats-invalid-1st-too-big.txt
umpstate/tests/testdata/stats-invalid-2nd-NAN.txt
umpstate/tests/testdata/stats-invalid-2nd-negative.txt
umpstate/tests/testdata/stats-invalid-2nd-too-big.txt
umpstate/tests/testdata/stats-invalid-both-NAN.txt
umpstate/tests/testdata/stats-one-run-no-newline.txt
umpstate/tests/testdata/stats-two-runs.txt
8262d481bd56f8ce2ddbd2944ca80b6de1fe7bc0 22-Aug-2017 Andreas Gampe <agampe@google.com> Dumpstate: Add tombstone filtering

Only package the ten latest tombstones. This recovers the old behavior
when tombstones were limited to ten by tombstoned, and ensures that
bugreports stay small in size.

It is future work to optimize this, e.g., by packaging as many as possible.

(cherry picked from commit d0d7695ecbfd12aaecc8aec66aacb487b116ac0b)

Bug: 64290162
Test: m
Test: adb root && for ((i=0;i<50;i++)) ; do adb shell touch /data/tombstones/tombstone_$i ; done ; adb bugreport test.zip ; unzip -l test.zip | grep tomb
Merged-In: I4072b5fbcf1e0314aa3eebeefbadc61d5ec10787
Change-Id: I4072b5fbcf1e0314aa3eebeefbadc61d5ec10787
umpstate/dumpstate.cpp
61b7a7bc930d2be309572deb6f92ff77ffc7c481 23-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dumpstate: Add tombstone filtering"
eadd69b878628006dc1d09e350b739b67bb37056 23-Aug-2017 Kevin Rocard <krocard@google.com> Merge "Add dumpsys finish timestamp" into oc-mr1-dev am: 3b11ed3f8b
am: 628f0c2a38

Change-Id: I78659e8722061253bf9f12f06b2a743b28b02706
628f0c2a38b6068b87714135e227e466ae677641 23-Aug-2017 Kevin Rocard <krocard@google.com> Merge "Add dumpsys finish timestamp" into oc-mr1-dev
am: 3b11ed3f8b

Change-Id: I8e9c07c8f1e62e43561c9b1ea4d4b4c9f9e654b9
3b11ed3f8b912c065e4ddde13c0bf241210c5703 23-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add dumpsys finish timestamp" into oc-mr1-dev
d0d7695ecbfd12aaecc8aec66aacb487b116ac0b 22-Aug-2017 Andreas Gampe <agampe@google.com> Dumpstate: Add tombstone filtering

Only package the ten latest tombstones. This recovers the old behavior
when tombstones were limited to ten by tombstoned, and ensures that
bugreports stay small in size.

It is future work to optimize this, e.g., by packaging as many as possible.

Bug: 64290162
Test: m
Test: adb root && for ((i=0;i<50;i++)) ; do adb shell touch /data/tombstones/tombstone_$i ; done ; adb bugreport test.zip ; unzip -l test.zip | grep tomb
Change-Id: I4072b5fbcf1e0314aa3eebeefbadc61d5ec10787
umpstate/dumpstate.cpp
49628378d43b3fbfc078bfb98f0ed315e95e7569 17-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Change log libraries in tests to be statically linked"
d438af0a09866cdeeb9f4c0f17543a23be513998 17-Aug-2017 Arthur Eubanks <aeubanks@google.com> Change log libraries in tests to be statically linked

32-bit versions of the log libraries aren't flashed on the phone, so we
need to statically link them.

Test: build and run the 3 installd tests (32-bit and 64-bit)
Test: on walleye/bullhead
Change-Id: I06bea24c6c52ffdb34045449e0b40eb2ac146410
nstalld/tests/Android.bp
eebd76a6094cd9f5808ebd21245e20e3d01468f6 16-Aug-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Unconditionally unlink image." into oc-mr1-dev
am: 19d9cf4dd8

Change-Id: If949f9ccad4aca98d7b7abe3c088db2682d0e4a1
775cdd9b94ad0094944fa8df64a52a5e43440a68 15-Aug-2017 Nicolas Geoffray <ngeoffray@google.com> Unconditionally unlink image.

In case there is a stale one. Useful when doing:
adb shell cmd package compile --reset ...

bug: 64708178
Test: adb shell cmd package compile removes the app image
Change-Id: I459920d8ddd6071aee60668c90ee082d86e1e282
nstalld/dexopt.cpp
430e0797c374e55abd3e6febfbd33edf56cd6979 15-Aug-2017 Kevin Rocard <krocard@google.com> Add dumpsys finish timestamp

Dumpsys are very helpful to debug issues.
Nevertheless a recurrent problem is that the dumpsys take time especially
if multiple are taken like during a bug report generation.
Due to this delay, it can be hard to understand during
which logs a dumpsys was taken.

This commit changes the last line of a dumpsys to contain the time it
was generated.
Here is an example:

[... normal dumpsys...]
- Mix ID 8 I/O handle 37
- 1 sinks:
- Device ID 7 AUDIO_DEVICE_OUT_TELEPHONY_TX
Audio Policy Mix:
--------- 0.036s was the duration of dumpsys media.audio_policy, ending at: 2017-08-14 20:35:43

This patch adds the last part:
*, ending at: 2017-08-14 20:35:43*

Bug: 64699427
Test: adb bugreport
Test: mmm -j32 frameworks/native/cmds/dumpsys && adb sync data && adb shell /data/nativetest/dumpsys_test/dumpsys_test --gtest_filter=-DumpsysTest.DumpRunningServiceTimeout
# DumpRunningServiceTimeout is broken independently of this patch
Change-Id: I9873e7dd915b4f7cdd6eac5c44487ae5740fa805
Signed-off-by: Kevin Rocard <krocard@google.com>
umpsys/dumpsys.cpp
77beeeda210b5b358080f2446fe8e1df92374d05 15-Aug-2017 Yifan Hong <elsk@google.com> Merge "lshal: add help message for --neat" am: 87ffcc425e am: 17f20b035b am: 4a9b6d9546
am: 07ea1d7db7

Change-Id: I4e2cf3f53e438ee68b0dde875d609116a7b71ff3
07ea1d7db791ffd345d33f65138e1470cfed2f5a 15-Aug-2017 Yifan Hong <elsk@google.com> Merge "lshal: add help message for --neat" am: 87ffcc425e am: 17f20b035b
am: 4a9b6d9546

Change-Id: Ib47587f5707fba6922c13f747a181d6027b4ea6c
17f20b035bd747275ff9c098ebab4054a20a4397 15-Aug-2017 Yifan Hong <elsk@google.com> Merge "lshal: add help message for --neat"
am: 87ffcc425e

Change-Id: I16e4377a30f266c1d2ca4993184f2cbe62775de6
87ffcc425e479acf233996e8383890507c60bc49 15-Aug-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "lshal: add help message for --neat"
45a0eadfc4e0c43236e2995355a4142c9c12d423 15-Aug-2017 Yifan Hong <elsk@google.com> lshal: add help message for --neat

Test: pass
Bug: 38211518
Change-Id: If493c439f41a5a8576662ea23df688ece804f281
shal/Lshal.cpp
834727652dae7868eba54c1b2370dc344ff6564c 12-Aug-2017 Jeff Sharkey <jsharkey@android.com> Fix casting bug, add control for hard quotas.
am: bdd4de8a98

Change-Id: Ia3684d4318d1a8b168299d499823fc7d1769614b
bdd4de8a98d57110befb0c29f662e8a3e4cfc275 11-Aug-2017 Jeff Sharkey <jsharkey@android.com> Fix casting bug, add control for hard quotas.

Bug: 64160395, 63255278
Test: /data/nativetest/installd_service_test/installd_cache_test
Change-Id: I8e2e24afd88da4dc13afdf05927e59c268e69825
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_cache_test.cpp
nstalld/utils.cpp
nstalld/utils.h
465af449ca9788d43f2ddd486e21d86730116fcc 10-Aug-2017 Jiyong Park <jiyong@google.com> Merge "Change UniquePtr to std::unique_ptr" into oc-mr1-dev
am: 5b1a00f4af

Change-Id: I2b5aca277d65e0c67fc3e27dfeb170f0e3dc6122
5b1a00f4af5e4fde764593952a730377e60de4f3 09-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Change UniquePtr to std::unique_ptr" into oc-mr1-dev
5205430bd067b93d2c5af13d0cbd55b543d6107c 08-Aug-2017 Chih-Hung Hsieh <chh@google.com> Merge "Fix clang-tidy performance warnings in frameworks/native."
am: 2f651584f9

Change-Id: I3178258eafac53b174d1a8613b20df2b49b6f716
008b037868cfe6a85d6145165ff8ec9c835b4ced 08-Aug-2017 Calin Juravle <calin@google.com> Merge "Change the location of current profiles for secondary dex files" into oc-mr1-dev
am: 3a02aee276

Change-Id: Idcf8259cc590723798a02bbf0648d4afd46909bc
3a02aee27668e8ab4d237b2a52a1e492fa899a5b 08-Aug-2017 Calin Juravle <calin@google.com> Merge "Change the location of current profiles for secondary dex files" into oc-mr1-dev
2f651584f906cf04c2e5d6f9a752c130287eb956 07-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix clang-tidy performance warnings in frameworks/native."
1c809c7068f610ff22174dbe96b49f1b8ada9c1e 28-Jul-2017 Calin Juravle <calin@google.com> Change the location of current profiles for secondary dex files

Update the installd code to handle the new location for secondary dex
profiles.

Tighten up the validation code and add tests.

Counter part for frameworks commit
a07ca21f9727325d76d2ddbfa119513f47f0b45f.

Bug: 62336157
Test: adb shell cmd package compile -r bg-dexopt --secondary-dex
com.google.android.googlequicksearchbox
adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox

Change-Id: Ib7af091a35fe53e7f6bb5f30a09911188caff88f
nstalld/dexopt.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
4e7d18a72f72967a881bcdf78167011a836538ef 07-Aug-2017 Jiyong Park <jiyong@google.com> Change UniquePtr to std::unique_ptr

UniquePtr.h in libnativehelper/include is deprecated and will be removed
soon. Switching to the standard std::unique_ptr.

Bug: 63686260
Test: builds, cmd works in the device.
Change-Id: Ib008acd1dd7dba2305b0797c9dc7bab1aa747e7d
md/cmd.cpp
8acf5685a8f6dd450d113192b7e68db67a93c739 04-Aug-2017 Justin Yun <justinyun@google.com> Merge "Mark libbinder and libdumpstateutil as VNDK in Android.bp" into oc-mr1-dev
am: 6aa5b4e7fd

Change-Id: I339402d532bc6b569f581dc2a81d01330e0b029a
6aa5b4e7fdaa86a76e00e2508d7122e59cbd2aa2 04-Aug-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Mark libbinder and libdumpstateutil as VNDK in Android.bp" into oc-mr1-dev
cb057c2e6bf23b43df49282c0db26b663e4535f7 04-Aug-2017 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy performance warnings in frameworks/native.

* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.
* Use const reference type for loop index variables to avoid unnecessary copy.

Bug: 30407689
Bug: 30411878
Bug: 30413223
Test: build with WITH_TIDY=1

Change-Id: I75ed62e2cb9939878b8932ed512ceb7e241edd6f
trace/atrace.cpp
umpstate/dumpstate.cpp
umpsys/dumpsys.cpp
umpsys/tests/dumpsys_test.cpp
nstalld/CacheTracker.cpp
nstalld/InstalldNativeService.cpp
urfacereplayer/replayer/Replayer.cpp
4b0185e68897c8ffadca783252756217a8d9da15 04-Aug-2017 Yifan Hong <elsk@google.com> Merge "Use cutils/android_filesystem_config.h" into oc-mr1-dev
am: 595ff4798d

Change-Id: I3a8917e1389963f3ae457676eb30300f7526b07c
595ff4798d0bc1f48aba1e6d4109ffe5f77fe063 04-Aug-2017 Yifan Hong <elsk@google.com> Merge "Use cutils/android_filesystem_config.h" into oc-mr1-dev
cb4c58bda0693bf84f1c6ee2f244e51c5b9c8337 03-Aug-2017 Yifan Hong <elsk@google.com> Merge commit '219b580fed7916ed4e02dd634e003073f91c6b93' into manual_merge_219b580fe am: 84548cfbfb
am: 5cd3d789b8

Change-Id: I4476bca7b0b5e0a17af504a2b21a51d26b069587
84548cfbfb397ae66d0d71c520ce01864e377b6d 03-Aug-2017 Yifan Hong <elsk@google.com> Merge commit '219b580fed7916ed4e02dd634e003073f91c6b93' into manual_merge_219b580fe

Test: pass
Change-Id: Ic796fced51004d4a716c754fc8c0d347c33af8ff
3f68cca4d606454b7b3c5104ff01414630f5cae3 02-Aug-2017 Yifan Hong <elsk@google.com> Use cutils/android_filesystem_config.h

private/android_filesystem_config.h is not available for
vndservicemanager.

Test: m -j
Test: BOARD_VNDK_VERSION m -j

Bug: 63135587
Change-Id: Iaf9911a519ebbb798184e93b2911d0e813e6026c
Merged-In: Iaf9911a519ebbb798184e93b2911d0e813e6026c
ervicemanager/service_manager.c
c856156c934342502e65b58676f5ce48d949afed 02-Aug-2017 Jeff Sharkey <jsharkey@google.com> Merge "Installd: Fix math overflow on quota calculation" into oc-mr1-dev
am: 40cd637631

Change-Id: I210409959dfe59c41ecdb177e18f1bb28986bec7
99feeed7dfef5f005cb74ae2efa5d1b3a839c21b 02-Aug-2017 Felipe Leme <felipeal@google.com> Renamed 2nd device file back to dumpstate_board.bin.
am: 95d6ca5df4

Change-Id: Id4fbc6af2cee731716fcaea87629604051b0b4b5
40cd637631c7d7de94281122e4894de78fdd8702 02-Aug-2017 Jeff Sharkey <jsharkey@google.com> Merge "Installd: Fix math overflow on quota calculation" into oc-mr1-dev
dfdc1559f224c2ec81d3957ba7ce3e337abc67d6 02-Aug-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Otapreopt: Check dexopt return status before retry"
b367ff4fd9e332d8ff4bd45bf54778851f06f941 02-Aug-2017 Justin Yun <justinyun@google.com> Mark libbinder and libdumpstateutil as VNDK in Android.bp

As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: Ib1d9469ad0aead4cbec7c2548438d44608f36819
umpstate/Android.bp
212c88143ebdeabbab364fca7680d8cd2caff256 02-Aug-2017 Yifan Hong <elsk@google.com> Use cutils/android_filesystem_config.h

private/android_filesystem_config.h is not available for
vndservicemanager.

Test: m -j
Test: BOARD_VNDK_VERSION m -j

Bug: 63135587
Change-Id: Iaf9911a519ebbb798184e93b2911d0e813e6026c
ervicemanager/service_manager.c
95d6ca5df402889c4a9819e1422867b61283c0c8 02-Aug-2017 Felipe Leme <felipeal@google.com> Renamed 2nd device file back to dumpstate_board.bin.

Fixes: 62872793
Test: manual verification
Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push $OUT/system/lib/libdumpstateutil.so /system/lib/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test

Change-Id: I3574124be9d430b92a08531cff412e88f4469fa6
umpstate/dumpstate.cpp
bcb8747bcb6ab45dfefc425ca6889ebf02ae5f26 29-Jul-2017 Jerry Wong <jerry.wong@broadcom.com> Installd: Fix math overflow on quota calculation

On 32-bit devices, the hard quota size calculation could overflow that
would cause the hard quota limit size to be much lower than intended.

b/64160395

Change-Id: If7b0f2a40f77bb5e5957c663999544f4ab2e69be
nstalld/InstalldNativeService.cpp
fe446d3ef91fc286c7fd1420a8d28cf0ff3a37ea 29-Jul-2017 Christopher Ferris <cferris@google.com> Merge "Changes to support new v4.12.3 headers." am: ab9e842013 am: 4e99fac316 am: 6488d4e87d
am: 145b13a2db

Change-Id: Ic640122b90fc726373e0bd1d79eb68f1a99dc3fa
145b13a2db5d620eff2e15138101a7d2b652273a 29-Jul-2017 Christopher Ferris <cferris@google.com> Merge "Changes to support new v4.12.3 headers." am: ab9e842013 am: 4e99fac316
am: 6488d4e87d

Change-Id: I7c1ee59b3eda16790b3441654766ebe08f01406e
4e99fac3160edd1725b4024eacff4c72ee78bf99 29-Jul-2017 Christopher Ferris <cferris@google.com> Merge "Changes to support new v4.12.3 headers."
am: ab9e842013

Change-Id: I9db34d9168c6b69b73cdfb3f8a62134850346a63
c5883f6631259f6563c28f15f1b40e4b782a7e42 28-Jul-2017 Narayan Kamath <narayan@google.com> dumpstate: Add historical ANRs as separate entries in the zip file.
am: 8cbab7c3c9

Change-Id: I64742cfcd70d3982d2d9e59adb4ce7274be3b9f7
dbaa22a7e135432c2effcfc7b9b2f31be80b90ff 27-Jul-2017 Christopher Ferris <cferris@google.com> Changes to support new v4.12.3 headers.

Test: Built and booted angler.
Change-Id: I82405b4e52d203d6cfd81aa7583dfc8b2ae86f9d
ervicemanager/binder.c
8cbab7c3c93c1bc9364a81726f02eeacc4a9356b 27-Jul-2017 Narayan Kamath <narayan@google.com> dumpstate: Add historical ANRs as separate entries in the zip file.

ANRs now show up as separate entries in the bugreport zip file, like so:

-rw---- 0.0 fat 516946 bl 48779 defN 17-Jul-27 10:47 FS/data/anr/anr_2017-07-27-10-47-45-798
-rw---- 0.0 fat 520627 bl 48995 defN 17-Jul-27 10:47 FS/data/anr/anr_2017-07-27-10-47-30-328

Bug: 32470528
Test: adb bugreport ./bugreport.zip; zipinfo -l ./bugreport.zip | grep anr

Change-Id: Ibcde7bd35cab1d81e26c72e9247d63cf7bce1504
umpstate/dumpstate.cpp
59d7282b5344d30d9aba8457ab55111d6e956b0a 27-Jul-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'libcutils_private_headers' into oc-mr1-dev
am: a23145f901

Change-Id: Id17775ece2175390de16b0a4490d247828717e30
8ded50cc0df099ce1e573cb9af870260180bea67 26-Jul-2017 Yifan Hong <elsk@google.com> Use getpwnam()/getgrnam() instead of AID_* macros (dumpstate)

AID_* values are defined in libcutils private headers and hence
is not exported. Use getpwnam() instead to get these values.

Test: device boots
Test: bugreport
Test: dumpstate_test
Bug: 63135587
Change-Id: Ib35fe4fc4524eb1885616a9a1403ceb09f713777
umpstate/DumpstateInternal.cpp
6a9cf727b187d21737225326c342c63c5cdba942 25-Jul-2017 Andreas Gampe <agampe@google.com> Installd: Run debug tools when using libartd

When ART is requested to run through libartd, use dex2oatd instead
of dex2oat to compile apps (profmand instead of profman,
dexoptanalyzerd instead of dexoptanalyzer).

Bug: 15735795
Test: m
Test: manual test with libartd
Merged-In: I33a12198566f5d979207e1edd4460b839a0f55f1
Change-Id: I33a12198566f5d979207e1edd4460b839a0f55f1
nstalld/dexopt.cpp
f2d5d51e236d1683e7820d68eb3d76071fab548a 25-Jul-2017 Andreas Gampe <agampe@google.com> Installd: Run debug tools when using libartd

When ART is requested to run through libartd, use dex2oatd instead
of dex2oat to compile apps (profmand instead of profman,
dexoptanalyzerd instead of dexoptanalyzer).

Bug: 15735795
Test: m
Test: manual test with libartd
Merged-In: I33a12198566f5d979207e1edd4460b839a0f55f1
Change-Id: I33a12198566f5d979207e1edd4460b839a0f55f1
nstalld/dexopt.cpp
72d4a5beb78db69571df1b48e5ac7ea3a8acacb6 25-Jul-2017 Andreas Gampe <agampe@google.com> Installd: Run debug tools when using libartd

When ART is requested to run through libartd, use dex2oatd instead
of dex2oat to compile apps (profmand instead of profman,
dexoptanalyzerd instead of dexoptanalyzer).

Bug: 15735795
Test: m
Test: manual test with libartd
Merged-In: I33a12198566f5d979207e1edd4460b839a0f55f1
Change-Id: I33a12198566f5d979207e1edd4460b839a0f55f1
nstalld/dexopt.cpp
79c6ad33a14c127cbbfeccd5e0cc26911bda0517 25-Jul-2017 Andreas Gampe <agampe@google.com> Installd: Run debug tools when using libartd

When ART is requested to run through libartd, use dex2oatd instead
of dex2oat to compile apps (profmand instead of profman,
dexoptanalyzerd instead of dexoptanalyzer).

Bug: 15735795
Test: m
Test: manual test with libartd
Merged-In: I33a12198566f5d979207e1edd4460b839a0f55f1
Change-Id: I33a12198566f5d979207e1edd4460b839a0f55f1
nstalld/dexopt.cpp
1d66761379b54ff71094a7c722f131c591f3f897 14-Jul-2017 Calin Juravle <calin@google.com> Replace dexopt shared libraries with class loader context

Pass the class loader context to dex2oat with --class-loader-context
instead of using the runtime -cp argument.

Test: adb shell cmd package compile a_split_test_apk
Bug: 38138251
Change-Id: I2e483969af8adf97291aa94f42e6da9ee5f1716b
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/dexopt.cpp
nstalld/dexopt.h
913ed7a9d8cdd9e15180ad6949f53cdb0ea481b0 18-Jul-2017 Shubham Ajmera <shubhamajmera@google.com> Merge "Check dexopt needed for secondary dex while downgrading"
45c8743428e0c9445430995ba395b3b5ebf82b3e 22-Jun-2017 Shubham Ajmera <shubhamajmera@google.com> Check dexopt needed for secondary dex while downgrading

Test: make otapreopt
Test: manual
* Remove the check in the code that allows downgrade only when
the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
in dalvik_cache

For secondary dex:
* compile googlequicksearchbox to everything.
* run background dexopt service for secondary dex.
* verify the compiler filter for the corresponding odex files.

Bug: 36598475
Change-Id: I6ad40e2c53433326f83c2589646d94ba555400b2
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
01dc26cd176bb6e53a0fe5fed96658e3136cfafd 14-Jul-2017 Peng Xu <pengxu@google.com> Merge "Add sensor HAL process into dump list" into oc-dr1-dev am: fec340ea0f
am: 11c7026ee7

Change-Id: I17c398d623f09098b44e5332824f235af62b45b3
fec340ea0f82435c8fddeb10cb00b619259d08f2 14-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add sensor HAL process into dump list" into oc-dr1-dev
f1ab0ac51a8c77d12b5e7b868e70ef52e5e8ec0f 12-Jul-2017 Peng Xu <pengxu@google.com> Add sensor HAL process into dump list

Test: adb bugreport contains native stack trace for
/vendor/bin/hw/android.hardware.sensors@1.0-service

Bug: 63096400
Change-Id: I2c24d4fd2fab7ed52dbd12b5324ae03aeaec3cda
umpstate/utils.cpp
47055bfdd3de5a5677b3411256fa77494aa7aa12 11-Jul-2017 Wei Wang <wvw@google.com> Merge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev am: 5ebcaf1bb0
am: 546aa9b19b

Change-Id: I4fb053426ef70e6012ee47797d2a368bdf633ba9
699fbb73daaf33e080288f8513b0d56037dfe1a9 11-Jul-2017 Wei Wang <wvw@google.com> servicemanager: Mark servicemanager as shutdown critical

Bug: 62951929, 63514363, 62845700
Test: Build
Change-Id: Ib1b7aec4b6d3c590eb469daeed40b954d37efa18
ervicemanager/servicemanager.rc
175e684d01cc8f5f0c4106ca426820c1b1168ae9 11-Jul-2017 Roopesh Rajashekharaiah Nataraja <roopeshr@codeaurora.org> servicemanager: Mark vndservicemanager as shutdown critical

vndservicemanager needs to be alive during shutdown to allow vndk
components which may run during shutdown to communicate. The system
ndk servicemanager keeps running throughout shutdown, so this brings
the vndservicemanager on par with that behavior.

Bug: 62951929, 63514363, 62845700
Test: Build
Change-Id: Iba154820ef69c6491a5cb05747b6b905763a825d
ervicemanager/vndservicemanager.rc
8bd5059a3c01e01a4dcfc1eeca27c665bf8cbf37 10-Jul-2017 Calin Juravle <calin@google.com> Merge "Validate the size of all dex paths eagerly" into oc-dr1-dev am: c3be65b533
am: 7d70bbf154

Change-Id: I558a6faa56d1d57570f0f447ec30fa65b38e989d
c3be65b5330752babc27f0166afa2c55b76d49c7 10-Jul-2017 Calin Juravle <calin@google.com> Merge "Validate the size of all dex paths eagerly" into oc-dr1-dev
d23dee76234b7eb804f69b110b4fd8cae22fe1ab 07-Jul-2017 Calin Juravle <calin@google.com> Validate the size of all dex paths eagerly

Also, increase the PKG_PATH_MAX which is used as the max path length to
1024. This should accommodate reasonably long dex path (to cover for
longer secondary dex files paths).

If a dex path exceeds 1024 characters the dex file will not be compiled.

Bug: 63285397
Test: manual
1) create an artifical long paths under gmscore:
2) update /data/system/package-dex-usage.list to simulate the use of those
dex file
3) run `adb shell cmd package compile -r bg-dexopt --secondary-dex
com.google.android.gms`
4) observe that a 256+ characters dex path is ok while a 1024+ long one
fails.
5) run `adb shell cmd package reconcile-secondary-dex-files
com.google.android.gms` and check no errors are present.

Change-Id: I23b34013e32c5c64ca9c1381cc4d8d67e7121cc8
nstalld/dexopt.cpp
nstalld/installd_constants.h
7cd6d9375bd1e78c3e8268341f1bce905215e5b2 07-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Otapreopt: Work around bug 38186355""
c848328f08e39db147b7434b506c9fc9d27458e3 07-Jul-2017 Corey Tabaka <eieio@google.com> Restore PDX support to atrace. am: a6c0a721bd
am: 4c5f5779da

Change-Id: Iaa02a88978878b1c74d57d279a1a7c8bde9ce8ea
a6c0a721bd442f15d70a50815ef78a6c8ac6b1c9 01-Jun-2017 Corey Tabaka <eieio@google.com> Restore PDX support to atrace.

Restore PDX service tracing in atrace. This time only enable poking PDX services
when the "pdx" trace category is included.

Bug: 62882199
Test: Run systrace with/without pdx category and observe correct poke behavior.

Change-Id: I478332a661c3b8bc6061fda43f64b75d8113b305
trace/Android.bp
trace/atrace.cpp
efd53f88635840fe2a77fc836db57c4ecd94ed45 07-Jul-2017 Andreas Gampe <agampe@google.com> Revert "Otapreopt: Work around bug 38186355"

This reverts commit 12375069e753adea6c123fca7706b1018d358c92.

Bug: 38186355
Bug: 38199123
Test: m
Test: manual OTA
nstalld/otapreopt.cpp
a01369893823ee3d62ea79c422a76fe810f8a5cb 06-Jul-2017 Jeff Sharkey <jsharkey@android.com> Change storage migration to use quota APIs.

New quota APIs are much faster than trying to measure manually, and
removing this last user of calculateDirectorySize() means we can
remove it once and for all.

Bug: 36056324
Test: builds, boots
Change-Id: I60bb197ffc161ed24fe4aa8093495c8874095cdb
nstalld/InstalldNativeService.cpp
b22e65d9f2c311f6f4dc8af69aa4ba42bbd7ecf4 23-Jun-2017 Jiyong Park <jiyong@google.com> dumpstate/Android.mk is converted to Android.bp

Converted to soong. And libdumpstateutil is marked as
vendor_available:true.

Bug: 37342627
Test: BOARD_VNDK_VERSION=current m libdumpstateutil.vendor -j
Change-Id: Id1594d9aa2a7035aaad901d4c3881bd6128c431e
umpstate/Android.bp
umpstate/Android.mk
umpstate/DumpstateInternal.cpp
umpstate/DumpstateUtil.cpp
umpstate/dumpstate.h
29674ddb034d8cfa1a6e03b398f941ab50c0c140 28-Jun-2017 Jayachandran C <jayachandranc@google.com> Merge "Add telephony related dumpsys in the telephony monitor bugreports" into oc-dr1-dev am: d16d297825
am: f8b9f54e47

Change-Id: Ibfa4db88795a5953ad8dd1d327d2bf8b2ba2249c
a94c71732290dd6bba937548bbe748785dd43ab0 11-Jun-2017 Jayachandran C <jayachandranc@google.com> Add telephony related dumpsys in the telephony monitor bugreports

Collect dumpsys for the following in telephony monitor auto
generated bugreports for better debugging

1) TelephonyDebugService
2) CarrierConfig
3) Connectivity

Test: Verified telephony monintor auto generated bugreport

Bug: 62504502
Change-Id: Ia2a9e1ff5b289dec7a4d0bb4e8ef85fb413df87a
umpstate/dumpstate.cpp
c8c8a6170b8ddfb41c29b48b39ca4a3d5cf4f417 23-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "atrace: Enable cgroup tracing"
e8f6a0468edfe913f391105ab7266b1eed52dcfb 23-Jun-2017 John Reck <jreck@google.com> Disable setting saved_cmdline_size am: ba54d5baf4 am: 64dac11cc0
am: 4e0d0cba5c

Change-Id: I99df51ff5c01bc7d4adf5945e597f79e7c70988d
acc79d7cfee454042b5edebbf68c8687eda54447 23-Jun-2017 John Reck <jreck@google.com> Disable setting saved_cmdline_size
am: ba54d5baf4

Change-Id: Icd17c5257c03fd9e33114c5760ece6c21c74d025
64dac11cc015adf75988460013d544b14551d916 23-Jun-2017 John Reck <jreck@google.com> Disable setting saved_cmdline_size
am: ba54d5baf4

Change-Id: I447ad42ad4c245013e488701a61d8ce2348a368d
ba54d5baf4265cc5ccf656638bf6c5d9e770592f 23-Jun-2017 John Reck <jreck@google.com> Disable setting saved_cmdline_size

Minimal revert of the addition of increasing
the saved_cmdline_size. This change
exposed kernel bugs that prevented
atrace from working.

Bug: 62375794
Test: manual
Change-Id: Ie946b9246ce9ba22af59dbf0b9fe8a59a5fa1f3f
trace/atrace.cpp
79469d2ac75137c94755bd40282cdfcb4e77d157 22-Jun-2017 Jibu Joseph <jibu@google.com> Merge "Update dumpstate binary file name" into oc-dr1-dev am: 8d897e6003
am: 990dc8c59c

Change-Id: Iadce5459a5edf5187134e2c246d7bbe00f735629
df4e3bc2b8a6cd8c73d0b0d761b05901e6cee652 21-Jun-2017 Jie Song <jies@google.com> Update dumpstate binary file name

Keep modem_log_all.tar for a while for vendors

Bug: 62865279
Test: Verify file name in bugreport
Change-Id: Ia64f6c8e978877040eecfbc6066f0d741d91ddf3
umpstate/dumpstate.cpp
3dc8acb24585fec64ebaa51fc6ce0b0082110eb9 21-Jun-2017 Martijn Coenen <maco@google.com> Merge "Avoid SELinux violation at vndservicemanager" into oc-dr1-dev am: 5e6abb3f0a
am: 2e30c8e03d

Change-Id: Iaaf5dd70a213220bc23dacdb287ee75be5b9329c
5e6abb3f0a4066722678ef91c0aec5d518389336 21-Jun-2017 Martijn Coenen <maco@google.com> Merge "Avoid SELinux violation at vndservicemanager" into oc-dr1-dev
2bf08080288e83a71616c23d00bb111d637e22d0 21-Jun-2017 Jie Song <jies@google.com> dumpstate: Add the 2nd fd for binary file am: 9fbfad0b6d
am: 1d22d6103b

Change-Id: Ib34bf06af9e074123af8b20c5164b922fdd504d8
641dccd44aafa75c131024d441ea6e7dd2041d93 21-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Clean up possible null dereference warning."
9fbfad0b6dcda9a2b2c3913597aa24e4db7b3544 21-Jun-2017 Jie Song <jies@google.com> dumpstate: Add the 2nd fd for binary file

Bug: 33820081
Test: Verify binary file is added in bugreport
Change-Id: Ibe1c219ca4bf288adcb76996c6178426a4d04333
umpstate/dumpstate.cpp
61f8dfa24b0846ae66328891f8facf9e06237c15 13-Jun-2017 Kouji Shiotani <kouji.shiotani@sony.com> Avoid SELinux violation at vndservicemanager

Avoid following SELinux violation.

avc: denied { read } for comm="vndservicemanag"
name="nonplat_service_contexts" dev="rootfs" ino=17045
scontext=u:r:vndservicemanager:s0
tcontext=u:object_r:service_contexts_file:s0 tclass=file permissive=0
ppid=1 pcomm="init" pgid=1 pgcomm="init"

This violation caused by vndservicemanager reading service_contexts at
svcmgr_handler(). In main() loading as well, processing is divided by
the VENDORSERVICEMANAGER flag. Therefore, even in svcmgr_handler(),
processing is divided by flags like main().

Bug: 62562415
Test: mma
Change-Id: I06b0308a80fc6ea1ca57cd10d9555dd269b8e12d
ervicemanager/service_manager.c
cf64ff00ea6f3ab738a1441e2d04eaf38822fa4d 20-Jun-2017 Yifan Hong <elsk@google.com> Merge "Fix minor version bump reflected in lshal --init-vintf" am: ac6575097d
am: 99065302ed

Change-Id: Ic2a1f895312dee90e9e0eaf691edb48df4897c4e
c77bc022f78efbffcb686637adb178edf63a25eb 20-Jun-2017 Yifan Hong <elsk@google.com> Merge "Fix incorrect bitness for lshal --init-vintf" am: e162a97703
am: 126eee4d14

Change-Id: I435466a45aa5217f99c73007d5f07c1754216995
77c87825e677de1d7dc38d84eb3b3ffb4e8af69b 20-Jun-2017 Yifan Hong <elsk@google.com> Fix minor version bump reflected in lshal --init-vintf

Test: lshal --init-vintf has no warnings, and power@1.1 / vibrator@1.1
is shown in output.

Bug: 62675393
Change-Id: I1ffd8b6dc7fcadcf7228cf2b8838e918bb3afe6b
Merged-In: I1ffd8b6dc7fcadcf7228cf2b8838e918bb3afe6b
shal/ListCommand.cpp
e86f70b474a9007b07fe22d0731d2789a2dc2cc4 20-Jun-2017 Yifan Hong <elsk@google.com> Fix minor version bump reflected in lshal --init-vintf

Test: lshal --init-vintf has no warnings, and power@1.1 / vibrator@1.1
is shown in output.

Bug: 62675393
Change-Id: I1ffd8b6dc7fcadcf7228cf2b8838e918bb3afe6b
Merged-In: I1ffd8b6dc7fcadcf7228cf2b8838e918bb3afe6b
shal/ListCommand.cpp
236301c979cce54a7601a39973f2c8edf8374bc6 19-Jun-2017 Yifan Hong <elsk@google.com> Fix incorrect bitness for lshal --init-vintf

Test: lshal --init-vintf, graphics.mapper has 32+64.

Change-Id: Ic586c8333064cc5636679ce8ad4e1231307191f4
Merged-In: Ic586c8333064cc5636679ce8ad4e1231307191f4
Fixes: 62675393
shal/ListCommand.cpp
97eda0c48f7c6d8c4f2808c36c39f540b4c1f182 19-Jun-2017 Yifan Hong <elsk@google.com> Fix incorrect bitness for lshal --init-vintf

Test: lshal --init-vintf, graphics.mapper has 32+64.

Change-Id: Ic586c8333064cc5636679ce8ad4e1231307191f4
Merged-In: Ic586c8333064cc5636679ce8ad4e1231307191f4
Fixes: 62675393
shal/ListCommand.cpp
4dfca7c9d7decf492b244cd031d98c30c6a592eb 16-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Enable cgroup tracing

In prep for work involving analyzing cgroup CPU time distribution,
enable this trace category in systrace.

Bug: 37997910
Test: Enabled cgroup category by systrace as root/non-root

Change-Id: Ie16cc347c3399eedcd7604fc3e9af607a45f34dc
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
trace/atrace.rc
78f71fe71d9fcbaed1270b902c9f3a2bf14c37f3 14-Jun-2017 Mathieu Chartier <mathieuc@google.com> Use _exit for profile copy dexopt command

Previously we used exit(0), but this called global destructors and
could cause problems depending on the state when the forking
happened.

Using _exit avoids calling hte global destructors in the child
process.

Test: Delete packages.xml and flash to simulate first boot
Bug: 62597429
Change-Id: I3a6dcd5f05ca85e1488df154ec283c2ec842e59f
nstalld/dexopt.cpp
bf16598142b7768ff0c09b7582dd53256eba94f9 13-Jun-2017 Joel Fernandes <joelaf@google.com> atrace.rc: Correct path to saved_cmdlines_size when setting permission
am: 922e418f45

Change-Id: I99862d8e16d1c10405a696b89553a855881c967a
83e73f35d6cb2ba7dd0edc665ae169b6c2b30501 13-Jun-2017 Joel Fernandes <joelaf@google.com> atrace.rc: Correct path to saved_cmdlines_size when setting permission
am: 922e418f45

Change-Id: If92363cbd1ad525aa6b65e255cc86d7d6005ad25
922e418f4575c38556b4c217a18b7a79c5a8a8c8 13-Jun-2017 Joel Fernandes <joelaf@google.com> atrace.rc: Correct path to saved_cmdlines_size when setting permission

Bug: 62375794
Test: CTS test

Change-Id: Ie252be152ba26aced63af55734d3155ad93f2919
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit 0094a2d5962ed81c6c624c900450d84f1967ba49)
trace/atrace.rc
1dc1ef5af577d0cacc7b86a83d243d9750b0dd6d 12-Jun-2017 Wei Wang <wvw@google.com> dumpstate: Better format for dumping block stat

After CL the format looks like:

------ BLOCK STAT (/sys/block/mmcblk0) ------
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/stat : 11299 16093 1262592 31863 3895 2968 63232 6463 0 10260 38243
/mmcblk0/stat : perf(ios) rd: 75622KB/s(1322/s) wr: 18671KB/s(2246/s) q: 4
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p1/stat : 37 29 66 6 0 0 0 0 0 6 6
/mmcblk0/mmcblk0p1/stat : perf(ios) rd: 5632KB/s(6167/s) q: 1
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p24/stat : 12 32 346 0 1 0 8 0 0 0 0
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p26/stat : 0 0 0 0 3 381 3072 296 0 100 296
/mmcblk0/mmcblk0p26/stat : perf(ios) rd: 0KB/s(0/s) wr: 15729KB/s(30/s) q: 3
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p30/stat : 11 33 352 23 0 0 0 0 0 23 23
/mmcblk0/mmcblk0p30/stat : perf(ios) rd: 7836KB/s(478/s) q: 1
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p38/stat : 1 3 32 0 0 0 0 0 0 0 0
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p39/stat : 816 1072 47000 3460 0 0 0 0 0 273 3460
/mmcblk0/mmcblk0p39/stat : perf(ios) rd: 88147KB/s(2989/s) q: 13
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p40/stat : 17 13 228 0 4 0 32 3 0 3 3
/mmcblk0/mmcblk0p40/stat : perf(ios) rd: 0KB/s(0/s) wr: 5461KB/s(1333/s) q: 1
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p41/stat : 4831 14319 453376 17336 0 0 0 0 0 3273 17330
/mmcblk0/mmcblk0p41/stat : perf(ios) rd: 70898KB/s(1476/s) q: 5
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p42/stat : 8 124 1056 3 0 0 0 0 0 3 3
/mmcblk0/mmcblk0p42/stat : perf(ios) rd: 180224KB/s(2667/s) q: 1
Block-Dev : R-IOs R-merg R-sect R-wait W-IOs W-merg W-sect W-wait in-fli activ T-wait
/mmcblk0/mmcblk0p45/stat : 5560 468 760088 11033 3046 2587 60120 5490 0 6840 16453

Bug: 62319771
Test: adb bugreport and check the result
Change-Id: I9464c4758f03479d433bdb7a907dd4953f226e1e
umpstate/dumpstate.cpp
516e0c3738c5264b966011cb968bf4f3031df9fc 13-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: Remove wpa_cli usage" into oc-dr1-dev
509bb5d1764cdc44eef5166436dac3130a239d6d 09-Jun-2017 Wei Wang <wvw@google.com> dumpstate: Dump all block device stat

We have "UPTIME MMC PERF" but it is limited to MMC and thus has
been broken for a while in recent devices.
This CL is to add dump for all block devices stat information.

Bug: 62319771
Test: adb bugreport and check the result
Change-Id: I74e0bf0c4bf40e268dffd0abb8922f0ffb5e9692
umpstate/dumpstate.cpp
267b4fd7e75d368dc13d998260c5b31b78b6edad 08-Jun-2017 Jeff Sharkey <jsharkey@google.com> Merge "Don't double-count external cached app data." into oc-dev
am: b5a1f50f5e

Change-Id: Ia991cb98e842a9a9f64e669435c860611e79ff72
c11cc1d365c27dd888fcf01e5706c4df16816f48 08-Jun-2017 Jeff Sharkey <jsharkey@google.com> Merge "Don't double-count external cached app data." into oc-dev
am: b5a1f50f5e

Change-Id: Ia2057fe4522596b4593465db1f5d6cdcbf39c063
4ca8ff98e40023c32e0f05473e1fe906b6537417 07-Jun-2017 Jeff Sharkey <jsharkey@android.com> Don't double-count external cached app data.

Cached app data is already counted in extStats.dataSize, so we don't
need to count it twice.

Test: builds, boots, verified Settings UI before/after
Bug: 62343684
Change-Id: Ic02cbe3f5938949730f9bc8d911ed398436f84d7
nstalld/InstalldNativeService.cpp
ef63521323be64ab863ed093855c8d0ad68e20d0 05-Jun-2017 Roshan Pius <rpius@google.com> dumpstate: Remove wpa_cli usage

List of saved networks is dumped out by WifiConfigManager during
bugreport collection. The 'wpa_cli` command in dumpstate.cpp is
non-functional since the saved networks are no longer saved in
wpa_supplicant.

Bug: 62068865
Test: Collected bugreport and ensured that there are no wpa_cli errors.
Change-Id: I0080bf10dafcbd187fcf583232ce64dd3868d818
umpstate/dumpstate.cpp
88a69ded4ba00393e3865ccdfe65f964e58467b6 07-Jun-2017 Luis A. Lozano <llozano@google.com> Clean up possible null dereference warning.

Added a runtime check for the value of the pointer.

Bug: b/27101951
Test: verified warnings are gone.
Change-Id: Ia1004ca6fdc0937450a72d680c02a79aab22a739
nstalld/CacheTracker.cpp
485d70cfa4e4ecd3f38e9cf404c6faca9561f29f 06-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: setup saved_cmdlines_size and write only if available
am: 9351f72049

Change-Id: I6ac54d96cda205bc5d4e4d569b03b2064140e310
9351f72049a2bc65170afcf131008c8bd1710959 06-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: setup saved_cmdlines_size and write only if available

Older kernels (bullhead etc) don't have saved_cmdlines_size, check and
write only if available. Also make work on non-root by setting
permissions in rc file (thanks John Reck for suggestion).

Bug: 62375794

Change-Id: Iefffc3203afd092ffb6cf420a144b38844aaee39
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
trace/atrace.rc
ce964f2e6088761f3e2b22535010872327eff264 06-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: setup saved_cmdlines_size and write only if available

Older kernels (bullhead etc) don't have saved_cmdlines_size, check and
write only if available. Also make work on non-root by setting
permissions in rc file (thanks John Reck for suggestion).

Bug: 62375794

Change-Id: Iefffc3203afd092ffb6cf420a144b38844aaee39
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
trace/atrace.rc
76689e9b20ff5d377fb33eaa23edcad9300d5fc4 05-Jun-2017 Nicolas Geoffray <ngeoffray@google.com> Revert "Disable in-place vdex update"

Reverting to only apply this when doing dexlayout.
PS1 is a pure revert. PS2 contains the fix.

This reverts commit e446fede9258359b61d4c8753d7e96477fa29388.

Bug: 38113240
Test: OTA and dexopt

(cherry picked from commit b03814f39559c824e097bf2d869c7a56d8b41b67)

Change-Id: Ibabb1ec3af1101c6c44fbea498f8625c9515af8f
nstalld/dexopt.cpp
cf61460126ff0f945e27171f241b800b21bb160e 06-Jun-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Disable in-place vdex update"" am: 52ca987db6 am: deb23917a9 am: 3470e3e3f7
am: fd256c977a

Change-Id: I59679c67151f61644662229c0106add720299dd1
fd256c977add88ac4b25c9d9aa09a8205e060321 06-Jun-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Disable in-place vdex update"" am: 52ca987db6 am: deb23917a9
am: 3470e3e3f7

Change-Id: I9b6b0b3fecb25e01b10d126e9d236658acd1e99c
b03814f39559c824e097bf2d869c7a56d8b41b67 05-Jun-2017 Nicolas Geoffray <ngeoffray@google.com> Revert "Disable in-place vdex update"

Reverting to only apply this when doing dexlayout.
PS1 is a pure revert. PS2 contains the fix.

This reverts commit e446fede9258359b61d4c8753d7e96477fa29388.

Change-Id: I04a7dbde142d59e8dcdf4e93ab0456c4aa3d02ab
nstalld/dexopt.cpp
5d2e06c8a77cc784d047994ebe4d38ba0d033707 05-Jun-2017 Joel Fernandes <joelaf@google.com> Merge "atrace: Enable sched_waking if available" into oc-dev
am: 4b37107002

Change-Id: I961c608a96040cfd87bd55249617c715cb6d6488
be83a34f7d731c849e134046a97f8931f56501c0 05-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Set saved_cmdline_size to 8192
am: efb73a96b5

Change-Id: I96758a6d56d5478b3287ead6c3d4e43fb7e61524
4b37107002585a085ec8f415dea680b1db73f4a3 05-Jun-2017 Joel Fernandes <joelaf@google.com> Merge "atrace: Enable sched_waking if available" into oc-dev
efb73a96b559f88a168b1cfbd5a3ad865ab8f937 02-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Set saved_cmdline_size to 8192

This increases the size of the table tracking comms and pids and
prevents overwriting them easily.

Bug: 38167231

Change-Id: I69b9000e4f9d0c2c7969efd38e02d8c1bffdad5c
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit ed80bd04cc3bf80082b1d733ef06d90a29c6270a)
trace/atrace.cpp
237c363006dbc0e55dde8f4f37e0b5af15433840 04-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Enable sched_waking if available

sched_waking helps to know when a wakeup happens at the earliest.
wakeups can originate on different CPUs which makes it impossible to
know just from sched_wakeup what the source was. Thankfully sched_waking
is just for that, enable it if its available.

Bug: 36415990

Change-Id: I489ca0112d5e0ed781888866a9efa57f17ca8a53
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
ee593e27cf607ab4603f65e89a7a366c5f154942 04-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Enable sched_waking if available

sched_waking helps to know when a wakeup happens at the earliest.
wakeups can originate on different CPUs which makes it impossible to
know just from sched_wakeup what the source was. Thankfully sched_waking
is just for that, enable it if its available.

Bug: 36415990

Change-Id: I489ca0112d5e0ed781888866a9efa57f17ca8a53
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
18c2d051e3f20c388acfd352893136e8abc621a5 03-Jun-2017 Chong Zhang <chz@google.com> Merge "Add media.codec process to native stack dump list" into oc-dev am: eb30998a33
am: edde8a79f0

Change-Id: I944e3e094aac18ebb859cc2e900ccf8b162357b4
edde8a79f05a911403da1ad2f005d8ff62ebf624 03-Jun-2017 Chong Zhang <chz@google.com> Merge "Add media.codec process to native stack dump list" into oc-dev
am: eb30998a33

Change-Id: I8de97da46705f876848bfa939f05dc31f82389f2
de00ee453638f151501017ba802a5a54815288c9 03-Jun-2017 Chong Zhang <chz@google.com> Add media.codec process to native stack dump list

This is needed for non-treble devices.

Test: do 'adb shell bugreport' on angler, and check that
'Cmd line: media.codec' section is present and stacks are there.

bug: 62297059
Change-Id: I2573bb48d021e7750adf44eb00f06f5b9efb3a85
umpstate/utils.cpp
80a6844a19abc91d1179205aa66405de2e025f3d 02-Jun-2017 Joel Fernandes <joelaf@google.com> Merge "atrace: Set saved_cmdline_size to 8192"
ed80bd04cc3bf80082b1d733ef06d90a29c6270a 02-Jun-2017 Joel Fernandes <joelaf@google.com> atrace: Set saved_cmdline_size to 8192

This increases the size of the table tracking comms and pids and
prevents overwriting them easily.

Bug: 38167231

Change-Id: I69b9000e4f9d0c2c7969efd38e02d8c1bffdad5c
Signed-off-by: Joel Fernandes <joelaf@google.com>
trace/atrace.cpp
a5978594a80a0632e9c35b5e6e02edda4f430d70 02-Jun-2017 Narayan Kamath <narayan@google.com> Merge "dumpstate: Further cleanups related to new stack dumping scheme."
3291cd9eaab89538dac3af66a5f099da7d320c86 27-May-2017 David Sehr <sehr@google.com> Disable in-place vdex update

Vdex files can be corrupted by dexlayout or by previously dexlayout-ed
files being recompiled if they are used as both input and output.
Disable this feature.

Bug: 38113240
Test: OTA and dexopt
Change-Id: Iee2d9a6c1ba8cddda25290f68f50649d5288d588
(cherry picked from commit e446fede9258359b61d4c8753d7e96477fa29388)
nstalld/dexopt.cpp
bd86372f09748b258f959cb7a1a04613038e59b0 01-Jun-2017 Narayan Kamath <narayan@google.com> dumpstate: Further cleanups related to new stack dumping scheme.

- Rewrite AddDumpFds to iterate over all files in the dump directory
instead of assuming a specific file pattern. This gives us additional
flexibility in generating dump file names.

- Fix a bug in deducing the value of is_global_stack_trace_file.

- Add a better section header for the most recent ANR dump. The most
recent dump will be titled "VM TRACES AT LAST ANR" and all others will
be titled "HISTORICAL ANR". Also fixes the sort order so that the most
recent ANR shows up first.

Bug: 36024548
Test: Manual; adb bugreport

Change-Id: I461712954d033ef3a3911d5b419a101cac71c8fb
umpstate/dumpstate.cpp
6b26ae49fc41d61bde300a074fec8dc5dcb2985c 01-Jun-2017 Andreas Gampe <agampe@google.com> Installd: deleteOdex's outputPath can be null am: c523409f0f
am: 7b28d34ee2

Change-Id: I8d700639d5056dd68b41e01b994f074dafe9bedc
7b28d34ee25695759ce19b48233932e7515cf147 01-Jun-2017 Andreas Gampe <agampe@google.com> Installd: deleteOdex's outputPath can be null
am: c523409f0f

Change-Id: I36aa3e4c04967567e1f1cfa5f967be416bdeca8e
8a5a2b9c58afd1f9dc7de475802a7ea11b98037b 01-Jun-2017 Andreas Gampe <agampe@google.com> Installd: deleteOdex's outputPath can be null

Add @nullable, as the outputPath can be null for system apps.

(cherry picked from commit c523409f0fd03aa498cedc486f85e9a4b7257f3a)

Bug: 62236497
Test: m
Test: Fill up /data, apply OTA
Change-Id: I61d86721b485f85195b153d76ce25412dcb68be6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
c523409f0fd03aa498cedc486f85e9a4b7257f3a 01-Jun-2017 Andreas Gampe <agampe@google.com> Installd: deleteOdex's outputPath can be null

Add @nullable, as the outputPath can be null for system apps.

Bug: 62236497
Test: m
Test: Fill up /data, apply OTA
Change-Id: I61d86721b485f85195b153d76ce25412dcb68be6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
3040d9db984237259c0ec7238ad9081018ffe808 25-May-2017 Nicolas Geoffray <ngeoffray@google.com> Delete vdex file in delete_odex.

(cherry picked from commit 192fb9662ce8b2a60da2b280d8000283fb3b6f6b)

bug: 38513395
Test: unfortunately no unit test here, so after discussing
with agampe@ just relied on build.

Change-Id: I305ddaadc813673fb55473f5e8ca357f39cf98f3
nstalld/dexopt.cpp
8f788290f89c0782ca5cf2d1feaa81250295c5fa 25-May-2017 Narayan Kamath <narayan@google.com> dumpstate: use tombstoned/debuggerd for java traces.

- debuggerd_dump_traces now supports Java traces as well, so
use that when dalvik.vm.stack-trace-dir is set. The output
FD we use for the intercept is currently a regular file
written by mkostemp, but this can be cleaned up once the
old way of doing things is removed.

- We're no longer writing traces to a global trace file, so
add bug report entries for all java traces written in the past
30 minutes just as we do for native traces.

The minor refactoring that this CL undertakes was done under the
assumption that the old way of doing things will be removed in the
near future.

Bug: 32064548
Test: manual

Change-Id: I8af6f0a644115296dc41affc3b7cd98a2db32c48
umpstate/DumpstateInternal.h
umpstate/dumpstate.cpp
umpstate/utils.cpp
e2cc7337ccd1afb2fbfc401918648d557be0da3a 01-Jun-2017 David Sehr <sehr@google.com> Merge "Disable in-place vdex update" am: d9917d78a0 am: 2521871a1f am: b8e9326fd8
am: 8425a02d5c

Change-Id: I7ca8d02b2e43ae1a2d69aeb0551f7297f6da83ee
8425a02d5c6653a84f87c437c1ae36f67c51164a 01-Jun-2017 David Sehr <sehr@google.com> Merge "Disable in-place vdex update" am: d9917d78a0 am: 2521871a1f
am: b8e9326fd8

Change-Id: Ia2297f8cc31830e4e3909580f3af45dfb96e5901
d9917d78a0bd246cb084772bb7c470fed4016282 01-Jun-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Disable in-place vdex update"
76dd2a7016e2f0afcc45d23be1b3e51c2acc4440 31-May-2017 Jeff Sharkey <jsharkey@google.com> Merge "Consistent "low storage" behavior." into oc-dev am: 1e4088fc68
am: 666ff7278b

Change-Id: Ifeab043cb89ce953845a6db67cde1100ec7f715d
666ff7278bdedfdcc904d79a1fdd7631d991f8a0 31-May-2017 Jeff Sharkey <jsharkey@google.com> Merge "Consistent "low storage" behavior." into oc-dev
am: 1e4088fc68

Change-Id: I8a2328710d4bc770badfcc9778534fccaaf91405
77f1357b974f415205a0899b423e261c06dd2b28 31-May-2017 Narayan Kamath <narayan@google.com> Merge "dumpstate: Track debuggerd API changes." am: ccc5db441b am: 62b9a75c4c am: ea3784b686
am: aece2afa84

Change-Id: I4c7780e8f1bcea90a41d0b5b720292602caa8d55
aece2afa84d9032b96989d329605634e5ba93e6b 31-May-2017 Narayan Kamath <narayan@google.com> Merge "dumpstate: Track debuggerd API changes." am: ccc5db441b am: 62b9a75c4c
am: ea3784b686

Change-Id: I82e5974f96a2a617d31a63813dac22035532c59b
93b36d1de19c3536f3809a96f2a5e11365e2cb4f 31-May-2017 Narayan Kamath <narayan@google.com> dumpstate: Track debuggerd API changes.

dump_backtrace_to_file_timeout now needs an additional argument
that specifies the dump type.

Bug: 36024548
Test: make; manual bug report capture
Change-Id: I6ce3c172dd571e296d9ced9c576b88ea487b2fbb
umpstate/utils.cpp
60f8a5330ca921d936ae306bf6d17596b82b518c 30-May-2017 Jeff Sharkey <jsharkey@android.com> Consistent "low storage" behavior.

When freeing cached data, the caller can now provide a "reserved"
size which we won't clear cached data from.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Ieb91b3e5345a950d4785fd7915f520f0a68a567a
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/tests/installd_cache_test.cpp
e446fede9258359b61d4c8753d7e96477fa29388 27-May-2017 David Sehr <sehr@google.com> Disable in-place vdex update

Vdex files can be corrupted by dexlayout or by previously dexlayout-ed
files being recompiled if they are used as both input and output.
Disable this feature.

Bug: 38113240
Test: OTA and dexopt
Change-Id: Iee2d9a6c1ba8cddda25290f68f50649d5288d588
nstalld/dexopt.cpp
177759a90584489b1b77cdaf3818ebdb79b1b9bf 26-May-2017 Yifan Hong <elsk@google.com> Merge "Add pids for processes that dlopens implementations" am: 2410cd179d am: 977066464e am: 479f9d0c7b
am: 564a599e94

Change-Id: I0af1a0c6c899a7d6344977b73d2457b01d1d2ceb
564a599e94acda7ec5e1924f9eaf8c2071ade60a 26-May-2017 Yifan Hong <elsk@google.com> Merge "Add pids for processes that dlopens implementations" am: 2410cd179d am: 977066464e
am: 479f9d0c7b

Change-Id: I896d198a1680ad1a5020a712f925db3c3dfc2084
2410cd179d60b14ac9ad639a930a7b9c712b8463 26-May-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add pids for processes that dlopens implementations"
f1a6f58bdfd8f95d041a76d79c86838a4a878e65 26-May-2017 Martijn Coenen <maco@google.com> Merge "atrace: trace binder_set_priority."
f2d557b619394d201cdf4571a20fa92480c9f7fd 25-May-2017 Yifan Hong <elsk@google.com> Add pids for processes that dlopens implementations

Test: lshal -itrpc
Test: lshal
Test: lshal --init-vintf
Test: lshal_test

Bug: 37639822
Change-Id: Ia415e5f8dbcd10f24e9a5cfdd591eb829a1da89e
shal/ListCommand.cpp
shal/Timeout.h
7f3d7a2234d7fedc1333152a0567dec74d82ee9c 26-May-2017 Martijn Coenen <maco@google.com> atrace: trace binder_set_priority.

Useful to debug priority inheritance issues.

Test: binder_set_priority events traced
Change-Id: I89d6ad463aa670ce9b838cb051e58d58e80f07f6
trace/atrace.cpp
f44c05f87e8becbff468a4dd59c88b3a2a6bae5c 26-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Delete vdex file in delete_odex." am: 99dedeb690 am: f6b79dd073 am: 6dc664460d
am: 362e56e41a

Change-Id: I7594ff3af6fc72e4d155afab41ef3ae4cb1b60ef
362e56e41a847391c02706c170b21a6d1f6c6d68 26-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Delete vdex file in delete_odex." am: 99dedeb690 am: f6b79dd073
am: 6dc664460d

Change-Id: I0116a003cd1985e15d2beb9a60a4262549647774
99dedeb690856e0f0b91b9de0bc24c36216add97 26-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Delete vdex file in delete_odex."
192fb9662ce8b2a60da2b280d8000283fb3b6f6b 25-May-2017 Nicolas Geoffray <ngeoffray@google.com> Delete vdex file in delete_odex.

bug: 38513395
Test: unfortunately no unit test here, so after discussing
with agampe@ just relied on build.

Change-Id: I305ddaadc813673fb55473f5e8ca357f39cf98f3
nstalld/dexopt.cpp
62c2c12d56e1b9c7d51980fabdf8c6b971971501 26-May-2017 Steven Moreland <smoreland@google.com> Merge "Add thread usage output to lshal." am: 4a3e0a9767 am: 9a130151a2 am: de314f2df2
am: 42f3d38f35

Change-Id: I5160ee0c8a8f309ffab6a854c9d03c67a88b84fe
42f3d38f35c446296ee8ad26a735054b43398aa2 26-May-2017 Steven Moreland <smoreland@google.com> Merge "Add thread usage output to lshal." am: 4a3e0a9767 am: 9a130151a2
am: de314f2df2

Change-Id: I321f393d2fc7252ea6d009c743fe797b083d718a
68638b4b783bdeced176e71c816824bbb846e0ce 26-May-2017 Jaekyun Seok <jaekyun@google.com> Merge "Newly create idmap only when it is stale" into oc-dev am: 4bf5dcce19
am: 951a77b675

Change-Id: Iaf155251ac7d62b236f356fd0f66f1f621038b9c
951a77b6757f529a4ebc7bf678cce78abd5a8e3b 26-May-2017 Jaekyun Seok <jaekyun@google.com> Merge "Newly create idmap only when it is stale" into oc-dev
am: 4bf5dcce19

Change-Id: Ibafdbb1406b822a7e7f50ca229b8aefe9981b547
4bf5dcce1917e6489f35d9de8d815f0da05ddbfa 25-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Newly create idmap only when it is stale" into oc-dev
732a29a4a6f07958bd15e01c5ec1fdab53243374 25-May-2017 John Reck <jreck@google.com> Add MDSS tracing to gfx category

Bug: 62039896
Test: Ran systrace, verified mdss shows up with just gfx tag
Change-Id: Icc2d343fecbec9a63b97adae857208ca6a98f607
trace/atrace.cpp
d8e20191c2fa10a458b29bb06502487d704ba076 24-May-2017 Steven Moreland <smoreland@google.com> Add thread usage output to lshal.

This output shows how many threads are in use at a give time.

Test: lshal, manual
Bug: 35099601
Change-Id: I3a22bb131b828cdd77e73e7810229d9c68a496d3
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/TableEntry.h
5cb903e0a976a143cd70441dcbd0fcb5a9630daa 17-May-2017 Jaekyun Seok <jaekyun@google.com> Newly create idmap only when it is stale

For now, OverlayManagerService calls Installd.idmap() whenever a user
is changed, and then a idmap is re-generated even though there are no
changes on its target apk and overlay apk.
This CL is to avoid such unnecessary re-generation of idmap. Instead
only a group id will be updated when the idmap isn't outdated.

To correctly check staleness of idmap, "--verify" function of idmap is
invented as well.

Test: building succeeded and tested on sailfish.
Bug: 37179531
Change-Id: I874be9765d37bfa6c562c3f39a395040dc6a7d1f
nstalld/InstalldNativeService.cpp
61167ba6f2a7c029de45041705b38dc04d6ec581 23-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Do not set the trace clock in atrace.rc." into oc-dev am: 27ef38ca4c
am: 755b10ddc3

Change-Id: If7306d6a2bd35a392aee6e2a6951781bead7cb78
755b10ddc37f8dd5f61ecab7e57ae900bab8e71e 23-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Do not set the trace clock in atrace.rc." into oc-dev
am: 27ef38ca4c

Change-Id: I068e661eba9c7e668a6157dc4d704b4b73e8514c
69915f973399a8b4e948877ce0cadead1e1a577a 23-May-2017 Carmen Jackson <carmenjackson@google.com> Do not set the trace clock in atrace.rc.

This reverts only the atrace.rc change from commit ea826794184be368f65f099ceac4fc31234700f6.
"Set the atrace clock to the best available value: boot, mono, or global."

This change caused a 100+ms regression in boot time. We also confirm that
the clock is set to the correct value when we call atrace, so we will
still see correct behavior after reverting this change.

Bug: 38504158
Test: Manually tested that the trace clock is updated when atrace is
called.
Change-Id: Ifa302694964a4f9fc54db16e7125d5279067bbfd
trace/atrace.rc
528c610a24f9b7a22ccee39286d6674f02ffe41b 23-May-2017 Andreas Gampe <agampe@google.com> Otapreopt: Add some static_asserts am: ef21fd2b6b
am: 904f744dc8

Change-Id: I3247532b1b08bef1f9d18ee4da386d889fcd46d9
904f744dc8478f22ae1996413d09f7707130ba0c 23-May-2017 Andreas Gampe <agampe@google.com> Otapreopt: Add some static_asserts
am: ef21fd2b6b

Change-Id: I9f72d69a74a945f3c822401e466028d94330fdb3
ef21fd2b6b08d5faddaeabe83718d875d20a6abc 22-May-2017 Andreas Gampe <agampe@google.com> Otapreopt: Add some static_asserts

Add some checks that indicate version issues.

Bug: 38501464
Test: m
Change-Id: Iec2043eda19126166139d7220618d11032e98af0
nstalld/otapreopt.cpp
aeae88f981047a2a8486fc6a0b617ad1a934f037 20-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Set the atrace clock to the best available value: boot, mono, or global." into oc-dev am: bfe6bf6f31
am: 115d6cd1d7

Change-Id: I11606b0da51b924b2e51b2872cdd652d28e0cc7f
115d6cd1d77ba146055aa4741c9891eeb53fb8aa 20-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Set the atrace clock to the best available value: boot, mono, or global." into oc-dev
am: bfe6bf6f31

Change-Id: I4b198e07cdf1742aff8a771721021ca6ba28f20a
7da2e6c74b9c9812ad60292b754f6edca6e28c41 20-May-2017 Marc Hittinger <trojal@google.com> Merge "Enable lowmemory trace events in atrace"
bfe6bf6f31a3ade00422e8742bb3f9eb104914a5 20-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Set the atrace clock to the best available value: boot, mono, or global." into oc-dev
f1f62e3b73fa5b84a552332beeacce874fd9429c 18-May-2017 Marc Hittinger <trojal@google.com> Enable lowmemory trace events in atrace

Enable collection of lowmemory events in atrace as a category. These
events have been available in the kernel, but not exposed via atrace.

Bug: https://github.com/catapult-project/catapult/issues/3557
Test: Run "atrace memreclaim", trigger LMK events.
Change-Id: I92140518796bdda8b302d566d7d78e2129b9839c
trace/atrace.cpp
trace/atrace.rc
8748ecda68a6f7cb7c1ad4ee4349d2e4fdbe31f6 19-May-2017 Calin Juravle <calin@google.com> Merge "Delete secondary dex profiles during reconciliation" into oc-dev am: 74a812c587
am: 07d92974fa

Change-Id: I2ac3257a90c708406da4220b700cf6bd4ecd5fc6
07d92974fa67b10ead74e79ef9c0d67a669015fb 19-May-2017 Calin Juravle <calin@google.com> Merge "Delete secondary dex profiles during reconciliation" into oc-dev
am: 74a812c587

Change-Id: Ia31c6372f66a4c1a0e574e1e85dfcc7af1307bfd
74a812c587c21e85449a47c098c57d87c1527306 19-May-2017 Calin Juravle <calin@google.com> Merge "Delete secondary dex profiles during reconciliation" into oc-dev
ea826794184be368f65f099ceac4fc31234700f6 05-May-2017 Carmen Jackson <carmenjackson@google.com> Set the atrace clock to the best available value: boot, mono, or global.

This reverts commit dc34097448a76a4bb09636f25567113d7a6551dc.
"Revert "Set the atrace clock to boot when possible and mono otherwise.""

...and includes a fix for devices that break with that change. Write will
fail with an Invalid Argument exception if we programmatically write a
value to the trace_file that doesn't exist in the file. So, we'll check
for both potential values we might set. If neither of them exist, fall
back to setting to 'global', which should be safe since we were doing it
before without checking.

Bug: 32379831
Test: cts-tradefed run singleCommand cts-dev --module
CtsAtraceHostTestCases passed.
Test: Manually examining trace_clock before and after running atrace shows that the
trace_clock changes as expected (for this test I disabled atrace.rc and added an
additional debug print statement):
$ cat /d/tracing/trace_clock
[local] global counter uptime perf mono boot
$ atrace --async_start freq
capturing trace...marlin:/ $ cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
$ atrace --async_stop > /dev/null
$ cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
$ atrace --async_start freq
clock is already correct!
$ atrace --async_stop > /dev/null

Change-Id: I267056d19bcdbea58881ab2b32f093caac5f14c1
trace/atrace.cpp
trace/atrace.rc
513140941eeec7a5bad56956cce101f3da829d43 19-May-2017 Calin Juravle <calin@google.com> Delete secondary dex profiles during reconciliation

Test: manual inspections after adb shell dumpsys package dexopt
Bug: 38430319
Change-Id: I8401288b753a0c38ee3020d12e8e02c4a25723d2
nstalld/dexopt.cpp
c821f28ff2c0d367f1468501033162851b4b2848 17-May-2017 Howard Chen <howardsoc@google.com> Merge "Make the binder_lock category optional" am: 61e58d5a47 am: c4a8373ccd
am: f06f26bbb5

Change-Id: I6f9d043a8a2ac1a3a1d6a1e135fb061b94edccba
27175b6c169939f97d89c3b9f4beac053934d52d 17-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Make the binder_lock category optional"
4a9dda11db6a98543651335a4c728dfce58d272a 10-May-2017 Howard Chen <howardsoc@google.com> Make the binder_lock category optional

The binder_lock event type has been deprecated after binder
driver uses fine grained locking. This patch makes "binder_lock"
an optional category for atrace to support system w/ w/o FGL.

Bug: 37559846
Test: pixel phone with "atrace --async_start binder_lock"
Merged-In: I691efd355e903a26629f896a56a664502e5807f7
Change-Id: I691efd355e903a26629f896a56a664502e5807f7
trace/atrace.cpp
d7fb61115a242399ca732dc116ebce2b5085f179 17-May-2017 Adam Lesinski <adamlesinski@google.com> Merge "Revert "Newly create idmap only when it is outdated"" into oc-dev am: b57d3d222a
am: 2f48fe9aca

Change-Id: I3cac6098593b9fdf7db5ab6e9e8b776c9ab36d72
2f48fe9acadd8b74ea4e9139a6ac89d2be039b27 17-May-2017 Adam Lesinski <adamlesinski@google.com> Merge "Revert "Newly create idmap only when it is outdated"" into oc-dev
am: b57d3d222a

Change-Id: Ia9e211300173e81c4d64785e19e31c3d0c7344d9
b57d3d222a1fe73a06e2a07416bfec1585e358a5 17-May-2017 Adam Lesinski <adamlesinski@google.com> Merge "Revert "Newly create idmap only when it is outdated"" into oc-dev
b6182b3080be69f7983ad6ff8e3d23ecabf4d266 17-May-2017 Adam Lesinski <adamlesinski@google.com> Revert "Newly create idmap only when it is outdated"

This reverts commit 1d091465334784adeded4ef182cc6f732eb6f99e.

Reason for revert: Causes b/37992057

Change-Id: I7811483016b28a88d6a50bd445dd5d5e8d2e48d6
nstalld/InstalldNativeService.cpp
e9594fcd9a9733912a9ea34ce31752869936a025 15-May-2017 Yifan Hong <elsk@google.com> Merge "Add lshal --neat option" am: 3a6828d50b am: 702ca32b5a am: 42648b7216
am: 52b7b5edc4

Change-Id: Icc2a7f152310f59a36f1c24e1e955a112d61ec8c
52b7b5edc4b1b9a2d85bf67c3eff26d6b09aec7b 15-May-2017 Yifan Hong <elsk@google.com> Merge "Add lshal --neat option" am: 3a6828d50b am: 702ca32b5a
am: 42648b7216

Change-Id: If89739d3318c70d907070da796f8874b21e30bda
37af85d546b9f0c5198dfdc34e0082b9bf5a37b5 13-May-2017 Yifan Hong <elsk@google.com> Actually remove dead processes from lshal

Test: run lshal with and without the change

Change-Id: Id8c52a5be3253f5ff9c1cb851459a16e01ca5dda
Merged-In: Id8c52a5be3253f5ff9c1cb851459a16e01ca5dda
Fixes: 35765788
shal/ListCommand.cpp
3b3fbb7e23140e87f9f85d7ce82daeef82dde1e1 10-May-2017 Yifan Hong <elsk@google.com> Add tests to lshal.

Test: lshal_test
Bug: 37725279
Change-Id: I1914e6274974ed5eb0ce2d655f1333d2344b49f5
Merged-In: I1914e6274974ed5eb0ce2d655f1333d2344b49f5
shal/Android.bp
shal/ListCommand.cpp
shal/Lshal.cpp
shal/Lshal.h
shal/main.cpp
shal/test.cpp
4d71d2913702fd5a6b6f84bdfae02f6ef1a14b24 10-May-2017 Yifan Hong <elsk@google.com> Add `lshal debug` command.

Supported command:
lshal debug android.hardware.foo@1.0::IFoo option option

Test: adb unroot && lshal --debug ; echo $?
Test: adb unroot && lshal debug android.hardware.nfc@1.0::INfc ; echo $?
Test: adb root && lshal --debug ; echo $?
Test: adb root && lshal debug android.hardware.nfc@1.0::INfc ; echo $?

Bug: 37725279
Change-Id: Ia2f4c9c0d3fb0a7bb26e76f01d02f49dc426e7f8
Merged-In: Ia2f4c9c0d3fb0a7bb26e76f01d02f49dc426e7f8
shal/Android.bp
shal/DebugCommand.cpp
shal/DebugCommand.h
shal/ListCommand.cpp
shal/Lshal.cpp
shal/Lshal.h
shal/utils.h
8388ba3e2ddaf703192946b0b7874cc2431f3dd7 10-May-2017 Yifan Hong <elsk@google.com> Lshal: support commands.

Support the following commands:
lshal list
lshal list -itrpc
lshal help
lshal help list
lshal list -h
lshal list --help

Test: run these commands
Bug: 37725279
Change-Id: I970fbc8d250d43f57e92f783229e0645d7e8df4e
Merged-In: I970fbc8d250d43f57e92f783229e0645d7e8df4e
shal/Android.bp
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/Lshal.h
shal/utils.cpp
shal/utils.h
f2d9a89e0fbdcc6ef067ef4ca62ca1f893f9ec92 10-May-2017 Steven Moreland <smoreland@google.com> lshal: remove "// static" comments

Test: pass
Change-Id: I4d710c8aaad87cfcd7896800a5ab24f812775703
Merged-In: I4d710c8aaad87cfcd7896800a5ab24f812775703
shal/PipeRelay.cpp
6da06916211a1292ce83d5fa730cd8f805902b13 13-May-2017 Yifan Hong <elsk@google.com> Add lshal --neat option

... that doesn't output explanatory text and title line.

Test: lshal --neat
Test: lshal
Test: lshal --neat -itrpc

Change-Id: I269a5d284903dc0e9bc3be96379ed41aecea8ddb
Fixes: 38211518
shal/ListCommand.cpp
shal/ListCommand.h
671c4a0d9f39394525d4a84d1ebc9f69ef193f11 13-May-2017 Yifan Hong <elsk@google.com> Merge "Actually remove dead processes from lshal" am: 28765c6184 am: d52b085d44 am: e69eaddc3e
am: 681af84df2

Change-Id: I9e066dcb2b9a165c2642ea393ad30d323f898c16
681af84df2f69d78674dedf5b6a2aef526a7778d 13-May-2017 Yifan Hong <elsk@google.com> Merge "Actually remove dead processes from lshal" am: 28765c6184 am: d52b085d44
am: e69eaddc3e

Change-Id: I120912d0dd12dec09d531a96111080c6f8a14b92
61fb7bcecb6297d802dcb56d12bf107fa200640d 13-May-2017 Yifan Hong <elsk@google.com> Actually remove dead processes from lshal

Test: run lshal with and without the change

Change-Id: Id8c52a5be3253f5ff9c1cb851459a16e01ca5dda
Fixes: 35765788
shal/ListCommand.cpp
3d4856745a496b80dbcfaef5946239b4eae9d452 13-May-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal_debug' am: d4f5bb4c17 am: a7f366d411 am: cb0cb2f04e
am: 50892aed32

Change-Id: I05e1a63fbfbe3c2348cc70f8a98bc6fad90ee5e2
50892aed3299e5cdd2908b47ccdbf3bd36d8a29e 13-May-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal_debug' am: d4f5bb4c17 am: a7f366d411
am: cb0cb2f04e

Change-Id: Ia931ccf63b5a7c6d05616c1137fe90e45dc4d612
d4f5bb4c17e617ff39085e4a7fdd96e96b3c62ad 13-May-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal_debug'

* changes:
Add tests to lshal.
Add `lshal debug` command.
Lshal: support commands.
9881df9717388f8740d2d7d2ac2e42eaf8bd85c9 10-May-2017 Yifan Hong <elsk@google.com> Add tests to lshal.

Test: lshal_test
Bug: 37954458
Change-Id: I1914e6274974ed5eb0ce2d655f1333d2344b49f5
shal/Android.bp
shal/ListCommand.cpp
shal/Lshal.cpp
shal/Lshal.h
shal/main.cpp
shal/test.cpp
48dc9f8586c288e152bdd5e14423281764f8db5f 10-May-2017 Yifan Hong <elsk@google.com> Add `lshal debug` command.

Supported command:
lshal debug android.hardware.foo@1.0::IFoo option option

Test: adb unroot && lshal --debug ; echo $?
Test: adb unroot && lshal debug android.hardware.nfc@1.0::INfc ; echo $?
Test: adb root && lshal --debug ; echo $?
Test: adb root && lshal debug android.hardware.nfc@1.0::INfc ; echo $?

Bug: 37954458
Change-Id: Ia2f4c9c0d3fb0a7bb26e76f01d02f49dc426e7f8
shal/Android.bp
shal/DebugCommand.cpp
shal/DebugCommand.h
shal/ListCommand.cpp
shal/Lshal.cpp
shal/Lshal.h
shal/utils.h
443df7932cedd88d523164ac7175fa19ec553c7b 10-May-2017 Yifan Hong <elsk@google.com> Lshal: support commands.

Support the following commands:
lshal list
lshal list -itrpc
lshal help
lshal help list
lshal list -h
lshal list --help

Test: run these commands
Bug: 37725279
Change-Id: I970fbc8d250d43f57e92f783229e0645d7e8df4e
shal/Android.bp
shal/ListCommand.cpp
shal/ListCommand.h
shal/Lshal.cpp
shal/Lshal.h
shal/utils.cpp
shal/utils.h
eb8acbf4af7f1ad7ae94337dc3e0d6a38eab4178 10-May-2017 Howard Chen <howardsoc@google.com> Make the binder_lock category optional

The binder_lock event type has been deprecated after binder
driver uses fine grained locking. This patch makes "binder_lock"
an optional category for atrace to support system w/ w/o FGL.

Bug: 37559846
Test: pixel phone with "atrace --async_start binder_lock"
Change-Id: I691efd355e903a26629f896a56a664502e5807f7
trace/atrace.cpp
2c784c9b8b977d0ec5030fbe712f4d202a883a3a 11-May-2017 Martijn Coenen <maco@google.com> Merge "Only spawn one binder thread for cmd." into oc-dev am: 31d8ab2e7c
am: e19f2930c7

Change-Id: I7945d151fd477c4485265740ec357dba1bd8b382
e19f2930c77459eb26a4030ea40145c80953a3ca 11-May-2017 Martijn Coenen <maco@google.com> Merge "Only spawn one binder thread for cmd." into oc-dev
am: 31d8ab2e7c

Change-Id: I2cc1e090bb1669bc7ed181c5e3ae65d5b35f77e5
31d8ab2e7c038952aa3381b323ee564b26e16488 11-May-2017 Martijn Coenen <maco@google.com> Merge "Only spawn one binder thread for cmd." into oc-dev
c21bc9afe403f52c189d2d6b79dedaf9dce6217b 11-May-2017 Martijn Coenen <maco@google.com> Only spawn one binder thread for cmd.

To work around race conditions in libbinder when
spawning new threads while being shut down.

Bug: 36066697
Test: cmd still works
Change-Id: I71c8d1aac29a1bf65d54023a4ed39d943ad54c98
md/cmd.cpp
7ea0738923e429eab47354170564940a376f0662 11-May-2017 Mathieu Chartier <mathieuc@google.com> Merge "Add copy system profile functionality"
c0d105badbb0952370bfe32c6c8c2377ec02b42a 11-May-2017 Nicolas Geoffray <ngeoffray@google.com> Remove obsolete DEXOPT_SAFEMODE.
am: 2520d44e66

Change-Id: I2f053a09a4eeb48bcee07bb0c9509709bb8dc50f
f937aa1e80c1d566003323939b59c082fd5cfcc2 11-May-2017 Alex Vakulenko <avakulenko@google.com> Merge "Revert "atrace: Poke PDX services using utility class."" into oc-dev am: 17cc37dc15
am: c6e9b955f4

Change-Id: I2578fc68350df843566312c93c03636e9d8a36de
4206d1550b7252abf59dc45f522ef57db3939745 11-May-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Work around bug 38186355" into oc-dev am: 4c8cc1c86a
am: 0bcb8e9326

Change-Id: I00677ec99337440037be6467486564213714bce5
3a6114f230509369b1d86ab2f814942bf50e94d4 11-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Remove obsolete DEXOPT_SAFEMODE." am: 4fa2b96d21 am: d1058fb90c
am: 422eab43cc

Change-Id: I5547f465814d5cd3dca05e0a4c8e0f2473febc75
2520d44e664049f67f56795bedf5cc1d0494cc44 05-May-2017 Nicolas Geoffray <ngeoffray@google.com> Remove obsolete DEXOPT_SAFEMODE.

installd side of the change.

bug:37929796
Test: build
Change-Id: I358c0784a7b563cbd6ceaecdb80710971f483d02
(cherry picked from commit bad623a225d0b3d94f30f8654bd4684969e90d4c)
nstalld/installd_constants.h
nstalld/otapreopt.cpp
89726a1deaca6646e1641e0358186a0a19374dc7 11-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Handle safe mode in PackageManager." into oc-dev
4fa2b96d212d20ee835de7068b4c4f2748c25cc4 11-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Remove obsolete DEXOPT_SAFEMODE."
f966f2a5af6cc2022a5af4edeb20cf4b5ede0d40 10-May-2017 Mathieu Chartier <mathieuc@google.com> Add copy system profile functionality

Test: Flash preopted speed-profile maps.
Test: Confirm ref profile exists.
Test: Close maps, recompile with speed-profile, test the profile was used.
Test: Launch maps, do some stuff until cur profile exists.
Test: Re-compile with speed-profile and confirm cur merged over ref correctly.

Bug: 38032017

Change-Id: I19c8009ad61213bdcb52f010329eb459ca82f92b
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
c6e9b955f48db33424750a96fd26ff514a5be7ec 11-May-2017 Alex Vakulenko <avakulenko@google.com> Merge "Revert "atrace: Poke PDX services using utility class."" into oc-dev
am: 17cc37dc15

Change-Id: Ic31751da5e2699c9a9e11fd0df716847c0685d7e
0bcb8e93261930b9ca3482500b83ee770db4992f 11-May-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Work around bug 38186355" into oc-dev
am: 4c8cc1c86a

Change-Id: Ic8b695f766165402fd2f66f54efcf30b76b498fe
4691e74a6104e1f5d01604bda082872b78f1bcfa 11-May-2017 Yifan Hong <elsk@google.com> Merge "lshal: remove "// static" comments" am: 8d2f788a05 am: 7d6944d40a
am: 45bf90c166

Change-Id: I3fd98e82715890ed1a83862dfe369a15b316c3ad
5cf6378fb51ec17cbf23af2cd4632acf1dbecdf8 10-May-2017 Steven Moreland <smoreland@google.com> lshal: remove "// static" comments

Test: pass
Change-Id: I4d710c8aaad87cfcd7896800a5ab24f812775703
shal/PipeRelay.cpp
17cc37dc15af19861d51e31cbfa4a624fa2a50fa 10-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "atrace: Poke PDX services using utility class."" into oc-dev
612c12b29308f0662c99f81aa9aa22c6cd0894df 10-May-2017 Alex Klyubin <klyubin@google.com> Merge "Switch from libcrypto_static to libcrypto target"
e61e3618ee6fde5f2de0469628c3aed86becb7f9 10-May-2017 Alex Vakulenko <avakulenko@google.com> Revert "atrace: Poke PDX services using utility class."

This reverts commit f70680e995d6df4604c9b34f6a5afebe613d7feb.

There appears to be a bug in the current build system that does not
cleanly rebuild all targets using static libraries built across
different build systems (Soong/make). With the recent change to PDX
connection handshake, it is important that all clients and services are
rebuilt to include the new protocol changes. However this is not the
case when doing incremental builds. Some services remain untouched
during global builds and hence there is a disparity in clients' and
services' implementations of the protocol.

atrace being one of the clients is affected (the symptom is that when
started atrace just hangs waiting for connection to a PDX service).

While there is nothing wrong with the current state of code, but the
issue of incomplete incremental builds is causing headaches for people
trying to chase performance issues in O with systrace (since it is
unclear that they need to do a clean build).

Reverting the dependency on PDX in atrace for now until the build system
issue is identified and fixed property. This change can be re-landed then.

Bug: 38201226
Change-Id: Ica0efc38f600295ef6f64b9f9584ac41cb84f424
trace/Android.bp
trace/atrace.cpp
4c8cc1c86a5ca613173b22e135cedb1c2b2e77c3 10-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Otapreopt: Work around bug 38186355" into oc-dev
ea694c6267a261dcd6580ee69bb590db21cbb9af 05-May-2017 Nicolas Geoffray <ngeoffray@google.com> Remove obsolete DEXOPT_SAFEMODE.

installd side of the change.

bug:37929796
Test: build
(cherry picked from commit bad623a225d0b3d94f30f8654bd4684969e90d4c)

Change-Id: Ice855d20184443a641e081efa4ec943326ccefdd
nstalld/installd_constants.h
12375069e753adea6c123fca7706b1018d358c92 10-May-2017 Andreas Gampe <agampe@google.com> Otapreopt: Work around bug 38186355

Temporarily also accept a malformed string for null.

Bug: 38186355
Test: m
Test: manual OTA
Change-Id: I19d527d04b86596551f7bed54221c67be06c34c7
nstalld/otapreopt.cpp
a0af34de9ef2449000343b468f4a056a91dcdbb6 03-May-2017 Nicolas Geoffray <ngeoffray@google.com> Handle safe mode in PackageManager.

installd side of the change.

bug:37929796
Test: manual OTA with a safemode app.

(cherry picked from commit be6ecd6f6141de1ecd4ec6eb5885bdd0f655fafa)

Change-Id: I43dcdd3fea3f62398f16f89348c1a2f1b4b1bb6d
nstalld/dexopt.cpp
6949ec68e7d249b2bcbc12dbe7577d826178c0b8 10-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Always unlink the out_vdex_file." into oc-dev
36a29f1be6b9998eb7d2704c667748d10e05db8b 10-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Always unlink the out_vdex_file." am: fbb09a7192 am: e5a1bc620b am: 2087818222
am: 0bc052e9bc

Change-Id: I3a7aaffbc0d4d7314a3765e9b9bfe02c438e3e29
0bc052e9bcd721607eb8b25e220edce2ce1bcb28 10-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Always unlink the out_vdex_file." am: fbb09a7192 am: e5a1bc620b
am: 2087818222

Change-Id: Iab9661cb66924b200263acaac4ce4f2876481a52
105e98780cfcf3145d6c53c57a41e924eb73bb05 09-May-2017 Nicolas Geoffray <ngeoffray@google.com> Always unlink the out_vdex_file.

Even if we pass the same vdex file as input and output to
dex2oat, make sure we unlink it if dex2oat failed.

bug:38113240
Test: manual, killing dex2oat invocation

(cherry picked from commit 7bb165779f59bfa1324ca991f64ab98331a410b5)

Change-Id: I157b3d33179b5bff1ca38750bee24aab01c5a19b
nstalld/dexopt.cpp
abaf14cd6f3873a2067e3573792dad362e130695 10-May-2017 Luke Song <songwalker@google.com> Merge "Move sensord" into oc-dev
am: 903726f55b

Change-Id: I6c55dc0e0e24b418cf33ec5e469f4c00411b63ce
903726f55bf57210bf6523dc909074f46c8c4e5a 10-May-2017 Luke Song <songwalker@google.com> Merge "Move sensord" into oc-dev
4591154fd7da2826e16fc13ebaf8d559ddd80b7d 10-May-2017 Steven Moreland <smoreland@google.com> lshal: remove "// static" comments

Test: pass
Change-Id: I4d710c8aaad87cfcd7896800a5ab24f812775703
shal/PipeRelay.cpp
c6201a6881808d1128c2d585e9d3b8197cd5742d 09-May-2017 Luke Song <songwalker@google.com> Merge "Move sensord"
7bb165779f59bfa1324ca991f64ab98331a410b5 09-May-2017 Nicolas Geoffray <ngeoffray@google.com> Always unlink the out_vdex_file.

Even if we pass the same vdex file as input and output to
dex2oat, make sure we unlink it if dex2oat failed.

bug:38113240
Test: manual, killing dex2oat invocation
Change-Id: I406014f97a2c3b2bd646e13b5d86dfa0eaa2692f
nstalld/dexopt.cpp
7b3e965ba587aaed4bb5ffefc98c72d63814d4dd 09-May-2017 Calin Juravle <calin@google.com> Merge "Do not return an error if the dalvik-cache odex is missing" into oc-dev am: d6ca10b76d
am: 5249e61342

Change-Id: Ie2da25c82e6979adc04486f17a71ca4a1d355f8c
5249e61342f5a88173a35c5eee710ed979c42846 09-May-2017 Calin Juravle <calin@google.com> Merge "Do not return an error if the dalvik-cache odex is missing" into oc-dev
am: d6ca10b76d

Change-Id: I0ff52940cbce928720fcdbb08ee0ad2da8a55be0
d6ca10b76d2d00d2b60bb186f71b125f917825b0 09-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Do not return an error if the dalvik-cache odex is missing" into oc-dev
249f2d3e018bd98eba74c3184b80bc91b04281cd 04-May-2017 Calin Juravle <calin@google.com> Do not return an error if the dalvik-cache odex is missing

Test: adb shell /data/nativetest/installd_service_test/installd_service_test
Tried uninstalling an updated version of prebuilt app.
Didn't find the error message in the logcat.
Bug: 35804241
Change-Id: Iec045fa9c9ac8f036785fe5cbd0f7e43f2b680c1
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_service_test.cpp
37ff431d6aace3ee42364e18b1e39b1a523556df 08-May-2017 Alex Klyubin <klyubin@google.com> Switch from libcrypto_static to libcrypto target

libcrypto target offers the same static library as libcrypto_static.
Thus, there's no need to use libcrypto_static.

Test: make dumpstate
dumpstate binary unchanged by this commit
Bug: 26160319

Change-Id: I62ca775870482386f0bb7ce1e2f8c94cf6f0342a
umpstate/Android.mk
bd32a5d7d27158cc31016fc1de39adf7ee2cd06f 08-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Remove obsolete DEXOPT_SAFEMODE."
bad623a225d0b3d94f30f8654bd4684969e90d4c 05-May-2017 Nicolas Geoffray <ngeoffray@google.com> Remove obsolete DEXOPT_SAFEMODE.

installd side of the change.

bug:37929796
Test: build
Change-Id: I358c0784a7b563cbd6ceaecdb80710971f483d02
nstalld/installd_constants.h
nstalld/otapreopt.cpp
ad7ab5959397785b1cbbbe41715b3a11289b1c3e 06-May-2017 Jeff Sharkey <jsharkey@google.com> Merge "Clear cached files on external storage." into oc-dev am: 4b567487b7
am: da58bf4b22

Change-Id: Iac74be908685c9d16c39a3178312eef091c7946c
da58bf4b22df3bc9d4941cf6dbea7f41ceacfc19 06-May-2017 Jeff Sharkey <jsharkey@google.com> Merge "Clear cached files on external storage." into oc-dev
am: 4b567487b7

Change-Id: Ib979f876c37632b723e6a982dc48ec746aaef290
4b567487b7372d6bc4bb3c697723f7f5d464966b 06-May-2017 Jeff Sharkey <jsharkey@google.com> Merge "Clear cached files on external storage." into oc-dev
1d3290a98e9069bd4d79ba9c9fb0dc0feceac306 13-Apr-2017 Luke Song <songwalker@google.com> Move sensord

Move service to more device-specific directory.

Bug: 36996994
Test: Build targets
Change-Id: Ie0befa422d6cc114826d6a7e145d7f8d4da61185
r/pose/Android.mk
r/pose/pose.cpp
4a9b7174ca37e95e6dd33594ca30c774c8866fa5 06-May-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix lshal --init-vintf may have empty <instance> tags."
d712f0ccc120357e1267a04ac6de9dd732b27e76 03-May-2017 Jeff Sharkey <jsharkey@android.com> Clear cached files on external storage.

When clearing cached files belonging to an app, include any cached
files on external storage. Since we need to keep sdcardfs in the
loop about any file deletions, we always mutate by going through the
sdcardfs layer instead of behind its back.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37486230, 37566983, 37913442, 37914374
Change-Id: If174bf7eaf682da83cf0ab1b4938fe9a5956d464
nstalld/CacheItem.cpp
nstalld/CacheTracker.cpp
nstalld/CacheTracker.h
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/utils.h
b6cc403149d8eaa2c892f8b999276d9463d73e8f 05-May-2017 Corey Tabaka <eieio@google.com> Merge changes from topic 'o-compositor-unification' into oc-dev am: 0e04fe4713
am: 21d661f3cc

Change-Id: I69641ef3f9792b0624dcba595cfd58ea97371fef
21d661f3cc2759fe99a3a6608834f6c558b43374 05-May-2017 Corey Tabaka <eieio@google.com> Merge changes from topic 'o-compositor-unification' into oc-dev
am: 0e04fe4713

Change-Id: Ie819585288871279d6de56290c7939b1c9ab63aa
0e04fe47130add878c12ee4db3c8cf1931efdda8 05-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'o-compositor-unification' into oc-dev

* changes:
Remove the VR compositor from the framework.
Remove unnecessary clients and rename files.
Support multiple consumer queues.
Return pdx::Status<T> from BufferHubQueue::Dequeue.
Add support for consumer queue initial import and hangup.
bbcbc50ac52d0e6313b388b5609a0a37eba6ec97 05-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove redundant dependencies" into oc-dev-plus-aosp
e5abacdd341bbf9f2d294c3f7ed1903dda7897e4 05-May-2017 Nicolas Geoffray <ngeoffray@google.com> resolve merge conflicts of 7827bcc3e to oc-dev-plus-aosp
am: 9175ac3b24

Change-Id: I9b1ccf3ae7c493277830824fa41fc6133d4ff8c8
9175ac3b242057d306b04a6f2f37fedace748b9b 05-May-2017 Nicolas Geoffray <ngeoffray@google.com> resolve merge conflicts of 7827bcc3e to oc-dev-plus-aosp

Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ib00772a1460f0d066366edec8df35831f1039ac3
7a45fd929acbd9a8fc673242c781190689db7683 05-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Handle safe mode in PackageManager."
2251d822dac2a96aad4184a6fdc2690f0a58af7c 21-Apr-2017 Corey Tabaka <eieio@google.com> Remove the VR compositor from the framework.

Remove the VR compositor framework and enable out-of-process VR composition
in VrCore.

This CL seems large due to the ripple effect of changing the VrFlinger
API and protocol types. There are three major modules that require
concurrent changes:
1. Protocol definitions and low-level VrFlinger API in libdisplay.
* Additional changes needed to keep old interfaces working for
a short time while replacing the dependent code (dvrGraphics*).
2. VrFlinger service implementation changes to support VrCore compositor
and the removal of the internal compositor.
3. Changes to libdvr platform library API due to changes in #1 and #2.

Because of the nature of the interdependence of types and other defs it is
difficult to break this CL into smaller chunks. However, review of the three
major modules (libdisplay, libdvr, and libvrflinger) may be done separately
to ease the mental burden on reviewers.

Change Summary:
- Remove obsolete screenshot service. VR screenshots will be implemented
by VrCore.
- Update display protocol definitions for changes in VrFlinger service
requirements. The majority of the changes in libdisplay are a
consequence of these protocol and service changes.
- Update VrFlinger to support two kinds of surfaces:
1. Application - use by VR apps.
2. Direct - used by VrCore (protected by permission check).
- Remove VrFlinger internal compositor and GL context.
- Remove obsolete debug console.
- Update VrFlinger hardware composer interface to handle direct
surfaces only, removing the concept of GPU (compositor) layers.
- Update display manager to expose access to application surface info
to VrCore (protected by permission check).
- Update libdvr platform library interfaces for changes to VrFlinger
API / protocol.
- Clean up libdvr API struct setup using a common include.
- Add C++ header-only helpers for DVR platform library opaque types.

Bug: 36401174
Test: Build; run VrFlinger display test tool.
Change-Id: I15abfde5f72dbb3725a3f58621486afba6b64902
r/vrscreencap/Android.mk
r/vrscreencap/vrscreencap.cpp
ceccaead53f9c19fedccb8f4e45dcaf30a46242b 05-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Revert "Set the atrace clock to boot when possible and mono otherwise."" into oc-dev am: 7fccc2079e
am: 40446e0e6d

Change-Id: Ibb1679f186c6ecfc76b6725ced164da0597c1663
40446e0e6df2011fb056127280b2d4ed33aaddfc 05-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Revert "Set the atrace clock to boot when possible and mono otherwise."" into oc-dev
am: 7fccc2079e

Change-Id: I183fd416c85c85ea1549eae2a417ef0a95b9a5bf
7fccc2079eb31dc37355e8f0658dedf83bb4cdd8 05-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Set the atrace clock to boot when possible and mono otherwise."" into oc-dev
a6cbf6bd42738cf7a753e60e0216f9f49f13ef1c 05-May-2017 Ajay Panicker <apanicke@google.com> Merge "Re-enable the zipping of bluetooth logs" into oc-dev am: cf2efe056b
am: a566e4b48e

Change-Id: I2ce50377dad4380492f96e6d808d8cad609b1ee2
a566e4b48e93ad1bf228aa454866d307175c26a0 05-May-2017 Ajay Panicker <apanicke@google.com> Merge "Re-enable the zipping of bluetooth logs" into oc-dev
am: cf2efe056b

Change-Id: Ic92f75300d6cf4ac928c778730e843e62f674dfc
cf2efe056b60a69e9e0fa6a90cac2d0eac96ac2a 05-May-2017 Ajay Panicker <apanicke@google.com> Merge "Re-enable the zipping of bluetooth logs" into oc-dev
dc34097448a76a4bb09636f25567113d7a6551dc 05-May-2017 Carmen Jackson <carmenjackson@google.com> Revert "Set the atrace clock to boot when possible and mono otherwise."

This change broke CTS tests.

This reverts commit 56a2ba0b0009b6a8db7c385489e5fef4c0d32d0a.

Bug: 37906221
Test: cts-tradefed run singleCommand cts-dev --module
CtsAtraceHostTestCases passes locally.
Change-Id: Ia82732eac33fbde8bddc1e8de7a68c20befe760e
trace/atrace.cpp
trace/atrace.rc
cedc84318532ee9b834ab90c8b3d02079a1c3627 04-May-2017 Steven Moreland <smoreland@google.com> Remove redundant dependencies

android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Iaf818c23d1929c81f83978fcf605a8f80e741294
(cherry picked from commit cf58afb7fccd7a073e0d34b08ccddc45ee1c1be9)
umpstate/Android.mk
cf58afb7fccd7a073e0d34b08ccddc45ee1c1be9 04-May-2017 Steven Moreland <smoreland@google.com> Remove redundant dependencies

android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Iaf818c23d1929c81f83978fcf605a8f80e741294
umpstate/Android.mk
cfaf9654cde11b21e82ea7f00e111e77dd4491df 04-May-2017 Tom Cherry <tomcherry@google.com> Merge "installd create_data_user_ce_path uses dir instead of symlink" am: f8af02fffa am: 21ea7683bc am: 906a243b4b
am: 4f23dd219d

Change-Id: Ibb02b9734bb58c893d92e18b66272f420f8cd476
4f23dd219d43e16ccf4c96030f10c435ead9e40c 04-May-2017 Tom Cherry <tomcherry@google.com> Merge "installd create_data_user_ce_path uses dir instead of symlink" am: f8af02fffa am: 21ea7683bc
am: 906a243b4b

Change-Id: I31741b3f6ead4a9468b56f779e459d76b3029537
f8af02fffa115431525460299dbe4e67ad030408 04-May-2017 Tom Cherry <tomcherry@google.com> Merge "installd create_data_user_ce_path uses dir instead of symlink"
06ceb02325f1e696c9b837fb18e9d78d716ed3a8 03-May-2017 Yifan Hong <elsk@google.com> Fix lshal --init-vintf may have empty <instance> tags.

Test: on bullhead, lshal --init-vintf | grep "<instance></instance>"

Change-Id: Ic6ab977adcdc5293015e9daba506b625629e5352
Fixes: 37311367
shal/Lshal.cpp
71cd87b7b8a93ae13a7b41b0b3f279c194c812f0 04-May-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal --init-vintf may have empty <instance> tags." into oc-dev am: 8d320dfc21
am: 0ec25acc1d

Change-Id: Ifc8e381a4c57f560031f412d9a89f68c19a1f08a
0ec25acc1d59225714cae14822d75b5ddf671974 04-May-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal --init-vintf may have empty <instance> tags." into oc-dev
am: 8d320dfc21

Change-Id: I896e63e4ed726a7c04149b858c5e33032a574093
8d320dfc21dcbc25d25b0adc4efb5517e5907a3e 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix lshal --init-vintf may have empty <instance> tags." into oc-dev
cb8c2b42e34a5781ee7e325f10be60bf3ff61403 03-May-2017 Yifan Hong <elsk@google.com> Fix lshal --init-vintf may have empty <instance> tags.

Test: on bullhead, lshal --init-vintf | grep "<instance></instance>"

Change-Id: Ic6ab977adcdc5293015e9daba506b625629e5352
Fixes: 37311367
shal/Lshal.cpp
50c3195e94d99c8515595a8f3926d2bd2b5cb8cc 03-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Remove newline from "capturing trace..."" into oc-dev am: 871795f9e4
am: ad54eeead7

Change-Id: I882fa14b30caea2fc75633a0f209795278db4c95
ad54eeead79f629d34b69a40d0e12cffa3aa7b02 03-May-2017 Carmen Jackson <carmenjackson@google.com> Merge "Remove newline from "capturing trace..."" into oc-dev
am: 871795f9e4

Change-Id: I4f97e3f42c35340505a8d7366cb28267428c2c41
871795f9e40f637a53edfad1c46ecca410696538 03-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove newline from "capturing trace..."" into oc-dev
d26ac3a3cffcc7a1622f90b738eba385bf35b867 03-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Revert "vndservicemanager: remove static dependency on libselinux"""
ed9d61aac9679c4945ee5a72b5d5fb865291ffff 03-May-2017 Steven Moreland <smoreland@google.com> Merge "Lshal: note debug in help" am: 1a1d34791e am: 8ddafb99ba am: 1b840019dc
am: 1a10d9d2b0

Change-Id: Iec16a5ce69754ac59b9c0e3acea5f7e58ee400d3
1a10d9d2b0522db5534c7db8f5a0d96a9cd11c1a 03-May-2017 Steven Moreland <smoreland@google.com> Merge "Lshal: note debug in help" am: 1a1d34791e am: 8ddafb99ba
am: 1b840019dc

Change-Id: I236e63e28858474bb0553941d0932421bc6d0cf3
1a1d34791e11ca76568c3d97c9d383b115bcdbc2 03-May-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Lshal: note debug in help"
c691f31ff87179c68682ddb81c1c067699de1a8b 03-May-2017 Sandeep Patil <sspatil@google.com> Revert "Revert "vndservicemanager: remove static dependency on libselinux""

This reverts commit 53625afa7c7264ad575a42cf9c292c919e4582f1.

The build errors introduced in original topic has now been fixed in
libselinux

Bug: 37343404
Bug: 37919668
Test: Build and boot.

Change-Id: I2c1baac221c9516ac9d3ef5317af19839c8f9af3
Signed-off-by: Sandeep Patil <sspatil@google.com>
ervicemanager/Android.bp
be6ecd6f6141de1ecd4ec6eb5885bdd0f655fafa 03-May-2017 Nicolas Geoffray <ngeoffray@google.com> Handle safe mode in PackageManager.

installd side of the change.

bug:37929796
Test: manual OTA with a safemode app.
Change-Id: I1cdb034b9e27b72ad606a4935172d0040364c380
nstalld/dexopt.cpp
9014ca88a9412cb1a1168ae842f30f8783ea1e3d 03-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "Disable input-vdex when doing speed-profile."" into oc-dev
8a6c3c6a05aa5a7e9c40fd0822b2e3a11d13c6a5 03-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "vndservicemanager: remove static dependency on libselinux""
53625afa7c7264ad575a42cf9c292c919e4582f1 03-May-2017 Nick Kralevich <nnk@google.com> Revert "vndservicemanager: remove static dependency on libselinux"

MAC builds have the following compile error:

Undefined symbols for architecture x86_64:
"_selabel_file_init", referenced from:
_initfuncs in label.o
ld: symbol(s) not found for architecture x86_64
clang.real: error: linker command failed with exit code 1 (use -v to see invocation)

Reverting patchset.

This reverts commit 53dfd407ce2729ff5653725a43bdad51e6dd274a.

Change-Id: I8ab4a14ad853a1bf13412a13371661a859a73df7
ervicemanager/Android.bp
6fb35106669d324a5d47d16f5d3604c6c123bb28 03-May-2017 Steven Moreland <smoreland@google.com> Lshal: note debug in help

Test: pass
Bug: 37725279
Change-Id: I2f43628e42f2cb334083dcb4f7d174100021a745
shal/Lshal.cpp
ac53e73bba9b311bc92e40a58ad98c5e65d49d17 03-May-2017 Carmen Jackson <carmenjackson@google.com> Remove newline from "capturing trace..."

Turns out this broke a test.

Bug: 37906221
Test: Compiled
Change-Id: I750a2831114071de2627da08de033cbe7924b51b
trace/atrace.cpp
97d66b57e3d34a7219c02a2d4141bfcb9c0e9490 02-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "vndservicemanager: remove static dependency on libselinux"
5209d80a2b45b55df6d0f0b32281b79d05f5c3a4 02-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Disable input-vdex when doing speed-profile."" am: eebbf2e371 am: b8d5b100d1 am: 87de761742
am: a4a4811a21

Change-Id: I8cf4a2efc2530854d442b34d73d75d724f2675f0
a4a4811a21941e2b8f008d4052256c4f3aaa08ef 02-May-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Disable input-vdex when doing speed-profile."" am: eebbf2e371 am: b8d5b100d1
am: 87de761742

Change-Id: I7cbceeec5137a31ba65055c7db5fa21a91333e4d
575fc2c3c8f67be2a258cf28f915c7c902f332d1 24-Apr-2017 Nicolas Geoffray <ngeoffray@google.com> Revert "Disable input-vdex when doing speed-profile."

https://android-review.googlesource.com/#/c/377754/ is fixing vdex and delayout.

bug: 37558732
Test: device boots, vdex works on OTA, input-vdex is passed
for speed-profile

This reverts commit a2dbefc7a51482acb8d5d139c9e2f01306ef9ceb.

(cherry picked from commit 3c95f2da655567d9fcc28d7a35dcc79d75cb61f6)

Change-Id: I4d36ec79ca681e20ffb181ec099ce5b229e38aed
nstalld/dexopt.cpp
eebbf2e371e04be0fcd33cf31a4f5ab0e9bd5048 02-May-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Revert "Disable input-vdex when doing speed-profile.""
63d8e566f7396884de830a0af358f0ad2c11f302 25-Apr-2017 Nicolas Geoffray <ngeoffray@google.com> Update installd to new compiler filters.

bug:34715556
Test: build and boot aosp bullhead

(cherry picked from commit 4b64ed991b23dc1215ce10fce69c3e2595dd34b7)

Change-Id: Ib94bda97ed131878c3be092d58920500d2d8d556
nstalld/dexopt.cpp
c9c0075bda100a08b1ee17f328d8567b462fcc28 02-May-2017 Steven Moreland <smoreland@google.com> Merge "Remove redundant dependencies" am: c0a1cdc42b am: 03a732f115 am: 3f6c37a537
am: a15009cdaa

Change-Id: I6ebf26ff6453e32fbe6799d04fcff23c763834ac
a15009cdaa8fcf3bd665d9df1dc8c3fe90d81796 02-May-2017 Steven Moreland <smoreland@google.com> Merge "Remove redundant dependencies" am: c0a1cdc42b am: 03a732f115
am: 3f6c37a537

Change-Id: I68b0cc52156d23c8a49bdca58c60e2ede744b6c8
c0a1cdc42bc2242ba12c8da98c2adf8c43c338a9 02-May-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove redundant dependencies"
70a39e7b791192ea1e7e3d29dfda7efb363e6bf7 18-Apr-2017 Yifan Hong <elsk@google.com> Fix lshal not to squash HAL entries incorrectly.

Bug: 37311367
Test: lshal --init-vintf
Change-Id: I693b53f5f342c7600e4031d020792fd347e3ae83
shal/Lshal.cpp
53dfd407ce2729ff5653725a43bdad51e6dd274a 01-May-2017 Sandeep Patil <sspatil@google.com> vndservicemanager: remove static dependency on libselinux

libselinux_vendor is part of VNDK. No need to statically link
to it anymore.

Bug: 37343404
Test: Build and boot
Test: 'vndservice list' to ensure all services are listed as before

Change-Id: I5b3151f44f7b77ce0f2ff4bba38550a3d7e35375
Signed-off-by: Sandeep Patil <sspatil@google.com>
ervicemanager/Android.bp
8f72688c456283ed1d72036bdd0dedc9d52682aa 01-May-2017 Steven Moreland <smoreland@google.com> Remove redundant dependencies

android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: Ia22e134d3882f2e503e540dda332fc17213b6bb0
trace/Android.bp
shal/Android.bp
107d668f54862917007f13aa5bd6d277348b7ae1 29-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "Set the atrace clock to boot when possible and mono otherwise." into oc-dev am: e721536ec7
am: fce874a9aa

Change-Id: I17305a489ed6e8ef40cfc85a8d1221f95645d129
fce874a9aa5d3486bb392e0424a81d21da7e8659 29-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "Set the atrace clock to boot when possible and mono otherwise." into oc-dev
am: e721536ec7

Change-Id: I17dbc1323605d130d71ede6c1f61f471678ebed2
56a2ba0b0009b6a8db7c385489e5fef4c0d32d0a 28-Apr-2017 Carmen Jackson <carmenjackson@google.com> Set the atrace clock to boot when possible and mono otherwise.

Bug: 32379831
Test: Inspected the trace_clock while running atrace, without including the .rc file change:
$ adb shell
marlin:/ # cat /d/tracing/trace_clock
[local] global counter uptime perf mono boot
marlin:/ # atrace --async_start freq
capturing trace...
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
marlin:/ # atrace --async_stop > /dev/null
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
marlin:/ # exit

Test: Inspected the trace_clock while running atrace, after the .rc file change:
$ adb shell
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]
marlin:/ # atrace --async_start freq
capturing trace...
marlin:/ # cat /d/tracing/trace_clock
local global counter uptime perf mono [boot]

Change-Id: I9ec88df109b311b90c9d88fe3a70f9ce090b4d15
trace/atrace.cpp
trace/atrace.rc
2ff8e87d906365a9b786ac6829b901ca2798bb68 27-Apr-2017 Ajay Panicker <apanicke@google.com> Re-enable the zipping of bluetooth logs

Bug: 35998031
Test: Enable snoop logs in developer settings then take a bugreport
Change-Id: Id17c27a659b3e53a0435867ce76fa3de110f1c0c
umpstate/dumpstate.cpp
4a3e28f4cb2963ca129bdc679d462a72c3b36872 27-Apr-2017 Vijay Venkatraman <vijaykv@google.com> Merge "Change vndservicemanger's dep on libselinux to libselinux_vendor"
503625097fd57570abd68b11fe564d2f578bc5bb 27-Apr-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Update installd to new compiler filters." am: f41404045a am: d9cfce8e4d am: 685d22015a
am: 91582cd2a5

Change-Id: I17208bed9c2cc0ddacc81d093126e679ba0cd178
91582cd2a5f19cdba19886717bf75a36e6ca6b2a 27-Apr-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Update installd to new compiler filters." am: f41404045a am: d9cfce8e4d
am: 685d22015a

Change-Id: I6679c0a2c8ad13ce22d9ac877f394153b6fae433
3c95f2da655567d9fcc28d7a35dcc79d75cb61f6 24-Apr-2017 Nicolas Geoffray <ngeoffray@google.com> Revert "Disable input-vdex when doing speed-profile."

https://android-review.googlesource.com/#/c/377754/ is fixing vdex and delayout.

bug: 37558732
Test: device boots, vdex works on OTA, input-vdex is passed
for speed-profile

This reverts commit a2dbefc7a51482acb8d5d139c9e2f01306ef9ceb.

Change-Id: I8fcab30ec617b39769fbf7e5818e5d503d647fb4
nstalld/dexopt.cpp
b0d9d26d8aadf36c240899797e48f0bf820e1204 27-Apr-2017 Jaekyun Seok <jaekyun@google.com> Merge "Newly create idmap only when it is outdated" into oc-dev am: bb54a7df3a
am: b148c4ba6b

Change-Id: I7018b71e8a710580822095c0b87853e0f877ecd8
b148c4ba6b5c35e4d2ef214d22eac1ed9a4ef25d 27-Apr-2017 Jaekyun Seok <jaekyun@google.com> Merge "Newly create idmap only when it is outdated" into oc-dev
am: bb54a7df3a

Change-Id: Ia6ffd48aeaf1b3d0de2294115d3769b82f950a51
bb54a7df3a42d4beeb5fd99e01369415a7d1c24c 26-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Newly create idmap only when it is outdated" into oc-dev
1d091465334784adeded4ef182cc6f732eb6f99e 19-Apr-2017 Jaekyun Seok <jaekyun@google.com> Newly create idmap only when it is outdated

For now, OverlayManagerService calls Installd.idmap() whenever a user
is changed, and then a idmap is re-generated even though there are no
changes on its target apk and overlay apk.
This CL is to avoid such unnecessary re-generation of idmap. Instead
only a group id will be updated when the idmap isn't outdated.

Test: building succeeded and tested on sailfish.
Bug: 37179531
Change-Id: Id726cbbc621bd64f2a329798b2ab5436f0c28d70
nstalld/InstalldNativeService.cpp
bd70b6815015af63dae96953ec000d6a05c28aca 26-Apr-2017 Corey Tabaka <eieio@google.com> Merge changes from topic 'atrace-pdx' into oc-dev am: 961c83c865
am: 5c8e63db1d

Change-Id: I7d5f4521a66eb15730cb435dd29b110d348171b4
5c8e63db1d561f93e14aa618bdfdc274be2ec451 25-Apr-2017 Corey Tabaka <eieio@google.com> Merge changes from topic 'atrace-pdx' into oc-dev
am: 961c83c865

Change-Id: Iec4a030890bf1c9d88b4c220ea476fdc29ede0b9
961c83c8653a37e751e73bed9947b1ecb7ba3bc7 25-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'atrace-pdx' into oc-dev

* changes:
atrace: Poke PDX services using utility class.
libpdx: Add service poke logic to ServiceUtility.
6561fb6f46fced31995cd632c7431ad51f7a0e36 25-Apr-2017 Vijay Venkatraman <vijaykv@google.com> Change vndservicemanger's dep on libselinux to libselinux_vendor

Bug: 37343404
Test: Build vndservicemanager with BOARD_VNDK_VERSION set
Change-Id: Ibdb0872a8f1342a533524eb43cfb6ec13a6d1d0c
ervicemanager/Android.bp
4b64ed991b23dc1215ce10fce69c3e2595dd34b7 25-Apr-2017 Nicolas Geoffray <ngeoffray@google.com> Update installd to new compiler filters.

bug:34715556
Test: build and boot aosp bullhead
Change-Id: If10fb8cdfe34f109d4caa1df56a49304025da553
nstalld/dexopt.cpp
f73768c0ce1c41303daa1a563ac86e5bf786673f 13-Apr-2017 Luke Song <songwalker@google.com> Move sensord

Move service to more device-specific directory.

Bug: 36996994
Test: Build targets
Change-Id: Ie0befa422d6cc114826d6a7e145d7f8d4da61185
r/pose/Android.mk
r/pose/pose.cpp
7e8662f3b9aee3858323ce68fd19e75676d9d17d 22-Apr-2017 Chia-I Wu <olv@google.com> Merge "dumpstate: add graphics composer to hal_interfaces_to_dump" into oc-dev am: 5a0cb643da
am: 9e078a6bf9

Change-Id: I6c3021c19b17153991053f32df48ddb269272fc0
9e078a6bf9b739a5d31847a65583cffe31768354 22-Apr-2017 Chia-I Wu <olv@google.com> Merge "dumpstate: add graphics composer to hal_interfaces_to_dump" into oc-dev
am: 5a0cb643da

Change-Id: I446ff2f8b709c9f4d5de3604f6d43756529501ae
5a0cb643daf917dde3cc89ea8d2bc94a39410fd8 22-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: add graphics composer to hal_interfaces_to_dump" into oc-dev
108c0f0dec94e2651eafd452b01d5c98ccc114c7 20-Apr-2017 Chia-I Wu <olv@google.com> dumpstate: add graphics composer to hal_interfaces_to_dump

Bug: 37152880
Test: adb shell dumpstate
Change-Id: Id9679d0f02350bc4f51b11b250c7703703dbdfe7
umpstate/utils.cpp
578b37554e44687737e050283749892cdc7b49ac 21-Apr-2017 Jeff Sharkey <jsharkey@google.com> Merge "Fix external cache and secondary user bugs." into oc-dev am: c419dc56ac
am: 31725a7409

Change-Id: I3a8d07b94d5cf410b628c3f3f66a1b94e0cb6e1b
31725a74096afffce194fa777516f77320f3e58e 21-Apr-2017 Jeff Sharkey <jsharkey@google.com> Merge "Fix external cache and secondary user bugs." into oc-dev
am: c419dc56ac

Change-Id: I9ef878cecaf84e577a24aeba1735d62c9541a2b4
c419dc56ac64daf0fc24a10e98f4131a089d7101 21-Apr-2017 Jeff Sharkey <jsharkey@google.com> Merge "Fix external cache and secondary user bugs." into oc-dev
f70680e995d6df4604c9b34f6a5afebe613d7feb 15-Apr-2017 Corey Tabaka <eieio@google.com> atrace: Poke PDX services using utility class.

Poke PDX services to enable tracing in stand-alone services.

Bug: 37432968
Test: build; run systrace with gfx flag; observe bufferhubd traces.
Change-Id: Id03a82fa51c6ca7c595ecc29c15a742295c53d46
trace/Android.bp
trace/atrace.cpp
1961fa21bd732cb2fd169539c89bd2e1f31e8368 20-Apr-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal not to squash HAL entries incorrectly." am: 665173c59d am: 167edf54a0 am: 09ccaa169e
am: e776177295

Change-Id: Iabc3f1e6808a7c6a491da7b9da3888548dba69a9
d66d2c4f010241f15ed0d73312ac7ca566624af3 20-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Fix count" into oc-dev am: e620d805d8
am: 68e58c45a8

Change-Id: Ib51503fc8778f1b0b3858d9b92cfb3dfb869c040
e7761772950f92197f9bad6012f9bd138d8a3eaa 20-Apr-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal not to squash HAL entries incorrectly." am: 665173c59d am: 167edf54a0
am: 09ccaa169e

Change-Id: I1867070622cf8799859db748e6ca8bb6aadf7ed3
665173c59d2bc213bb4946e5e2167dc79f3faaa7 20-Apr-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal not to squash HAL entries incorrectly."
68e58c45a8ae0c2bb53b45bd4689896cb1184c8d 20-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Fix count" into oc-dev
am: e620d805d8

Change-Id: Ifc134fd806137d09ed7ac914ea37769e0c1d92ad
e620d805d8d4668233464807cce51a8f623aab21 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Otapreopt: Fix count" into oc-dev
e313f5a6c6a802701a4233e327c67240bbeac497 20-Apr-2017 Dan Cashman <dcashman@google.com> Merge "Reflect removal of vndservice_manager SELinux object manager." into oc-dev
am: fbc73bf092

Change-Id: Id4517f15bb8e95e19c975eccc6a57dc95c9a8535
fbc73bf092bdbdb4ae2f91e3fe0b806dc34785a5 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reflect removal of vndservice_manager SELinux object manager." into oc-dev
f6594e48a8b05b4da3ced55a22ba2af734f753a6 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Convert libreplayer to blueprint"
d4bee96663229cd6c36e77821893d25566d4246c 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Reflect removal of vndservice_manager SELinux object manager."
6f9b54aa84a5f7aabd6f777c67a159ef8a8d0ec6 19-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Add non-profile fallback" into oc-dev am: c211793ac6
am: 533a393631

Change-Id: I5d9684ac6f9f82e851302732590f5f39dd82c0e0
533a393631774a85f09d6b37e5b8908841610f45 19-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Add non-profile fallback" into oc-dev
am: c211793ac6

Change-Id: Ia5382234efcb715e7c58fac62eb1400055a41f04
c6968f31253ddd413880ee4866e78c35b835065b 05-Apr-2017 Fabien Sanglard <sanglardf@google.com> Convert libreplayer to blueprint

Bug: 34095715
Test: Manual and AUPT
Change-Id: Iad825598fa4035508789c895fc90da52b86e39fb
urfacereplayer/Android.bp
urfacereplayer/proto/Android.bp
urfacereplayer/proto/Android.mk
urfacereplayer/replayer/Android.bp
urfacereplayer/replayer/Android.mk
urfacereplayer/replayer/Main.cpp
645e79cb279575b569bd308e7dfb09645e19d0dd 19-Apr-2017 Andreas Gampe <agampe@google.com> Otapreopt: Fix count

Don't count null for argc.

Bug: 37158297
Test: m
Test: OTA pre-versioned -> OTA versioned
Change-Id: I378b0b7b445f34c766460182d724d6abd84ff773
nstalld/otapreopt.cpp
89aeee442b539f60b5b6611657ac379c65aa7a96 19-Apr-2017 Jeff Hao <jeffhao@google.com> Fix passing --classpath-dir to dex2oat for split apks.

Merged wrong version of CL in by mistake. CL should have been
cherry-picked from cc5c4e32637601432bc6359fb7ff34e4cadb6502.

Bug: 34169257
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

Change-Id: Ibebcdce1c9ab0de3254727c8dfc3d0de18932f1c
nstalld/dexopt.cpp
99d7da990339a91a9cc78fb491a1356809890755 19-Apr-2017 Jeff Hao <jeffhao@google.com> resolve merge conflicts of d3b56698c to oc-dev-plus-aosp

Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iae7fc90e9281102fb32dcc214838f590b9576f7a
c211793ac645c969a437e63ead11947f888d2bec 19-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Otapreopt: Add non-profile fallback" into oc-dev
10b8a6e72c5b1c2eef4e5657dd0927f0c1623fff 06-Apr-2017 Jeff Hao <jeffhao@google.com> Run dex2oat from the staged apk directory.

The frameworks/base change makes the PackageManager pass relative paths
of previous code paths as shared library paths. This change passes the
base directory for these relative paths to dex2oat using the new switch
--classpath-dir.

Part of a multi-project change.

Bug: 34169257
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

(cherry-picked from commit cc5c4e32637601432bc6359fb7ff34e4cadb6502)

Change-Id: I8f941eb9982a051c1f49256d5489f2575af1d80f
nstalld/dexopt.cpp
bba4b8a1fdd288d3d638963066209a632347b4fc 19-Apr-2017 Jeff Hao <jeffhao@google.com> Merge "Run dex2oat from the staged apk directory." am: 296d91edc8 am: 7b30832493
am: 27167f9cd0

Change-Id: I3fe2a1e60a8fd3a8e6726940249e523837ddb733
bb26dd29563d90f25aa55b79a32203f0cebc1dc0 18-Apr-2017 Dan Cashman <dcashman@google.com> Reflect removal of vndservice_manager SELinux object manager.

(preemptive cherry-pick of commit: 2762a7833ffc68cb731be53730e2364920a9d041
to avoid merge conflict)

Bug: 34454312
Bug: 36052864
Test: policy builds and device boots.
Change-Id: Ic2aebb15f4ae9085bf2cb440cceef6b4beb5ddc5
ervicemanager/service_manager.c
b39d2f093242fe03772b540c031e914e857b9dc2 18-Apr-2017 Andreas Gampe <agampe@google.com> Otapreopt: Add non-profile fallback

Slightly refactor compilation flow. Add a fallback option: if the
compilation fails and was profile-guided, attempt a non-profile-
guided compilation. This makes A/B OTA more robust to profile
format changes.

Bug: 37256688
Test: m
Test: manual OTA N -> O
Change-Id: I20c4b44a87c0f7faa8920abdae01e39379405eca
nstalld/otapreopt.cpp
a084fcdcd052d71e8205a2eea0955911b99160b9 18-Apr-2017 Jeff Sharkey <jsharkey@android.com> Fix external cache and secondary user bugs.

External cache files now have their own GID range, so measure using
those quotas. Fix secondary user code measurement, since it always
lives under user 0. Fix secondary user data measurement in manual
mode; we need to match based on appId instead of pure UID.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 35812899, 35844919, 37193650
Change-Id: Ic3b153798164c33ea10e8a4dabc65edff26c56ca
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/utils.h
9ee841f0944dde330bb8e466e808941081b187ed 18-Apr-2017 Yifan Hong <elsk@google.com> Fix lshal not to squash HAL entries incorrectly.

Bug: 37311367
Test: lshal --init-vintf
Change-Id: I693b53f5f342c7600e4031d020792fd347e3ae83
shal/Lshal.cpp
4887469691aec31d7e01893cdc989d1fe33e9591 06-Apr-2017 Jeff Hao <jeffhao@google.com> Run dex2oat from the staged apk directory.

The frameworks/base change makes the PackageManager pass relative paths
of previous code paths as shared library paths. This change passes the
base directory for these relative paths to dex2oat using the new switch
--base-dir.

Part of a multi-project change.

Bug: 34169257
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

Merged-In: Ic20aa0b6a80104d0759ac84df3eb89570604e53f
(cherry-picked from commit cc5c4e32637601432bc6359fb7ff34e4cadb6502)

Change-Id: I29e6e7365654cc1a538272591356e2253d6ec0e4
nstalld/dexopt.cpp
f575552320c63859f29af65c4e0e5b79fd4770df 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "atrace: Don't NPE if we can't access hal-related tracepoint files." into oc-dev am: 638fc1f809
am: c35a2c6514

Change-Id: I3f97bed1c56b8ed47fe93489aea575a018494795
c35a2c65144b32f578db91746d982195f47f48dc 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "atrace: Don't NPE if we can't access hal-related tracepoint files." into oc-dev
am: 638fc1f809

Change-Id: I5c6fa1f459c84c45d00f1047aee09fdf921cf345
638fc1f8099a0ffb5f11787552c6c18002ae607e 19-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "atrace: Don't NPE if we can't access hal-related tracepoint files." into oc-dev
000dd99ef84411150828b8e678e5c78653896146 19-Apr-2017 Jeff Hao <jeffhao@google.com> Merge "Run dex2oat from the staged apk directory."
c94bf016848146668976c76d7bb216d83568895b 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "Add atrace_userdebug.rc to enable some tracepoints for userdebug only." into oc-dev am: 932dc64614
am: c65c9d0aff

Change-Id: I6e850d894254ad4adebcd06e2c6ca86bd6ada95e
c65c9d0affb46d68ca9971c9dddd633445907231 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "Add atrace_userdebug.rc to enable some tracepoints for userdebug only." into oc-dev
am: 932dc64614

Change-Id: I944f3c8c0b1a1f4c191cf616ddff22f67d4f2b14
932dc64614f29f53701766fed0c07c8cf592ccf1 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> Merge "Add atrace_userdebug.rc to enable some tracepoints for userdebug only." into oc-dev
7320612aeb8674a63106299f2cba5d23df1ca03b 19-Apr-2017 Carmen Jackson <carmenjackson@google.com> atrace: Don't NPE if we can't access hal-related tracepoint files.

This currently NPEs when Traceur attempts to start a trace.
Based on b/34242478, this is currently expected and we should fail
gracefully instead.

Bug: 37281960

Test: Starting a trace using Traceur on a userdebug build succeeds.

Change-Id: I082d5750625dec0e1db4a1dd341dc332d8dd752f
trace/atrace.cpp
2762a7833ffc68cb731be53730e2364920a9d041 18-Apr-2017 Dan Cashman <dcashman@google.com> Reflect removal of vndservice_manager SELinux object manager.

Bug: 34454312
Bug: 36052864
Test: policy builds and device boots.
Change-Id: Ic2aebb15f4ae9085bf2cb440cceef6b4beb5ddc5
ervicemanager/service_manager.c
75d4e57dfa11a5fcc99a260facf71309945ade67 11-Apr-2017 cjbao <cathy.bao@intel.com> installd create_data_user_ce_path uses dir instead of symlink

Select whichever is real dir instead of symbolic link from either
/data/data or /data/user/0. This is to minimize path walking overhead
in kernel.

Test: Manual test
Change-Id: Ie06640624746ff40a2b5b47ead50a7f10eb2db3e
Signed-off-by: cjbao <cathy.bao@intel.com>
nstalld/utils.cpp
280fd61a39747854a8537cc4beaf8e9eaef46cd6 18-Apr-2017 Andreas Gampe <agampe@google.com> OtaPreopt: Add version support am: c4ced4f015
am: c7ad3fb016

Change-Id: Idd15bb1f5cb2004acbfe69eef75d8cf888aeb2ff
c7ad3fb016e53ba7b67f73f57fb83798302fefe8 18-Apr-2017 Andreas Gampe <agampe@google.com> OtaPreopt: Add version support
am: c4ced4f015

Change-Id: I79b9057f781751623dc321f280e6b4680aa1f952
d0644d285868bfd6db59c8777412f911b8c19d32 18-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Remove param count checking in otapreopt_chroot" into oc-dev am: d537b474ee
am: 565a1f1411

Change-Id: Idd6c6ae8ad0a46c06b7bf44b1a790135b1c17099
565a1f1411869adc8619bb4335b82ddbd89f51f8 18-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Remove param count checking in otapreopt_chroot" into oc-dev
am: d537b474ee

Change-Id: I7e5c65821858225b0ff818e8c45409e5703fd2cd
c4ced4f015ef5ba66cc89440c89369190448a4e0 15-Apr-2017 Andreas Gampe <agampe@google.com> OtaPreopt: Add version support

Add versioning to otapreopt:

Give up on having otapreopt being a mostly-ignorant frontend to a
blackbox dexopt function. Remove the dexopt helper taking a char*[], and
replace with a direct call to the typed signature.

Add support for a versioned dexopt command. The current version is
"2." An unversioned command string is either version "1" (N) or
version "2" (O pre-versioning).

Translate version 1 to version 2 by
* filter DEXOPT_OTA
* override dexopt_needed to DEX2OAT_FROM_SCRATCH
* add null se_info

Bug: 37256688
Test: m
Test: Manual OTA N (v1) -> O (v2)
Test: Manual OTA O (pre-versioning) -> O (v2)
Test: Manual OTA O (v2) -> O (v2)
Change-Id: I9fff673f3ba99833e88cf1c5c9625f42436ec150
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/otapreopt.cpp
dd315948dbfa02ca4262ca5bb0e29e25b95803ad 17-Apr-2017 Yifan Hong <elsk@google.com> Merge "Update to allow multiple HALs in a manifest."
c093d3a68143f73b0ad89678874086e2b84a5675 14-Apr-2017 Andreas Gampe <agampe@google.com> Otapreopt: Remove param count checking in otapreopt_chroot

Pass on parameters without a check. This will simplify future updates.

Bug: 37256688
Test: m
Test: manual OTA
Change-Id: I9db3749856a1281a777136436ce255c5dd7f7f3c
nstalld/otapreopt_chroot.cpp
c33832c4fa12d0f14b3891f2d3723f6d226b4a76 16-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix use-after-free issue caught by ASAN." into oc-dev am: 6e03e0e348
am: 430e440ed1

Change-Id: I520b35131a0cd9fc6416179af43ffacaafe2118a
430e440ed179cab8003b9184f0e3841bef6f0387 16-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix use-after-free issue caught by ASAN." into oc-dev
am: 6e03e0e348

Change-Id: I0703e88bfc8b28268b6773b4f3da7c4c51ddd765
a35161d6ce3caf08caa1719bfd262ad9c1ee5413 16-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix profile disk space accounting bugs." into oc-dev am: c729b02742
am: 93603cb0b3

Change-Id: I6bb9279597e155d4ae8d1bf2cedbb210245cf0b1
f6ee444ed0e6c1744075153a89384d934a4346bc 16-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Hopefully fix funky SELinux labels." into oc-dev am: a4a729ebd0
am: 87116bd078

Change-Id: Iaba40d8f89084ecfd5c2ce7e5f8b188698c87975
6e03e0e348a09154c35058e12d26383efdbc57a1 16-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix use-after-free issue caught by ASAN." into oc-dev
a46e2f840b5574b0c6cf633fadebc9f66f76194b 13-Apr-2017 Yifan Hong <elsk@google.com> Update to allow multiple HALs in a manifest.

Test: libvintf_test
Test: lshal --init_vintf

Bug: 37294247
Change-Id: I202787d7856db6e06e595bd52c644f6a0eefcb66
shal/Lshal.cpp
93603cb0b35e537f41feeb8b2bd5846a7cae9b21 16-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix profile disk space accounting bugs." into oc-dev
am: c729b02742

Change-Id: I0674abcd30ca457c438698e39a9c3473d313b999
87116bd078da66d9d3b15367f519a28b15aa9d2a 16-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Hopefully fix funky SELinux labels." into oc-dev
am: a4a729ebd0

Change-Id: I9d4f644acb310bcd45c0959e154799f474c1cb28
c729b027424807e58db4f8fa82b2296624024f2b 16-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fix profile disk space accounting bugs." into oc-dev
7b6c840c4281aeb2cc42ed022d1708fec0cda2ec 15-Apr-2017 Jeff Sharkey <jsharkey@android.com> Hopefully fix funky SELinux labels.

We've seen reports of cases where DE storage cache directories are
missing the SELinux category information, so explicitly offer to
restorecon those directories to fix the labels.

This matches what we're already doing for CE storage.

Test: builds, boots
Bug: 35991539
Change-Id: I0eb6df801e933fbb005e3f8fdfe57a4e5ce3313d
nstalld/InstalldNativeService.cpp
06a6184da6c2d80ea8a30f7cf827ecdfe191622d 15-Apr-2017 Jeff Sharkey <jsharkey@android.com> Fix profile disk space accounting bugs.

Profile data is only stored on internal storage (it doesn't move to
adoptable devices), so only count it when asking about internal
storage (which has a null UUID).

Also fix bug where "current" profile data was being double-counted
for apps.

Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
Bug: 36102172, 36101738
Change-Id: I22b82e8cfb3bf1be1155fb827a538c21f09d88eb
nstalld/InstalldNativeService.cpp
d9ff77fa4b934b54e287ba259cb02a0eee0d9ce8 15-Apr-2017 Jeff Sharkey <jsharkey@android.com> Fix use-after-free issue caught by ASAN.

Keep strong references to std::string objects around while we're
actively using them in fts_open().

Test: builds, boots
Bug: 36975037
Change-Id: Icd7cba5852a01f0a1015e7d0d7dcd3087fa44ae8
nstalld/InstalldNativeService.cpp
4acf7caeea570592fce569718df791aa2b047d3f 14-Apr-2017 Carmen Jackson <carmenjackson@google.com> Add atrace_userdebug.rc to enable some tracepoints for userdebug only.

These tracepoints are currently approved by security for userdebug only
(see linked bug).

These are enabled for use in Traceur, which is currently only available
for userdebug builds.

Bug: 37110010
Test: Compiled and installed for userdebug and verified correct permissions
for a file in atrace.rc as well as a file in atrace_userdebug.rc:

(atrace_userdebug.rc)
$ adb shell ls -al /sys/kernel/debug/tracing/events/workqueue/enable
-rw-rw-rw- 1 root shell 0 1970-01-01 00:00 /sys/kernel/debug/tracing/events/workqueue/enable

(atrace.rc only)
$ adb shell ls -al /sys/kernel/debug/tracing/trace_clock
-rw-rw-r-- 1 root shell 0 1970-01-01 00:00 /sys/kernel/debug/tracing/trace_clock

Test: Compiled and installed a user build and verified correct
permissions for the file modified in atrace.rc, but that
atrace_userdebug.rc was not executed:

(atrace_userdebug.rc)
$ adb shell ls -al
/sys/kernel/debug/tracing/events/workqueue/enable
-rw-r--r-- 1 root root 0 1969-12-31 19:00

(atrace.rc
$ adb shell ls -al /sys/kernel/debug/tracing/trace_clock
-rw-rw-r-- 1 root shell 0 1969-12-31 19:00
/sys/kernel/debug/tracing/trace_clock

Change-Id: Ifb0ce9942a2e7a48f480b46bf944fcbc69c1707d
trace/Android.bp
trace/atrace_userdebug.rc
e7810641404fe3c54ce0631c2b151a97dff6a59b 14-Apr-2017 Mathias Agopian <mathias@google.com> get rid of IGraphicBufferAlloc am: 0556d79eac
am: ebddb4e7d3

Change-Id: Ied42b454fcc5e8e36bc2cdf0e11848679fe926a3
5dc656563a67b326dedd0a2c493d7f40df504c55 14-Apr-2017 Yifan Hong <elsk@google.com> Merge "Update to allow multiple HALs in a manifest." into oc-dev am: 1011062e1a
am: 4d94d79af9

Change-Id: I181b8de3dd56192b0c17e2ae245daa8e58ccc26e
ebddb4e7d316e6c60b741c02538125d1a59e98ea 14-Apr-2017 Mathias Agopian <mathias@google.com> get rid of IGraphicBufferAlloc
am: 0556d79eac

Change-Id: I9b76eac770fc7585ea73a8497ae04e22ad5b9eec
0556d79eacbf0c9978080d87aa4075120533c7ef 22-Mar-2017 Mathias Agopian <mathias@google.com> get rid of IGraphicBufferAlloc

Buffers can now be allocated directly through
the graphic allocator HAL.

Test: marlin: run full camera cts
Test: angler: take screenshot, take photo w/ and w/o HDR, video, panorama, refocus, slo-mo
Bug: 36462585
Bug: 36333314
Change-Id: Ie5222c53c3b9462e0ac7a41568718aad131eb328
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
4d94d79af9180128c6afdb97df3e01f21e4df4bb 14-Apr-2017 Yifan Hong <elsk@google.com> Merge "Update to allow multiple HALs in a manifest." into oc-dev
am: 1011062e1a

Change-Id: I3ed6dfa6daa5750a1c5262431fb876fa5203a824
1011062e1ac5d0a15ae99108eed2add6c77c3e8f 14-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update to allow multiple HALs in a manifest." into oc-dev
bdb0b553d32c4d1728a5c5903de77a3790de904d 13-Apr-2017 Calin Juravle <calin@google.com> Merge "Fix installd test" into oc-dev am: 22651020b5
am: 0cda84cdd0

Change-Id: I81db663d4a37928e264fa4c09f479d743868adc7
0cda84cdd00e40d033dd45761ffc81e356f20f99 13-Apr-2017 Calin Juravle <calin@google.com> Merge "Fix installd test" into oc-dev
am: 22651020b5

Change-Id: I6ce8ae2c3550786fe876ce59beb5f29214b05bba
22651020b544bbfc665cd0bb29048b728459f4a4 13-Apr-2017 Calin Juravle <calin@google.com> Merge "Fix installd test" into oc-dev
5f5fde019855511c7dffbc8312d4d68c512a1d65 13-Apr-2017 Yifan Hong <elsk@google.com> Update to allow multiple HALs in a manifest.

Test: libvintf_test
Test: lshal --init_vintf

Bug: 37294247
Change-Id: I202787d7856db6e06e595bd52c644f6a0eefcb66
shal/Lshal.cpp
a40b6e3f5229ccc98660b1bee3461b523d91f0ea 13-Apr-2017 Calin Juravle <calin@google.com> Fix installd test

CreatePrimaryCurrentProfile was using the wrong userid for the expected
value.

Test: adb shell /data/nativetest/installd_utils_test/installd_utils_test
Bug: 36101738
Change-Id: I80b8212d09a0e4b600c00f85ac604a0e5fa1cc11
nstalld/tests/installd_utils_test.cpp
094fb32aa804ce6bb953dfa0f267c144e9b35824 13-Apr-2017 Martijn Coenen <maco@google.com> Merge "Link vndservicemanager against libselinux statically." into oc-dev am: 94f2ea67c5
am: 3cd279c9d7

Change-Id: Ifa52fd35c520f2a81f098dd3e9451451c6236408
3cd279c9d79169b9d2d848f46b16f75bb43e6790 12-Apr-2017 Martijn Coenen <maco@google.com> Merge "Link vndservicemanager against libselinux statically." into oc-dev
am: 94f2ea67c5

Change-Id: I824ad4f11704c5bf95f12e7b0ffeaa9ddc23f78d
1b1df2f44c67110c73a793f7257f84eda7ba3f39 12-Apr-2017 Josh Gao <jmgao@google.com> Merge "atrace: don't use sendfile." am: c1c9354ad8 am: 86504eb9e6 am: 3ec7db90cc
am: 14e05af4ae

Change-Id: I283d36ef5622885226dfa46191eee210cd8a3cde
14e05af4ae1edaffabdfce3658e57df1fbc7a705 12-Apr-2017 Josh Gao <jmgao@google.com> Merge "atrace: don't use sendfile." am: c1c9354ad8 am: 86504eb9e6
am: 3ec7db90cc

Change-Id: I4f57aaf2b483a98631bb746b77cecfacf52298b1
a5f53b053f87234a8a73008e6358297a261a34fe 12-Apr-2017 Martijn Coenen <maco@google.com> Link vndservicemanager against libselinux statically.

Bug: 37189668
Test: vndservicemanager works
Change-Id: I8187fb86371d5a2073287beb6b17e263eedfb17b
ervicemanager/Android.bp
fd126d3a9a0439c73076155ccad26c9904362325 12-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Check dexopt return status before retry" into oc-dev am: d3ef230cac
am: 90e3fee90b

Change-Id: I682dfa11741c43fe99073004c8530a6b15f46f45
90e3fee90b45a2327f08fca5622e6570cf65aae1 12-Apr-2017 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Check dexopt return status before retry" into oc-dev
am: d3ef230cac

Change-Id: I581bf4250a6ed5f86b2f1c6c417cb6c337fda7c6
d3ef230cac44b4d225c277d2fcfe59ba79dc9b65 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Otapreopt: Check dexopt return status before retry" into oc-dev
2ba516d8b8dcdfd679df041873f1d1dd98eb905e 12-Apr-2017 Hendrik Wagenaar <hendrikw@google.com> Merge "Convert the pose buffer into a more generic named buffer" into oc-dev am: ee7cb1b5b8
am: ddbf5daffc

Change-Id: Ib32993c0eb368e2f937dd8968797da20f437a603
ddbf5daffc6caae76451895be28e79dc15e36404 12-Apr-2017 Hendrik Wagenaar <hendrikw@google.com> Merge "Convert the pose buffer into a more generic named buffer" into oc-dev
am: ee7cb1b5b8

Change-Id: I6d1024468e2ee1d4343edab7badfcf5aaf1b8a4d
54e1a402610d7f392f7e421dcafcf6b017a99d88 21-Mar-2017 Andreas Gampe <agampe@google.com> Otapreopt: Check dexopt return status before retry

Only retry compilation (triggering a wipe and boot image regeneration)
when dex2oat failed in runtime creation.

(cherry picked from commit 2c925927ee7524086965be324e614c9041126085)

Bug: 36336122
Test: m
Test: Device boots
Test: Can install apps
Test: Can run A/B OTA
Change-Id: I1a2ae3a871a926002980acd8b7fa777fe8f7d739
nstalld/Android.mk
nstalld/otapreopt.cpp
eaa5522feac452703a0836310047d4b15702487d 06-Apr-2017 Hendrik Wagenaar <hendrikw@google.com> Convert the pose buffer into a more generic named buffer

* It's likely that we'll have more than one pose buffer
* It's cleaner to separate the vsync info into a separate buffer

Bug: 37001881
Bug: 37240552
Test: Added and manually ran TestNamedBuffersSetup
Change-Id: I76621d3cfa8c21c9d5d1e6e648854067673be9ab
r/vrscreencap/Android.mk
d3d36e71f274a1f6df1eb77db5a6abfb12035c75 12-Apr-2017 Josh Gao <jmgao@google.com> atrace: don't use sendfile.

sendfile appears to have horrendous performance when used with the
ftrace output file, being up to 100x slower than the naive read/write
loop.

Switch to doing that instead, speeding up atrace from:

$ atrace --async_start sched freq; sleep 1; time atrace --async_stop > dummy
c apturing trace... 0m08.93s real 0m00.08s user 0m07.98s system

to:

$ atrace --async_start sched freq; sleep 1; time atrace --async_stop > dummy
capturing trace... 0m00.78s real 0m00.07s user 0m00.21s system

Bug: http://b/37164190
Test: atrace --async_start sched freq; sleep 1; time atrace --async_stop > dummy
Change-Id: I22fe1871e263867f9ac54c8f5b474df824b4bc69
trace/atrace.cpp
cc5c4e32637601432bc6359fb7ff34e4cadb6502 06-Apr-2017 Jeff Hao <jeffhao@google.com> Run dex2oat from the staged apk directory.

The frameworks/base change makes the PackageManager pass relative paths
of previous code paths as shared library paths. This change passes the
base directory for these relative paths to dex2oat using the new switch
--classpath-dir.

Part of a multi-project change.

Bug: 34169257
Test: cts-tradefed run singleCommand cts -d --module
CtsAppSecurityHostTestCases -t android.appsecurity.cts.SplitTests

Change-Id: Ic20aa0b6a80104d0759ac84df3eb89570604e53f
nstalld/dexopt.cpp
dc26a5d91571e88e0884203a8b99e52bd39449f0 10-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Get a hack in place for broken quotas." into oc-dev am: 99dfb8a646
am: 6df1c78ad0

Change-Id: Ic37d8fd86a326be3cf38fef6e28129c6f5637d65
6df1c78ad020228bbea8b29f8ec975c1f1e84fb9 10-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Get a hack in place for broken quotas." into oc-dev
am: 99dfb8a646

Change-Id: I20dc12745c89e2bf55aa21ef91c0ec37e57d2a49
ec1be62c18b216901d738be0ccc8a05aab8edef0 10-Apr-2017 Jeff Sharkey <jsharkey@android.com> Get a hack in place for broken quotas.

Sadly we mixed together both UID and GID quotas in such a way that
we couldn't detangle the actual data-vs-cache usage in all cases.

Temporarily patch over this to get CTS passing until we can circle
back and try again.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 36731175, 37193650
Change-Id: I5870b4e9c22398762fc47672e4d5d78c06bef79f
nstalld/InstalldNativeService.cpp
nstalld/utils.h
2b77417fe6292970fa36bd50a94c43caece31636 07-Apr-2017 Martijn Coenen <maco@google.com> Merge "Add separate 'vndservice' binary." into oc-dev am: cde29667e4
am: ed0f34693d

Change-Id: I0b9cff8eacbfb4dbb2b42539205aa741cfdaafc5
ed0f34693df545a420f6b846fb33c06965cd8e54 07-Apr-2017 Martijn Coenen <maco@google.com> Merge "Add separate 'vndservice' binary." into oc-dev
am: cde29667e4

Change-Id: Iae0d0a37df6afdbd9f99b139afbcd6aa8a8c0c5a
3def1f2d8212d44527f5de0c22874326239a0a13 07-Apr-2017 Martijn Coenen <maco@google.com> Add separate 'vndservice' binary.

This is installed on the vendor partition,
and can be used to call into vndservicemanager
and the services it hosts.

Bug: 36987120
Test: vndservice list works
Change-Id: I2d72312276cd4402ee1b399713cd5322b125b00f
ervice/Android.bp
ervice/service.cpp
1d3a06e67b872d1f3e402c2dcd68596475461f87 07-Apr-2017 Martijn Coenen <maco@google.com> Merge "Add option to list vndservicemanager services." into oc-dev am: 6463f888ed
am: 0963a43d81

Change-Id: Ic93f3128cf11bc98c9c5b37868b8cd0ea4ae0465
0963a43d81effcc088ccc451999727bbfb65ce88 07-Apr-2017 Martijn Coenen <maco@google.com> Merge "Add option to list vndservicemanager services." into oc-dev
am: 6463f888ed

Change-Id: Iead3573a7bb2537ffbcaded7fabf29732d0d0bf0
6463f888ed7eccf4012798fcbf8e49a24e5193e0 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add option to list vndservicemanager services." into oc-dev
9c13a8e7b168d1422e338d1ef938b2b0aac554d3 07-Apr-2017 Calin Juravle <calin@google.com> Merge changes from topics 'seinfo', 'public_dex' into oc-dev am: 1f639435da
am: 17fc9f4338

Change-Id: I9edc270561a9096ed73d09f27c1f49ea6ff2d314
0db1d961b6ef819c8d3979b2f884d936e77102fd 07-Apr-2017 Calin Juravle <calin@google.com> Fix permission for public secondary dex files am: ebc8a79bbc
am: 31000a4011

Change-Id: If3e7afc374c478597fddbce8b8849812278b9d7e
17fc9f43387532f3f3628cbb4fd942e90700b96a 07-Apr-2017 Calin Juravle <calin@google.com> Merge changes from topics 'seinfo', 'public_dex' into oc-dev
am: 1f639435da

Change-Id: I02a2f1b5aef05f91d3766f28e2394b3091fcc1a1
31000a40112f935fb47b7b770c89c353638b36bb 07-Apr-2017 Calin Juravle <calin@google.com> Fix permission for public secondary dex files
am: ebc8a79bbc

Change-Id: Iee64f192d00ab1a2e106493ba827e11f85748959
1f639435da6d9f5402c95f5c2e68b24ab4a67eb7 07-Apr-2017 Calin Juravle <calin@google.com> Merge changes from topics 'seinfo', 'public_dex' into oc-dev

* changes:
Restore selinux labels for secondary dex oat directory
Fix permission for public secondary dex files
0f0f298dc4bb3aaccabdb43520ef9bf561d44477 07-Apr-2017 Martijn Coenen <maco@google.com> Merge "vndservicemanager: use separate SELinux class." into oc-dev am: 8385d60c69
am: 6049b8455a

Change-Id: Ie27f835ea9bdf3c87bab6068002e50418a18a005
6049b8455a28e338a5a173a2803ea5def7ed1a21 07-Apr-2017 Martijn Coenen <maco@google.com> Merge "vndservicemanager: use separate SELinux class." into oc-dev
am: 8385d60c69

Change-Id: Iccac8bab23f6f2ad081d2661e68dc5b81cbb294f
8385d60c694cbdbe16053cbb9403106a2ccfa15b 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "vndservicemanager: use separate SELinux class." into oc-dev
cb556e340b50d16e8fac41b0c69d8d35bd7915f9 05-Apr-2017 Calin Juravle <calin@google.com> Restore selinux labels for secondary dex oat directory

Bug: 36896515
Test: adb shell cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms
adb shell ls
/data/user_de/0/com.google.android.gms/app_chimera/m/0000000c/oat/arm64/
-Z
youtube loads gms modules without extracting from apk

Change-Id: I4e12a6f532a1442a840e3ed8d01b98dd9a328eb6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
6196e0ae116b6af8ab5a0a8ce4a9b03fe9cf4c06 06-Apr-2017 Scott Randolph <randolphs@google.com> Merge "Use explicit .c_str() for hidl_string" into oc-dev am: 0005f132ce
am: 0730b35b18

Change-Id: Ibc0f8650ddde7d0e555a5aef48cf1b3e2c76324e
4339a83c0f840fcfaa0bcd45f0aeb2d3d7675b63 06-Apr-2017 Martijn Coenen <maco@google.com> vndservicemanager: use separate SELinux class.

For doing access control.

Bug: 36052864
Test: device boots
Change-Id: I263679ed4532ec52b1e64e5e60bdc064b7484073
ervicemanager/service_manager.c
0730b35b187e05e112135efc73f40174cc3063c5 06-Apr-2017 Scott Randolph <randolphs@google.com> Merge "Use explicit .c_str() for hidl_string" into oc-dev
am: 0005f132ce

Change-Id: I16d601dd262aa1ac2c60f38d7d3658085ee0c7b1
0005f132ceef28184e9a3fd33cc313134b99d220 06-Apr-2017 Scott Randolph <randolphs@google.com> Merge "Use explicit .c_str() for hidl_string" into oc-dev
ebc8a79bbc00759307bed9142b60cff1e35d79e0 05-Apr-2017 Calin Juravle <calin@google.com> Fix permission for public secondary dex files

- make the oat directory accessible by others
- if the dex files is readable by others and we are not doing a speed-
profile compilation make the oat file readable by others.

Bug: 36896515
Test: adb shell cmd package compile -r bg-dexopt --secondary-dex com.google.android.gms
check that the oat directory and files have the right permissions

Change-Id: I1829217004353fb8c86e5a6b7eb570555e36a495
nstalld/dexopt.cpp
865764f19aa90ca82dac5a4478a251a83ba622f9 06-Apr-2017 Yifan Hong <elsk@google.com> Merge "lshal --init-vintf stripped <impl> tag." into oc-dev am: 7ad6b13213
am: faa6510ac5

Change-Id: Iee908794803aedfb423d2cd7c765d7fdd6cde9b9
faa6510ac59cfb7b88a098830f01e4ed983a43ad 06-Apr-2017 Yifan Hong <elsk@google.com> Merge "lshal --init-vintf stripped <impl> tag." into oc-dev
am: 7ad6b13213

Change-Id: Ib463dd6572229c3e09a17482f318b36825ed6547
7ad6b13213fa09b7af396512f226c65b4bc4eaf2 06-Apr-2017 Yifan Hong <elsk@google.com> Merge "lshal --init-vintf stripped <impl> tag." into oc-dev
fab4ea32ace8992903536da66e62d97204d73eac 05-Apr-2017 Yifan Hong <elsk@google.com> lshal --init-vintf stripped <impl> tag.

<impl> tag is deprecated from the manifest.

Test: lshal --init-vintf
Change-Id: Ifa9336e3dfe7f1091ee61aa6a10df9629ad98b49
shal/Lshal.cpp
d6480caf4d58ff5060fa2fb20a3384bd2bcd38dc 05-Apr-2017 Martijn Coenen <maco@google.com> Add option to list vndservicemanager services.

Test: adb shell service list -v
Bug: 36987120
Change-Id: I081a0c725ddb4175f4ab43714c25cc41ed2239a3
ervice/service.cpp
1c7ea13b84ff41aa07000e88aba287d378d03c96 05-Apr-2017 Sandeep Patil <sspatil@google.com> Merge "dumpstate: don't read /proc/interrupts" into oc-dev am: f806b87fe1
am: 1609cf9920

Change-Id: I8fd2916e308d911978de06789a9eceaa0d7a3ea7
1609cf9920cc35a89dda655accfe0022238775fa 05-Apr-2017 Sandeep Patil <sspatil@google.com> Merge "dumpstate: don't read /proc/interrupts" into oc-dev
am: f806b87fe1

Change-Id: I1bd0811c428c2492e7f1a1a98e598ac675d6d00d
f806b87fe1b1b5864507af6c96cfb79923769643 05-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: don't read /proc/interrupts" into oc-dev
8c61104ef3479d8a11f455f1af5ab0e8409d305e 05-Apr-2017 Adrian Roos <roosa@google.com> Merge "dumpstate: add dropbox crashes to bugreport" into oc-dev am: 77e270d0ff
am: 000017be4c

Change-Id: I99b7cc93796efb0ab1d56585d9f266b37cb077be
000017be4c54f1f89ff1980affeac5f711fb17cd 05-Apr-2017 Adrian Roos <roosa@google.com> Merge "dumpstate: add dropbox crashes to bugreport" into oc-dev
am: 77e270d0ff

Change-Id: I5ae4acc8377c87c4a581929f81899a1693f602d7
77e270d0ffbcc90b839b821bc24a308362f9e146 05-Apr-2017 Adrian Roos <roosa@google.com> Merge "dumpstate: add dropbox crashes to bugreport" into oc-dev
8b397ab3d6ad2ff23897b3743fe51325e15ffaf6 05-Apr-2017 Adrian Roos <roosa@google.com> dumpstate: add dropbox crashes to bugreport

Adds system crashes from the dropbox to the end of the bugreport
to allow diagnosing issues even after the device has rebooted.

Test: adb bugreport
Bug: 36852229
Bug: 26849505
Change-Id: I11589b81208e916d25d543c43c1283bdbffda949
umpstate/dumpstate.cpp
a199d5264f64f1324c784b17b82919f448672e2c 05-Apr-2017 Yifan Hong <elsk@google.com> lshal --init-vintf stripped <impl> tag.

<impl> tag is deprecated from the manifest.

Test: lshal --init-vintf
Change-Id: Ifa9336e3dfe7f1091ee61aa6a10df9629ad98b49
shal/Lshal.cpp
82debadaabf9c39a6015a1f8fd3648b1e377d13a 21-Mar-2017 Sandeep Patil <sspatil@google.com> dumpstate: don't read /proc/interrupts

/proc/interrupts may be dumped by dumpstate HAL if required.
The framework dependency on this file is unnecessary, since the
interrupt names are hardware / kernel dependent anyway.

Bug: 36486169
Test: 'adb shell bugreport' on sailfish
Change-Id: I336318b24ce4bcc5b710645359b7c4ccda3f6989
Signed-off-by: Sandeep Patil <sspatil@google.com>
umpstate/dumpstate.cpp
06042bde8b6066217c27a81b532f412f897c898f 04-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Offer to "fixup" GIDs used for app data." into oc-dev am: e7353ae5fc
am: c87da92c89

Change-Id: I2c8cc61639eee1ccd5ec54c9e6e27e33d919af53
c87da92c89f8bf786f112d4f9d9f82eb31c81df2 04-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Offer to "fixup" GIDs used for app data." into oc-dev
am: e7353ae5fc

Change-Id: I7b0b11c6b47fdd09f3f36bd77714065f917b87cd
e7353ae5fcf8608507c7ee424b5869c4ed391920 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Offer to "fixup" GIDs used for app data." into oc-dev
5a0c485ecb91c0ece910db8dba31c6f013207ede 03-Apr-2017 Scott Randolph <randolphs@google.com> Use explicit .c_str() for hidl_string

hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class. It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug: 36532780
Test: Build the tree
Change-Id: Icfa77d2d505d527f5c9484ea73d2e596ccd810af
umpstate/utils.cpp
a2c60be15950ba2009aa97c88963b04ce079a740 04-Apr-2017 Martijn Coenen <maco@google.com> Merge "vndservicemanager: load vendor service_contexts." into oc-dev am: 42aca5a0d3
am: 321948ffb0

Change-Id: If9b5674dc5cc5112f28b28914b5a632de4281e03
321948ffb09818753e9591a7816fdf01fd46aa12 04-Apr-2017 Martijn Coenen <maco@google.com> Merge "vndservicemanager: load vendor service_contexts." into oc-dev
am: 42aca5a0d3

Change-Id: Icd22fb964cb05f17232b7637eaf86e3120d88897
42aca5a0d3cae3f1fb416a0170ff339bd763c71c 04-Apr-2017 Martijn Coenen <maco@google.com> Merge "vndservicemanager: load vendor service_contexts." into oc-dev
f13c2eb22a0fae2c25e205a7d5a5af8ed4633100 04-Apr-2017 Keun-young Park <keunyoung@google.com> Merge "add surfaceflinger and servicemanager to animation class" into oc-dev am: f60ab4119e
am: 3eb271e3b8

Change-Id: I9410131f144c374f08411411153cd03a0b2a1438
3eb271e3b8d2626ad82057f1ed7a37ee2b2645fe 04-Apr-2017 Keun-young Park <keunyoung@google.com> Merge "add surfaceflinger and servicemanager to animation class" into oc-dev
am: f60ab4119e

Change-Id: Ib85f6365b77709576023afadd9b5465cfc755e99
f60ab4119e64c642f519ef7994482e72bd11f0cb 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "add surfaceflinger and servicemanager to animation class" into oc-dev
e12d5964a8d14abe7f2eb6e57469cbe7f7391a19 04-Apr-2017 Jeff Sharkey <jsharkey@android.com> Offer to "fixup" GIDs used for app data.

We recently started tracking cached app data using a per-app GID for
the "cache" and "code_cache" directories and their contents. For
upgraded devices, we ideally want to "fixup" the GIDs of any existing
data while the device is still showing the boot animation, instead of
blocking the user when they unlock the device.

Since all the information we need is available in metadata, we can
update GIDs before the user has unlocked data. We're pretty paranoid
and we only pivot between the normal app GID and the cache GID; any
other GID values are ignored.

This "fixup" method can also be used in the future to ensure
consistency of the files on disk. Also fix bug by always using
"fts_path" instead of "fts_accpath" which is based on racy chdir().

Test: /data/nativetest/installd_service_test/installd_service_test
Bug: 34201111, 35084485
Change-Id: Ia52694f3763cba09926082c08f0766477e03e39c
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/tests/Android.bp
nstalld/tests/installd_service_test.cpp
nstalld/utils.cpp
nstalld/utils.h
31361232e1e7965d00c638ead2903f08f168f1c9 01-Apr-2017 Martijn Coenen <maco@google.com> vndservicemanager: load vendor service_contexts.

Also, don't crash when /dev/vndbinder is not
accessible.

Bug: 36052864
Test: loads vendor service contexts
Test: doesn't crash without /dev/vndbinder, works with it
Change-Id: Ida9dd94791206e14246348a8b8e66be09ed8fca7
ervicemanager/Android.bp
ervicemanager/service_manager.c
c97b1558ff53a70e99f4643c89b6c06bb95ec766 03-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "We really want f_frsize." into oc-dev am: 623912183d
am: f0a5d271b4

Change-Id: Ie1bd22bb85bdaec4434ffd22183f51c62145e4ce
f0a5d271b4d70410fe6e9fd2b0d0058f7d4cd3dc 03-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "We really want f_frsize." into oc-dev
am: 623912183d

Change-Id: I735d29c3f09a3c8ebc44d11539aba836254502d6
623912183d8314595b37cdedc7c193a21c345bdb 03-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "We really want f_frsize." into oc-dev
103752a946098f0cf030011463ad5927a7d2927d 03-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Define upper-bound disk quotas for all apps." into oc-dev am: c86462b7c0
am: 83d8363b72

Change-Id: I6f8955505f51de3077e369c5a3a46185bf826b8a
83d8363b72fb1be57b1ace78f844c893f6771c19 03-Apr-2017 Jeff Sharkey <jsharkey@android.com> Merge "Define upper-bound disk quotas for all apps." into oc-dev
am: c86462b7c0

Change-Id: I1ea5db7d8f556fbc04d300fcc4fe8532ea349610
c86462b7c02b65353a81bbf0f06f60089dd5839c 03-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Define upper-bound disk quotas for all apps." into oc-dev
a836c472f017f09cf16fa68176df461a4958d22a 03-Apr-2017 Jeff Sharkey <jsharkey@android.com> We really want f_frsize.

It's confusing, but f_bsize is not the value you're looking for; the
real block size is f_frsize. Fix all those bugs.

Test: builds, boots
Bug: 36840579
Change-Id: I2846b8998c27f3e9a71dbf573a0a22158215a3bd
nstalld/tests/installd_cache_test.cpp
nstalld/utils.cpp
e59c85cc0e78bfcc8fec6acc8e37e6a472ffc07f 03-Apr-2017 Jeff Sharkey <jsharkey@android.com> Define upper-bound disk quotas for all apps.

Abusive or broken apps can go crazy and try allocating all of the
disk space on the device. To mitigate the impact on system health,
set hard limits to block any given app from using more than 90% of
disk blocks, or 50% of disk inodes.

Also define the hard limit for AID_MEDIA_RW to avoid filling up the
device via the SD card.

Kick QUOTAON when scanning devices, since ext4 doesn't toggle
DQUOT_LIMITS_ENABLED during initial mount.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.EnvironmentTest#testSaneInodes
Bug: 36450358
Change-Id: Iaa2bc6a2f0bc9047ee54c1d1a49bbda92142457a
nstalld/InstalldNativeService.cpp
nstalld/utils.cpp
c49e7908b322b5c96d9029783493af965ec28edc 01-Apr-2017 Tony Mak <tonymak@google.com> Merge "Add UID in bugreport" into oc-dev am: 42f1c7b9cb
am: 0e8a2988b1

Change-Id: I3dcf6cf9060db3e2e4204ffed752d16e61e314d1
0e8a2988b173b339aa19e9cdf08113d03099c468 01-Apr-2017 Tony Mak <tonymak@google.com> Merge "Add UID in bugreport" into oc-dev
am: 42f1c7b9cb

Change-Id: Iaeae8f0b96fd472c696099de6743a7b7add11712
dac30b4bbfba384148a906d0b973500ce5c78882 23-Mar-2017 Keun-young Park <keunyoung@google.com> add surfaceflinger and servicemanager to animation class

- necessary for running shutdown animation

bug: 36526187
Test: many reboots

Change-Id: Id26f5747a8903e91db8499093a489409dcafa129
ervicemanager/servicemanager.rc
aa0ed7e0093dcb59107ecf5870a774db60d8e6c0 31-Mar-2017 Dan Shi <dshi@google.com> Merge "Add test config to dumpsys_test" am: cf617abcb2 am: c19f57f08e am: e678a5ad0a
am: 0922a9395c

Change-Id: I5f9e22a6eef80d97dc8f5bcbca05e65014f0f147
0922a9395c65f2e68dce70ed5170d87443bb2f1b 31-Mar-2017 Dan Shi <dshi@google.com> Merge "Add test config to dumpsys_test" am: cf617abcb2 am: c19f57f08e
am: e678a5ad0a

Change-Id: Ia879ceb72a4d8ba3763b026bf42cfa08ea81ca9c
c19f57f08e52e97afd96f33d8fd3d56d9561681d 31-Mar-2017 Dan Shi <dshi@google.com> Merge "Add test config to dumpsys_test"
am: cf617abcb2

Change-Id: I6257e48eeaf89e26ff4c46e69dd20941dae58392
cf617abcb242313e8b1407486d00a041415ba196 31-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add test config to dumpsys_test"
d468bb72e3648fc10ee42db2aaa9cc9824951d3f 31-Mar-2017 Richard Uhler <ruhler@google.com> Merge "Remove obsolete and unused PATCHOAT_FOR_RELOCATION." am: 804b145356 am: 55cfd8607f am: 766381b582
am: 59a6166322

Change-Id: Id4b5a3f11d61f6d568b152ad077ac7a77ffb8f42
59a6166322bef076824b5d07c8d58dfe21390c0a 31-Mar-2017 Richard Uhler <ruhler@google.com> Merge "Remove obsolete and unused PATCHOAT_FOR_RELOCATION." am: 804b145356 am: 55cfd8607f
am: 766381b582

Change-Id: Ia46753ab12f575ddff835b5aee30fa25fa0f3619
55cfd8607fe0d3b32b2db24ff31a321b481515ef 31-Mar-2017 Richard Uhler <ruhler@google.com> Merge "Remove obsolete and unused PATCHOAT_FOR_RELOCATION."
am: 804b145356

Change-Id: I0c9a38e9be249bcb81f7b04b436a00d60b779fc5
804b145356a00301f3d1c3d03fafe23f599e554c 31-Mar-2017 Richard Uhler <ruhler@google.com> Merge "Remove obsolete and unused PATCHOAT_FOR_RELOCATION."
ae7376516dd9f57137408f11e5fdcc53a15d4d8b 30-Mar-2017 Tony Mak <tonymak@google.com> Add UID in bugreport

Test: adb bugreport, found uid in logcat.

Change-Id: I90ab10adb05fe835a6ce74bddb0f1b88aacd22a7
Fix: 36339235
umpstate/dumpstate.cpp
34d2c2cc3a931dd67d185c9f20b98deba54952cb 30-Mar-2017 Richard Uhler <ruhler@google.com> Remove obsolete and unused PATCHOAT_FOR_RELOCATION.

Bug: 33192586
Test: m
Change-Id: I7868402804935c27e896229371480c7a120e2477
nstalld/dexopt.h
f6b5a52871cd8b3a5434d5124559e92a8387e6ed 30-Mar-2017 Dan Shi <dshi@google.com> Add test config to dumpsys_test

Design doc:
Generalized Suites & the Unification of APCT & CTS Workflows Design/Roadmap
https://docs.google.com/document/d/1eabK3srlBLouMiBMrNP3xJPiRRdcoCquNxC8gBWPvx8/edit#heading=h.78vup5eivwzo

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
Change-Id: Icfbf76319b42959a0a65c5f8666744420fd5266c
umpsys/tests/Android.bp
umpsys/tests/AndroidTest.xml
30c768217c676b9582a014e6a17bd78f0ab3cfa4 29-Mar-2017 Andreas Huber <andih@google.com> Merge "Use lshal's new --debug option when emitting bugreports." into oc-dev am: 91cfa880a3
am: cada705736

Change-Id: I0b0a3fab511d84b2402a6bd31d9d321e954f6921
cada705736b5f502043bd16c48e80a503d176c8b 29-Mar-2017 Andreas Huber <andih@google.com> Merge "Use lshal's new --debug option when emitting bugreports." into oc-dev
am: 91cfa880a3

Change-Id: Iea0611f40d9a5fa4bf38d631a0b6565655af87d0
91cfa880a3b1076c79a2b1ac0791890bcdd098a1 29-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use lshal's new --debug option when emitting bugreports." into oc-dev
56aec3cf81a91b4371d0e89eeb17e4145520e417 29-Mar-2017 Elliott Hughes <enh@google.com> Merge "Remove references to property size limits." am: 8f8daca7ab am: 75500cc6fd am: 624f84956b
am: 22cc9245f1

Change-Id: Icabe7e4b4726e3b204bb08829dd0434c8d00e8f3
22cc9245f1eb4b9bf70d85b95c860db0d3f0c615 29-Mar-2017 Elliott Hughes <enh@google.com> Merge "Remove references to property size limits." am: 8f8daca7ab am: 75500cc6fd
am: 624f84956b

Change-Id: Ibddf32a6fbf37988755d08eef31135749af29089
75500cc6fda99823c78e93ea93a738f3fd0d485b 29-Mar-2017 Elliott Hughes <enh@google.com> Merge "Remove references to property size limits."
am: 8f8daca7ab

Change-Id: I146d719f51f6337abe13fc96b7e99fd7c4aebdcf
8f8daca7ab43c0c3ebd043eec2c1829d280b5a14 29-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove references to property size limits."
5fd6ff6b7670cce9ed17e06764db59d44ba15575 28-Mar-2017 Elliott Hughes <enh@google.com> Remove references to property size limits.

Bug: http://b/33926793
Test: "python systrace.py"
Change-Id: Ia11c160935b8601bc9c4d867abc57ccf37f84082
trace/Android.bp
trace/atrace.cpp
32320b4670dbcab0f376ef309b5961194a6a5431 28-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add test config to bugreportz, dumpstate_test_fixture and surfaceFlinger_test"
d6fec26403c690bb4deac60c1c0a4ef3f42d8845 28-Mar-2017 Felipe Leme <felipeal@google.com> Temporarily skipping dump of bluetooth logs. am: 3ae337c4a1
am: 3f02408dca

Change-Id: I96d2e706f3283d53be6c727d6f208916930526f9
e395f0e0d4aee69de980652494a572e2b6b531d8 28-Mar-2017 Luke Song <songwalker@google.com> Merge "Interesting pose modes"
3ae337c4a12f3fa32a87663e6d8b736bcc136692 28-Mar-2017 Felipe Leme <felipeal@google.com> Temporarily skipping dump of bluetooth logs.

Bug: 35998031
Test: manual verification
Change-Id: I0bdf6eb1546c0850b301441f48753b65fa7b1e5e
umpstate/dumpstate.cpp
69ec3ac3e761042f0c5e1e708c161d2df3c6db2b 23-Mar-2017 Andreas Huber <andih@google.com> Use lshal's new --debug option when emitting bugreports.

This calls into live binderized services and logs their "IBase::debug(...)"
output.

Bug: 36520620
Test: make, adb shell lshal, adb shell bugreport
Change-Id: I421e30e74c82817adf276b5750ce40038852df83
umpstate/dumpstate.cpp
af307711f2f096e9cd1f8507eec3a28827a211e1 27-Mar-2017 Dan Shi <dshi@google.com> Add test config to bugreportz, dumpstate_test_fixture and surfaceFlinger_test

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
Change-Id: I1a9ebedc1b4286a3489596af60185071bd68de10
ugreportz/Android.mk
ugreportz/AndroidTest.xml
umpstate/Android.mk
umpstate/AndroidTest.xml
5f8e45a196836c1db2cc8f3a748c63f0e26b2f99 28-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove legacy cache clearing logic."
1cb4aafc17daae520a5c3a991f59605ea3ee4ee5 28-Mar-2017 Jeff Sharkey <jsharkey@android.com> Remove legacy cache clearing logic.

It was riddled with funky memory access, and it's been fully replaced
by the new V2 logic.

Test: builds, boots
Bug: 27948817, 36655947
Change-Id: Ic5f0636c414ccf5ccf56eb50fea321b6688a83a0
nstalld/InstalldNativeService.cpp
nstalld/utils.cpp
nstalld/utils.h
ebe113fa06bda30eb1efbb51f48dd6aec5053288 27-Mar-2017 Andreas Huber <andih@google.com> Merge "Enable --debug option for "lshal" command." am: 16175ca725 am: 674d3acd18
am: 829f3c6d85

Change-Id: I6751fec855783983b96672bec82ae9ba0c737a8b
674d3acd18a2efb251ae97b77c3e6207ef8742c2 27-Mar-2017 Andreas Huber <andih@google.com> Merge "Enable --debug option for "lshal" command."
am: 16175ca725

Change-Id: Ifa29afcb7677a3ec76a03d5f0365ba4de7ee4c9b
78ac0c5c5fea3f6cd2d3ddc9e76d54b2267f118f 18-Mar-2017 Luke Song <songwalker@google.com> Interesting pose modes

Pose source experiments from earlier, adapted to work in
PoseService::UpdatePoseMode(). Might be fun to test things on.

Bug: None
Test: adb shell pose --mode=<motion_sickness OR flying>
Change-Id: If488fcb250c35b6ab7df27890f705efde3e0e3cd
r/pose/pose.cpp
28d35913d5324dd520d80d9b6afdd0698afa8fd4 24-Mar-2017 Andreas Huber <andih@google.com> Enable --debug option for "lshal" command.

This calls into live binderized services and logs their "IBase::debug(...)"
output.

Bug: 36520620
Test: make, adb shell lshal, adb shell bugreport
Change-Id: Ida3b0c61eafd9f3de562a5df3af24bbaf383de22
shal/Android.bp
shal/Lshal.cpp
shal/Lshal.h
shal/PipeRelay.cpp
shal/PipeRelay.h
003d01d81b2602b7cb7bcdba6687088a3925dbaf 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Revert "atrace: Make atrace notify VR services of new trace sessions""
075888c49e1e64e21f8e9f15bc19731d8186e58e 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dumpstate: dump HAL native traces processes."
eecb8666a78f28914a902bcd1399d042577b3c76 23-Mar-2017 John Reck <jreck@google.com> Revert "atrace: Make atrace notify VR services of new trace sessions"

This reverts commit 213feb32c76bb4ed4262dad8c71f0377ee710fac.

Reason for revert: tracing & perf teams don't want to support PDX at this point in time.

Change-Id: I28b8a7c55c9d31c8469236fb60a6e034b1ef8af7
trace/Android.bp
trace/atrace.cpp
17b29e1a798a7b8abea529b317451c34e61903f0 22-Mar-2017 Steven Moreland <smoreland@google.com> Dumpstate: dump HAL native traces processes.

Test: hal service dumps in data/anr/bugreport-traces.txt after bugreport
Bug: 36414311
Change-Id: Ifca491d02f77bf4fb26450f06c2ea02769475786
umpstate/Android.mk
umpstate/utils.cpp
b53a1c9b4df27a7a66c9448778eace166a0ce14c 17-Mar-2017 Naveen Kalla <mrnaveen@google.com> Add notification_title and notification_description to dumpstate

Initiator of dumpstate can set dumpstate.options.title and
dumpstate.options.description properties to notify dumpstate the details
that will be used to file a bug. dumpstate will send this information
along with the BUGREPORT_FINISHED intent.

Bug: 33561517
Test: Use the new API to invoke bugreport from TelephonyMonitor and
ensure that the bugreport is taken and title and description are
updated properly in the notification. Run dumpstate and
BugreportReceiver unit tests

Change-Id: Ia23a3ef4d5751be14f347ac38ef7c8a18f79799d
umpstate/DumpstateService.cpp
umpstate/dumpstate.cpp
umpstate/dumpstate.h
ba56f5ea261b286ff3dd5525fee2666a401b3ce8 23-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Follow "atomic" to "group" refactoring."
f8a3ed9dcda90b9def6963b2a41012f90e225718 23-Mar-2017 Steven Moreland <smoreland@google.com> Merge "lshal: --init-vintf exclude system hals" am: 8db626d2f3 am: 34206360f2
am: d1b6b40adb

Change-Id: Ie2d28a374a3fb18d969783394b80b3a0d6fe0869
34206360f22c715d547cbadb5b40bbee079e1a13 23-Mar-2017 Steven Moreland <smoreland@google.com> Merge "lshal: --init-vintf exclude system hals"
am: 8db626d2f3

Change-Id: Ibe4636eb13c9439d09f51948ca49921a1e209747
8db626d2f3b570ddfca12394b99f92b96dd34c69 23-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "lshal: --init-vintf exclude system hals"
ed909ae8db2f44ce7fe7003c6fee457f13669702 23-Mar-2017 Jeff Sharkey <jsharkey@android.com> Follow "atomic" to "group" refactoring.

Remove noisy logging about UIDs that are relying on default cache
quota of 64MiB.

Move away from yucky old statfs() and use statvfs() instead.

Test: /data/nativetest/installd_cache_test/installd_cache_test
Bug: 35812899, 35684969, 36482620
Change-Id: I3d68da97eac2ebcda489bdf9d27061cac5b3f7cc
nstalld/CacheItem.cpp
nstalld/CacheItem.h
nstalld/CacheTracker.cpp
nstalld/InstalldNativeService.cpp
nstalld/tests/installd_cache_test.cpp
nstalld/utils.cpp
nstalld/utils.h
9b6cd60472dfbcfeacbd7c6e486dc435599d3021 22-Mar-2017 Steven Moreland <smoreland@google.com> lshal: --init-vintf exclude system hals

--init-vintf is provided for convenience so that vendors can initialize
their vendor interface. Excluding system hals so that they aren't
included in the default vintf file that is generated. They are
maintained manually.

Test: Verified frameworks hals are no longer visible in init-vintf.
Bug: 34772739
Change-Id: Ie40c384334affcb3abee063d58000b808f04e234
shal/Lshal.cpp
2d71f97dfbb7657e0a815db7ede6fd372c66ec10 23-Mar-2017 Dmitry Shmidt <dimitrysh@google.com> Merge "dumpstate: Remove FWDUMP_bcmdhd support"
am: 86388dbc9a

Change-Id: Iadf37acb012f762919567354a7aede95f81b9eff
b3a7005a8f229be7084aa09f5a58699648921a3b 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: Remove FWDUMP_bcmdhd support"
7459281f9e1d999281260ff4bbdf3d3e5e0459f5 22-Mar-2017 Martijn Coenen <maco@google.com> Merge changes from topic 'vendorbinder'

* changes:
Add vndservicemanager.
Allow ProcessState to use another binder dev node.
79109f8c42eee4fa55d137cdc28d4910ae067015 22-Mar-2017 Dmitry Shmidt <dimitrysh@google.com> dumpstate: Remove FWDUMP_bcmdhd support

Bug: 35983944
Test: Manual

Change-Id: I4fe1c5d755940d84967d0bd1270ab86638e0311a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
umpstate/Android.mk
umpstate/dumpstate.cpp
7ceca192f1f6f2540088da4275601adc7b6d4747 22-Mar-2017 Dmitry Shmidt <dimitrysh@google.com> dumpstate: Remove FWDUMP_bcmdhd support

Bug: 35983944
Test: Manual

Change-Id: Ia527bbe950b0f569a07e68805684d11ba2f71c66
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
umpstate/Android.mk
umpstate/dumpstate.cpp
69b0515dcd58a479c41977aca7bd18b865571d09 21-Mar-2017 Martijn Coenen <maco@google.com> Add vndservicemanager.

vndservicemanager is the context manager for
binder services that are exclusively used from
the vendor binder domain, "/dev/vndbinder";
these services can only be registered and accessed
by vendor processes.

To facilitate code re-use, vndservicemanager
is just framework servicemanager accessing the
vendor binder devnode.

Bug: 36052864
Test: modified binder_test to use /dev/vndbinder

Change-Id: Iac19a1180321a5be78d7be5ceb4ba211c593dc47
ervicemanager/Android.bp
ervicemanager/bctest.c
ervicemanager/binder.c
ervicemanager/binder.h
ervicemanager/service_manager.c
ervicemanager/vndservicemanager.rc
e27fbca405432c58c32bec1bdd388738d4d746e3 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove mediacodec from native_processes_to_dump."
dbb808d75f3d46626b46b04bad2210b6278b990f 28-Feb-2017 Pawin Vongmasa <pawin@google.com> Remove mediacodec from native_processes_to_dump.

Test: Camera, Photos, YouTube, and Play Movies apps.
Bug: 35328855
Change-Id: I098fe262e414822419c1e08e5f891e8e2b13cdc9
umpstate/utils.cpp
d4d5c219d64b38d071a72361c5d87ccf916952c6 22-Mar-2017 Steven Moreland <smoreland@google.com> Merge "Update re hwservicemanager debugDump semantics." am: ed2debbb47 am: eec11e4cf5
am: 1cf95ad88a

Change-Id: Ieb69025cf922fbcc4e838c88d8701c8a8a5abfb7
eec11e4cf5ebbd7d81a2f802380ffb9fcbe1237d 21-Mar-2017 Steven Moreland <smoreland@google.com> Merge "Update re hwservicemanager debugDump semantics."
am: ed2debbb47

Change-Id: Ibcac4fabedc0f3a1b310d02510785e4c46261a3b
ed2debbb47bc9114168150d40c422412c6870d56 21-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Update re hwservicemanager debugDump semantics."
56d2d516937ae4b71163abcbe98a80b09955e898 21-Mar-2017 Steven Moreland <smoreland@google.com> Update re hwservicemanager debugDump semantics.

Test: internal boots, hidl_test, lshal works
Bug: 36414311
Change-Id: I572269a679dea3b6e985227f6727850f7dd33b58
shal/Lshal.cpp
4856e00f0e001185b107480fe27ef3360923eb87 21-Mar-2017 Brian Carlstrom <bdc@google.com> Merge "Add comment regarding keeping TRACE_DUMP_TIMEOUT_MS in sync"
1a13cc31a6064b882b627d78be7e0a04e8556463 21-Mar-2017 Andreas Gampe <agampe@google.com> Merge "Installd: Clean up installd" am: da86f5aa93 am: 3c8458247e
am: 265dae948f

Change-Id: I4e84e771681ac460001d6e1102d1435180df9968
3c8458247e2e99d124a227ae6b05f73dda002201 21-Mar-2017 Andreas Gampe <agampe@google.com> Merge "Installd: Clean up installd"
am: da86f5aa93

Change-Id: I17553e106659ede717e277d4836a12972ef6b2a0
2c925927ee7524086965be324e614c9041126085 21-Mar-2017 Andreas Gampe <agampe@google.com> Otapreopt: Check dexopt return status before retry

Only retry compilation (triggering a wipe and boot image regeneration)
when dex2oat failed in runtime creation.

Bug: 36336122
Test: m
Test: Device boots
Test: Can install apps
Test: Can run A/B OTA
Change-Id: I1a2ae3a871a926002980acd8b7fa777fe8f7d739
nstalld/Android.mk
nstalld/otapreopt.cpp
013f02e58b0b17b5b9fb4b4a2b3dc482eecfc434 21-Mar-2017 Andreas Gampe <agampe@google.com> Installd: Clean up installd

Remove unnecessary includes.

Bug: 36336122
Test: m
Test: Device boots
Test: Can install apps
Change-Id: Iebbe049221d650667385efeac972956269bd53c2
nstalld/Android.mk
nstalld/dexopt.cpp
nstalld/globals.h
nstalld/otapreopt.cpp
a332275cc748dda0b2865c7f21f3058931329388 20-Mar-2017 Brian Carlstrom <bdc@google.com> Add comment regarding keeping TRACE_DUMP_TIMEOUT_MS in sync

Test: m -j32 && flashall
Bug: 35962833
Change-Id: I02e18cb6817bb3dc6c8c76ee037e2299c3b7ab53
umpstate/utils.cpp
570e6ec1230c9e3458e0de57ebfe2aa2be043293 18-Mar-2017 Ian Pedowitz <ijpedowitz@google.com> Changing from ro.product.device to ro.product.name for bugreport file name

ro.product.device returned dragon for ryu, when the original intent
would have been to have ryu. ro.product.name does this.

Bug: 33257711
Test: Compiled and flashed to a device, and took a bugreport
Change-Id: Ib2a11e084f9c1c550c28e0c89adc92a14652ee37
umpstate/dumpstate.cpp
8348fa3545e0ad4e178b5f3faf37a3b68da727d6 17-Mar-2017 Calin Juravle <calin@google.com> Merge "Support profile guided compilation for secondary dex files" am: cb2e477f14 am: f01cd5f89f
am: 95c5f4b85d

Change-Id: I432fd0a8e7056b5d41e6beb9a71d8fd74c3a34b8
4e3f9c1dd5b14815420d5bc732b378adcd2bf37a 17-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Force vrhwc/wm to report the native resolution"
f01cd5f89fc8564cbc6d6175d9953f55da80708b 17-Mar-2017 Calin Juravle <calin@google.com> Merge "Support profile guided compilation for secondary dex files"
am: cb2e477f14

Change-Id: Ib763c8cf38a04243b1a4834a70b15a6533f7bf5d
e77dce28e5e9a7f078cb324a7b9320802fca8469 14-Mar-2017 Stephen Kiazyk <skiazyk@google.com> Force vrhwc/wm to report the native resolution

Due to some Yak-shaving, this also involved a partial conversion of our
libraries to soong.

Notes:
* I also changed the name of libsensor to libvrsensor to avoid a naming
clash with an existing library
* The remaining libraries will be soongified in a separate CL

Bug: 36139334
Test: Build and run vr apps.
Change-Id: Ib39687bd01e3d2e1c30adc54e18f362a85954ab9
r/pose/Android.mk
114f08107be384a3f9cc954bdec2b6b7619354ae 09-Mar-2017 Calin Juravle <calin@google.com> Support profile guided compilation for secondary dex files

Test: adb shell cmd package bg-dexopt-job works for sercondary dex files
Bug: 26719109
Change-Id: I4011a780f65378c23a4631c07c37cdb4f5fee41e
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
f9e6033ea896e43d962a81c13d2b65d952955450 16-Mar-2017 Romain Guy <romainguy@google.com> Merge "Revert "Get rid of IGraphicBufferAlloc""
f8b4ca51111cd2e566d1774ac464da859db78976 16-Mar-2017 Romain Guy <romainguy@google.com> Revert "Get rid of IGraphicBufferAlloc"

This reverts commit 78491c9f694cb0767996503c629776a8eda950d7.

Change-Id: I78d5c0a30ab80265f697f681387872b6763b2d1e
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
d4639b1eae0d934ad47b260315416fb7b8026a50 16-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Get rid of IGraphicBufferAlloc"
78491c9f694cb0767996503c629776a8eda950d7 15-Mar-2017 Mathias Agopian <mathias@google.com> Get rid of IGraphicBufferAlloc

This reverts commit 527747dce1ab4714bd424e5c1a25ebad3506c2cb.

selinux policy allowing this change fixed.

Test: took a screenshot
Test: ran ImageReaderTest CTS
Bug: 36194109
Change-Id: I72ac17b6c252750aa2a66cd1d94bd8b4e21b5e9d
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
83b2d2642cd76ed070ad2d78a15c279e197e67e6 16-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove bad make rules causing system.img to rebuild every time"
ad460ce9c5e3e257242f79becc5636803332b6f3 15-Mar-2017 Colin Cross <ccross@android.com> Remove bad make rules causing system.img to rebuild every time

ALL_DEFAULT_INSTALLED_MODULES is supposed to contain paths, not
module names. Module names are phony targets, which causes
anything that depends on it to be always dirty, resulting in
rebuilding system.img on every incremental build.

ALL_DEFAULT_INSTALLED_MODULES shouldn't be used anyways, use
PRODUCT_PACKAGES in a product makefile instead, and all_modules
isn't used at all any more, remove both of them.

Bug: 36274890
Test: builds
Change-Id: I2db49dcc27515357b0306d0c3e9b38026012b1ea
r/pose/Android.mk
r/vrscreencap/Android.mk
62743d734adcbba7370f8a41871e837722470b57 15-Mar-2017 Calin Juravle <calin@google.com> Merge "Use assignment instead of reset for profile unique_fd" am: fd695a61c1 am: 32d41fecc8
am: 621bc30864

Change-Id: I7635c11b945098d39ae6d557b3df27854ec19d42
32d41fecc81b29de1145a5c9b7117bd91f833be9 15-Mar-2017 Calin Juravle <calin@google.com> Merge "Use assignment instead of reset for profile unique_fd"
am: fd695a61c1

Change-Id: Ifcf742625e9c05379b063ba5480db406a9b81459
4eba6d702e7ca40875d7e2d30129672a43d9a28b 15-Mar-2017 Calin Juravle <calin@google.com> Use assignment instead of reset for profile unique_fd

Using reset with a unique_fd will just convert the unique_fd to int
without releasing it.

Test: adb shell cmd package compile -m speed-profile com.google.android.googlequicksearchbox
Bug: 36234017
Change-Id: I577197ac4a147765191777a5ebc6ef150dea1027
nstalld/dexopt.cpp
a82590a830038ae48e9364cacf394d346ed4b2b1 14-Mar-2017 Calin Juravle <calin@google.com> Merge "Use unique_fd instead of fd_t when managing profiles" am: 02971e3348 am: 9f6666ae1d
am: 0acbc6bb3c

Change-Id: I21f46a971ea164071ef80f9406ae63685bf8e671
9f6666ae1dab656a1a94a49786261d5672fa9c8d 14-Mar-2017 Calin Juravle <calin@google.com> Merge "Use unique_fd instead of fd_t when managing profiles"
am: 02971e3348

Change-Id: I81a72601fe2507db09dd23fdb3527c0ed0dd02df
02971e33486d466b066d4e105a82b3dece92238f 14-Mar-2017 Calin Juravle <calin@google.com> Merge "Use unique_fd instead of fd_t when managing profiles"
975e49a2ae848ef7d2b9d9ad8ea1afad656f037b 13-Mar-2017 Chia-I Wu <olv@google.com> Merge "Revert "get rid of IGraphicBufferAlloc""
527747dce1ab4714bd424e5c1a25ebad3506c2cb 13-Mar-2017 Chia-I Wu <olv@google.com> Revert "get rid of IGraphicBufferAlloc"

This reverts commit 1da94dfed674e94edc37cdc8ef68530520edf169.

Bug: 36176799
Bug: 36175706
Change-Id: I6dd5fe8df564f0efa4392a800fb316e27a05076e
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
1a0af3b982b851519b06233addaa9c3bcb61f627 09-Mar-2017 Calin Juravle <calin@google.com> Use unique_fd instead of fd_t when managing profiles

Long due code improvement...

This will make things cleaner when adding support for secondary dex
profiles.

Test: adb shell cmd package bg-dexopt-job
Bug: 26719109
Change-Id: I232759d76c285c9eed9885f8ee4b84431fd65d15
nstalld/dexopt.cpp
nstalld/dexopt.h
444ad1ee82a549c96bf9e5087b9041d6264c93ec 12-Mar-2017 Jeff Sharkey <jsharkey@android.com> Fix external manual calculation bug.

Ignore file extensions anywhere under "Android" since those files
belong to specific apps. Don't depend on GID being set for those
directories.

Bug: 35684969, 35441006, 34945234
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Ifeb8d314cc2b803ac0d3595974daf91f51862061
nstalld/InstalldNativeService.cpp
2c5d1a85898f9178b0a1130b7f36ea3031361133 12-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Finer-grained locking for size operations."
b26786d647b624498c11405075e5223d1853f30a 12-Mar-2017 Jeff Sharkey <jsharkey@android.com> Finer-grained locking for size operations.

Disk space measurements are read-only and don't perform mutations,
so other installd operations shouldn't block them.

If there's an ongoing parallel operation (such as a dexopt) that
could race and skew the results, that's no different than an actively
running app changing it's disk usage during the measurement.

This change also allows measurements to happen in parallel, so we can
no longer rely on getcwd() being stable, which means all fts(3) users
now need to use FTS_NOCHDIR.

Bug: 36032444, 35706513
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/pm/InstallerTest.java
Change-Id: I67d303d3ecce148052d41444cef67381b1d34ab0
nstalld/CacheItem.cpp
nstalld/CacheTracker.cpp
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/utils.cpp
8c9483d8842c6d1fb3818c1f02a10e12e97d8576 11-Mar-2017 Steven Moreland <smoreland@google.com> Merge "dumpsys: remove usage of String16::std_string" am: 561b4e5d89 am: a8f36c30d0
am: 250d06bea5

Change-Id: I21f7533d90919a4384f52a3bd5a4976a2cef1d00
a8f36c30d07075b08a8635f93b3e8545da0ea219 11-Mar-2017 Steven Moreland <smoreland@google.com> Merge "dumpsys: remove usage of String16::std_string"
am: 561b4e5d89

Change-Id: Ie64c773351594a8925d32b5513e912418bcf35d7
561b4e5d89125c86cf6248fb124b68ffdb06c356 11-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "dumpsys: remove usage of String16::std_string"
47ec28647af5ce9d7079ee2ab782cf42e6299cad 11-Mar-2017 Calin Juravle <calin@google.com> Merge "Use std::string for profile operations instead of const char" am: 7c7d888d94 am: ccaa1f3f78
am: 0045d606d1

Change-Id: I6ad63a777811dbc5e5d74870441d8c76dc3273af
ccaa1f3f78e7f0891877153f3d5c07bfd596b084 11-Mar-2017 Calin Juravle <calin@google.com> Merge "Use std::string for profile operations instead of const char"
am: 7c7d888d94

Change-Id: I44676d7bc0b9297ccb920066284f371fa2e40c3c
76268c56febde9a77183387fbd4baabe6694e6b5 09-Mar-2017 Calin Juravle <calin@google.com> Use std::string for profile operations instead of const char

Will make things cleaner when adding secondary dex profile support.

Also, add tests to verify profile path creation.

Bug: 26719109
Test: /data/nativetest64/installd_utils_test/installd_utils_test
Change-Id: I8cb1a11cefee21f5001d2b729110696d52fc8323
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
dc9fcf4218567ca800e0c03606484315fc8eeb79 10-Mar-2017 Calin Juravle <calin@google.com> Merge changes I20d546fd,I15363803
am: 632dbe2c77

Change-Id: I5fe86348657aa5e7f733be63c2134af4fe4a5365
2ee8cc08caf6c45c8550896b54387c7a42339d0f 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Allow "android" package name.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 36062649

(cherry picked from commit ab7ac8d5a04bd3f38b85ce20ae5bb382f2a26585)

Change-Id: I20d546fdd20813e96bcb5f061ca5b352dff44450
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
068ef2229e5493b2678b00ff875df486b561e00d 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Update is_valid_package_name() to match framework.

The framework has a new format for /data/app directory names in OC
to protect user privacy. This change updates the validation logic
in installd to support the new format.

For consistency the logic now mirrors the package name validation
logic used by PackageParser.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 33705143

(cherry picked from commit 367ace2f77105f7a09b34a50bc875fd4fa591177)

Merged-In: I41d270942479c52e063c29a2cb9552d7b238b86e
Change-Id: I15363803fb45310697e29be810e800dc1b1902d0
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
a0f7f2dfd0ecb0ba13efdb62b5b850e198f01a1f 10-Mar-2017 Steven Moreland <smoreland@google.com> dumpsys: remove usage of String16::std_string

Test: pass

Change-Id: Ib74a126b91d25376a7235f73bbc12ada62ae7e69
umpsys/tests/dumpsys_test.cpp
99295a2b1bce6b1031db91b60fb046d5c17fa92c 09-Mar-2017 Mathias Agopian <mathias@google.com> Merge changes from topic 'igraphicbufferallocator'

* changes:
get rid of IGraphicBufferAlloc
Remove a dependency of EGL on ui/GraphicBuffer.h
remove EGL dependency on libbinder
54e1e10afe4bbb4defdaa99a86b156b8e543ffc0 09-Mar-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Disable input-vdex when doing speed-profile." am: 028ad63e80 am: a5582c290c
am: a15409a340

Change-Id: I3261131e0f71f6305cdb177ef227ab114be23c60
a5582c290c8d5daafa366ec6a3658c64c146a3f7 09-Mar-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Disable input-vdex when doing speed-profile."
am: 028ad63e80

Change-Id: I3ec636cd526bcdb749fc3af87f2ac0d301fbcafd
a2dbefc7a51482acb8d5d139c9e2f01306ef9ceb 09-Mar-2017 Nicolas Geoffray <ngeoffray@google.com> Disable input-vdex when doing speed-profile.

input-vdex and dexlayout are incompatible with each other.

bug: 36084905
bug: 36076104
bug: 36059948
bug: 35872504

Test: device boots, vdex works on OTA, input-vdex is not passed
for speed-profile.

Change-Id: I194311041899399db422867670f5e788d6b9ceeb
nstalld/dexopt.cpp
1da94dfed674e94edc37cdc8ef68530520edf169 28-Feb-2017 Mathias Agopian <mathias@google.com> get rid of IGraphicBufferAlloc

buffers can now be allocated in-process.

Test: compile & run
Bug: cleanup
Change-Id: I3d4317a9bed20a6d8be2b7ac8fbb85738efb3657
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
7bbe84efb332a3081466943e41301e92ba0f3dda 09-Mar-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'vintf_arch' am: 45370128a5 am: c2b36f5696
am: 628dafc85e

Change-Id: Ib17fb1e919fdc5a1d3ce652debf1f0d530fde57f
c2b36f56968dd32631a98a8d06e6497d5318c6a2 09-Mar-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'vintf_arch'
am: 45370128a5

Change-Id: Ia8e62d1a64e5a893b651c46e5872854e2f52034f
45370128a5749ecc61d5fd3b7850c43b351c03ab 09-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'vintf_arch'

* changes:
Update to use bitness info in VINTF.
Fix forEachTable will copy the table.
3fdbd9f9347f495530036fb4306d769380d6c40f 08-Mar-2017 Yifan Hong <elsk@google.com> Update to use bitness info in VINTF.

Bug: 35966597
Test: lshal -ir has bitness info for passthrough ref section
Test: lshal --init-vintf has bitness info in the manifest.
Change-Id: Ie9f52bb1ca30ce69856dbf44fab8287563014550
shal/Lshal.cpp
shal/TableEntry.h
8ab3bee8df72dea6d1ca0fe2ec9cd87b0fa3d5be 08-Mar-2017 Yifan Hong <elsk@google.com> Fix forEachTable will copy the table.

std::initializer_list<T> has T deduced to Table, which will
copy the table. Use pointers instead.

Test: pass
Change-Id: I7da40eb0f5d0171244a9b9caacf37b41fe0af304
shal/Lshal.cpp
ab7ac8d5a04bd3f38b85ce20ae5bb382f2a26585 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Allow "android" package name.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 36062649
Change-Id: I9b41a34822a1a194d256f5b99d5955e51716029c
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
110c3baf58aeef284f08a85d730898aaeb65c8ba 08-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update is_valid_package_name() to match framework."
367ace2f77105f7a09b34a50bc875fd4fa591177 08-Mar-2017 Jeff Sharkey <jsharkey@android.com> Update is_valid_package_name() to match framework.

The framework has a new format for /data/app directory names in OC
to protect user privacy. This change updates the validation logic
in installd to support the new format.

For consistency the logic now mirrors the package name validation
logic used by PackageParser.

Test: /data/nativetest64/installd_utils_test/installd_utils_test
Bug: 33705143
Change-Id: I41d270942479c52e063c29a2cb9552d7b238b86e
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
c9e55782b05366bfcda975c2f5e4b80632b8c884 07-Mar-2017 Calin Juravle <calin@google.com> Merge "Installd: Clean up code related to foreign dex use" am: 62b34b57c4 am: 9d4819ff2e
am: 9181bdb57f

Change-Id: I2257654b3b73e74a92a179e1068f771e2b6af186
9d4819ff2eac7973ab0bb2eee34ec3c09a740915 07-Mar-2017 Calin Juravle <calin@google.com> Merge "Installd: Clean up code related to foreign dex use"
am: 62b34b57c4

Change-Id: Id7beb09ed3d3b79b3b818dd5192b457605f5a54c
62b34b57c493990d1b779e0f5ffde138c3a4228f 07-Mar-2017 Calin Juravle <calin@google.com> Merge "Installd: Clean up code related to foreign dex use"
e403b9cbc95d6a5159ad79105451fb415641fd24 06-Mar-2017 Yifan Hong <elsk@google.com> Merge "lshal: update descriptions in output." am: 074c1cd157 am: 105e9391ac
am: 76ccc8cbd1

Change-Id: Iadb1ea22c087d643d0664919411a3e2408d12fd1
105e9391acdda4a0bdc732b366e05907c638890d 06-Mar-2017 Yifan Hong <elsk@google.com> Merge "lshal: update descriptions in output."
am: 074c1cd157

Change-Id: Iaa60e243566133d1674b2591becdbc9ead403754
074c1cd1572275be5765f0530963e6930d785aaf 06-Mar-2017 Yifan Hong <elsk@google.com> Merge "lshal: update descriptions in output."
9257845ae16aa6aceedec627cec2e1fce912947c 05-Mar-2017 Jeff Sharkey <jsharkey@android.com> Merge "Small change for testing." am: f88834e30d am: e89136bbe2
am: f67181001f

Change-Id: I3e86e4996e59266076fa6a0dfcc07a1302b34b9a
e89136bbe2672b166beb8f69bad8d2b90dc23109 05-Mar-2017 Jeff Sharkey <jsharkey@android.com> Merge "Small change for testing."
am: f88834e30d

Change-Id: I8ca5fd99ae37093e912ab699e976c05d446e2c81
f88834e30d906329142c626b4a09da715582b069 05-Mar-2017 Jeff Sharkey <jsharkey@android.com> Merge "Small change for testing."
4059e73faa207e6da3e4aaa61f7e4b073a89cbb0 05-Mar-2017 Jeff Sharkey <jsharkey@android.com> Small change for testing.

Bug: 35970955, 35969439, 35968280
Change-Id: I56c6626221b456e13b1371b69e9c980edaddfa91
ugreportz/readme.md
35c8465e31381dcc9a59655f63a91849a50294a6 04-Mar-2017 Calin Juravle <calin@google.com> Installd: Clean up code related to foreign dex use

We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Also, fix the getUserSize by considering the size of the actual profiles
not of the set of empty markers.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170
Change-Id: I9250e816a1bfa95cb10155e513ae28ebfda7ce4b
nstalld/InstalldNativeService.cpp
nstalld/utils.cpp
nstalld/utils.h
e9e9fe40fb702ab1390a32c61981bc927177258a 01-Mar-2017 Mathias Agopian <mathias@google.com> fallout of cleaning-up libutils includes

Test: run & compile
Bug: n/a

Change-Id: I99e462d2db6560742fa3f065d5de50cd60111130
urfacereplayer/replayer/Replayer.h
1071c1bf64903ca545c0a216c07708c33f4a832d 03-Mar-2017 Yifan Hong <elsk@google.com> lshal: update descriptions in output.

Test: pass
Change-Id: I912e2153e531a35ecdf1e76fd6bafa68880b8721
shal/Lshal.cpp
c0fcf526271cb818f75a1473e0e889f4e9a1b50f 03-Mar-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal_32' am: 2eaf6b8eae am: 407ec93f4a
am: 8810351ddc

Change-Id: Id15799972ddead9152ac4f8bd9f1ddc071f16f89
407ec93f4a7c3b02072a248aabb3007da6ebebb6 03-Mar-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal_32'
am: 2eaf6b8eae

Change-Id: Id18cdd5d27d2624c7ae0f7a60b178d5bf1c71c05
a3b8709a5dfc57d6d6bcc0ee89bbeb4aed3e908c 03-Mar-2017 Yifan Hong <elsk@google.com> lshal: Put more description to output

Split the output by three parts according to the source of information.
Describe each part before the table.

--sort will be applied to each table individually.

Bug: 35803917
Test: lshal
Change-Id: Ief0dae21fdeb58ebaed46d2aa68f298b8b75218d
shal/Lshal.cpp
shal/Lshal.h
shal/TableEntry.h
b44790219f43369883b3dd8eaf3971bdc5fe656b 03-Mar-2017 Yifan Hong <elsk@google.com> lshal: also list libraries in 32-bit.

Add an "Arch" column (selected by -r) to lshal
to show whether the HAL runs in 32 bit or 64 bit.

* For binderized services, whether the process
runs in 32bit or 64bit (__LP64__)
* For passthrough libraries (-impl.so), whether
the library is in /{system,vendor,odm}/lib/hw
or /{system,vendor,odm}lib64/hw

Bug: 35803184
Test: lshal -itrpc
Change-Id: I328da4ad9eacbf2959be4ac2e478c16535a89068
shal/Lshal.cpp
shal/Lshal.h
shal/TableEntry.h
ba1d417ecab84b0638db460eeceed909a2bf32e5 03-Mar-2017 Calin Juravle <calin@google.com> Merge changes from topic 'secondary-dex'
am: ad79651822

Change-Id: Idcdf7a84b25376aca209ded1cdbb5d1831578810
b77cb8b653d2b2efc7a18c6862f6fb3f32afc311 03-Mar-2017 Calin Juravle <calin@google.com> DEXOPT_FORCE may be passed for primary apk as well.
am: 2ab108c5be

Change-Id: I684e155161c626f407f5bfab874108cf30f06a81
1061d48614c3a273c8e37ddb61374f65db3446bc 03-Mar-2017 Calin Juravle <calin@google.com> [Installd] Clean up logic for secondary dex oat files
am: c9eab382fa

Change-Id: Ib344fdf483df92e954321726b5d2c22abbe46c4a
51b4f988c9dbb3906e95f7f24d09c2ada34df5fb 03-Mar-2017 Calin Juravle <calin@google.com> Add installd logic for compiling secondary dex files
am: 80a2125b85

Change-Id: I117e7dbaafed5b7183c53517dc27cc7dbc3540fc
ad79651822dc32b8ac1a76bd5259c9eca917b07f 03-Mar-2017 Calin Juravle <calin@google.com> Merge changes from topic 'secondary-dex'

* changes:
Fix the ownership of compiler artifacts for secondary dex files
DEXOPT_FORCE may be passed for primary apk as well.
[Installd] Clean up logic for secondary dex oat files
Add installd logic for compiling secondary dex files
b2dead1d1d254ecfe33b6948c9cbc606b05b99a0 02-Mar-2017 sj.cha <sj.cha@lge.com> Keystore and gatekeeper not working when servicemanager crashed

Reproduce step :
- Kill servicemanager process

frequency : 100%

Reason of issue :
As you know, servicemanager manages almost framework services.
However when servicemanager killed by unknown reason, android restart servicemanager.
In this case, keystore and gatekeeper deamon should be restart.
But current android source code doesn't consider those case.
So, I want to disscuss about this changes with you.
(It is able to so fixed in theirs(keystore.rc...) rc files.
But I'm not sure what is the best changes.)

Solution : Adding restart services syntax from rc file

Signed-off-by: SangJin Cha <sj.cha@lge.com>
Change-Id: Iab02b54417406dd84a1e970dc1ded6437183d0c0
ervicemanager/servicemanager.rc
2ab108c5be96768ef094591720596fbc4b7f91f7 31-Jan-2017 Calin Juravle <calin@google.com> DEXOPT_FORCE may be passed for primary apk as well.

Remove the check that DEXOPT_FORCE is not set for primary apks. PM will
set it when forcing compilation.

Bug: 32871170
Test: adb shell cmd package compile -f m speed pkgname

(cherry picked from commit 259702336f5826d2a205a2b038cb5a3263fb10e9)

Change-Id: Id34cd1ec929a1e196caf61651a18eb9c275b2590

Merged-In: I690608c48a2c486230ca7d2328ac5c6181427328
nstalld/dexopt.cpp
2289c0ac89acce109b3e93c434d86b20c5ecc1ad 15-Feb-2017 Calin Juravle <calin@google.com> Fix the ownership of compiler artifacts for secondary dex files

odex, vdex and art files should be owned by the app and not by system.

Test: verify odex and vdex owner:
adb shell cmd package compile -m speed --secondary-dex -f
com.google.android.gms
adb shell ls
/data/user/0/com.google.android.gms/app_chimera/m/00000004/oat/arm64/
-al
-rw-r--r-- 1 u0_a17 u0_a17 5640832 2017-02-02 18:00
DynamiteModulesA_GmsCore_prodmnc_alldpi_release.odex
-rw-r--r-- 1 u0_a17 u0_a17 3016818 2017-02-15 12:42
DynamiteModulesA_GmsCore_prodmnc_alldpi_release.vdex

Bug: 35389574
Bug: 32871170

(cherry picked from commit 944d0def1a628bcbd76056683085efd2b999fe5b)

Change-Id: I1f0d09d04807b6284d42f0cf89956322a4214d5f

Merged-In: I0650265cedcc572d43bb1fc0d0758ae43ea890b2
nstalld/dexopt.cpp
c9eab382fa4d71ade0077e0547969a47f39ecf05 25-Jan-2017 Calin Juravle <calin@google.com> [Installd] Clean up logic for secondary dex oat files

Add a new method to installd, reconcileSecondaryOdex, which checks if
the given dex files still exist and if not, deletes the oat files that
were generated for it.

Test: devices bots
adb shell cmd package reconcile-secondary-dex
com.android.google.gms (after artificially/temporarily renaming some
dex files)

Bug: 32871170

(cherry picked from commit bd9683607d391a29b1422a50f8972267e9bddc47)

Change-Id: Icb5c71b43a0e531d5be5d900149e707d0fe0a8de

Merged-In: I8465a7be9fd4e44e191ad40f7bd0f41c8b2d6f73
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
80a2125b85eaa0916daea7e90b016fe4f1b59924 17-Jan-2017 Calin Juravle <calin@google.com> Add installd logic for compiling secondary dex files

Secondary dex compilation takes almost the same path as primary apk
compilation.

The main difference is in the fact that for secondary dex files we
create the oat dir on the fly and execute dexoptanalyzer (the equivalent
of GetDexOptNeeded) to check if we really need to perform the
compilation.

Test: adb shell cmd package compile -f -m speed --secondary-dex com.google.android.gms
Bug: 32871170

(cherry picked from commit 42451c029b0e87990e5833daea2286bb12c21df5)

Change-Id: Ie5efe6eccc6b8c91ca7bd7c9e680aa7288d79ae8

Merged-In: I2c56d57322899968a338ccabffca575d66f8ee08
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/installd_constants.h
nstalld/utils.cpp
nstalld/utils.h
599dc3588a345bf4f3ef3d1e4c4821be2308c90c 02-Mar-2017 Elliott Hughes <enh@google.com> Merge "Move dumpstate to calling getprop."
am: 16401044cb

Change-Id: Ic55dcb53917eb7a885bf32532e36b08354a1f0f0
16401044cb4f2c9f487bdf6abb9aeb7d1e3de578 02-Mar-2017 Elliott Hughes <enh@google.com> Merge "Move dumpstate to calling getprop."
4baf3faafc56f145122df3a2bcde3fd0d3e9ce07 01-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updating bugreport to dump only visible activities."
52eddbac268a55d40915e8f4c9133113f3520179 28-Feb-2017 Elliott Hughes <enh@google.com> Move dumpstate to calling getprop.

There's no obvious reason for reinventing the wheel like this (given that
dumpstate already spends most of its time calling out to other utilities),
and I keep having to come and fix this code.

(This time the problem being that there's no longer a limit on system
property names.)

Bug: http://b/33926793
Test: ran dumpstate
Merged-In: I08281680df5aabfdb39228abf8c2aab089cc8b9e
Change-Id: I08281680df5aabfdb39228abf8c2aab089cc8b9e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
5ebcd56c6f57514f7833e7528a08d8ca55c48f69 01-Mar-2017 Yifan Hong <elsk@google.com> Merge "lshal --vintf to create a skeleton hal manifest." am: 73d5aef51e am: 86c2f1cb0c
am: 4ccb9b6fb2

Change-Id: I7b34fe8c1015c48818fa293e18522b9644ffb568
86c2f1cb0c520b17d18beae10d602569312bbef9 01-Mar-2017 Yifan Hong <elsk@google.com> Merge "lshal --vintf to create a skeleton hal manifest."
am: 73d5aef51e

Change-Id: Ibd6873caa3d7c9bb9949b1d21666430a0cd7890a
4b86549b14b30a0ba4381c09c5ce5185ad56bf1c 01-Mar-2017 Yifan Hong <elsk@google.com> lshal --vintf to create a skeleton hal manifest.

Run it as follows:
lshal --init-vintf=/data/a.xml
lshal --init-vintf > /data/a.xml

Test: lshal --init-vintf with and without path argument
Bug: 35852743
Change-Id: Ief9385fc2764a487d1a70644699e01133bdc8a8e
shal/Android.bp
shal/Lshal.cpp
shal/Lshal.h
shal/NullableOStream.h
shal/TableEntry.h
78bf9f0bdcb2f9d0160ddf88b23f0de11c7693dc 01-Mar-2017 Steven Moreland <smoreland@google.com> Merge "lshal: separate timeout for hwservicemanager list" am: 180bb92608 am: b67f970cfe
am: cf148e1e08

Change-Id: Ic5e76ba7bde5966075fc657dc7ed21b97fd00299
b67f970cfec26d4f0d720f5bceac93ba82f74af7 01-Mar-2017 Steven Moreland <smoreland@google.com> Merge "lshal: separate timeout for hwservicemanager list"
am: 180bb92608

Change-Id: I4ca38f7831505366201ca7a480dae358ecfc39ba
180bb92608a9bf24ab11a101b87844ea478b0324 01-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "lshal: separate timeout for hwservicemanager list"
9b5c15d266b3fd5d26c992f8f8f4e6a3a03436df 01-Mar-2017 Steven Moreland <smoreland@google.com> lshal: separate timeout for hwservicemanager list

Bug: 35752836
Test: lshal works
Change-Id: I201da49e375d2d5e9ea67dfdf34ef2d5a8b537b0
shal/Lshal.cpp
6646f552a198840da0b10f3461e42d80377d2cfc 01-Mar-2017 Mathias Agopian <mathias@google.com> Merge "Remove unneeded references to IMemory"
1434a5ccf5fa91f20f8f145ecdc4303a03cf3a17 01-Mar-2017 Winson Chung <winsonc@google.com> Updating bugreport to dump only visible activities.

- With ag/1947868, all activities will be dumped regardless of their
visibility unless otherwise specified.

Bug: 35850518
Test: Take bugreport, ensure that only visible activitys are dumped
Change-Id: Ifc352989173ec538bd0876d6a13d4af2302ebebb
umpstate/dumpstate.cpp
6961b6bc1f6f172745deee98e7dcb34a3668e4e6 01-Mar-2017 Mathias Agopian <mathias@google.com> Remove unneeded references to IMemory

Test: compiled & run
Bug: cleanup
Change-Id: Ifef6695275f244a420df574b3bc49adb99c93fbf
urfacereplayer/replayer/Replayer.cpp
23ccc625fd60891d20977abc5f2c35cbe46142ac 28-Feb-2017 Elliott Hughes <enh@google.com> Move dumpstate to calling getprop.

There's no obvious reason for reinventing the wheel like this (given that
dumpstate already spends most of its time calling out to other utilities),
and I keep having to come and fix this code.

(This time the problem being that there's no longer a limit on system
property names.)

Bug: http://b/33926793
Test: ran dumpstate
Change-Id: I08281680df5aabfdb39228abf8c2aab089cc8b9e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
ca6c4370fde29f2a251d8091f6f5deb4b3425341 28-Feb-2017 Martijn Coenen <maco@google.com> Merge "Truncate trace output files." am: 09ab378326 am: d62093dae4
am: f114e0f7fe

Change-Id: Iae062a81f9da04a6dd47eb625df14a6b2c66e33c
d62093dae4bbf28c250556a492ecdfa62ead399d 28-Feb-2017 Martijn Coenen <maco@google.com> Merge "Truncate trace output files."
am: 09ab378326

Change-Id: Iec36d0074c6e5fd90c3f9b39d07feef89ddb4b31
09ab378326b64459b81ad1e326be9478e46dd3d9 28-Feb-2017 Martijn Coenen <maco@google.com> Merge "Truncate trace output files."
2a7c23a67355c56e6fb4df487cb74263f7835828 25-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: run lshal as root."
00a1513cea6f218988464e75a4148bc218148339 25-Feb-2017 Yifan Hong <elsk@google.com> Merge "dumpstate HAL uses "default" service name"
54a11d3b60587b338349509a6265ee7b46421125 24-Feb-2017 Steven Moreland <smoreland@google.com> dumpstate: run lshal as root.

Running lshal as root gives additional information about which processes
have registered with which hals.

Test: adb bugreport and checked for appropriate output in lshal
Fixes: 35741078
Change-Id: I75606909ebccf2df3dc164d72edd2456facb3ad3
umpstate/dumpstate.cpp
89ed4c8cfd8ad64269dfcff9742e16bdd705b926 10-Feb-2017 Mathias Agopian <mathias@google.com> split libandroid.so

- ANativeWindow (native_window.h) and
AHardwareBuffer (hardware_buffer.h) now live
in libnativewindow.so, which is a vodka library.

- libandroid.so still provide those symbols
via a static library version (libnativewindow.a)

- removed libbinder dependency as well

Test: compiled & booted
Bug: 35164655
Change-Id: Ib4bc8e8fc9ec1891bcbee63c28fd0131d82edf29
urfacereplayer/replayer/Android.mk
69d9221e3f2c3db256d8216f8f0d6316f7213c88 25-Jan-2017 Chris Phoenix <cphoenix@google.com> dumpstate HAL uses "default" service name

The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I87d3f4f00965e8cccb18b9bd158bd8d393ea8d5a
umpstate/dumpstate.cpp
aec27c3014eac1f7770a8fd54ec49a90c0d42006 22-Feb-2017 Jeff Sharkey <jsharkey@google.com> Merge "Logic for atmoic/tombstone behavior; split mode."
871a8f236ef2a055b9955b47a342b2c44c020ef7 22-Feb-2017 Jeff Sharkey <jsharkey@android.com> Logic for atmoic/tombstone behavior; split mode.

Flesh out logic for cache directories that request new atomic and/or
tombstone clearing behaviors. Atomic directories are considered for
deletion as a single all-or-nothing unit, and tombstone directories
truncate any removed files instead of unlinking them.

Since these behaviors can be mixed together, add local tests that
quickly verify several different permutations.

Reduce memory footprint of CacheItem objects by only storing name
and pointer to parent (instead of full path). Fix ordering bug by
switching to std::stable_sort.

Add "V2_DEFY_QUOTA" flag so we can split clearing into two distinct
phases: clearing data for apps above their quotas, and then pushing
deeper by clearing data for apps below their quotas.

Test: adb shell /data/nativetest64/installd_cache_test/installd_cache_test
Bug: 34692014, 33811826
Change-Id: I156897de1d1d1c371b2b837128b2e286bf33d40d
nstalld/CacheItem.cpp
nstalld/CacheItem.h
nstalld/CacheTracker.cpp
nstalld/InstalldNativeService.cpp
nstalld/tests/Android.bp
nstalld/tests/installd_cache_test.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
7caec546308622d1135625222f50e67a2f454a38 22-Feb-2017 Yifan Hong <elsk@google.com> Merge "lshal: Fix timeout causes unexpected exits." am: 057e74631b am: fdf61aa557
am: 91a4bd9cd2

Change-Id: I4663a64806ddb285e8bf5e9235759fee49bc8a93
fdf61aa5576b673aa070d4cf715c63f14dbc2c2c 22-Feb-2017 Yifan Hong <elsk@google.com> Merge "lshal: Fix timeout causes unexpected exits."
am: 057e74631b

Change-Id: Iadfbc11f8bbfc45759f2214d0811922cbb173758
c579198835539100087ba71f5bbf38c3c09422e6 22-Feb-2017 Martijn Coenen <maco@google.com> Truncate trace output files.

To avoid creating trace files with garbage at the end.

Bug: 35588070
Test: atrace runs
Change-Id: I26ef4c652ca2e2dd8ff9d11d4f380b44791cb960
trace/atrace.cpp
a57dffb151145529e71b22a8d7f985bc1de105f4 21-Feb-2017 Yifan Hong <elsk@google.com> lshal: Fix timeout causes unexpected exits.

with thread::detach the background thread keeps running even after
the thread object is destroyed; the background thread will access
caller's stack memory, causing segfault. Change it to a thread join
to avoid the issue. To avoid waiting too long on the child thread,
send a SIGINT if timeout (child thread's signal handler will then
call pthread_exit() to terminate the thread).

Since we are using pthread_* functions, change usage of std::thread
to pthread_t for consistency.

Test: lshal
Test: run lshal with IPC_CALL_TIMEOUT set to zero will no longer
cause SIGSEGV and SIGABRT (test 10 times)

Bug: 35623669
Change-Id: I4eef8ffd8ff399793648e861ca4c1a2bdcc7ec50
shal/Lshal.cpp
shal/Timeout.h
a61f4ff80fafd3d7ee09670ab1fd78b468b22a43 22-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use --receiver-include-background instead of package name on SendBroadcast()."
325b8c94a5ae47b7903ea5fe386a78466d6cb3b7 21-Feb-2017 Jeff Sharkey <jsharkey@android.com> Method to test for quota support.

Framework logic needs to change its behavior depending on how quickly
disk usage calculations can be performed.

Test: builds, boots
Bug: 34690590
Change-Id: I6139d1ea6a6084b1fd42062e2032ec9f515f6d98
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
c1ae13ed156e826fb5b3a237843ce87eabdd1c6f 18-Feb-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal cannot be run without root" am: 6481ebfbc3 am: 8d6362fc44
am: b40360f7c3

Change-Id: Id53e3d9648060bbdecc5f1b67d4ac85183162740
8d6362fc44636cff50aa97f2966daf96155bc43c 18-Feb-2017 Yifan Hong <elsk@google.com> Merge "Fix lshal cannot be run without root"
am: 6481ebfbc3

Change-Id: Ic269ab86b933557ee171961f78d6e49e0d4df315
38903c0f88efefec3573d9ff3a8e28131da2f3b5 17-Feb-2017 Yifan Hong <elsk@google.com> Fix lshal cannot be run without root

Root cause is invoking copy constructor on a Return<T> object
implicitly, while the old object contains a failed status and
gets destroyed. Use the move constructor instead to fix this.

Test: adb unroot && adb shell lshal
Change-Id: I44710166cc5d7da30bf54b10d1860be1b91dc98a
shal/Timeout.h
a9347647eca3101c014be902b713772de3977d87 14-Feb-2017 Mathias Agopian <mathias@google.com> Break a dependency of libui on libandroid

This was only a header dependency, but it still
created a circular dependency, which will cause
problems in another CL.

We fix this by creating a libarect static library
containing only that header. both libui and
libandroid now depend on it and reexport the
header.

We also make sure rect.h ends-up in the right
place.

Test: built and booted device
Bug: 35164655

Change-Id: Iba25b8b801b26b26ec1401c00caf367a06f197ca
urfacereplayer/replayer/Android.mk
81c7a629943938b0f6325e693382c7db7cd4e3c5 17-Feb-2017 Martijn Coenen <maco@google.com> Merge "atrace: Don't output service lookup/notification errors." am: 9753b43355 am: acc03d821b am: b4951bb3c5
am: c874bf6032

Change-Id: I2f82d450a9a07d1a30b8017e34ad1f158fac3eec
c874bf60322eaf2393b3b92ba9ebd64a1306f273 17-Feb-2017 Martijn Coenen <maco@google.com> Merge "atrace: Don't output service lookup/notification errors." am: 9753b43355 am: acc03d821b
am: b4951bb3c5

Change-Id: I1795408b3731916b08d5c716bacebc1892a9760a
b4951bb3c59bf50f67c1107628017c4df88a3052 17-Feb-2017 Martijn Coenen <maco@google.com> Merge "atrace: Don't output service lookup/notification errors." am: 9753b43355
am: acc03d821b

Change-Id: Id61287c635379735bc0c78dea8571720594de52f
1e4a7fbdd392cb5af35bca169d90b35850a9e9f4 17-Feb-2017 Martijn Coenen <maco@google.com> atrace: Don't output service lookup/notification errors.

Bug: 34933232
Test: android.atrace.cts.AtraceHostTests
Change-Id: If981106fb1bf7db24b9fd173c6936a1e189756f0
trace/atrace.cpp
61364b1c07027c226b338d945c7d5aeda6472aed 16-Feb-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal' am: 7e894fc94f am: c972254b58 am: fc025cd2aa
am: 9fc5b8da62

Change-Id: I5004085481e0a46331dbc82272806678e940f290
9fc5b8da6226b6261991b537f9c9c5763f40dcd0 16-Feb-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal' am: 7e894fc94f am: c972254b58
am: fc025cd2aa

Change-Id: If5e30cbb533aa16de6b2f565104102ecec66c87a
fc025cd2aadfa20ef4e430e52d9c0cfbc88c7e47 16-Feb-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal' am: 7e894fc94f
am: c972254b58

Change-Id: I1b5c1eceb88b57a50331340709c50507eb8f9bf8
52eb3c9f8b436c0e389090436b5aac2b6ff888aa 16-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Moved bugreport intents to the com.android.internal namespace."
a4ef1f050ce4f4a9976057f1efa34a4ff5ec0ac8 16-Feb-2017 Felipe Leme <felipeal@google.com> Use --receiver-include-background instead of package name on SendBroadcast().

...so it does not break other receivers of BUGREPORT_FINISHED.

Bug: 34833915
Test: manual verification
Change-Id: Ic203a02a8961be6aa7e70e536833c7ef0ec5ee33
umpstate/dumpstate.cpp
ae09a3ddfec51c82257e338346e39ee472470061 15-Feb-2017 Yifan Hong <elsk@google.com> lshal: Add option to print cmd lines instead of pids.

Add -m to arguments of lshal. When this flag is set,
/proc/{pid}/cmdline is printed instead of a plain PID.
If the file doesn't exist, it will be striped out from
the PID column as well (the process is considered died
and won't hold a reference to the binder object.)

Test: lshal -icm

Bug: 35160832

Change-Id: I4345bf06112a1f87ce91bec6f6f787703e46cd17
shal/Lshal.cpp
shal/Lshal.h
shal/TableEntry.h
5997ac173ef23f2ad158a9ab7e255220953816a1 16-Feb-2017 Felipe Leme <felipeal@google.com> Moved bugreport intents to the com.android.internal namespace.

Change-Id: I5b19c119b9f845007b37dc955120d2a4f1187e63
Fixes: 35275802
Test: manual verification
umpstate/dumpstate.cpp
e2dadf0c4f132d3a39309f4e274f1a35f7caaaed 15-Feb-2017 Yifan Hong <elsk@google.com> lshal: Add timeout for IPC calls.

IPC calls into interfaces should be done fault-torelently.
Add a timeout for each IPC call made so that lshal won't be
indefinitely blocked even if the interface don't reply
promptly.

Bug: 35317039

Test: lshal

Change-Id: Icb8157716ad68bddb5b33304b9063aa6f233985d
shal/Lshal.cpp
shal/Timeout.h
944d0def1a628bcbd76056683085efd2b999fe5b 15-Feb-2017 Calin Juravle <calin@google.com> Fix the ownership of compiler artifacts for secondary dex files

odex, vdex and art files should be owned by the app and not by system.

Test: verify odex and vdex owner:
adb shell cmd package compile -m speed --secondary-dex -f
com.google.android.gms
adb shell ls
/data/user/0/com.google.android.gms/app_chimera/m/00000004/oat/arm64/
-al
-rw-r--r-- 1 u0_a17 u0_a17 5640832 2017-02-02 18:00
DynamiteModulesA_GmsCore_prodmnc_alldpi_release.odex
-rw-r--r-- 1 u0_a17 u0_a17 3016818 2017-02-15 12:42
DynamiteModulesA_GmsCore_prodmnc_alldpi_release.vdex

Bug: 35389574
Bug: 32871170
Change-Id: I0650265cedcc572d43bb1fc0d0758ae43ea890b2
nstalld/dexopt.cpp
38d53e0327f200a8a16f99d1e1a09e33c2be8e81 14-Feb-2017 Yifan Hong <elsk@google.com> lshal: Allow selecting columns and sorting by column.

Examples: see tests below.

Test: lshal
Test: lshal -intpac
Test: lshal --sort=i
Test: lshal --sort=p

Bug: 34984175

Change-Id: Ia09823776a206868a5d58a2ede153a4538147756
shal/Lshal.cpp
shal/Lshal.h
shal/TableEntry.h
b0dde932ad8989a393fad148c17817bcb2ff7a43 11-Feb-2017 Yifan Hong <elsk@google.com> lshal: Refactor lshal to use an Lshal class; combined instance column with interface column

We need to be able to select columns, sort columns,
and do IPC calls fault-tolerently.
Refactoring lshal.cpp into an Lshal class for more
objective-oriented programming, so that global variables
can be avoided and less parameters will need
to be passed around.

Test: lshal outputs identical output as without this CL, except
with the column merged.

Change-Id: I9668c998da692222aef96ae67bbab8066172543d
shal/Android.bp
shal/Lshal.cpp
shal/Lshal.h
shal/TableEntry.h
shal/lshal.cpp
33bc71ff9524457ad4e0f57523d676b500701370 14-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Revert "dumpsys: add option to list hardware services."" am: 9555a5d497 am: d2390bea79 am: 8d3069503e
am: 36ec1bc76f

Change-Id: I5b16be2dae542e0becc114f36a2f75418e9911d5
36ec1bc76f6cb2760445dd2d1f538a4ffdec40bb 14-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Revert "dumpsys: add option to list hardware services."" am: 9555a5d497 am: d2390bea79
am: 8d3069503e

Change-Id: I6f4d5148e41181a4498fe1bcc3b2e9e0551785fb
8d3069503e64dd573eed12d66da0fd51ded1b7b5 14-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Revert "dumpsys: add option to list hardware services."" am: 9555a5d497
am: d2390bea79

Change-Id: Ib70ddc0635bc3a502dbc9f7eb31c5716860e9833
2c3cd83603a7eefe7efe8c99cbe1c04b54cfe599 14-Feb-2017 Steven Moreland <smoreland@google.com> Revert "dumpsys: add option to list hardware services."

This reverts commit 6270dd1bf7f4a6eaa0e36b2cbb0f9bdd4790b5d8.

Reason for revert: obsolete, removed in favor of lshal
Test: dumpsys_test

Change-Id: I06e256a5bd0995727a3d6f3f88f79a623b1474f3
umpsys/Android.bp
umpsys/dumpsys.cpp
umpsys/dumpsys.h
umpsys/main.cpp
umpsys/tests/Android.bp
umpsys/tests/dumpsys_test.cpp
ff6f7a468751c7386b682507972bac5ff278621c 13-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Vibrates using 'cmd vibrator' instead of HAL vibrator."
d173ea530d0944d4d9ae7a164bdfd4a63148352c 13-Feb-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal' am: c9bc03729b am: d99d31d5d3 am: 5581e229a6
am: cd98373272

Change-Id: Ibea02dc9a1fc6e659992c746db3ef59ec5fc35aa
cd983732725bc7cabdbc16fad14f878289fe1b9d 13-Feb-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal' am: c9bc03729b am: d99d31d5d3
am: 5581e229a6

Change-Id: I526b604879c5c5103a7d0f9a66471534383c6175
5581e229a6ae09efa098aeb5804507e940e951fa 13-Feb-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal' am: c9bc03729b
am: d99d31d5d3

Change-Id: I615d885788739a2d3d2f11204ad23833a77d96d5
b7ddc9e5cba5a0a287993b5b3124a75d67d9557c 04-Feb-2017 Yifan Hong <elsk@google.com> Dump client PIDs for passthrough HALs.

* This is done with registerPassthroughClient in IServiceManager; when a
service is retrieved through the passthrough service manager, its PID
will be recoreded by the binderized service manager.
* The action of dumping all available dynamic libraries is now done by
dumpAllLibraries.
Bug: 34712252
Test: lshal

Change-Id: I7f08e3255ffed0f46435843504e0e225d0d9bbc9
umpsys/tests/dumpsys_test.cpp
shal/lshal.cpp
b24760fd49d6475885eb4edae7b2f42888d5e30f 03-Feb-2017 Yifan Hong <elsk@google.com> Fix permissions for lshal

Instead of IServiceManager::debugDump, lshal now relies
on list and get. lshal itself will call getDebugInfo
on each interface, so that each interface can check if
the call is from a root user, then decide to leak
addresses or not.

Bug: 34899586

Test: lshal

Change-Id: I8eb9168c3b071b8b1f27dbeaa0ac27d2067200d7
shal/lshal.cpp
35b8cf1902bba437eb9c3f14cb69cf403695ebe8 11-Feb-2017 Felipe Leme <felipeal@google.com> Vibrates using 'cmd vibrator' instead of HAL vibrator.

Change-Id: I7959f08bcb9623d1dfe26e941ccd2623e8cdf278
Fixes: 34346796
Test: manual verification
Test: dumpstate_test passes
umpstate/Android.mk
umpstate/dumpstate.cpp
8d2410eb937fdc27255b1129ed961463d64f847f 08-Feb-2017 Felipe Leme <felipeal@google.com> Explicitly sets Shell component on broadcast.

Change-Id: I11299885c300709d4b6c5a8b4d21bc31d96e2a62
Fixes: 34833915
Test: manual verification
Test: dumpstate_test passes
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
c1e7b635ede3fa4eaa539d2ca44f4aa590d1433a 07-Feb-2017 Felipe Leme <felipeal@google.com> Use 'cmd activity' instead 'am' to send a broadcast.

'am' is a deprecated binary that calls the ActivityManager shell
command behind the scenes, so calling 'cmd activity' directly
eliminates a process fork.

Bug: 34833915
Test: manual verification

Change-Id: Ia156897d784aa1d64f60317f92828987d64936e3
umpstate/utils.cpp
213feb32c76bb4ed4262dad8c71f0377ee710fac 14-Jan-2017 Corey Tabaka <eieio@google.com> atrace: Make atrace notify VR services of new trace sessions

Notify VR services based on PDX IPC of system property changes to let
them know a new trace session starts.

Bug: None
Test: Build and flash system; observe that systrace works for PDX services.

Change-Id: I02c6a08dd77760684f84154df4d07a853869481a
trace/Android.bp
trace/atrace.cpp
97999061b2ab9145fd4dc53fc671b66d1da4e3a7 02-Feb-2017 Yifan Hong <elsk@google.com> Merge "lshal: print pids of client processes." am: 1ca609d756 am: 9046024ef1 am: d8a939213c
am: d275f64c0f

Change-Id: Id7f6bfc4e486a33c6f399a49811bd322922f87e4
d275f64c0f1c6d58d34ca63a9c968dd357ccd69b 02-Feb-2017 Yifan Hong <elsk@google.com> Merge "lshal: print pids of client processes." am: 1ca609d756 am: 9046024ef1
am: d8a939213c

Change-Id: Ic5bcd43734aa7be5f5ed62544ed76c0cf09ed07b
d8a939213cf98aedb62da7f99667623eb3ded9e1 02-Feb-2017 Yifan Hong <elsk@google.com> Merge "lshal: print pids of client processes." am: 1ca609d756
am: 9046024ef1

Change-Id: I74ab0b58d0edbb12283367143fd52be3dae4583c
f4bee849129bd1b1e557c4e3cb1a4e5ef501d71d 02-Feb-2017 Yifan Hong <elsk@google.com> lshal: print pids of client processes.

Bug: 34777099
Bug: 34861460

Test: lshal
Test: NFC / light / audio with and without persistent.hal.binderized;
run lshal to reflect this.

Change-Id: I50aa5d99fb14957b1e40a405836e68c235a22006
shal/Android.bp
shal/lshal.cpp
7fe71e59ad3055e1a80d8043449b8a056bc92236 01-Feb-2017 Yifan Hong <elsk@google.com> Merge "Do not -1 for lshal." am: 50752b732e am: bd4cc238fb am: 44a6d5a5eb
am: 035fa3eb6b

Change-Id: I0547c8b71e2709c19f30db457d881ee7d2986cc7
035fa3eb6b467ca796816c0001fac852a9d97a1f 01-Feb-2017 Yifan Hong <elsk@google.com> Merge "Do not -1 for lshal." am: 50752b732e am: bd4cc238fb
am: 44a6d5a5eb

Change-Id: Icfd5998fd5a6cc558cc26addf0e89ccd0b61bb5f
44a6d5a5eb8c1a2683907da11f66fb87e8609769 01-Feb-2017 Yifan Hong <elsk@google.com> Merge "Do not -1 for lshal." am: 50752b732e
am: bd4cc238fb

Change-Id: I1dd676e1d50b68913578890c5d5096a8d81480b9
98b087b0172cb548e1375ae5f9847a9314455426 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Push mapping from file extension to GID."
b22e7a742d4e0ba1510deda8f0726c02755a7961 01-Feb-2017 Jeff Sharkey <jsharkey@android.com> Push mapping from file extension to GID.

An upcoming sdcardfs change will offer to automatically change the
GID of files on external storage based on the extension, but we need
to tell the kernel the mapping that we'd like to see.

Test: build, boots
Bug: 34733702
Change-Id: I15d4db5423d18c4da17e198c0e45a8adb381fed2
nstalld/installd.rc
nstalld/matchgen.py
ba7940e3704d53d4e0f7a82efe2821cec88fec3b 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "dumpstate: dump list of hardware hals on device"
81b429eba542f95877459bf6b860c55f35fea222 01-Feb-2017 Steven Moreland <smoreland@google.com> dumpstate: dump list of hardware hals on device

lshal is a binary on the device that lists all registered and
passthrough hardware hals that are currently running.

Fixes: 34809346
Test: bugreport includes lshal dump
Change-Id: Ia1340d1b94ac4c902a81b709924ebf45462435cc
umpstate/dumpstate.cpp
6a25701bdda59940690971f19ed18e13400af053 01-Feb-2017 Yifan Hong <elsk@google.com> Do not -1 for lshal.

Test: compiles
Change-Id: I99e6306a6b82ec85bc84f9572f3e4f2f8cdf2847
shal/lshal.cpp
bff27a43cdbe8256c7469c7e212c68a92bda8697 01-Feb-2017 Calin Juravle <calin@google.com> Merge "DEXOPT_FORCE may be passed for primary apk as well."
259702336f5826d2a205a2b038cb5a3263fb10e9 31-Jan-2017 Calin Juravle <calin@google.com> DEXOPT_FORCE may be passed for primary apk as well.

Remove the check that DEXOPT_FORCE is not set for primary apks. PM will
set it when forcing compilation.

Bug: 32871170
Test: adb shell cmd package compile -f m speed pkgname

Change-Id: I690608c48a2c486230ca7d2328ac5c6181427328
nstalld/dexopt.cpp
d3e0c11c6c2971a3ffeb334478813d4ecd516efd 31-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Add permission bits to open calls with O_CREAT" am: 9dc2e6bc43 am: 3e240c81be am: 417c546404
am: b941ea5b2f

Change-Id: If2239057cb266f40fd2deb086eeec25903a7f075
b941ea5b2f7d805d293debaed4baee9a33359811 31-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Add permission bits to open calls with O_CREAT" am: 9dc2e6bc43 am: 3e240c81be
am: 417c546404

Change-Id: I35421a4b17751fb04e9b0532d40c822812ad0cb8
417c54640463bda3bed2d454f59632fc2f020e78 31-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Add permission bits to open calls with O_CREAT" am: 9dc2e6bc43
am: 3e240c81be

Change-Id: Id28d9cdc5b4862b7c62b4d5dd2da6fde13f8dd9c
ba7457767103775320c531637c2efa937ae8ac21 31-Jan-2017 Ecco Park <eccopark@google.com> Merge "dumpstate: add the property(ro.radio.log_loc) for modem_logs"
5e5ad9c139c92670219b5701ff49f29e47426073 30-Jan-2017 Calin Juravle <calin@google.com> Merge "[Installd] Clean up logic for secondary dex oat files"
20e0fd800ffa9eaa9e95f3c9b84e1610068827ee 30-Jan-2017 Calin Juravle <calin@google.com> Merge "Add installd logic for compiling secondary dex files"
4f079d0e2ff9041ff4304818864c1c2ab876bc05 27-Jan-2017 Alex Vakulenko <avakulenko@google.com> frameworks/native: Add VR command-line tools

Bug: None
Test: `m -j32` succeeds
Change-Id: Ia83c71875eb0f207f63a168c88a138daeea42d5d
r/.clang-format
r/pose/Android.mk
r/pose/pose.cpp
r/vrscreencap/Android.mk
r/vrscreencap/vrscreencap.cpp
bd9683607d391a29b1422a50f8972267e9bddc47 25-Jan-2017 Calin Juravle <calin@google.com> [Installd] Clean up logic for secondary dex oat files

Add a new method to installd, reconcileSecondaryOdex, which checks if
the given dex files still exist and if not, deletes the oat files that
were generated for it.

Test: devices bots
adb shell cmd package reconcile-secondary-dex
com.android.google.gms (after artificially/temporarily renaming some
dex files)

Bug: 32871170

Change-Id: I8465a7be9fd4e44e191ad40f7bd0f41c8b2d6f73
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/dexopt.cpp
nstalld/dexopt.h
42451c029b0e87990e5833daea2286bb12c21df5 17-Jan-2017 Calin Juravle <calin@google.com> Add installd logic for compiling secondary dex files

Secondary dex compilation takes almost the same path as primary apk
compilation.

The main difference is in the fact that for secondary dex files we
create the oat dir on the fly and execute dexoptanalyzer (the equivalent
of GetDexOptNeeded) to check if we really need to perform the
compilation.

Test: adb shell cmd package compile -f -m speed --secondary-dex com.google.android.gms
Bug: 32871170

Change-Id: I2c56d57322899968a338ccabffca575d66f8ee08
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/installd_constants.h
nstalld/utils.cpp
nstalld/utils.h
6ca7d0879ce405634f79607fba2bb8c69dee0e82 28-Jan-2017 Ecco Park <eccopark@google.com> dumpstate: add the property(ro.radio.log_loc) for modem_logs

For temporary solution for not saving modem logs in bugreport,
I created the property(ro.radio.log_loc) to indicate the place
where modem_logs are saved.

During transition to hal dump of telephony, we will keep the property in
device configuration.
Bug: 33820081

Change-Id: I7712ce095686a54ea7f097f190611aec7a64d79c
Signed-off-by: Ecco Park <eccopark@google.com>
umpstate/dumpstate.cpp
3ef54f28c2143170e172fc12f0e9e6bde15ea4d3 25-Jan-2017 George Burgess IV <gbiv@google.com> Add permission bits to open calls with O_CREAT

Open needs a third argument if you pass it O_CREAT:
https://linux.die.net/man/3/open

This turns into a compile-time error with FORITFY, so we need this fixed
before our unbroken FORTIFY can go in.

(The TEMP_FAILURE_RETRY open isn't detected by clang FORTIFY, but I
noticed that open_reference_profile potentially passes in O_CREAT as an
open_flag.)

Bug: 32073964
Test: Now builds with clang FORTIFY; CtsCompilationTestCases passes;
manually verified that /data/misc/profiles/ref/*/primary.prof has rw
permissions after a successful `cmd package compile -m speed-profile`.
Change-Id: Ie707d5ad403d2f86c769277b3e0f147c45000a6b
nstalld/dexopt.cpp
63a7d98b7ebb06e06665eeb13d7431162d251c83 26-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Replace strlen with arraysize in array bounds." am: 70a5f12045 am: 5f186d057a am: d427837d32
am: c4aaa479ba

Change-Id: Ie73ddfcbf564778b7a3d085773ef6fba3ad66977
c4aaa479ba81332bd5bee26e617978d56dfb25a0 26-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Replace strlen with arraysize in array bounds." am: 70a5f12045 am: 5f186d057a
am: d427837d32

Change-Id: Ia9f3ad966545b25d05394d57f38f3c1107a69469
d427837d32f60901b063be2249ce2b75faeec05d 26-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Replace strlen with arraysize in array bounds." am: 70a5f12045
am: 5f186d057a

Change-Id: Ic23f22a26e160055c2e50eb9641183c0da9dfc2a
70a5f120458f1705090cc3f8f144a322527618e6 26-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Replace strlen with arraysize in array bounds."
36cebe7778a89fa1302a8828ade93db2d014c522 25-Jan-2017 George Burgess IV <gbiv@google.com> Replace strlen with arraysize in array bounds.

clang-FORTIFY doesn't let us evaluate strlen("foo") as a constant
expression that can be used in static array bounds. Instead, we'd need
to either do __builtin_strlen("foo") or arraysize("foo") - 1. Just use
arraysize here, since the extra 1 byte per array isn't likely to be a
terrible thing.

Happy to swap to __builtin_strlen if anyone cares deeply enough.

Bug: 32073964
Test: Now builds with clang FORTIFY.
Change-Id: I4c9b3eb74775901554b939246722bd3a22326d10
nstalld/dexopt.cpp
9ad7a5b58dedf0147a637ee986df32127e58cd81 26-Jan-2017 Yifan Hong <elsk@google.com> Add debugDump() to IServiceManager. am: 5ccdab9bc5 am: 169161171c am: 6c24cc3dd6
am: bd0382f41d

Change-Id: Ia7b46d17897c0214ff20a189745ebfb54b4a7433
d773d824b828af8147569f715dffcba3cc7a9f52 26-Jan-2017 Yifan Hong <elsk@google.com> Add an lshal command. am: 85dd3ad89f am: a763ae7121 am: 5a0eaa454f
am: 684fae26ec

Change-Id: I3ecd794a8d51e3c316cf2974af0c7c95a4bfcef5
bd0382f41d348bfea59c0b6a2fdcbaafdf43633e 26-Jan-2017 Yifan Hong <elsk@google.com> Add debugDump() to IServiceManager. am: 5ccdab9bc5 am: 169161171c
am: 6c24cc3dd6

Change-Id: Id823cb5ce3aab358311858a5c041fbeb305dfdb7
684fae26ec8a7fa5b4ee115e9f14cd55bd23d95f 26-Jan-2017 Yifan Hong <elsk@google.com> Add an lshal command. am: 85dd3ad89f am: a763ae7121
am: 5a0eaa454f

Change-Id: Ifa851e5bb55a870a290b4be134607a744af5f741
6c24cc3dd66ecc4997598de33eb02c9529131845 26-Jan-2017 Yifan Hong <elsk@google.com> Add debugDump() to IServiceManager. am: 5ccdab9bc5
am: 169161171c

Change-Id: I570c0d3f712dd8069d14fdae37c587ebcfd99229
5a0eaa454fca2ae9cf3c96f3adb548d660dd165f 26-Jan-2017 Yifan Hong <elsk@google.com> Add an lshal command. am: 85dd3ad89f
am: a763ae7121

Change-Id: I627e16e1216e09dccbc96db26dfba844e073d403
169161171cc06040de91547e91232951e5ec463a 26-Jan-2017 Yifan Hong <elsk@google.com> Add debugDump() to IServiceManager.
am: 5ccdab9bc5

Change-Id: I4823ca88072ebe167fa6a3b894cad610cea88c94
a763ae7121f7d2f76a7a969d7b45a61aca247483 26-Jan-2017 Yifan Hong <elsk@google.com> Add an lshal command.
am: 85dd3ad89f

Change-Id: I43be1cd548f30d7d6e954411fc3db8b13e20f3c0
1f2d5a9cda804196017139bcc2476b6f29e518eb 26-Jan-2017 Yifan Hong <elsk@google.com> Merge changes from topic 'lshal'

* changes:
Add debugDump() to IServiceManager.
Add an lshal command.
1b705dc20b346ccda5f5ce02287c28aaa50491e2 26-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix two bugs in external storage accounting." am: d1361ceb0c am: e4dc5d4ec5 am: 0f08cf28bd
am: 8f1b3ed54f

Change-Id: I3324121cd4f987c58cd0065200d21fbdfc98065b
8f1b3ed54f5dfeb7626df4203ee6ed0c3973a1ec 26-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix two bugs in external storage accounting." am: d1361ceb0c am: e4dc5d4ec5
am: 0f08cf28bd

Change-Id: Ib784b3bbeb49c56b0f2f2b180c04fc6bec14e68b
0f08cf28bd18c837f7deed1f2a1709de791226a0 26-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Fix two bugs in external storage accounting." am: d1361ceb0c
am: e4dc5d4ec5

Change-Id: I61ec7deb5d7196259e83de0a141ef23d198b9f1e
63f928567d1dddbadfe113bde8f167b1d16df7d2 26-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dump Per UID IO usage from storaged"
5ccdab9bc541ef2b3839c5d33b0c0ed4ecd3258f 26-Jan-2017 Yifan Hong <elsk@google.com> Add debugDump() to IServiceManager.

Test: mma
Change-Id: I04289500c7ee42a84d3593b4c0e45a0b829370a7
umpsys/tests/dumpsys_test.cpp
85dd3ad89f26e8a28336ac3b2365fb896df7a0f6 25-Jan-2017 Yifan Hong <elsk@google.com> Add an lshal command.

lshal lists services registered to the binderized
IServiceManager and all services available to the
passthrough IServiceManager as *.so libraries. It
also dumps the reference count for each service.

Bug: 34712252
Test: adb shell lshal
Change-Id: I9436a033cf736b8a8c307a2e87549c9db6379f3f
shal/Android.bp
shal/lshal.cpp
64f07c5fdccbe59468f318512591a316d8eec909 26-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove from preloads/file_cache when clearing the cache"
2435442bcac12703a5c44790aacc91ede94a3e9a 24-Jan-2017 Jin Qian <jinqian@google.com> Dump Per UID IO usage from storaged

Test: adb bugreport
Bug: 34198239
Bug: 33086174
Change-Id: Ic333bdb961f6ce36327ec2b710485ff0a7f7aec1
umpstate/dumpstate.cpp
76ddaeb2017e422de5a8d686ab62844d23d17624 26-Jan-2017 Jeff Sharkey <jsharkey@android.com> Fix two bugs in external storage accounting.

When doing a manual tree walk, we always want to inherit fts_number
from the parent fts node.

For create_data_media_package_path(), two of the arguments had been
swapped.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 27948817, 30927649
Change-Id: Ic3cbf387cf119aa82af6e380bde9d9b069f6bfb0
nstalld/InstalldNativeService.cpp
b640267dd1590a32c5edc0ad40b6d4ddecf70ff7 26-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Add mode to open call with O_CREAT" am: af78fe13a0 am: f6b468db7b
am: 2b0fedb71e

Change-Id: I7710b8e0e21243edf1136fa87bb36655bc5b5b95
2b0fedb71e48cb80cbf53ca62e5e2a5b4e223211 26-Jan-2017 George Burgess IV <gbiv@google.com> Merge "Add mode to open call with O_CREAT" am: af78fe13a0
am: f6b468db7b

Change-Id: I6ec7cd3bfa79ac95a042e26455073cb3cbec60c3
1593ef2626842bddf61127b55e1450d40448e252 25-Jan-2017 George Burgess IV <gbiv@google.com> Add mode to open call with O_CREAT

This change was already applied internally. For us to submit FORTIFY, we
need to push it out here. Otherwise, we get compile-time errors about
this.

Bug: 32073964
Test: Builds with FORTIFY.
Change-Id: Ib500aca933468c06f7ceb796a9bb6a16c118e366
Merged-In: I63eb3d5499ae7e9ff9a77393763e39b747fd4611
trace/atrace.cpp
f3124d8fab2377d6b5ec2c7cbc775e2ab20df3ef 07-Sep-2016 Fyodor Kupolov <fkupolov@google.com> Remove from preloads/file_cache when clearing the cache

Test: pm trim-caches 50G internal
Bug: 31008665
Change-Id: If74f4d3c2d838ecb924aba84ad76293af34089bc
nstalld/InstalldNativeService.cpp
nstalld/utils.cpp
nstalld/utils.h
5c6944c35211accd783d2584fac6421dd0af5bdd 15-Dec-2015 MÃ¥rten Kongstad <marten.kongstad@sonymobile.com> installd: add command 'removeIdmap'

Add an installd command to remove an idmap file. This is the inverse of
the 'idmap' command and is intended for clean-up once an idmap file is
no longer needed because an APK was removed, etc.

This commit depends on a corresponding commit in frameworks/base (with
the same Change-Id).

Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
Change-Id: Iae19a519803f0c172b02a32faa283ef36f43863c
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
cfaa07ad3207cc2b64586f388ecad95d60082c88 23-Jan-2017 Christopher Tate <ctate@google.com> Allow bugreport broadcasts to launch manifest receivers

Bug 34594835

Test: bugreport via hard buttons
Change-Id: I7a944f2dfa35d278d2f78d1b37beab4468bd1bb4
umpstate/dumpstate.cpp
30a8e823ccb3994cca06b22de09e80e9a469fed8 23-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removed duplicated build from bugreport name."
e099ff592fd56d1ad84d7b628fb95612aec203b7 23-Jan-2017 Paul Lawrence <paullawrence@google.com> Merge "Update atrace to work with tracefs, not debugfs" am: a92616ecfe am: ea7c1845ee am: 00613eaf8d
am: 3e715e9929

Change-Id: I3b7c015a8fb37aa5b135e7b329f31c9bf4d31166
3e715e99292784724e5421a981549d59ac8445fd 23-Jan-2017 Paul Lawrence <paullawrence@google.com> Merge "Update atrace to work with tracefs, not debugfs" am: a92616ecfe am: ea7c1845ee
am: 00613eaf8d

Change-Id: Ia24e8eb3bc9b1b9ea5ce4047233c3cbd82016e29
00613eaf8d9d640360abfd9c74901490637387e2 23-Jan-2017 Paul Lawrence <paullawrence@google.com> Merge "Update atrace to work with tracefs, not debugfs" am: a92616ecfe
am: ea7c1845ee

Change-Id: I5e31ed34bbaf173577b3b33bbda0f4e4c6a67f92
a92616ecfebace548f7a88d59c36e64070287bef 23-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Update atrace to work with tracefs, not debugfs"
909f4a5d1a05c5d0496cdaab14f58b7072dfbbec 23-Jan-2017 Felipe Leme <felipeal@google.com> Removed duplicated build from bugreport name.

It got duplicated by a bad git merge :-(

Change-Id: I476e63405fa7b0ef858728da7400ee860b56296f
Fixes: 33257711
Test: manual verification
Test: dumpstate_test passes
umpstate/dumpstate.cpp
f70d82da86adc73eafb958b84038da39817ec79f 21-Jan-2017 Steven Moreland <smoreland@google.com> Merge "dumpsys: add option to list hardware services." am: 4d741ebedc am: 57d82aa9fd am: 42b3ff58a6
am: bb7afe6ac9

Change-Id: I5696bb6d3175687f1107a964a53af8940667d5c8
bb7afe6ac9ba568416c48eb44428578238ac12f8 21-Jan-2017 Steven Moreland <smoreland@google.com> Merge "dumpsys: add option to list hardware services." am: 4d741ebedc am: 57d82aa9fd
am: 42b3ff58a6

Change-Id: If9c58d07862e23e96ce89dc0fa282f49302379bb
42b3ff58a650b78b68c6c4a2ac3c5b340ad9de79 21-Jan-2017 Steven Moreland <smoreland@google.com> Merge "dumpsys: add option to list hardware services." am: 4d741ebedc
am: 57d82aa9fd

Change-Id: Ife39a9b63ccf7a8fd83ad9b142c68cb0b0f321e4
6270dd1bf7f4a6eaa0e36b2cbb0f9bdd4790b5d8 21-Jan-2017 Steven Moreland <smoreland@google.com> dumpsys: add option to list hardware services.

This gives a convenient way to dump information about hidl services.
When hidl services dump information themselves as well, that dump will
be made here as well.

Bug: 33382892
Test: dumpsys_test, dumpsys --hw works as expected
Change-Id: Ib08b5d052e63ed6260035ee8d3ad3dac296202b1
umpsys/Android.bp
umpsys/dumpsys.cpp
umpsys/dumpsys.h
umpsys/main.cpp
umpsys/tests/Android.bp
umpsys/tests/dumpsys_test.cpp
078b91ea547b4ac7d7c87e4dbbd61639af85ced4 21-Jan-2017 Chris Phoenix <cphoenix@google.com> Merge "vibrator HAL uses "default" service name"
5fceed6466434fd1c863628c8bb668e773d4c70f 20-Jan-2017 Chris Phoenix <cphoenix@google.com> vibrator HAL uses "default" service name

The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds; verify HAL still works

Bug: 33844934

Change-Id: Ifd6c601c854a87ee60c14bb2e73d95d25236690e
umpstate/dumpstate.cpp
2cd93cc4ce68da81815351db75cbda4b357e6753 17-Jan-2017 Paul Lawrence <paullawrence@google.com> Update atrace to work with tracefs, not debugfs

When tracefs is mounted, tracing is under /sys/kernel/tracing not
/sys/kernel/debug/tracing. Modify atrace to detect this situation and
get the right files.

Bug: 31856701
Test: Run atrace, check output is same where ever tracefs is mounted
Change-Id: I78df0da91d9f56c56077d1b8b9dba7b0126b2d8d
trace/atrace.cpp
trace/atrace.rc
decf4e53b1b8aa6327e948885958665ef2d07e92 20-Jan-2017 Michael Wright <michaelwr@google.com> Merge "Add i2c tracing support to atrace" am: 2630e78f53 am: 8b6f035960
am: 1fd4f885dc

Change-Id: Ic643712f08bad7561b3d490513d25da94ac64c20
1fd4f885dceb10484539af27c74ca008efbd45f4 20-Jan-2017 Michael Wright <michaelwr@google.com> Merge "Add i2c tracing support to atrace" am: 2630e78f53
am: 8b6f035960

Change-Id: Ie9ec292bfaa8f2ea6f29daeca624edda6c5e18af
3c4fa103caa62883a7842f0f8750c7bdfc410fc5 20-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added device name to bugreport file."
ab54f68b7c16a2278f7eaf05ab4ebea1e0401096 18-Aug-2016 Michael Wright <michaelwr@google.com> Add i2c tracing support to atrace

Cherry-picking from internal master

Test: None
Change-Id: Iaf0daa0982bd8d2355d3590d43ad78711e764ee0
trace/atrace.cpp
trace/atrace.rc
ea3a2b8f848a3a06667577e97ae9b0d5fb72c217 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Measure external storage using new GIDs." am: f5a21ba425 am: 973d5aeb17 am: 9715247a54
am: 3801d6668c

Change-Id: Iced41d9d4d5ccc146e044de68046b8ee48d2fc52
3801d6668c9648a6df66285a373b78b48374109c 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Measure external storage using new GIDs." am: f5a21ba425 am: 973d5aeb17
am: 9715247a54

Change-Id: Ic1687f3b78ba2b3be689eb9462f568e7a68c54d8
9715247a543f769bcb01f176b718f4625c0f48e6 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Measure external storage using new GIDs." am: f5a21ba425
am: 973d5aeb17

Change-Id: If3e585b5a35faa1f0151351affa23b382976dc4a
65344c8c20faf7544ad8323b3361108bd8d4a9d1 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "First pass at updated cache clearing logic." am: 45270e18cc am: fe40750da2 am: 19c96b49b5
am: 4aaed0fc6d

Change-Id: If99a870507c953ff92ac56653fe26cd7f29597d6
4aaed0fc6dfae1072c5dfa9f19850a689270dab5 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "First pass at updated cache clearing logic." am: 45270e18cc am: fe40750da2
am: 19c96b49b5

Change-Id: Ide4a9e17f76b3f136c2f13b0558a6130865226f4
19c96b49b53c7a215159e3599b44b2e10697f832 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "First pass at updated cache clearing logic." am: 45270e18cc
am: fe40750da2

Change-Id: I54afc93c8d39857a63906b0cb8ec72f4aba4f6d4
7bf5b9532e192e846be3a31f28171cdba0f3c830 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Measure external storage using new GIDs.

We just defined a new range of GIDs that will be used to mark per-app
data files stored on external storage, so start measuring them.

Also measure all OBB files using another new GID that was defined.

Note that we're relying on the per-app cache GIDs to track cache
usage on *both* internal and external storage, which means that stats
and extStats won't always add up. (The framework already combines
these values together, and we didn't want to waste precious GID
space on explicitly tracking cache files on external storage.)

Test: builds, boots
Bug: 27948817, 34263266
Change-Id: Ife087df299ff8ee1a75fce1e39b4b737cf9375d5
nstalld/InstalldNativeService.cpp
nstalld/utils.h
45270e18cc52501cdbec95d3d005f04472ed8055 19-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "First pass at updated cache clearing logic."
f8124bd485e29fa013313426463dfe1647e69765 15-Dec-2016 Felipe Leme <felipeal@google.com> Added device name to bugreport file.

New format is now: bugreport-DEVICE-BUILD-TIMESTAMP

Fixes: 33257711

Test: manual verification
Test: dumpstate_test passes
Change-Id: Id5abf30c7beeeb4f5b2fcc7219673ea3e7a20478
umpstate/dumpstate.cpp
e75d9631b2bfabc97bb3d1fd88668f3383ef5664 19-Jan-2017 Josh Gao <jmgao@google.com> resolve merge conflicts of 9c65f4f50 to master

Change-Id: Icc63b82a4852222275c0bbafd84d4f535a0f8f10
e2f5c16e092240a1bb7cba9a0ff8c8543b3f2ab1 19-Jan-2017 Calin Juravle <calin@google.com> Merge "Clean up and simplify the logic in dexopt" am: 57eb11ed2d am: 617b5a2bf9
am: f136f947d6

Change-Id: Iaaa9430484e8d30f5e70df193a4a56ed08bfc12a
00ac89ebc39fd2841f543653f3518009a2fbd9d0 19-Jan-2017 Josh Gao <jmgao@google.com> resolve merge conflicts of 467ecaff0 to master

Change-Id: Ia24f84fa163411da8172db12d918c37313c54183
9c65f4f5099d2827b2cc7283077a80d406bbbb06 19-Jan-2017 Josh Gao <jmgao@google.com> dumpstate: use O_APPEND for anr file. am: 989b812dcd am: b0f08f67fd
am: 67e3e53dd9

Change-Id: I446b797e3f8cb9d4299509fb34b84f5b25336300
f136f947d65345727cd72ef11b4f73f88841fc31 19-Jan-2017 Calin Juravle <calin@google.com> Merge "Clean up and simplify the logic in dexopt" am: 57eb11ed2d
am: 617b5a2bf9

Change-Id: I296990f67265262156b96d9b1353ce5d24e744ec
57eb11ed2d6219501cbf8877e17a2575c279c556 19-Jan-2017 Calin Juravle <calin@google.com> Merge "Clean up and simplify the logic in dexopt"
67e3e53dd960df578863913b86e8c1030f05e220 19-Jan-2017 Josh Gao <jmgao@google.com> dumpstate: use O_APPEND for anr file. am: 989b812dcd
am: b0f08f67fd

Change-Id: Ic0fb8b7a328edcaa62c725d84aea74d9404e6ee9
467ecaff086c134640bed81ebe8d03ca73d3b339 19-Jan-2017 Josh Gao <jmgao@google.com> resolve merge conflicts of f79a82d6a to nyc-mr1-dev-plus-aosp
am: 27cdfc3e9d

Change-Id: I0219baebce53482f730cfb73ae600be01bbeb224
27cdfc3e9d7c71bd95639eb315fac2c36494e14e 19-Jan-2017 Josh Gao <jmgao@google.com> resolve merge conflicts of f79a82d6a to nyc-mr1-dev-plus-aosp

Change-Id: I5a9fbde2637d746bfd32d5b7546777708746e6d9
b0f08f67fd832c8058c7af2a1b2e37b77b5ca1e7 19-Jan-2017 Josh Gao <jmgao@google.com> dumpstate: use O_APPEND for anr file.
am: 989b812dcd

Change-Id: Ibaa04b99195886df0ff14b2f6569e37918373619
f79a82d6a25a64430c5e72b06016190ab07a5f48 19-Jan-2017 Josh Gao <jmgao@google.com> dumpstate: switch to using libdebuggerd_client.
am: d2db024a86

Change-Id: I219627b359a88b8a694b4f4cd46de9cea9767655
134a7193a01f7f4406d4639c51d3356d41417466 19-Jan-2017 Josh Gao <jmgao@google.com> Merge changes from topic 'kill_debuggerd'

* changes:
dumpstate: use O_APPEND for anr file.
dumpstate: switch to using libdebuggerd_client.
fceb4309e78be778275d1f3b7e85b97e2a487b0f 18-Jan-2017 Calin Juravle <calin@google.com> Merge "Clean up and simplify the logic in dexopt"
7a570e8a0091a93be7dfd98acbb693bbb6ace75a 15-Jan-2017 Calin Juravle <calin@google.com> Clean up and simplify the logic in dexopt

Make some order in dexopt logic by extracting independent parts in their
own helpers.

It will make further updates of dexopt simpler and easier to reason
about (e.g. for secondary dex files).

Test: device boots
adb shell cmd package compile -m speed|speed-profile packageName
install new packages

Bug: 32871170

(cherry picked from commit 4a391f80601d7f65d7e63353363e6d32868161d5)

Change-Id: If0c96174e904519a4332e54553690b691ff63149
nstalld/dexopt.cpp
88ddd94834dae9c5862a07a1e4432b171b2f5d9f 18-Jan-2017 Jeff Sharkey <jsharkey@android.com> First pass at updated cache clearing logic.

The old clearing algorithm is very naive and it sorts all cached files
globally by modified time. This sadly lets apps gamify the system by
setting their modified times far in the future, and it's very
expensive because it requires a global filesystem traversal to free
up even the smallest amount of data.

Instead, this CL introduces a much more fair cache clearing algorithm
that deletes files from specific UIDs based on how much cache space
that UID is using proportional to the space allocated to them. This
new design has several nice properties:

-- It uses the recently added quotactl() feature to rapidly target
the apps that are using the most space.
-- We only need to traverse the filesystem for UIDs that actively
enter the crosshairs of the clearing algorithm.
-- Disciplined apps who stay under their allocated quota will be
the last to have their cached data cleared.
-- This design can be easily adapted to support additional features
such as atomic purging and tombstones.

In summary, the new algorithm is extremely efficient when freeing up
the typical small-to-medium amounts of disk space, and is only
moderately less efficient than the old algorithm when forced to clear
all cached data.

Test: builds, boots, clearing strategy looks sane
Bug: 33965858
Change-Id: I66f95089cb33f1add3f31fcf1082ab2469870fda
nstalld/Android.bp
nstalld/CacheItem.cpp
nstalld/CacheItem.h
nstalld/CacheTracker.cpp
nstalld/CacheTracker.h
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
7d9483a508029826b69b3bac437754d7a9d993f6 18-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Add systrace details to storage measurements." am: a693382d94 am: b0858a472e am: 6248cde3b3
am: 64a2155e1d

Change-Id: I93d3eba418b98081eca6a2b0cabda58db5649057
64a2155e1daa4d45b826689f483222045c000450 18-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Add systrace details to storage measurements." am: a693382d94 am: b0858a472e
am: 6248cde3b3

Change-Id: I2d259e341128528ef0d81e9dea4631527efd48dc
6248cde3b36f165e4cc3171d8beec3946df1d779 18-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Add systrace details to storage measurements." am: a693382d94
am: b0858a472e

Change-Id: I37efa4372b36d97e0fbbac362d74e66957eca569
a693382d9452c3d5c1f3a37422653038b0c38253 18-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Add systrace details to storage measurements."
4623279948c5e457f6a94f4c2f2f9f712642657f 18-Jan-2017 Sandeep Patil <sspatil@google.com> Merge "servicemanager: selinux: set selinux callbacks early" am: bfbe2d711c am: a7575ec40f am: f32881a401
am: 46dd875465

Change-Id: I7f203727aa257adf80d92e777013e0da6bfae481
46dd875465e5aa01c52c5d5f245c361d756f5d04 18-Jan-2017 Sandeep Patil <sspatil@google.com> Merge "servicemanager: selinux: set selinux callbacks early" am: bfbe2d711c am: a7575ec40f
am: f32881a401

Change-Id: I0d6dfd8a807cec0b9cdefab79f3bcfe817976579
f32881a401701b40b1d518676dae99a31b8f4764 18-Jan-2017 Sandeep Patil <sspatil@google.com> Merge "servicemanager: selinux: set selinux callbacks early" am: bfbe2d711c
am: a7575ec40f

Change-Id: Id220cef18e1b003f5c0edd3a8da4d2871d2055a9
bfbe2d711caad5aa63a82ac5164657571f485788 18-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "servicemanager: selinux: set selinux callbacks early"
466459b68da52edf20962c3c80e2fe0325569c18 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Add systrace details to storage measurements.

Can be used to find bottlenecks, and confirm that quota stuff is
being used when expected.

Test: builds, boots
Bug: 34341727
Change-Id: Ifefc155e5d3b0c74245e0d287e84df699ce09d16
nstalld/InstalldNativeService.cpp
989b812dcd0d0a52de0d59fcf307ee3ee2b1bdee 14-Jan-2017 Josh Gao <jmgao@google.com> dumpstate: use O_APPEND for anr file.

Bug: http://b/30705528
Test: ran dumpstate, grepped dmesg for new selinux denials
Change-Id: I28814edcf37a7edbde79279feff0e7def64316f2
umpstate/utils.cpp
d2db024a868706547ff55b1be8a9ee1a154b911c 06-Jan-2017 Josh Gao <jmgao@google.com> dumpstate: switch to using libdebuggerd_client.

Bug: http://b/30705528
Test: manual inspection of dumpstate output
Change-Id: I8f9822f67f1a81fcfa2b3a9120e6631b19b29854
umpstate/Android.mk
umpstate/utils.cpp
4a391f80601d7f65d7e63353363e6d32868161d5 15-Jan-2017 Calin Juravle <calin@google.com> Clean up and simplify the logic in dexopt

Make some order in dexopt logic by extracting independent parts in their
own helpers.

It will make further updates of dexopt simpler and easier to reason
about (e.g. for secondary dex files).

Test: device boots
adb shell cmd package compile -m speed|speed-profile packageName
install new packages

Bug: 32871170
Change-Id: I691c76703c4c2314881124c5fae5b760fe503af5
nstalld/dexopt.cpp
28702bb83a5d300d7ca949b49587a3300da60a3f 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Handle devices without quota, speed up lookup." am: 36ba03a248 am: 411ae16a91 am: 9eeb77f0dd
am: bf8bc22859

Change-Id: I94e86de78b8d84f0d3a23ff627b0808812a47ded
bf8bc22859b78dfb4389869bec4c346ac5aa7e5f 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Handle devices without quota, speed up lookup." am: 36ba03a248 am: 411ae16a91
am: 9eeb77f0dd

Change-Id: I6f6004769a576003a5fb27bcd78470badf43d68a
9eeb77f0dde6e61fa8fafef7869fcae19f683a75 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Handle devices without quota, speed up lookup." am: 36ba03a248
am: 411ae16a91

Change-Id: Icb7deaa5e60880d783fc4c434bbd0e70ad2c188b
93ba7019cb473158bdea1b8fc73a1db34ea9a129 27-Dec-2016 Sandeep Patil <sspatil@google.com> servicemanager: selinux: set selinux callbacks early

SELinux library error logs are never be shown in logcat if
there's a failure before the callbacks are set. We missed
all logs from service context initialization because of this.

Bug: 33746484
Test: Restart new service manager to make sure context init logs
show up in logcat.

Change-Id: I5479cf5fe10ceb1a210eda26946b6ea344792e24
Signed-off-by: Sandeep Patil <sspatil@google.com>
ervicemanager/service_manager.c
d972d4206db6e42cc574586a1af2f94264a04519 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Wrap all installd operations in lock. am: 7a9059e8ed am: b940bdae84 am: 0c4cc3ebf1
am: 53c09d3b56

Change-Id: I97bb0b683c0033815009e6d9376aa18d1f503ebc
eca1bff0ce7709830816418107c8f444afdd33f5 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Mask st_mode before comparing it. am: 24ef15bd00 am: 0e636867b5 am: fc7bb04d26
am: d7025b423a

Change-Id: I19192f9d88fc022a4c252035ee6360e7a897b05e
53c09d3b56f9dd0c8d2b87f342f832552281d291 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Wrap all installd operations in lock. am: 7a9059e8ed am: b940bdae84
am: 0c4cc3ebf1

Change-Id: Ia1f4a8234e8ecbc7040e1042ad4c3d77d8399770
d7025b423ad5034c631814dbe2cf791ba7e1c169 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Mask st_mode before comparing it. am: 24ef15bd00 am: 0e636867b5
am: fc7bb04d26

Change-Id: I47042d02d6a9de1678f24eb7fda1be61c9d51631
0c4cc3ebf1f6b96d003a5763ffd5d1b92a1f414d 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Wrap all installd operations in lock. am: 7a9059e8ed
am: b940bdae84

Change-Id: I494c59b015dac7dd301c1666ef95a9c28a00f7e3
fc7bb04d261c794bf80589e0f040f46992bd39d2 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Mask st_mode before comparing it. am: 24ef15bd00
am: 0e636867b5

Change-Id: Ic8968f123759d36d49bf9bd65ec17e7f6024b888
66b1a12e7a120f85042669bb58f1db864616b506 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Handle devices without quota, speed up lookup.

Start tracking which block devices have quota support, and gracefully
clear FLAG_USE_QUOTA when no support is present.

Also build a cached map of mounted volumes that support quota, which
halves the average quota calculation speed from 0.70ms to 0.35ms,
since we're no longer parsing procfs every time.

Test: builds, boots, common operations work
Bug: 34249218
Change-Id: Ie791df7801b67495331f3eea256c018860c9b4f6
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
7a9059e8ed297a8e025c843b632c7c8571682b46 17-Jan-2017 Jeff Sharkey <jsharkey@android.com> Wrap all installd operations in lock.

Historically installd has a single lock up in the framework, but
we're starting to call in from multiple locations, so installd needs
to protect itself.

This specifically applies to any disk measurement requests, which
use the optimized fts(3) mode which uses chdir() internally.

Test: builds, boots, common operations work
Bug: 34330051
Change-Id: Ic746ea890ebcc7b2bf923404874b04dbc19d42ad
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
24ef15bd009204b73ebf0e94ba3d868177a5f44c 13-Jan-2017 Jeff Sharkey <jsharkey@android.com> Mask st_mode before comparing it.

Otherwise it will never match the requested mode_t.

Test: builds, boots, skips when matching
Bug: 34201111
Change-Id: Iebaa8063a72eb6eaf2e773c1d35204617d0f16b8
nstalld/InstalldNativeService.cpp
47e9be2d71c5eca9002e289c98e8bbc20dffc073 22-Dec-2016 Felipe Leme <felipeal@google.com> Moved DumpstateUtil.h functions to its own namespace.

Also make it a shared library.

Test: dumpstate_test passes
Test: manual verification

Bug: 26379932

Change-Id: I75dd3ef9fec3ac692a132bdd8c68307c1a1ee602
umpstate/Android.mk
umpstate/DumpstateUtil.cpp
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
7440ddb786b7732478173fe142512dba4e2a8dfd 16-Dec-2016 Steven Moreland <smoreland@google.com> dumpstate: remove references to legacy dumpstate

Test: dumpstate_tests pass
Test: manual verification
Bug: 31982882

Change-Id: If48cccec2e334d54acf6f3a67098475d3122117a
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/libdumpstate_default.cpp
umpstate/tests/dumpstate_test.cpp
9e0bfcf8cd1f1c19355b3a9574aacc7eb5fcaced 13-Jan-2017 Ecco Park <eccopark@google.com> Merge "expose the GetPidByName API of dumpstate"
61ffcf73d50dbed5b52265e79bb73abf1849324d 28-Oct-2016 Ecco Park <eccopark@google.com> expose the GetPidByName API of dumpstate

Bug: 32248316

This API is used by external dumpstate module
1) add unittest for GetPidByName
2) change the API name to c++ style
3) Test: dumpstate_test pass

Change-Id: I5eb80e0d1f1ef0f09b77ac3affd8a9b41d64f679
Signed-off-by: Ecco Park <eccopark@google.com>
umpstate/DumpstateUtil.cpp
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/tests/dumpstate_test.cpp
185f9aee74ae60c35bbd337dc912814ace4abb9e 12-Jan-2017 Felipe Leme <felipeal@google.com> Merge "Added a dumpstate readme for development."
561d531811c3aff18eb1e65f5cf666c0913bb2a7 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h when utilizing ALOG macros" am: 9a30f044ca am: 70a969c6fc am: eed9f305d1
am: ce85202907

Change-Id: Ia3b7d023db0f2f9705927fcb02cd4cdee1846670
ce8520290703e060c0a3396111894d41f3a2f35b 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h when utilizing ALOG macros" am: 9a30f044ca am: 70a969c6fc
am: eed9f305d1

Change-Id: I8b74f7e83492f0023c76be4796a2e94455fd87d8
eed9f305d1c8eeb3a951e8a0624ee5a36fae5390 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "liblog: use log/log.h when utilizing ALOG macros" am: 9a30f044ca
am: 70a969c6fc

Change-Id: I5b2e4fa842edf56ab85c6bcb24997e537c02d5de
527bd084723838071c6b4bf79431c4293a3144f8 12-Jan-2017 Felipe Leme <felipeal@google.com> Added a dumpstate readme for development.

Test: verified a formatted .md
Change-Id: If34b75c74d23bbe2afb025a59cb75f09f1d147d7
umpstate/README.md
4eb1382e54cd9e8ae805d2725e6afc7cbe29dd99 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> liblog: use log/log.h when utilizing ALOG macros

Audit dropout because ALOG is behind MYLOG ...

Test: compile
Bug: 34250038
Change-Id: I009478157d2267e10f8c09a7faa4b8f7c7c4a1e7
umpstate/utils.cpp
4fa9ca7fe642ea5787089611ec17e72895e84727 12-Jan-2017 Martijn Coenen <maco@google.com> Merge "Don't print error if we can't talk to hwservicemanager." am: 53d36e4476 am: c144b7da38 am: 63f8f36dbd
am: 12a615c83c

Change-Id: If1facb53f01a7eb33dfdf70681c6de72fa4cef63
12a615c83ceccf1e2216717ff1c63162dce4fa51 12-Jan-2017 Martijn Coenen <maco@google.com> Merge "Don't print error if we can't talk to hwservicemanager." am: 53d36e4476 am: c144b7da38
am: 63f8f36dbd

Change-Id: I53ade820c7285638d444c7ca248e416e6e807f92
63f8f36dbde5203cff62a15b89e6478aaa325374 12-Jan-2017 Martijn Coenen <maco@google.com> Merge "Don't print error if we can't talk to hwservicemanager." am: 53d36e4476
am: c144b7da38

Change-Id: Ib2b9c2e285bd0dddab59b4ee40599d9fed63fd49
53d36e44764bca0d79691959c69474b9b6e338de 12-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Don't print error if we can't talk to hwservicemanager."
e0ea99cc4ba89452b9b6b1baa33bddcb11f3351a 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of a2c2d11f9 to master

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I84d0ffa430df3beca0dcc6ed205ce220d7be1f87
64d54eb0465c7c372ea1b57a9fa4984be0cd79f8 12-Jan-2017 Martijn Coenen <maco@google.com> Don't print error if we can't talk to hwservicemanager.

This currently fails as a non-root user due to SEPolicy,
and is causing CTS test failures. Until we figure out
the policy on b/34242478, don't print an error to allow
the test to pass again.

Test: cts-tradefed run cts --module CtsAtraceHostTestCases --test
android.atrace.cts.AtraceHostTest#testSimpleRun

Bug: 33814619
Change-Id: Ie5578639028e7890284d71bbf1b753f5803ca4af
trace/atrace.cpp
a2c2d11f98b692401be56c8f285c570bae47ddda 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "Replace cutils/log.h and rationalize log/log.h and android/log.h" am: d655e61a22 am: 16a30c1ac8
am: fbc9758151

Change-Id: I911936217c6b47f48092319ff66edafaf0f7c395
fbc97581511f1fa6aba808a970afa912706fbdea 12-Jan-2017 Mark Salyzyn <salyzyn@google.com> Merge "Replace cutils/log.h and rationalize log/log.h and android/log.h" am: d655e61a22
am: 16a30c1ac8

Change-Id: I697418fbab0dbbd447d0dca2eda5b1545cc2522e
de3d159226fd695219f55e6724c6c308ac0b7b7b 12-Jan-2017 Felipe Leme <felipeal@google.com> Added -t option to dumpstate.
am: cd4d6631fa

Change-Id: Ib29893ecf7400bd4890dda09164d525e904aa219
7823e124e00576e20e47ec717cbe8bc89f0f2bf2 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if possible
- add system includes that are assumed as side effects
- define LOG_TAG first

Test: compile
Bug: 31289077
Bug: 30465923
Change-Id: I8d99b24c333578c9b5aa9f2a01324bd0bba268dd
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/globals.cpp
nstalld/otapreopt.cpp
nstalld/utils.cpp
p-up-vpn/ip-up-vpn.c
ervicemanager/binder.c
ervicemanager/service_manager.c
f7fdd527921ea896d645109b4783d2c2a15f90d6 11-Jan-2017 Felipe Leme <felipeal@google.com> Merge "Added test cases to dumpsys." am: 5cfc1c0546 am: 74ee4a06a3
am: 70a7c38431

Change-Id: I45a9525b275bb0b327fce9982901b8e3304e2783
70a7c384312e314b4af6cfe25a35820d354d0d8a 11-Jan-2017 Felipe Leme <felipeal@google.com> Merge "Added test cases to dumpsys." am: 5cfc1c0546
am: 74ee4a06a3

Change-Id: I5e536d12eef0ff8d41030f037f309f67c880b2a7
5cfc1c0546d797ebca9bdc3645585e33cc0c1193 11-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Added test cases to dumpsys."
6ec6ac46c457fb54752c7044647e77b4008ed2cf 11-Jan-2017 Felipe Leme <felipeal@google.com> Added option to take a 'bugreporttelephony'.

This option takes a lightweight version of bugreport that only includes a few,
urgent sections used to report telephony bugs.

BUG: 32589463
BUG: 26849505

Test: dumpstate_test passes
Test: manual verification
Change-Id: I9b7369323a62e30e5d740eeb22db0045262387ba
umpstate/dumpstate.cpp
de8eebfe59117a8cc75e223bb2b5c5b84d7d6808 11-Jan-2017 Richard Uhler <ruhler@google.com> Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed." am: 6c207a7d96 am: 83c87d4985 am: 3977570f9f
am: 94b74589f8

Change-Id: Icc93e0e83e6608f1ce064d40df8bd863f9cde0a6
94b74589f87aa4576ecf1a89724e3515ed77547b 11-Jan-2017 Richard Uhler <ruhler@google.com> Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed." am: 6c207a7d96 am: 83c87d4985
am: 3977570f9f

Change-Id: Ib75da8118af0cef7bd06a9a88478529b64cd328d
3977570f9f38ec219b5c2abc08cc9ceba4871ab0 11-Jan-2017 Richard Uhler <ruhler@google.com> Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed." am: 6c207a7d96
am: 83c87d4985

Change-Id: I72c03782c82ff40cef7c520adc6d694b52289951
6c207a7d9607c394c786cb1c2275de9c60afc305 11-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed."
cd4d6631fabdfda39818eb561734104369f776b9 06-Jan-2017 Felipe Leme <felipeal@google.com> Added -t option to dumpstate.

This option takes a lightweight version of bugreport that only includes a few,
urgent sections used to report telephony bugs.

BUG: 32589463
BUG: 26849505
Test: manual
Merged-In: I9b7369323a62e30e5d740eeb22db0045262387ba
Change-Id: I9b7369323a62e30e5d740eeb22db0045262387ba
umpstate/dumpstate.cpp
umpstate/dumpstate.rc
343175a5ffeba6d1714336913a81b3029df73dbb 03-Aug-2016 Felipe Leme <felipeal@google.com> Added test cases to dumpsys.

BUG: 28980245
BUG: 33382892

Test: dumpsys_test passes

Change-Id: Ief6c21022abc74022256431351fd6eef789faf39
(cherry picked from commit b6e244914deaffcdeea02deebf7c0da2643f601c)
umpsys/.clang-format
umpsys/Android.bp
umpsys/dumpsys.cpp
umpsys/dumpsys.h
umpsys/main.cpp
umpsys/tests/Android.bp
umpsys/tests/dumpsys_test.cpp
6ae5c4f52b55943a7a84fb3cb47710effe788e11 10-Jan-2017 Felipe Leme <felipeal@google.com> Reverted wake_lock code.

If dumpstate dies, there is no guarantee the wake_lock will be released...

Fixes: 34193090
Bug: 33327009

Test: dumpstate_test passes
Test: manual verification
Change-Id: I4662722b1f82f3e140e174e506864a452c002fc8
umpstate/Android.mk
umpstate/DumpstateInternal.cpp
umpstate/dumpstate.cpp
78ef6e13966b830d111f18702948d77cfa2634a7 10-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Methods to calculate user and external disk usage." am: 4d9746d7a3 am: 15e80e0436 am: e5281b7f9b
am: 4e4e8ab3a4

Change-Id: I954e87563f1a8222be418221657e730ffda51814
4e4e8ab3a48e5ce760d795be6bb4b0490cfd5d32 10-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Methods to calculate user and external disk usage." am: 4d9746d7a3 am: 15e80e0436
am: e5281b7f9b

Change-Id: Ie7f29f8b10dc1e9158c7574e9836e27e3fda62eb
e5281b7f9b14b50dda74c41ed85ac0b80a97e038 10-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Methods to calculate user and external disk usage." am: 4d9746d7a3
am: 15e80e0436

Change-Id: I63799087ee8b62b68da1f39ee2495b54481bd866
df2d754b38796e0c49c70e0a67f7d383e3079ff2 07-Jan-2017 Jeff Sharkey <jsharkey@android.com> Methods to calculate user and external disk usage.

Add method to calculate user disk usage, which will be faster than
making a Binder call for every single appId under a user. Add method
to calculate external disk usage, which uses file extensions to track
usage with "audio", "video", and "images" categories.

Add script to generate optimized file extension matcher logic.

Start measuring internal and external storage space separately; new
GIDs are coming in a future CL. Pass down all package names, inodes,
and code paths, since shared UIDs host more than one.

Test: builds, boots, stats are consistent
Bug: 27948817, 32206268
Change-Id: Icb9843ac5159e0e5f1503d9b64e0bcae407e1a5d
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/MatchExtensionGen.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/matchgen.py
nstalld/utils.cpp
nstalld/utils.h
f4f0b805b515df3e64928e0b80929e66cee11cde 09-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dump task I/O information from storaged."
f649a6ef3ca6358f605aea100c77a3f20f4af937 18-Jul-2016 ynwang <ynwang@google.com> Dump task I/O information from storaged.

Bug: 30983988
Test: generate bugreport
Change-Id: I8631e08af175f9fd6efd09f8b0106d77554edb60
umpstate/dumpstate.cpp
76cc027ca6ebfd2f870c1cbb8f1d1fd19e0ac8e9 08-Dec-2016 Richard Uhler <ruhler@google.com> Cleanup code given PATCHOAT_FOR_RELOCATION has been removed.

Test: make, device boots.
Bug: 33192586
Change-Id: Ic3937708a7dfcd16f02cf68fc20674ec457d60b7
nstalld/dexopt.cpp
865a01c8f1e1ba0fd1e8856f4b24c2ad4cc93d34 05-Jan-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass the same fd when compiling due to boot image update." am: 4f8c1fd2ea am: dd4268dc5e am: 5e28b3ea17
am: 3e9c24f0ac

Change-Id: I5a9f561273f339b1e4243585d2cf3eecf47cad9e
3e9c24f0ac04229c6ff007dbe768765f15b578d3 05-Jan-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass the same fd when compiling due to boot image update." am: 4f8c1fd2ea am: dd4268dc5e
am: 5e28b3ea17

Change-Id: Ie888266def019012e15436db981f5cba87757dce
5e28b3ea1779ddc372666f00ecaec3bf7660ea39 05-Jan-2017 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass the same fd when compiling due to boot image update." am: 4f8c1fd2ea
am: dd4268dc5e

Change-Id: I996ab33bafcba4480a99d81496864d5157bda316
4f8c1fd2ea233a343f05302221cb87d29fe06224 05-Jan-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Pass the same fd when compiling due to boot image update."
ca12228bc2a27b1cd01b820d01b2ef17622cc730 20-Dec-2016 Nicolas Geoffray <ngeoffray@google.com> Pass the same fd when compiling due to boot image update.

Test: device boots, apps get installed, OTA uses same vdex.
Change-Id: I913062630640f31a18d23b2f62afd74986322e6a
nstalld/dexopt.cpp
e328faf4b2eff026877fceeb2d130c3fc567930e 05-Jan-2017 Martijn Coenen <maco@google.com> Merge "Callback elision for HIDL interfaces." am: b7ee96a666 am: d390a8291a am: 8824b5252e
am: 26ad6b0d06

Change-Id: I4134bec0f49f4fe5fdc4d0ea06198567d7d76355
26ad6b0d0604fb26b25291a7c48b41522b25d93f 05-Jan-2017 Martijn Coenen <maco@google.com> Merge "Callback elision for HIDL interfaces." am: b7ee96a666 am: d390a8291a
am: 8824b5252e

Change-Id: I6902f398a0b80b6c077b60cc71bec63b900d7493
8824b5252e1b465c3bc460a72579a0fa0b5278d4 05-Jan-2017 Martijn Coenen <maco@google.com> Merge "Callback elision for HIDL interfaces." am: b7ee96a666
am: d390a8291a

Change-Id: I6977094aa5a97d82b51c18f605e258046c488c7e
f6ac84820198b66b687738cb5ec32b19e74fef2a 02-Jan-2017 Martijn Coenen <maco@google.com> Callback elision for HIDL interfaces.

Test: mma
Bug: 31380743
Change-Id: I33080b61d6233b63106b2602a628bfcdaa878a90
trace/atrace.cpp
2fc82a9b9319753c72acbbd7cbc5ce535e1a173b 04-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Reference profiles use shared GID for user 0." am: 226f77d87a am: ac437f476f am: 93d4073bc9
am: cdeb04edca

Change-Id: I876e3cbb360117aac41ab0f6601e65888d8b4e9f
cdeb04edca536beb6b4c0fb1da8f5be8c0a9948e 04-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Reference profiles use shared GID for user 0." am: 226f77d87a am: ac437f476f
am: 93d4073bc9

Change-Id: I011fb20fe94cd9717bbd3348a27b7c67cc4c2f08
93d4073bc9afb8190310e2b7bc480cb4a79fcc59 04-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Reference profiles use shared GID for user 0." am: 226f77d87a
am: ac437f476f

Change-Id: I937eb89caebc9a750adc4529f4a3620f8840cccf
adddd9876e145879169369913b5afe469b17c02d 03-Jan-2017 Jeff Sharkey <jsharkey@android.com> Reference profiles use shared GID for user 0.

Test: builds, boots
Bug: 33977235
Change-Id: I4de3852b3f230a6dc874a630e3c1b9fff2d83169
nstalld/InstalldNativeService.cpp
018343e4f29e809db3bc1b45682797c9568c315d 03-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Offer to measure disk stats using quotas." am: 8aed997c14 am: 5fcfd07918 am: c7cd1acccd
am: 92e6bc636a

Change-Id: Ifb9a2248fe048d0be91499169d3fd201dbb4e4f7
92e6bc636af4cc8535a448d24fe4d50a0c19f63b 03-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Offer to measure disk stats using quotas." am: 8aed997c14 am: 5fcfd07918
am: c7cd1acccd

Change-Id: I936632b80fb29dfdd5b201f0a86ee87e89931786
c7cd1acccd25f3e3aa0c29a5dd63d14c1a649f39 03-Jan-2017 Jeff Sharkey <jsharkey@android.com> Merge "Offer to measure disk stats using quotas." am: 8aed997c14
am: 5fcfd07918

Change-Id: I5aaeadb2167ed5b4e4bcfc2ddbd86a05a62e30d1
3dfae0c008576c873c4039bb4c2e54a6adf3720a 13-Dec-2016 Jeff Sharkey <jsharkey@android.com> Offer to measure disk stats using quotas.

Now we're getting somewhere! This CL starts using quotactl() to read
UID/GID quota statistics when called with FLAG_USE_QUOTA, otherwise
it continues using the old heavy-weight traversal for calculation.

We now set the recently defined per-app GID used for identifying
cached data, and we use the sticky GID bit on cache directories to
ensure that newly created data inherits the GID for tracking
purposes. For any existing apps during an upgrade, an initial
bootstrapping case will recursively set this new GID.

This change also shuffles around a bunch of the tedious manual
accounting logic so that we exactly match the new quota statistics.

Test: builds, boots, quota stats match manual stats
Bug: 27948817
Change-Id: I8512c3193ce698f197a3f446e625d6a1c74e7649
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/utils.cpp
nstalld/utils.h
c03d283e8b3f830d76dd94822b2a13872c05c730 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 525a5f2 to master

Test: build
Change-Id: Id1c6d3d9dd158fb086b0d8ab74f7838ef0a51af1
525a5f2da844d1acc9e405fc4935d8a1cb2ece67 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> Merge "Replace cutils/log.h and rationalize log/log.h and android/log.h" am: 1efda0b1d6 am: 7e92307cd8
am: 430f62090c

Change-Id: I8bbed9204718da324f0bdeceb7b8156cb315e900
430f62090cefe4630794873e30390433ad3e49a7 28-Dec-2016 Mark Salyzyn <salyzyn@google.com> Merge "Replace cutils/log.h and rationalize log/log.h and android/log.h" am: 1efda0b1d6
am: 7e92307cd8

Change-Id: I1523bfc0794fe8463fb6134ae8d8c5902947de8b
a5e161b1207ef447a51e99856097d69d4a6111e1 29-Sep-2016 Mark Salyzyn <salyzyn@google.com> Replace cutils/log.h and rationalize log/log.h and android/log.h

- cutils/log.h treat as deprecated and lead by example
- android/log.h to be used instead of log/log.h if required
- add system includes that are assumed as side effects of log.h
- modules that use SLOG should use SLOG for all logging (installd)
- define LOG_TAG first
- remove logging infrastructure if not used

Test: build
Bug: 31289077
Change-Id: Iea147a0104c7ab7f12451304131d6500f42141e7
umpstate/utils.cpp
nstalld/dexopt.cpp
nstalld/globals.cpp
nstalld/installd.cpp
nstalld/otapreopt.cpp
nstalld/utils.cpp
p-up-vpn/ip-up-vpn.c
ervicemanager/binder.c
ervicemanager/service_manager.c
c3fed34248b6991059c709ce9c7b16d02c06b32b 22-Dec-2016 Yifan Hong <elsk@google.com> Merge "Update for hiding Status from Return<T> object." am: c47aa53c84 am: e6d3ac9834 am: 672886dfdd
am: 20bfa17b2a

Change-Id: I175ec943aabab67731ffc063c7eb9fd3a48a200d
20bfa17b2a4bfb76f54aeb9301296d0f19ad1f3c 22-Dec-2016 Yifan Hong <elsk@google.com> Merge "Update for hiding Status from Return<T> object." am: c47aa53c84 am: e6d3ac9834
am: 672886dfdd

Change-Id: If28f500f8ac03b26616fd3989f495862352076a6
672886dfdd7051f66b251a8982e0657aa859baf9 22-Dec-2016 Yifan Hong <elsk@google.com> Merge "Update for hiding Status from Return<T> object." am: c47aa53c84
am: e6d3ac9834

Change-Id: Ied0f1916b10b4f2edaa713716284acef1f5e3721
c47aa53c84cc7ac0194057c3afac005437d5ae2b 22-Dec-2016 Yifan Hong <elsk@google.com> Merge "Update for hiding Status from Return<T> object."
74b37b98cd39e6592953da8a3aad2700e23a872f 21-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Only log restorecon changes for existing dirs." am: ee080ea229 am: ed8915cc2c am: 4500fde965
am: 1e6f01483a

Change-Id: I11a036ab1c2e6d7e854474205da8fced743d4cb1
1e6f01483afb16932bd6fb6a8bd590cf016f74c7 21-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Only log restorecon changes for existing dirs." am: ee080ea229 am: ed8915cc2c
am: 4500fde965

Change-Id: I2dd392bf176d795f26a4b497971a177d96746a63
4500fde965efea763aceecc1a82314c8ffb4b546 21-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Only log restorecon changes for existing dirs." am: ee080ea229
am: ed8915cc2c

Change-Id: I3895295399a51b93ad5dea76d8d346591d6ca178
036320995cc3e687649685ca346ae0c90174ba41 21-Dec-2016 Yifan Hong <elsk@google.com> Update for hiding Status from Return<T> object.

Test: compiles

Change-Id: Ie32514f34efaa1188f34f662b194b60d83c20bf0
trace/atrace.cpp
35b83dff3de2b5fe781a060566ee09266b3c2617 21-Dec-2016 Jeff Sharkey <jsharkey@android.com> Only log restorecon changes for existing dirs.

If we just created an app private data directory, we're always going
to be relabeling it, so don't log in that case. Continue logging if
something caused us to relabel an existing app data directory.

Test: builds, boots, only logs for existing dirs
Bug: 31958779
Change-Id: Id03f7c18aed191a4c7fb9dcf9380136c93798a4b
nstalld/InstalldNativeService.cpp
f4237c11d2daa4fdce728dc607b70563bdb8d7bb 20-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Remove ~1/3 of the installd calls at boot." am: ed04f3c7e5 am: 3f79c64976 am: 32aaf887ef
am: e5b37140f6

Change-Id: I4fda5d7b7f2d8f19d4b3ec6ea4a6ab31708f1c16
e5b37140f66f29678392ab2ef5d012715e4dee19 20-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Remove ~1/3 of the installd calls at boot." am: ed04f3c7e5 am: 3f79c64976
am: 32aaf887ef

Change-Id: I82bb9ca769fdc761a04a667c3c013a6f45fc5c03
32aaf887efea551cccdf2697bd9d49ff29612b3b 20-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Remove ~1/3 of the installd calls at boot." am: ed04f3c7e5
am: 3f79c64976

Change-Id: I20e68b8a24f2242160110df51d673d18a127d64e
36a900a0db526d63e899ed5d5b0a463ad7f9236e 20-Dec-2016 Jeff Sharkey <jsharkey@android.com> Remove ~1/3 of the installd calls at boot.

When preparing CE storage for an app, we always perform a second call
to extract any newly created CE directory inode. Let's simplify this
and just return the inode number from the createAppData() call.

Test: builds, boots, reads CE inodes after wipe
Bug: 33463450
Change-Id: I68485e4b9b49e9da7b3ac7c66f50c6abc750b7e3
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
451c17d82077cca61d0d04097961e99d84f54146 16-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Handle invalid shared GIDs." am: 788bdeae78 am: 477601a9ff am: 4be16dccfe
am: 2d9bf64d9f

Change-Id: I3fb92764c2a0271483e31646c63fbabd1f1c58c6
2d9bf64d9f63ed908ef1163223d383d7b1eb0346 16-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Handle invalid shared GIDs." am: 788bdeae78 am: 477601a9ff
am: 4be16dccfe

Change-Id: I3f845cb228aa409709da1f8de0444c9843533c01
4be16dccfe5b14aa1127ef32ebfaca627c2822b4 16-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Handle invalid shared GIDs." am: 788bdeae78
am: 477601a9ff

Change-Id: Id21818687508092e41a970b9cd18ddbe15b7d740
2e6dc9baaaf5d50b42ce36435e13c2559808b837 15-Dec-2016 Jeff Sharkey <jsharkey@android.com> Handle invalid shared GIDs.

Shared GIDs are only available inside a range from 50000-59999, so
system UIDs (outside the normal app range) don't have a valid GID to
use. The best we can do is skip the profile setup in those cases.

Test: builds
Bug: 27948817
Change-Id: I8c38a0e3631eafd07e96da3e37e641b3cce195a6
nstalld/InstalldNativeService.cpp
c655a2a5297b5fd3e8084bf55f5b56a76226d61a 14-Dec-2016 Steven Moreland <smoreland@google.com> Fix libhidlbase dependency.

Fixes treehugger failure on:
https://android-review.googlesource.com/#/c/312987/

Test: compiles
Change-Id: Ia974b825d2b00f06d76b20481e9b2f0c7b9f90f8
umpstate/Android.mk
2302daa97b898171a29c6c02013ee9b970297bfc 13-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use IVibrator hidl service in dumpstate."
cb7ef82aef52e766c45f65f446d02fd9356afea4 29-Nov-2016 Steven Moreland <smoreland@google.com> Use IVibrator hidl service in dumpstate.

Bug: 33067126
Test: Dumpstate vibrator works. dumpstate_test passes.
Change-Id: I9a87755f695829482d072e538e4938f35f393ae4
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
d83faa529c9e9e0d1cc946548595cb3162be0f99 13-Dec-2016 Steven Moreland <smoreland@google.com> Merge "Make atrace not depend on /dev/hwbinder." am: 228f4bdaa9 am: 10c9c24e23 am: cb6462ade8
am: 19040aa53a

Change-Id: Ifd53f9b42547a07e877ecb7d381f21cb3bb2f87b
19040aa53a776b4b8a4c1a7aa6e2a4c49a6e88d1 13-Dec-2016 Steven Moreland <smoreland@google.com> Merge "Make atrace not depend on /dev/hwbinder." am: 228f4bdaa9 am: 10c9c24e23
am: cb6462ade8

Change-Id: I2eee6a195d2ad5c494984e7d385836a892083fa7
cb6462ade80d1f934386591de30da2540ac15959 13-Dec-2016 Steven Moreland <smoreland@google.com> Merge "Make atrace not depend on /dev/hwbinder." am: 228f4bdaa9
am: 10c9c24e23

Change-Id: I2dccc33d53dab6b6d7c65b03edbd9e7b0691e796
228f4bdaa90543cc1437f232cb2df7760eb7da69 13-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Make atrace not depend on /dev/hwbinder."
f976b160fdf8517c1a34090f41a5c7068f6b7bef 13-Dec-2016 Josh Gao <jmgao@google.com> Merge "atrace: introduce tracing category for adb." am: 3c9a97902d am: 0deeeac8d1 am: 7c6061ed4b
am: dfdb951c97

Change-Id: I9e8a692191b7f0ed35d146e534ac1b9211ba2679
dfdb951c9724c693fd04e123c23cf9c2b19df455 13-Dec-2016 Josh Gao <jmgao@google.com> Merge "atrace: introduce tracing category for adb." am: 3c9a97902d am: 0deeeac8d1
am: 7c6061ed4b

Change-Id: Ie56c495139f0fa595c747066a0544f80bb388f1a
7c6061ed4b70a97eccd1c0be444efd3efb7afb92 13-Dec-2016 Josh Gao <jmgao@google.com> Merge "atrace: introduce tracing category for adb." am: 3c9a97902d
am: 0deeeac8d1

Change-Id: I73946e269c69e15974b5a74693063b0c12b13f4e
0ac72cff4dd86cc7f4e4ef0d30f1dc7651ac9dbb 13-Dec-2016 Jeff Sharkey <jsharkey@android.com> resolve merge conflicts of d77e675 to master

Change-Id: I211db442e0081ee51f889b1fe788dad08889c2ec
3c9a97902d6359bda61e05086849de5ed031d71b 13-Dec-2016 Josh Gao <jmgao@google.com> Merge "atrace: introduce tracing category for adb."
d77e675d5f206f8e9825b2fd99908d7cf0583544 13-Dec-2016 Jeff Sharkey <jsharkey@android.com> Split all dexopt-related code into dexopt.cpp. am: 90aff26f01 am: 1238205059
am: a0adc96cbc

Change-Id: Id79949c4108a597cadb2ea87c8c1652039203646
a0adc96cbcb434b65317ed921ab478b5c4692774 13-Dec-2016 Jeff Sharkey <jsharkey@android.com> Split all dexopt-related code into dexopt.cpp. am: 90aff26f01
am: 1238205059

Change-Id: Ie76d6c2016b8d5ceb6b5d59ae508d8729c6ea849
a42866b4cb9218cc80b8217ff9ad6458c3c4864e 13-Dec-2016 Steven Moreland <smoreland@google.com> Make atrace not depend on /dev/hwbinder.

Bug: 31262344
Test: compiles
Change-Id: I2b4fa6815723507dd04afda19e99e5a15053dc66
trace/atrace.cpp
7da5fc78535e3fd1581b3594b694a454a5badfe0 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Minor shuffling of installd error reporting." am: 991707a167 am: 405dbf06b5 am: 18148ac756
am: bbb06f3b6a

Change-Id: Ifd2d7c59b6698d2c6dfb35e1a99aa51df4bce9df
bbb06f3b6a5600df676388a5242f23890fd72bdd 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Minor shuffling of installd error reporting." am: 991707a167 am: 405dbf06b5
am: 18148ac756

Change-Id: I5686647a528dbeb8eaf4ba70fc1d47dd096713d8
18148ac7568faeb164c8c1162815f5285cc5d619 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Minor shuffling of installd error reporting." am: 991707a167
am: 405dbf06b5

Change-Id: I28a9d146ad51298d1d9c668e71929e7695b5b2e1
90aff26f0135379db19432ae90c40c0831ba5954 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Split all dexopt-related code into dexopt.cpp.

Only a few minor changes to return bool instead of binder::Status.

Test: builds, boots, apps install/uninstall fine
Change-Id: I538024c0e9da8ca2c0983a6e779c34bd40752053
nstalld/InstalldNativeService.cpp
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/utils.cpp
nstalld/utils.h
468b4cb566fd81d7181764d3f7121125c7db3b24 29-Nov-2016 Josh Gao <jmgao@google.com> atrace: introduce tracing category for adb.

Bug: http://b/31289465
Test: systrace
Change-Id: Ida5e898206e5b224771393d2d2ba609183dc3b90
trace/atrace.cpp
7be5ead81aa4d3b2536556c762bab03445a98155 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Minor shuffling of installd error reporting.

We actually want to early-return when creating user data fails, and
we want to return an exception when getAppDataInode() is called with
unsupported flags.

Test: builds, boots, apps install/uninstall fine
Bug: 13758960, 30944031
Change-Id: I69816275a0be7a73a8ae7f3d90f2cdea80d8ebfc
nstalld/InstalldNativeService.cpp
ae01df2851d0f188f2459eccefca926cf5ccf9d0 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Return real error strings from installd." am: 8f3ce2cd66 am: 6bd17e8e69 am: 7231e852a2
am: ee0d2ed9fa

Change-Id: Ia9f0bf02967d66e3bd39dc0e51cffd234a97c108
ee0d2ed9fab239e1cde5e862ca7e3b6c8a34e994 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Return real error strings from installd." am: 8f3ce2cd66 am: 6bd17e8e69
am: 7231e852a2

Change-Id: I562a85ad7b36c91c4ea74b0745413388f6d6abd9
7231e852a26e73c0229ea332de9c9873dc7bc41d 12-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Return real error strings from installd." am: 8f3ce2cd66
am: 6bd17e8e69

Change-Id: I7ea174edd4db19845a7681eb3821b2911861ca73
a9cc65f753b15339e70a2376c6878604e2b16377 14-Sep-2016 Ajay Panicker <apanicke@google.com> Add btsnoop_hci.log to bugreport zip (1/2)

Bug: 28672558
Test: Manual
Merged-In: I2995a9fd0e8be031c022ef8f275aae35265ba452
Change-Id: I2995a9fd0e8be031c022ef8f275aae35265ba452
(cherry picked from commit 2f531771707bcdfc12543a99c168f8462b423b13)
umpstate/dumpstate.cpp
umpstate/utils.cpp
423e746ac7d4b3a3d772dd0e01bdb9fd6029d439 10-Dec-2016 Jeff Sharkey <jsharkey@android.com> Return real error strings from installd.

Now that we've moved installd to Binder, we can return nice detailed
error strings explaining why a call failed. This is particularly
valuable when we record the error message into the PackageManager
persistent log, because up until now those errors were limited to
an unhelpful "installd returned -1" message.

Also perform uniform enforcement of all incoming package name and
UUID arguments.

Test: builds, boots, apps install/uninstall fine
Bug: 13758960, 30944031
Change-Id: Ic1f65ce8c10b1329e01d6a49d72cafa879c4d8bc
nstalld/InstalldNativeService.cpp
nstalld/utils.cpp
nstalld/utils.h
5465d8bbab8d12703b9a38a53027220de899e7a9 12-Dec-2016 Nick Kralevich <nnk@google.com> Merge "service_manager.c: remove is_selinux_enabled calls" am: fce768d017 am: 4646e4c581 am: cf5361cf87
am: 01fbe79911

Change-Id: I66154875621e12c1b0b48f99290ef0725162bf5c
01fbe7991170e6ac521727aca0dc700d857651e1 12-Dec-2016 Nick Kralevich <nnk@google.com> Merge "service_manager.c: remove is_selinux_enabled calls" am: fce768d017 am: 4646e4c581
am: cf5361cf87

Change-Id: Ief023a3be6ad3b5e3e7bb3960e431470d6acb3f1
cf5361cf87fbcaea9e7985cefb0fecf2dc3d154e 12-Dec-2016 Nick Kralevich <nnk@google.com> Merge "service_manager.c: remove is_selinux_enabled calls" am: fce768d017
am: 4646e4c581

Change-Id: I63a9f27535b2781de7d050071443d7fe73883de7
fce768d017e4e4c08c98396840c9557daeb3f926 12-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "service_manager.c: remove is_selinux_enabled calls"
0f70df22c1b950aeacb6edd3d2396a6439674643 11-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Filename refactoring, remove DEXOPT_OTA flag." am: 68603971f6 am: 4f1d7392b8 am: 00ee711d09
am: 671ccdfc37

Change-Id: I9b16e7c1dfe6650b2a63ec0e45e8818b3af228be
c996ed8748e2dd52e93a96b348382ad141ba9096 11-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Final push of installd to Binder; goodbye socket!" am: 24865a0868 am: 1186266f1b am: 3392e7b3de
am: ae70897463

Change-Id: I26623c4813a79ce4dc623b02755f17265abdf8e0
671ccdfc374b76b71d0c2cf5dd19fc672b10e5a3 11-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Filename refactoring, remove DEXOPT_OTA flag." am: 68603971f6 am: 4f1d7392b8
am: 00ee711d09

Change-Id: I3e4b7b87d8758402a9427bc4f89ac5ab969a35d3
00ee711d096ddc600ac3ea61f11c97f1a44a1e34 11-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Filename refactoring, remove DEXOPT_OTA flag." am: 68603971f6
am: 4f1d7392b8

Change-Id: I543a292b66690bd4764e262ee422e3ee47a02882
ae708974636707b1432fe4a861b93d8b2b949abe 11-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Final push of installd to Binder; goodbye socket!" am: 24865a0868 am: 1186266f1b
am: 3392e7b3de

Change-Id: I3f1fd0be7f7f5424a31d00e9abe83b7ae45b7d5e
3392e7b3de4a545c5fcf518dd33d4c5053090184 11-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Final push of installd to Binder; goodbye socket!" am: 24865a0868
am: 1186266f1b

Change-Id: I9382bde0b90aa8d3d0290a2429a3a1dd5c8e2726
eb4d5cbde02b17259e968321ef457b158ce1da4e 10-Dec-2016 Nick Kralevich <nnk@google.com> service_manager.c: remove is_selinux_enabled calls

SELinux is always enabled. No need to check for it.

Test: Device boots and service manager works without errors.
Change-Id: I12be7336e7c31a5f5796ea1383f3dc934eb3c97c
ervicemanager/service_manager.c
f3e30b936ef103dc0f3d8697e0f86ba82b49609e 10-Dec-2016 Jeff Sharkey <jsharkey@android.com> Filename refactoring, remove DEXOPT_OTA flag.

Test: builds, boots
Bug: 13758960, 30944031
Change-Id: Ib60899fc70b12f76fad9dfad596b513777752703
nstalld/Android.bp
nstalld/Android.mk
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/commands.cpp
nstalld/commands.h
nstalld/globals.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
nstalld/tests/installd_utils_test.cpp
6c2c056193010cf93b4264810d462c120ce801c8 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Final push of installd to Binder; goodbye socket!

Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.

Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug: 13758960, 30944031
Change-Id: I2ecd604fb6627b9028a7e32f87d0367e4a4afde3
nstalld/Android.bp
nstalld/Android.mk
nstalld/binder/android/os/IInstalld.aidl
nstalld/commands.cpp
nstalld/commands.h
nstalld/dexopt.cpp
nstalld/dexopt.h
nstalld/installd.cpp
nstalld/installd.rc
nstalld/installd_constants.h
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
d8b94e5e61ca744962400ebefa33c15c459571c4 08-Dec-2016 Felipe Leme <felipeal@google.com> Proper stdout buffering using setvbuf().

Bug: 33128765
Test: manual verification
Test: dumpstate_test passes

Change-Id: Ie6dc9b7eb8416293c01963bf224aef92ad3a50c1
umpstate/dumpstate.cpp
umpstate/utils.cpp
45d7690c170b95290c49006847c85679eff75e09 08-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed buffering issues."
8f00ed038f1de6fa0bbc73588f849b969be1d841 08-Dec-2016 Felipe Leme <felipeal@google.com> Fixed buffering issues.

- Replace all printf(...) and puts(...) calls to dprintf(STDOUT_FILENO).
- Replace all fflush(stdout) calls to fsync(STDOUT_FILENO).
- Added duration reporters on for_each functions.

Change-Id: If14b4d14ffc23bfead2ca8ad23b7b3027de01156
Fixes: 33128765
Test: manual verification
Test: dumpstate_test passes
umpstate/dumpstate.cpp
umpstate/utils.cpp
7c9787125da21b7b13270328220acb8e405af435 08-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Yet another set of installd Binder methods." am: 77f764d66f am: f2de2d1892 am: 2f930ae3b9
am: c90ae39681

Change-Id: I86c19e3a50eadaf9940b7b6df15a86e8fabe4685
c90ae39681278845e61909e54f4fa2cd73c16572 08-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Yet another set of installd Binder methods." am: 77f764d66f am: f2de2d1892
am: 2f930ae3b9

Change-Id: I89ae8314689c6fca4c077fb03fa232d51a515779
2f930ae3b92c0cb497da3e722e09e9f23edd3223 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Yet another set of installd Binder methods." am: 77f764d66f
am: f2de2d1892

Change-Id: I97a8ff8ea5e798977061ca6bfa2e6f41c46f4dc8
475c6f9743e5f6696c38fb22b8b8e9d49a82ab56 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Yet another set of installd Binder methods.

Pretty straightforward refactoring.

Test: builds, boots, apps install fine
Bug: 13758960, 30944031
Change-Id: I6e79fe1a3663807c24eb28dca684b539df398c13
nstalld/binder/android/os/IInstalld.aidl
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
db610546dd053721a310bed0773fbab42f5860b4 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Move more installd methods to Binder." am: f69c024050 am: 7e7ce45e1c am: e7a98cd308
am: 302bb81198

Change-Id: I80813e575dc670d81bf3293157344eec1b2b8405
302bb81198579c41dfa02e4f51327f75d806d3da 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Move more installd methods to Binder." am: f69c024050 am: 7e7ce45e1c
am: e7a98cd308

Change-Id: Iff7dceb5023a21dbc7ef9f272a9b2e119193477a
e7a98cd3088488d7f6550e281eb1565729ca84a2 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Move more installd methods to Binder." am: f69c024050
am: 7e7ce45e1c

Change-Id: Icf76d4f7895fd77d21d05572519b9a0fdc7665c4
f69c024050a73da00bcf199abc306611b528d3cd 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge "Move more installd methods to Binder."
ab5922d4787f2ebf943dd1116d6755e3a0fbd147 07-Dec-2016 Dan Willemsen <dwillemsen@google.com> Merge "Revert "Move installd back to Android.mk."" am: 1ae0486a54 am: 23ce729c01 am: 907ad285eb
am: f42caa82b2

Change-Id: If8627dcf7b664a4b6de5540c63d44ab55547e7ca
f42caa82b2b6ec84c6f3f8ae0f517e24ffb3ab7f 07-Dec-2016 Dan Willemsen <dwillemsen@google.com> Merge "Revert "Move installd back to Android.mk."" am: 1ae0486a54 am: 23ce729c01
am: 907ad285eb

Change-Id: I12c7b2f22240bde2c0730df959d090a53682a2e9
907ad285eb6950b9bd60c258c33d4d43a23611a6 07-Dec-2016 Dan Willemsen <dwillemsen@google.com> Merge "Revert "Move installd back to Android.mk."" am: 1ae0486a54
am: 23ce729c01

Change-Id: Ide925ed4c52981361680c31ed1e1e8d1a9268dd7
c1e93e7d746e07791b0667c80ad43a407c515fa8 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Move more installd methods to Binder.

Test: builds, boots, apps install fine
Bug: 13758960, 30944031
Change-Id: I1fcaaaaad34c2f9a3d6a15443ef1764186669865
nstalld/binder/android/os/IInstalld.aidl
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
4c939746f0b0d2354493c66a552cb7aec3e54b38 07-Dec-2016 Dan Willemsen <dwillemsen@google.com> Revert "Move installd back to Android.mk."

This reverts commit 00b6f68c5c72252542a1e8c5dda4b420ed02c947 and
converts the new entries to Android.bp now that Soong supports AIDL.

Test: mmma -j framework/native/cmds/installd
Test: /data/nativetest64/installd_utils_test/installd_utils_test; fails
the same before/after
Change-Id: I327eb0bc28fa84cda669ec0df59da82ee10caf1f
nstalld/Android.bp
nstalld/Android.mk
nstalld/tests/Android.bp
nstalld/tests/Android.mk
8507651ae703aff35dd784647aafb23fdd7830aa 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge commit '5c3b2b4267ad0ba4f7e7e8e38b91a8aeb1eb30a0' into dec6 am: 8e15412dcd
am: 1e62f7d1c1

Change-Id: I940ef93080cfee6f68cf660eb108cae3d716c3bd
1e62f7d1c11bebf18941691107def7ca085dec8c 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge commit '5c3b2b4267ad0ba4f7e7e8e38b91a8aeb1eb30a0' into dec6
am: 8e15412dcd

Change-Id: I9934417d5541d7c1e10374ac99dbb41a2cd268c7
8e15412dcd37522b15995efc1ff1c9e1cde96680 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge commit '5c3b2b4267ad0ba4f7e7e8e38b91a8aeb1eb30a0' into dec6

Change-Id: I28754671bdbe34c768f5babd4e8028a93391f45e
5c3b2b4267ad0ba4f7e7e8e38b91a8aeb1eb30a0 07-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge commit 'f5c3b20f062ca646572ee6c07713eba691971c95' into dec6

Change-Id: I96a76c752bb1cd478bfd88f384537951c7b694e2
ecea1bfeae1211f9a363925c172c0f23062107fb 07-Dec-2016 Bill Yi <byi@google.com> Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
0274c977e3b10b52936fd5b2eb464857f0ca6358 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Shuffle installd Binder implementation around.

Instead of writing wrapper methods in InstalldNativeService.cpp,
this change shifts the Binder implementation over into the existing
commands.cpp file. This will let us migrate all methods over, and
then perform one final file rename to InstalldNativeService.cpp.

The downside of this approach is that we no longer have a giant kill
switch to quickly switch back.

Moves the moveCompleteApp() method over to Binder.

Test: builds, boots, apps install fine
Bug: 13758960, 30944031
Change-Id: I53550e05bc2b65155c3de18424f67b1a95450a6f
nstalld/Android.mk
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/commands.cpp
nstalld/commands.h
nstalld/globals.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt_chroot.cpp
nstalld/tests/Android.mk
nstalld/utils.h
60bbe698927c46e66a355794fc1c7946a7685ac4 06-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check and write some error in atrace." am: 7b50c02030 am: 89c634b6ea am: 651068c908
am: f85aad587b

Change-Id: I6a6a0912f9a1db7bde78fe9ec824cea4656a0677
95d9ac642f082870fd4d2419f534171a9b82bbcd 31-Oct-2016 Jeff Sharkey <jsharkey@android.com> DO NOT MERGE. Check and restorecon cache/code_cache directories.

To speed up boot times, we recently relaxed SELinux restorecon logic
to only consider relabeling app storage when the top level SELinux
label changed.

However, if an app manually deletes either their cache or code_cache
directories, installd will helpfully recreate those directories at
the next boot, but they'll be stuck with incorrect SELinux labels
which an app can't fix. (Our historically aggressive restorecons had
relabeled them, which is why we didn't observe until now.)

This change checks the labels of the cache/code_cache directories,
and runs a restorecon if needed, fixing the issue above.

Test: delete cache and verify recreated with correct label
Bug: 32504081
Change-Id: I0114ae4129223e5909b1075d56a9b1145ebc5ef4
nstalld/commands.cpp
7db6041d156b750689b32e340d8a0753061262a3 21-Sep-2016 Jeff Sharkey <jsharkey@android.com> DO NOT MERGE. Recursively restorecon when SELinux label changes.

PackageManager has been pretty aggressive about asking installd to
restorecon over app data when it thinks something might have
changed. However, in the vast majority of cases these are no-op
requests, and we waste a bunch of time recursively walking all
private data, easily costing 60+ seconds on dogfooder devices.

This change updates the initial "create_app_data" command to kick off
a recursive restorecon if it detects that the top-level SELinux label
on the app private data directory changes. The "create_app_data"
command is designed to ensure that an app's storage is ready, so
PackageManager always calls it at least once per boot before apps
can run. (This change means that PackageManager no longer needs to
make separate "restorecon_app_data" calls.)

Test: booted, verified that a label change triggered restorecon
Bug: 30768146
Change-Id: I0c8d4018cf8ff888d0ae07a82adc3d61a6002aad
nstalld/commands.cpp
4ed6507cfb4f0fae8567b42037e74a07f7dd28ba 22-Jul-2016 Jeff Sharkey <jsharkey@android.com> DO NOT MERGE. Ignore setxattr() failures on tmpfs.

Bug: 30210614
Change-Id: Ic9dfb2439b4b1056e1a58552be2e84f4e524321e
nstalld/utils.cpp
9a998f4762cb5ad71c786229be748ea0ab9eb7a0 15-Jul-2016 Jeff Sharkey <jsharkey@android.com> DO NOT MERGE. Record "cache" inodes to clear while CE is locked.

There are two situations where we need to clear cached data from
all users, including those whose CE storage might still be locked:

1. When PackageManager is clearing caches to try making room for
package updates.
2. When the device fingerprint changes, we need to clear code caches
for all apps.

To enable this, we now record the inode number of the "cache" and
"code_cache" directories in xattrs of the parent directory. This is
just enough information to find the cache directories to enable
deleting files inside. When preparing CE storage for an app, we now
create these two directories and immediately write the inode numbers.

Bug: 26056125
Change-Id: I7e442b0676a695acf962593469793a93b03c8aee
nstalld/commands.cpp
nstalld/utils.cpp
nstalld/utils.h
f85aad587b9155ff83207aea9286d722e0e009fc 06-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check and write some error in atrace." am: 7b50c02030 am: 89c634b6ea
am: 651068c908

Change-Id: Ic27e4f2ada80478464be65a07ae6120f05b02b2b
651068c9080d3ed05f07f7b7728bcfca68edf342 06-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check and write some error in atrace." am: 7b50c02030
am: 89c634b6ea

Change-Id: Id42e740d49987d2a4e92d4c8e1bd39cc7f2c4042
89c634b6ea60059d422930b2c1881c394ebc16bb 06-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check and write some error in atrace."
am: 7b50c02030

Change-Id: I562794bbe7dc52268ad2b477e0dca58a7b79d365
7b50c020302cb5079e98f895487c9cad29630a2a 06-Dec-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Check and write some error in atrace."
d56dec833552f39b35fdc7d38f23ffd30ffdb000 25-Nov-2016 Jaekyun Seok <jaekyun@google.com> Remove static link in Android framework under /frameworks/native.

The dependencies to static libraries in frameworks should be removed
as many as possible to reduce a size of the system partition.
And that will improve coverage of the VNDK libraries because this
effort might find new necessary shared libs which were linked
statically before.

Size diffs of affected binaries on angler-userdebug build are as
follows.

dumpstate : 371048 -> 325312 (-45736)
libvulkan.so : 104892 -> 92016 (-12876)
libandroid_runtime.so: 1193240 -> 1193296 (+56)

total : (-58556)

Test: building succeeded, and the image was tested on angler.
Bug: 33056637
Change-Id: I2db1e94d8bc9cad64760cdf36cac445273bd641a
umpstate/Android.mk
23c11348bc82cfe4bc60b9a318a10d902b564eb6 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Initial Binder interface for installd. am: 9087400f3c am: 5b62e60a38 am: f6bccbfbcc
am: 6553101081

Change-Id: I36c6336f059400475faef26eb5d031fb61704199
6bdf44e1a0f715dcd168a6acfd18cdf4b598e658 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Move installd back to Android.mk. am: 00b6f68c5c am: db792601f6 am: 577e692768
am: 965a5cc82d

Change-Id: If3924379547b8f75f13d8aea9ffba1ab1ddcbbd7
6553101081b1bbf2720414616aaf26aa6d818cf4 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Initial Binder interface for installd. am: 9087400f3c am: 5b62e60a38
am: f6bccbfbcc

Change-Id: I2b69afefa4d9d13e8d420c06ab56371fb2265c95
965a5cc82dc8dac0a6db2b71f37133da1e334021 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Move installd back to Android.mk. am: 00b6f68c5c am: db792601f6
am: 577e692768

Change-Id: I13edcad8945fb1e49a563e7ba964749e489bc813
f6bccbfbcc1691b793572d420b4e787311cbb534 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Initial Binder interface for installd. am: 9087400f3c
am: 5b62e60a38

Change-Id: Ife94a52967367f9f80d5aee5ac2e151a116c60f5
577e69276832354ff768ede8f565bdc2cf8817a7 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Move installd back to Android.mk. am: 00b6f68c5c
am: db792601f6

Change-Id: I43e8540a0564c147621cd696361e1decaf33b76b
5b62e60a38fab22c0fd0174d8081e700a5d6522f 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Initial Binder interface for installd.
am: 9087400f3c

Change-Id: I4912defb2edafb60d429d90679bffe88589fcad9
db792601f651efa7754cc2f78a770c0f3e6e1194 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Move installd back to Android.mk.
am: 00b6f68c5c

Change-Id: Iad4819473f6b25f6ac7aa31e23661b564cd49f0e
772605770712552536fff5db371cb79d13b21896 06-Dec-2016 Jeff Sharkey <jsharkey@android.com> Merge changes from topic 'bind'

* changes:
Initial Binder interface for installd.
Move installd back to Android.mk.
4cffc50f81ea73048dcf38a919ec2957123e749b 05-Dec-2016 Colin Cross <ccross@android.com> Merge "Fix installing dumpstate test data"
5273792550a6206eae9c36272e970bed565a9e20 03-Dec-2016 Colin Cross <ccross@android.com> Fix installing dumpstate test data

The dumpstate test data was being copied to
$OUT/data/nativetest/dumpstate_test_fixture, but then
LOCAL_PICKUP_FILES was set to $OUT/data, which pulls in everything
that has been installed to /data. This results in lots of extra
files in the *tests.zip files.

Copy the test data to the intermediates directory for use with
LOCAL_PICKUP_FILES, and then again again to $OUT/data for use with
adb sync.

Bug: 30564705
Bug: 31807540
Bug: 31997691
Test: mma -j, test data is installed to $OUT/data and intermediates/DATA
Test: adb sync && adb shell /data/nativetest/dumpstate_test/dumpstate_test
Change-Id: Iaa83d96e5d23788b301fed8819a446baf127b58e
umpstate/Android.mk
61954a4e7e0073bbb77e7cc4613c1e8e4ca739bb 05-Dec-2016 Yifan Hong <elsk@google.com> Check and write some error in atrace.

Bug: 33305299

Test: compiles
Change-Id: I88c7ede6cbf68ca10d980e448456bb4ef2a73592
trace/atrace.cpp
9087400f3c82b97aa17a74329c7e65c0a5ff4062 05-Dec-2016 Jeff Sharkey <jsharkey@android.com> Initial Binder interface for installd.

Define an AIDL for installd, starting with a single method. Publish
that interface for the system to start using. We'll circle back and
migrate more methods in future CLs.

Migrating installd to Binder will allow us to get rid of one of
the few lingering text-based command protocols, improving system
maintainability and security.

Test: builds, boots
Bug: 13758960, 30944031
Change-Id: Icdb5320082567e0355d8f76f413f01cfacf0fb99
nstalld/Android.mk
nstalld/InstalldNativeService.cpp
nstalld/InstalldNativeService.h
nstalld/binder/android/os/IInstalld.aidl
nstalld/installd.cpp
00b6f68c5c72252542a1e8c5dda4b420ed02c947 04-Dec-2016 Jeff Sharkey <jsharkey@android.com> Move installd back to Android.mk.

An upcoming CL will be compiling an AIDL for installd, which the new
build system doesn't support yet.

Test: builds, boots
Bug: 13758960, 30944031
Change-Id: I47f9ef21eb6040072c402d40ae42a95d7bd0e61d
nstalld/Android.bp
nstalld/Android.mk
nstalld/tests/Android.bp
nstalld/tests/Android.mk
8d7cc71aa7848e8486c4385bf7251b3b9f85a561 04-Dec-2016 Yifan Hong <elsk@google.com> Merge "Fix includes; use IBase instead of IBinder." am: bd5dc9df53 am: a7a0658efb
am: 83327c2c6d

Change-Id: Iae21f4c79f9861a4932bac18eeb47c6b7d491c68
83327c2c6d10595af0f8df594a824a4c00951cb3 04-Dec-2016 Yifan Hong <elsk@google.com> Merge "Fix includes; use IBase instead of IBinder." am: bd5dc9df53
am: a7a0658efb

Change-Id: Ib4bfc9615322d30bdb7bb0aef9e245119f1f95e5
a7a0658efbb972c4496eaa90c54673b919df0390 04-Dec-2016 Yifan Hong <elsk@google.com> Merge "Fix includes; use IBase instead of IBinder."
am: bd5dc9df53

Change-Id: Ic75eab82059ff0d1bf483f11d55fb9a6a74dd539
e1e9220d20406c3a2016d0f1e7d10675a3df0376 29-Nov-2016 Yifan Hong <elsk@google.com> Fix includes; use IBase instead of IBinder.

Test: mma
Change-Id: I2604772ff952ed451cc87be330ed131452db8eff
trace/atrace.cpp
b8f9c0634a62e0d6cdc2449827a0f9c2099bafa7 29-Nov-2016 Yifan Hong <elsk@google.com> Fix includes; use IBase instead of IBinder.

Test: mma
Change-Id: I2604772ff952ed451cc87be330ed131452db8eff
trace/atrace.cpp
2da7a4482b88bf381e767b866e14e812ad938e13 02-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check for errors for IServiceManager::get and list." am: a09202e9ac am: aa51c8c56f am: bd7ba04be1
am: f31245a15e

Change-Id: I4d57ff85834dd0e35a69b453f4c7d4011ae3cd7b
f31245a15e086d6a292a1699fb236e905744e193 02-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check for errors for IServiceManager::get and list." am: a09202e9ac am: aa51c8c56f
am: bd7ba04be1

Change-Id: I73e85982d771f0e2009788567f71b52c4338464b
bd7ba04be1fedba0c44c7ff78c2041eef57b065a 02-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check for errors for IServiceManager::get and list." am: a09202e9ac
am: aa51c8c56f

Change-Id: Ia7637633ddf235421b5fc1a6164780bda71f1b0d
aa51c8c56f61e6727b80d5ab3d67210b4a4f403b 02-Dec-2016 Yifan Hong <elsk@google.com> Merge "Check for errors for IServiceManager::get and list."
am: a09202e9ac

Change-Id: I530107b1067810c4107cf22f4408d910190c9f7b
8cf4ed19624a7ca1dd2d8d5b0dee15ca2bcdba04 01-Dec-2016 Yifan Hong <elsk@google.com> Check for errors for IServiceManager::get and list.

Test: compiles
Change-Id: I65b858b1ebd5d45739db05fcadb58ae48fd3337e
trace/atrace.cpp
fefe4c813598d6c5a8cc1c146de9efa1ceef4b9d 29-Nov-2016 Jeff Sharkey <jsharkey@android.com> Check and restorecon cache/code_cache directories. am: 397ec26675
am: 6437218b85

Change-Id: I947b61f97b8a8c53f9072a3a3900566d91b5c6e8
f029297f673ae06d219bd727a318a48b885db6fd 22-Nov-2016 Felipe Leme <felipeal@google.com> Even moar refactoring...

- Moved DumpstateUtil functions to its own .cpp file.
- Created a DumpstateInternal file.
- Moved properties setting to a PropertiesHelper class.
- Added title to functions that uses a FD.
- Moved Nanotime() out of DurationReporter.
- Restricted number of default CommandOptions constants.

BUG: 31982882
Test: manual verification
Test: dumpstate_test pass

Change-Id: Iab3e61594f6f7298484185f6f302472d31064f7d
umpstate/Android.mk
umpstate/DumpstateInternal.cpp
umpstate/DumpstateInternal.h
umpstate/DumpstateService.cpp
umpstate/DumpstateUtil.cpp
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
3069899688d42d372d860d06f592aa53678baae2 28-Nov-2016 Felipe Leme <felipeal@google.com> resolve merge conflicts of dfc9df4 to nyc-mr1-dev-plus-aosp

Change-Id: I5da1f949bc1edb7dae110f3ab2a7328f9b1b02e9
d0246c80cf07e9f3f699d74d6ebdab48da373d6d 28-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Adjust installd with new dexopt return values." am: b29c82b67e am: f118868549 am: 6d938865ea
am: fe27746e5f

Change-Id: I66106139d63eb0095d05c240ab48dec8a194ec79
fe27746e5f1776b798bf524f184c22faa3d683f6 28-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Adjust installd with new dexopt return values." am: b29c82b67e am: f118868549
am: 6d938865ea

Change-Id: I1174d7e2c630073a9c979172cfc0c4a21d10b5e7
6d938865ea2861ae50c6041e3c3b3276b8dcf0e6 28-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Adjust installd with new dexopt return values." am: b29c82b67e
am: f118868549

Change-Id: I663a65ac5070782052a2a8676bc1df14074a49bb
f1188685490aae1a670fff038e0e613c861b6cf0 28-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Adjust installd with new dexopt return values."
am: b29c82b67e

Change-Id: Ib0f3811c5891d6871d7b9d44c615954b06f261c6
b29c82b67e05c9093d2accfa23e6007dc601f96b 28-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Adjust installd with new dexopt return values."
920c60cdaeb6394eb95aa93c02a2d8f425204074 25-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Adjust installd with new dexopt return values.

Bug: 30937355
Test: device boots, mimic system update, apps get updated.
Change-Id: I9539892dfcdd0cc722a292140accd7525ee132d0
nstalld/commands.cpp
9b8af75d62f497ff1d6c488389091dbb22e0cd46 23-Nov-2016 Manoj Gupta <manojgupta@google.com> Merge "Fix clang static analyzer warnings." am: b10d705f51 am: 87b2535ff8 am: 0405b428f8
am: 37e1c4e1ae

Change-Id: Idcd308c1a59ec9f4be15ecad66308e4543308c2c
37e1c4e1ae8d4bd72e531f4f75c4d59516373bd7 23-Nov-2016 Manoj Gupta <manojgupta@google.com> Merge "Fix clang static analyzer warnings." am: b10d705f51 am: 87b2535ff8
am: 0405b428f8

Change-Id: I23292033bc37b2dcb8f254be2cfacc21e67deaaf
0405b428f857c9d5f96d7f52ff97d7c775a01286 23-Nov-2016 Manoj Gupta <manojgupta@google.com> Merge "Fix clang static analyzer warnings." am: b10d705f51
am: 87b2535ff8

Change-Id: I24784df53a0574974f822ee01e2a1f13729176c5
87b2535ff8f3ddc6589d699bbf375fd34b54de5c 23-Nov-2016 Manoj Gupta <manojgupta@google.com> Merge "Fix clang static analyzer warnings."
am: b10d705f51

Change-Id: Ibdd7df4af9766b5d00515254cbb8d5e9370a4971
b10d705f517b4faa5884e963db71806445d79a31 23-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix clang static analyzer warnings."
46b85da716a32f285fe1222e9978beacc8697d09 22-Nov-2016 Felipe Leme <felipeal@google.com> Lotta of small dumpstate fixes...

- Fixed RunCommandToFd() so it respects DROP_ROOT.
- Renamed enums to be more consistent with fd model.
- Added tests to RunCommandToFd() and DumpFileToFd().
- Fixed RunCommandToFd() and DumpFileToFd(), which were rushed in.
- Disable tests that fail when running as suite.

BUG: 31982882
Test: manual verification
Test: dumpstate_tests pass

Change-Id: I1d8352a17be10a707a101fc1ac9c7d735e38f9fe
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
6f674aefab201fbf9141aabbb603bbfc84771927 19-Nov-2016 Felipe Leme <felipeal@google.com> Uses Dumpstate HIDL instead of dumpstate_board.

BUG: 31982882
Test: manual verification
Test: dumpstate_tests pass

Change-Id: I2d9a2658b52fba916984f0095edbd26ccd45a278
umpstate/Android.mk
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/dumpstate.h
be00418b9b775e1e127cc879361f35ddae708238 22-Nov-2016 Martijn Coenen <maco@google.com> Merge "atrace: support HAL services as well." am: 1aea108920 am: 7d7cd0cc88 am: 14ee7d4b21
am: 071ce9d83c

Change-Id: I80063296594ff5d4b3eff9c940ef1582109dca34
071ce9d83c88cc2f12f701498970b72def429d06 22-Nov-2016 Martijn Coenen <maco@google.com> Merge "atrace: support HAL services as well." am: 1aea108920 am: 7d7cd0cc88
am: 14ee7d4b21

Change-Id: I17df2efc0a20d6e683f766f107a47c76d53942d8
14ee7d4b215ceb28ac7b9c6a4673adea66160fda 22-Nov-2016 Martijn Coenen <maco@google.com> Merge "atrace: support HAL services as well." am: 1aea108920
am: 7d7cd0cc88

Change-Id: I52a8b3ffcc4bea2b2adb290de6a989b225f447e4
7d7cd0cc88ab9eb67cda34c8b4d70529f880d4c6 22-Nov-2016 Martijn Coenen <maco@google.com> Merge "atrace: support HAL services as well."
am: 1aea108920

Change-Id: Iac0430699cd15f59ed68b41d20010165a50a50e2
dd9a503175517ffed453bdcb8465cfe1955d7203 22-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Moved some functions to DumpstateUtil.h."
bda15a00929b836a53bf03473b1ec36285e5944b 17-Nov-2016 Felipe Leme <felipeal@google.com> Moved some functions to DumpstateUtil.h.

dumpstate_board() is been refactored into a HIDL interface, and the HIDL
implementations will need help functions to dump files and run commands into
a file descriptor.

BUG: 31982882
Test: dumpstate_test passes
Test: manual verification

Change-Id: I7a32f0ac236dae34fd85abe47bed0e52a34c5f36
umpstate/Android.mk
umpstate/DumpstateUtil.h
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
4744e0fd37ca8f91de881af86af9e15c6ac27efc 21-Nov-2016 Naveen Kalla <mrnaveen@google.com> Remove modem log after they are added to bugreport am: b77df78ad6
am: 1ab8369558

Change-Id: Iedbb175cd39d88fcd29fe6551f9e66972f74ff65
1ab836955862a78fceb9f46143daca828958f49a 21-Nov-2016 Naveen Kalla <mrnaveen@google.com> Remove modem log after they are added to bugreport
am: b77df78ad6

Change-Id: I4cec31388deed3d321e3e1b8c407af31b5916542
f78f0983c1823fd0fec6b043f1a17b78ed02d270 21-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove modem log after they are added to bugreport" into nyc-mr2-dev
04097337a94c7bed04833f39989c6819969e4021 20-Nov-2016 Wei Wang <wvw@google.com> atrace.rc: move to post-fs trigger

Test: manually
Bug: 32025203
(cherrypicked from commit 835180a675147ef7dd2a325016efd3b45523acc7)
Change-Id: I787984fc8ab7151ecce9e62a25fa03b0ecf263cd
trace/atrace.rc
ee9b97e85d153309cd6d076c54eefef991ac846d 16-Nov-2016 Martijn Coenen <maco@google.com> atrace: support HAL services as well.

Also poke services that are only registered with
hwbinder, so that they update their props (trace
categories) immediately.

Bug: 31262344
Test: builds, atrace works
Change-Id: I355ddd5f950acc27d598cd972e63f9711426b943
trace/Android.bp
trace/atrace.cpp
0b17f9f584de9af86f8bb0fbe8204c4d1baeef47 20-Nov-2016 Wei Wang <wvw@google.com> Merge "atrace.rc: move to post-fs trigger" am: 3749a60b42 am: 5b30ae185e am: 984d5f2b04
am: dfcfd94f74

Change-Id: I7c75051c1dab9b7c8b0bcc0286b42d3ade4b1dac
dfcfd94f74f9306ad21bbbc7bad1c2d42a6ec39d 20-Nov-2016 Wei Wang <wvw@google.com> Merge "atrace.rc: move to post-fs trigger" am: 3749a60b42 am: 5b30ae185e
am: 984d5f2b04

Change-Id: I92502fcf5adad5b8a88b2811efb8a3083b68ed6c
984d5f2b047e762932243839eba135f730c09aba 20-Nov-2016 Wei Wang <wvw@google.com> Merge "atrace.rc: move to post-fs trigger" am: 3749a60b42
am: 5b30ae185e

Change-Id: Ibb5370034f45a00e1ec9166abc4a66afc32b4847
5b30ae185ef44156ea7366eb28f403efb8bb5539 20-Nov-2016 Wei Wang <wvw@google.com> Merge "atrace.rc: move to post-fs trigger"
am: 3749a60b42

Change-Id: Ib2675cf4047d6ce1b9b6285538bb7f7be7ed1649
3749a60b42f756f93e19830b03d3cd2bde3fc8d2 20-Nov-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "atrace.rc: move to post-fs trigger"
835180a675147ef7dd2a325016efd3b45523acc7 20-Nov-2016 Wei Wang <wvw@google.com> atrace.rc: move to post-fs trigger

Test: manually
Bug: 32025203
Change-Id: I787984fc8ab7151ecce9e62a25fa03b0ecf263cd
trace/atrace.rc
b77df78ad67299d2478f0d4515a167891ab55784 19-Nov-2016 Naveen Kalla <mrnaveen@google.com> Remove modem log after they are added to bugreport

Delete the modem logfiles after it is added to the
bugreport zip file.

Bug: 32871032
Test: Take bugreports on the device and ensure that
the modem log file is deleted. Also ensure that
the generated bugreport zip file contains modem
logs on userdebug builds

Change-Id: Ia512c11cae95e370b77024492898b3ad697fa8b0
umpstate/dumpstate.cpp
e9d2c5414c86949f6de12c4291a2d8c34b2d0b34 15-Nov-2016 Felipe Leme <felipeal@google.com> Always remove the temporary zip file.

During N development, this file was only removed on user builds.

Change-Id: I16eba3905301662b802986d27cb8fcf6e0e34e01
Fixes: 32906722
Test: manual verification
umpstate/dumpstate.cpp
320537c04aacc97308ed28e9929e9f78fce8e829 14-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat.""" am: eda1ddf518 am: 45cee75031 am: 8605678f48
am: a2692a2822

Change-Id: I9726480b783dbb1c1ecf2bbbc93e78239de3298e
a2692a2822fa952ce270cc1b56b1cb076c682339 14-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat.""" am: eda1ddf518 am: 45cee75031
am: 8605678f48

Change-Id: I72d3a5583f8e1247c225335071ac64372a58c47b
8605678f48d74782c5d8a9abb9afc4bd3d04d07c 14-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat.""" am: eda1ddf518
am: 45cee75031

Change-Id: Ife44a4f96470e4545a543d22448458b442a3bff7
45cee75031b092c198ddb22d721e43b0a0b05a22 14-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat."""
am: eda1ddf518

Change-Id: Idbc246744abd62d0bb647f569968457cf5b85583
009ecbbd3fcfd06735b0102f0342fc7e60166d9b 07-Nov-2016 Felipe Leme <felipeal@google.com> Deprecated system properties used to update progress:

- Uses just the binder listener.
- Don't send all updates to the listener.
- SetListener returns a token that can be used to watch for dumpstate death.

Bug: 31636879
Test: dumpstate_test passes

Change-Id: Ie73fa355809b3b628ee39d7c52ded4b99387b14d
umpstate/Android.mk
umpstate/DumpstateService.cpp
umpstate/DumpstateService.h
umpstate/binder/android/os/IDumpstate.aidl
umpstate/binder/android/os/IDumpstateToken.aidl
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
53caf0d20c6831d81a0840ac6056ed4c1c691032 10-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat.""

Test: device boots, adb shell cmd package compile works.

This reverts commit 5373d3028d53df00c244802f89c8a31a8c1a55a6.

bug:30937355

Change-Id: Iddab9cc8de866a281672fc3c509d43070c3f56de
nstalld/commands.cpp
7447d7c3d74b28f1a071b1d3503212cc8ad08d68 04-Nov-2016 Felipe Leme <felipeal@google.com> Save dumpstate duration stats so it can be tuned over time.

Fixes: 26373682
Test: dumpstate_test passes and manual verification

Change-Id: I72a308bfb314e157b12746c1be2c33833bdf9d8a
umpstate/DumpstateService.cpp
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/testdata/empty-file.txt
umpstate/testdata/stats-invalid-1st-NAN.txt
umpstate/testdata/stats-invalid-1st-negative.txt
umpstate/testdata/stats-invalid-1st-too-big.txt
umpstate/testdata/stats-invalid-2nd-NAN.txt
umpstate/testdata/stats-invalid-2nd-negative.txt
umpstate/testdata/stats-invalid-2nd-too-big.txt
umpstate/testdata/stats-invalid-both-NAN.txt
umpstate/testdata/stats-one-run-no-newline.txt
umpstate/testdata/stats-two-runs.txt
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
67e488b2b84bb42e96e713dfa8a5c16c4f847b7f 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat."" am: 80a4f63d7e am: d5417da67b am: b741705b55
am: 35639b68d3

Change-Id: Id2976272c43aa04a92da3ee7024cf7b38574a84a
35639b68d3695365411c2baf1b5f141efc6168c0 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat."" am: 80a4f63d7e am: d5417da67b
am: b741705b55

Change-Id: I7752cd4a894e08f189992afaf35bbbf8b92b1a7b
b741705b55d4d00feb0c7365bdd11323be558400 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat."" am: 80a4f63d7e
am: d5417da67b

Change-Id: I532508a618531080f687dfbf7818cd5ec11b3d9e
d5417da67ba5b17c691a1140e46ae4c50f205c0e 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat.""
am: 80a4f63d7e

Change-Id: I02271ca0bbb3ee1d6eb5a8f73d6af0f23e0ab058
80a4f63d7e5464a8f04a9c178f4563a87d47989c 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat.""
5373d3028d53df00c244802f89c8a31a8c1a55a6 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Pass --output-vdex-fd and input-vdex-fd to dex2oat."

Mishandled create_vdex_filename.

bug:30937355

This reverts commit 196539e9ea6b096826c3489700588c286d8ca9c2.

Change-Id: Idd1a9f9567240899a103547a36dd036219f303cd
nstalld/commands.cpp
7d668921b99fc062ce4344092cbf0ea55b43bc71 09-Nov-2016 Elliott Hughes <enh@google.com> Merge "Dumpstate's netstat call should use -W." am: 0708c8355f am: ae4d6a6c8b
am: 7783703006

Change-Id: Ic37a4911434aa7bc2e1a9ed5dcf3fc1488c9776c
7783703006b938ea5b522021c475794171c3f6ab 09-Nov-2016 Elliott Hughes <enh@google.com> Merge "Dumpstate's netstat call should use -W." am: 0708c8355f
am: ae4d6a6c8b

Change-Id: Ia44bef0d5dcb530ee17bcd7467f067ed1ef4b3cb
ae4d6a6c8bc006713808208e513ba5fbf11f6f9c 09-Nov-2016 Elliott Hughes <enh@google.com> Merge "Dumpstate's netstat call should use -W."
am: 0708c8355f

Change-Id: If0d15f407cb5cd080950c414135a1ebcdf712d77
0708c8355fe9cd782d11ea0bc37aba4677b08e61 09-Nov-2016 Elliott Hughes <enh@google.com> Merge "Dumpstate's netstat call should use -W."
25a91bab4401c2aeefbf36aeecf5bf5c59efcefc 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass --output-vdex-fd and input-vdex-fd to dex2oat." am: 229d3c289b am: 6da66c1bf1 am: eeb8729f9c
am: 555d08ed44

Change-Id: I2351b61e70f9d393f61002ae5703454616283b63
555d08ed446612ef6d2782e992acee7af56b0a42 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass --output-vdex-fd and input-vdex-fd to dex2oat." am: 229d3c289b am: 6da66c1bf1
am: eeb8729f9c

Change-Id: I9651b38c104dae1d26e306aefb683556f54aaf84
eeb8729f9c204500bacd4e5d66f6208cf1fd200b 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass --output-vdex-fd and input-vdex-fd to dex2oat." am: 229d3c289b
am: 6da66c1bf1

Change-Id: Id4b58e3f19f7a93e0947bda20fefb1015ae4c346
6da66c1bf1a6a97c108814599f988ed905424e2b 09-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Pass --output-vdex-fd and input-vdex-fd to dex2oat."
am: 229d3c289b

Change-Id: Iab57ff0465b7e72b48c2d93b13e3930160a08704
196539e9ea6b096826c3489700588c286d8ca9c2 07-Nov-2016 Nicolas Geoffray <ngeoffray@google.com> Pass --output-vdex-fd and input-vdex-fd to dex2oat.

Adjust to new dex2oat flags.

bug:30937355
Test: device boots

Change-Id: Ieab2b2102a7b9c17b77618538608c47d8ad52e2d
nstalld/commands.cpp
75876a2c0649b8cde36329ca0a1dc6e349af6493 28-Oct-2016 Felipe Leme <felipeal@google.com> Created a dumpstate service.

For now this is still a limited service:

- It's only created when running an interactive bugreport.
- It only provides a listener to get updates.
- It will be just used by Shell to get updates.

Test: dumpstate_test passes
BUG: 31636879

Change-Id: Iae820261d220523c979bf905030456fcf0b2b618
umpstate/Android.mk
umpstate/DumpstateService.cpp
umpstate/DumpstateService.h
umpstate/binder/android/os/IDumpstate.aidl
umpstate/binder/android/os/IDumpstateListener.aidl
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
08c3dfde3aeac9190ff2e3663fdef3cc826e4b27 02-Nov-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Moved libdumpstate.default back to Android.mk"
412211887e611bd51a2b3288e311133a41cad3db 02-Nov-2016 Manoj Gupta <manojgupta@google.com> Fix clang static analyzer warnings.

frameworks/native/cmds/flatland/GLHelper.cpp:366:9: warning: Potential
leak of memory pointed to by 'src'

Test: Warning no longer appears
Change-Id: I2721d292cf1f387f34fb2e69f8370f1abff3f01f
latland/GLHelper.cpp
faf9f4c0170e190922f70df88584fb6878cb11d8 31-Oct-2016 Jeff Sharkey <jsharkey@android.com> Check and restorecon cache/code_cache directories. am: 397ec26675 am: 6437218b85
am: c981bfb460

Change-Id: Iad65eeae8cdd82e86d62ecc8490046765c1f6b48
c981bfb460013d4181b43d19ec40cc4406e17e3e 31-Oct-2016 Jeff Sharkey <jsharkey@android.com> Check and restorecon cache/code_cache directories. am: 397ec26675
am: 6437218b85

Change-Id: I5fed67126cbcb03ac946507eada3fd66ada6c266
6437218b85d1a454105add9f4afa7becf5408497 31-Oct-2016 Jeff Sharkey <jsharkey@android.com> Check and restorecon cache/code_cache directories.
am: 397ec26675

Change-Id: Ifd0ffc94a328f75148c24ff4e266461855c38965
06c082baf28566af5a6fb35b5a897e47c1b51bf4 31-Oct-2016 Felipe Leme <felipeal@google.com> Moved libdumpstate.default back to Android.mk

When this module was moved to Android.bp it had no dependencies, but now
it depends on modules defined on Android.mk.

BUG: 26379932
BUG: 31636879
Test: m libdumpstate.default
Change-Id: I577ef5ca16738854dd03adf5d0b090ac10ef5d28
umpstate/Android.bp
umpstate/Android.mk
397ec266753a675e6891c479971e6506491b1b44 31-Oct-2016 Jeff Sharkey <jsharkey@android.com> Check and restorecon cache/code_cache directories.

To speed up boot times, we recently relaxed SELinux restorecon logic
to only consider relabeling app storage when the top level SELinux
label changed.

However, if an app manually deletes either their cache or code_cache
directories, installd will helpfully recreate those directories at
the next boot, but they'll be stuck with incorrect SELinux labels
which an app can't fix. (Our historically aggressive restorecons had
relabeled them, which is why we didn't observe until now.)

This change checks the labels of the cache/code_cache directories,
and runs a restorecon if needed, fixing the issue above.

Test: delete cache and verify recreated with correct label
Bug: 32504081
Change-Id: I0114ae4129223e5909b1075d56a9b1145ebc5ef4
nstalld/commands.cpp
8567ebfaa428d6454431067da68765adde328800 31-Oct-2016 Jeff Sharkey <jsharkey@android.com> Check and restorecon cache/code_cache directories.

To speed up boot times, we recently relaxed SELinux restorecon logic
to only consider relabeling app storage when the top level SELinux
label changed.

However, if an app manually deletes either their cache or code_cache
directories, installd will helpfully recreate those directories at
the next boot, but they'll be stuck with incorrect SELinux labels
which an app can't fix. (Our historically aggressive restorecons had
relabeled them, which is why we didn't observe until now.)

This change checks the labels of the cache/code_cache directories,
and runs a restorecon if needed, fixing the issue above.

Test: delete cache and verify recreated with correct label
Bug: 32504081
Change-Id: I0114ae4129223e5909b1075d56a9b1145ebc5ef4
nstalld/commands.cpp
1ace199e87171d8170145760e68f8b59a63acc06 29-Oct-2016 Felipe Leme <felipeal@google.com> Re-added dumpstate.h to libdumpstate_default.cpp.

Without it, the sdk builds fail because they cannot link to
dumpstate_board().

BUG: 32512875
BUG: 31982882
BUG: 26379932

Test: manually built it
Change-Id: I3138f86a7747a09887c231f6c36767913249868e
umpstate/Android.bp
umpstate/libdumpstate_default.cpp
c6bc8bc4f05ad7d20e931944fb5042b578bc2e53 28-Oct-2016 Felipe Leme <felipeal@google.com> Encapsulates zip_writer_ on Dumpstate class.

BUG: 26379932
Test: DumpstateTest passes and manual verification of zip file.
Change-Id: I0113bec61cd32015fdd625afd2dca026bbf0ceab
umpstate/dumpstate.cpp
umpstate/dumpstate.h
062926ec7ccbd8cf4d49c98de742cdf3c338e275 28-Oct-2016 Felipe Leme <felipeal@google.com> Uses DISALLOW_COPY_AND_ASSIGN.

BUG: 26379932
Test: DumpstateTest passes

Change-Id: I544929fdd1f9777d6e2e6c602ca75d00fee358b9
umpstate/dumpstate.h
umpstate/libdumpstate_default.cpp
27de3fc0a14e4adc73f6bb5e68f90a59d0e68110 29-Oct-2016 Naveen Kalla <mrnaveen@google.com> resolve merge conflicts of de591df to nyc-mr2-dev-plus-aosp

Test: Resolved merge conflict and make sure change compiles

Change-Id: I341d3be774687f6cc62f9abb5998ebd6389d07ee
633f08bc7bc61bf478a1c4077388598be2d673da 28-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Creates a libdumpstateheaders module to export headers."
a61733abadf1d480048f449d22e2ac2b03b32830 28-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Dumpstate's netstat call should use -W."
cf2b1446f249c6e31c1b62251ab365d1b7a183a8 28-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add ANR traces to their own zip entries."
f6d37e36c072f53e17c9a44ec75ecf3c84333433 28-Oct-2016 Felipe Leme <felipeal@google.com> Creates a libdumpstateheaders module to export headers.

Currently, the device-specific dumpstate projects uses dumpstate.h
by importing just the header in the their makefiles:

LOCAL_C_INCLUDES := frameworks/native/cmds/dumpstate

But this approach makes it hard to include external stuff on
dumpstate.h (like common macros) because it breaks the device-specific
builds (unless they are changed to include the proper shared library
dependency).

A better approach is to define a libdumpstateheaders that contains the
proper dependencies, and let the projects use it instead:

LOCAL_STATIC_LIBRARIES := libdumpstateheaders

BUG: 26379932
BUG: 31982882
Test: DumpstateTest passes and manual verification

Change-Id: Iaabff379aded412f33cda1f93f3253866aff9f25
umpstate/Android.mk
21b7c8d618777d6bf684e52b082c23f7e04b0688 28-Oct-2016 Elliott Hughes <enh@google.com> Dumpstate's netstat call should use -W.

IPv6 addresses (which are quite normal on a real device connected to a
mobile network) are truncated by netstat by default. (80 columns!)

Supplying -W says "I care about seeing the IP addresses more than I
care about fitting on a VT100".

Bug: noticed in bugreport in http://b/32463933
Test: manual dumpstate run
Change-Id: I6f8b9ee258ceaa2beeca588fc95adb17fe07d0c4
umpstate/dumpstate.cpp
0adb3a3d4eddd85d2220e8e6f6603e5e9ae36b26 28-Oct-2016 Elliott Hughes <enh@google.com> Dumpstate's netstat call should use -W.

IPv6 addresses (which are quite normal on a real device connected to a
mobile network) are truncated by netstat by default. (80 columns!)

Supplying -W says "I care about seeing the IP addresses more than I
care about fitting on a VT100".

Bug: noticed in bugreport in http://b/32463933
Test: manual dumpstate run
Change-Id: I6f8b9ee258ceaa2beeca588fc95adb17fe07d0c4
umpstate/dumpstate.cpp
984f127900b4176bf990e7db90627cb25ef0af23 28-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add modem logs to the bugreport"
de591df31fa378fa20dcf9e778072bcdedc0aeb0 20-Oct-2016 Naveen Kalla <mrnaveen@google.com> DO NOT MERGE. Add modem logs to the bugreport

When user takes bug report, collect modem logs and add it to the
bugreport zip file.

Test: Take Bugreport and ensure that the modem logs are present
in userdebug builds. Also check that bug reports are collected
normally if there are no modem logs.

BUG=32219165

Change-Id: Ia20fc95ceee95972e17ac4193d350bbae36b3630
umpstate/dumpstate.cpp
058e1e8ce51327e00636d3b0008671dc09c20259 20-Oct-2016 Naveen Kalla <mrnaveen@google.com> Add modem logs to the bugreport

When user takes bug report, collect modem logs and add it to the
bugreport zip file.

Test: Take Bugreport and ensure that the modem logs are present
in userdebug builds. Also check that bug reports are collected
normally if there are no modem logs.

BUG=32219165

Change-Id: Ia20fc95ceee95972e17ac4193d350bbae36b3630
umpstate/dumpstate.cpp
e184f6610284ca80692d7e6789483375a7ca2f39 27-Oct-2016 Felipe Leme <felipeal@google.com> Add ANR traces to their own zip entries.

These files can be very large (O(20k) lines), so it makes more sense to
add them to their own zip entry.

Since this change could break tools that are expecting that section,
it's only enabled when setting the dumpstate version to 2.0-dev-1:

adb shell setprop dumpstate.version 2.0-dev-1

Test: DumpstateTest passes; manual verification
Bug: 32470528
Bug: 32064548

Change-Id: I4726b2209b15722c22defa87bffb24dc633d5bcd
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
635493810ef89f476490d60115fed9ba74e9d704 26-Oct-2016 Colin Cross <ccross@android.com> Replace surfaceflinger protobufs with protobuf-lite

Use lite protobufs for surfaceflinger to remove dependency on
libprotobuf-cpp-full, which will be removed from the platform.

Bug: 32417805
Test: builds
Change-Id: Ie27b253a2f6c1b296c4ae7c7cb056cd3c4c0dde6
urfacereplayer/proto/Android.mk
urfacereplayer/proto/src/trace.proto
urfacereplayer/replayer/Android.mk
urfacereplayer/replayer/Replayer.cpp
257cdc33dbfd9340d132af42c7d49d62551678d6 25-Oct-2016 Felipe Leme <felipeal@google.com> resolve merge conflicts of a97a282 to nyc-mr2-dev-plus-aosp

BUG: 32365477

Change-Id: I8075346262e94ca64b144a42f2e886496ffff62c
dfc9df466fdd6b830b500326a7368f0c46134e11 25-Oct-2016 Felipe Leme <felipeal@google.com> DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."
am: bb6b604623

Change-Id: I08b640b8c1ffae80205be5dcf179403c335e43ba
7781eccbc353c87aeddf24932194e9f2f22f1dff 25-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."" into nyc-mr1-dev
bb6b6046237d06e81440dfc2fc788640cbc48d1f 25-Oct-2016 Felipe Leme <felipeal@google.com> DO NOT MERGE. Revert "Dumpstate should hold a wakelock to save bug report time."

This reverts commit f87959e00732d7d737527f1248a71adea99ae29d.

BUG: 32402587
Fixes: 32365477

Change-Id: Ic4daec37efbaef1906450bf6609d5588d5c9a835
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/utils.cpp
7a7c28a4aa032072c80f825f35ee4dd3198f30ac 22-Oct-2016 Felipe Leme <felipeal@google.com> DO NOT MERGE. Added a is_zipping() function. am: 03974984bf
am: 40e091cd8f

Change-Id: Ia9e559632ea3c5e37063e1433c2a7928f8313625
40e091cd8f800f47a6829cb1e3bacc86eeb9bc3e 22-Oct-2016 Felipe Leme <felipeal@google.com> DO NOT MERGE. Added a is_zipping() function.
am: 03974984bf

Change-Id: Ib14224bf42315b3b1633662fac1f88610a824296
2b826d2e95ee336d9b18f3e119e51a31de318edd 21-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I46ec4bca,I64c00f3b

* changes:
Sets dumpstate version using system properties.
Fixed variable names according to Google C++ style.
03974984bf23a24ec81fa87764e567590da14608 21-Oct-2016 Felipe Leme <felipeal@google.com> DO NOT MERGE. Added a is_zipping() function.

BUG: 32219165
Fixes: 32335112
Change-Id: I2bc630f9c840ccd3a2e0474ed16a766e8a405ad8
umpstate/dumpstate.cpp
umpstate/dumpstate.h
b54660a8468372136b9a333dcb3855867156c878 21-Oct-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 91cc63a to master

Test: None
Bug: 31750617
Change-Id: Iace66f74cc0624064e536ef98707701f8e060701
439dbe3bc3c14533c6309b5134173bd1ac7bd27a 21-Oct-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: Use private interfaces for buffer size properties"
am: 430b3667ec

Change-Id: I150663d5108340f1434f8ec48eb6cd9d4722603f
d071c6802a03031b26de7b92a76d03849681149b 21-Oct-2016 Felipe Leme <felipeal@google.com> Sets dumpstate version using system properties.

Android N introduced a '-V' argument to change dumpstate's version, but
such argument can only be used when running dumpstate directly (as
root).
This CL uses a system property instead (dumpstate.version), so different
versions can be used while taking bugreports.

It also introduces a '-v' argument line to display the dumpstate header,
and removes the redundant dry_run check from _dump_file_from_fd().

Test: DumpstateTest passes
Change-Id: I46ec4bca133d16d8431358bb9f16eb89bb082be1
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
9a523aed06ef962f67385ac88191b08dc91059f4 21-Oct-2016 Felipe Leme <felipeal@google.com> Fixed variable names according to Google C++ style.

Trivia question: what do you get when Java developers refactor C into C++?
Anser: a_bigMess

BUG: 26379932

Test: DumpstateTest passes

Change-Id: I64c00f3b5953f077fb646cdc45a1656060a4b46e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
6c3d90f89a4313eb449c770db6f05b2819cdd8bb 27-Sep-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Use private interfaces for buffer size properties

Used to estimate the timeout to be applied to the logcat command.
This transition represents some technical debt and optimization.

Test: collect bugreport and confirm logcat output
Bug: 31750617
Bug: 21555259
Change-Id: I512b969a4a796fce468907494814315e30c5299d
umpstate/dumpstate.cpp
510169a46ed556de3f602da790a433afdef002ff 20-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactor zip functions and state into Dumpstate class."
0262759d3f9212f8500790dcd7dcb95c7760b589 20-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Minor dumpstate refactorings:"
1d486fe3847c831b9d57843cda209ed86853ee21 15-Oct-2016 Felipe Leme <felipeal@google.com> Refactor zip functions and state into Dumpstate class.

BUG: 26379932

Test: DumpstateTest passes

Change-Id: I8525b81c9239287a108aa6222048fa6171ddb15d
umpstate/dumpstate.cpp
umpstate/dumpstate.h
3d9eb950b14ee6527a5a85d669bd03ce2bdcff32 18-Oct-2016 Dianne Hackborn <hackbod@google.com> Finish implementation of "cmd".

Now wait for result to come back and return it, and
do some error checking and reporting for the IPC.

Test: manual.
Change-Id: Id8deb6cb3a363d0718af9e8faf2da4879ff6d27e
md/cmd.cpp
2b9b06ca7c54a6d7b6b2188dbd884b445b052d34 14-Oct-2016 Felipe Leme <felipeal@google.com> Minor dumpstate refactorings:

- Make some Dumpstate functions const.
- Renamed suffix_ to name_.

BUG: 26379932

Test: DumpstateTest passes

Change-Id: I324a6d63393f51ce27b2e95ce0e23296d97c328d
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
0ebdc7f7c96c43346a39305bc6dd21098c5222c3 13-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Minor changes on dumpstate refactoring:"
23d030256136620102f9da216d2f3758ac1c13f3 12-Oct-2016 Wei Wang <wvw@google.com> Move atrace init into on fs trigger

sysfs should be ready on ealier stage than boot

Bug: 32025203
Test: take systrace
Change-Id: Id73b6959f3075dc793d93551963193a211060da8
trace/atrace.rc
e05e5138aaf08e272eff0f1b5f74657d4fdcf8ba 12-Oct-2016 Wei Wang <wvw@google.com> Move atrace init into on fs trigger am: f920891b71 am: dc34164cef
am: 25d8a76073

Change-Id: Ic0639ebbb5d26c50f5ba9cb5c3140c582ec48490
25d8a760730fe732d6fd8f6837fcb33d12ae2e34 12-Oct-2016 Wei Wang <wvw@google.com> Move atrace init into on fs trigger am: f920891b71
am: dc34164cef

Change-Id: I30a5063ae24b21f38945b581d1bfbe67390667f6
dc34164cefc94d8ce417b24d9c95459567a2fef9 12-Oct-2016 Wei Wang <wvw@google.com> Move atrace init into on fs trigger
am: f920891b71

Change-Id: If6deb43479999924cfce63ca6b3994f9f7276c39
bbaf3c11c4723be0f6b56ef603e11b0baaa92429 11-Oct-2016 Felipe Leme <felipeal@google.com> Minor changes on dumpstate refactoring:

- Moved more attributes into Dumpstate class.
- Created a GetPath() method that encapsulates bugreportDir_.
- Moved TakeScreenshot() into Dumpstate class.
- Uses DropRoot() on TakeScreenshot().

BUG: 26379932

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test

Change-Id: I2d96460f9244d4e257a215e2fb1f00dfd466e059
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
f920891b71cbd33c96e7e44231524ee0b8e83760 12-Oct-2016 Wei Wang <wvw@google.com> Move atrace init into on fs trigger

sysfs should be ready on ealier stage than boot

Bug: 32025203
Test: take systrace
Change-Id: Id73b6959f3075dc793d93551963193a211060da8
trace/atrace.rc
e5ed19999d724b6f5131803ff56b3536349b58de 11-Oct-2016 Dianne Hackborn <hackbod@google.com> Add a little protection to prevent file opens when shell is done.

Test: N/A
Change-Id: I28b75fb67bc576dfb172ea431ab50e2b2c193ece
md/cmd.cpp
6d24dd590f10cd446af6b254633e77be13f3355c 07-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed RunCommandDropRoot when running as Shell."
cef0298e2540e6ad8c2728e6fcc007247c68aac0 04-Oct-2016 Felipe Leme <felipeal@google.com> Added tests for DumpFile.

BUG: 31807540
BUG: 30564705

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test

Change-Id: Ide3a8d5f4b2c02b752ce6f6692c83b71ebdf62ed
umpstate/Android.mk
umpstate/testdata/multiple-lines-with-newline.txt
umpstate/testdata/multiple-lines.txt
umpstate/testdata/single-line-with-newline.txt
umpstate/testdata/single-line.txt
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
26c4157a0823688ba78bf29d93fbce0def3a0fa6 06-Oct-2016 Felipe Leme <felipeal@google.com> Fixed RunCommandDropRoot when running as Shell.

BUG: 26379932
BUG: 31807540

Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest&& adb unroot && adb shell /data/nativetest/dumpstate_test/dumpstate_test

Change-Id: Id582f5fbd4d6282a2eacce602ae1a6d1f62d5c61
umpstate/tests/dumpstate_test.cpp
umpstate/utils.cpp
d80e6b6109c52d57ebba675c1f97fcb2ca1d93c5 03-Oct-2016 Felipe Leme <felipeal@google.com> Moar Dumpstate refactoring and unit testing:

- Moves UpdateProgress() into Dumpstate object.
- Tests RunCommand.AsRoot().
- Tests RunCommand.DropRoot().
- Test update progress.

BUG: 26379932
BUG: 31807540
Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test
Change-Id: I364d097487e090d201eb2e5f08fc794dce555510
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/tests/dumpstate_test_fixture.cpp
umpstate/utils.cpp
fd8affa8840d2d9f7f320201521a702919c677ff 01-Oct-2016 Felipe Leme <felipeal@google.com> Moar tests for RunCommand:

- Command not found.
- Command returns non-0 status (and fixed return of RunCommand).
- Command times out.
- Command is killed.
- Command crashes.
- Command logs initial message.

BUG: 31807540
Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test
Change-Id: I6459846791e45f4ebc4433b83feec81be4050167
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/tests/dumpstate_test_fixture.cpp
umpstate/utils.cpp
2cc37eaaa7f76b690987a09b0674161583403c84 26-Aug-2016 Wei Liu <luciferleo@google.com> Dumpstate should hold a wakelock to save bug report time. DO NOT MERGE.

BUG: 31828706
BUG: 30832947

Change-Id: I0a4b1fcce91caa96ccbc4e890d9968e3033487de
(cherry picked from commit f87959e00732d7d737527f1248a71adea99ae29d)
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/utils.cpp
f29e705b0a8c1ed79c8fbe38e9421fcd0c96d1fb 03-Oct-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency"
c180eea40b8d92c7ef71942a7b2109e0c26dab07 01-Oct-2016 Dimitry Ivanov <dimitry@google.com> Add missing liblog dependency

Bug: http://b/31289077
Bug: http://b/27171986
Test: remove liblog from libcutils and recompile
Change-Id: Ib46726fe6b330375bc925f409dfe6b1ce4cfe599
urfacereplayer/replayer/Android.mk
7265fd7001dcfce050899ee328b7f883f285e31a 01-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add "ip xfrm policy" to dumpstate output"
68fa070d567b1ff43f4ee64cb1c9bd364420ec03 01-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added initial tests for dumpstate."
32af8c2aefd9a31e851c8f17168f19afcb5efb18 28-Sep-2016 Erik Kline <ek@google.com> Add "ip xfrm policy" to dumpstate output

Test: local build, treehugger

Bug: 30869013
Change-Id: I1f0e5d820f0153484c38ecb0f9c764fca02d786c
umpstate/dumpstate.cpp
19d86fdcdc908fb12aae9367571243b3a5f71ce4 30-Sep-2016 Erik Kline <ek@google.com> Add "ip xfrm policy" to dumpstate output am: 53ca94ab34
am: 5159997ffa

Change-Id: I01a70f51e5c8df9d8421381f58246d49e69e8c52
5159997ffa250f3b09898869d87d2336c4516d2e 30-Sep-2016 Erik Kline <ek@google.com> Add "ip xfrm policy" to dumpstate output
am: 53ca94ab34

Change-Id: I0b7b5f39acd68f0e176b4c684c108c7d906e5515
9462bb9e6b7360a5d659b9721a7f7a37ed72f9a6 29-Sep-2016 Dianne Hackborn <hackbod@google.com> Merge "Introduce new command callback to shell."
1941a404d642b3dfaac365ba494f1e9912876f00 29-Aug-2016 Dianne Hackborn <hackbod@google.com> Introduce new command callback to shell.

This introduces a new feature of the IBinder command protocol
to allow the shell command implementation to call back into
its caller to ask it to open files in the calling context. This
is needed so that commands that have arguments specifying files
can open those files as the calling shell, not the system (or
whatever) process.

Test: Manual

Change-Id: Idd5b49ea21057864cc9cef816b3e4afbf01948fc
md/Android.mk
md/cmd.cpp
4c2d66379753e2b7680811726424026b9e54b18a 28-Sep-2016 Felipe Leme <felipeal@google.com> Added initial tests for dumpstate.

BUG: 31807540
Test: mmm -j32 frameworks/native/cmds/dumpstate/ && adb push ${ANDROID_PRODUCT_OUT}/data/nativetest/dumpstate_test* /data/nativetest && adb shell /data/nativetest/dumpstate_test/dumpstate_test

Change-Id: If5497784052b8d13d7c856f9400dbcd8c2015d05
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/tests/dumpstate_test.cpp
umpstate/tests/dumpstate_test_fixture.cpp
umpstate/utils.cpp
c7fe8fe5b525a1a071af92f3ebbeef2f6d4b06af 22-Sep-2016 Felipe Leme <felipeal@google.com> Deprecate run_command() and dump_file().

This change will break dumpstate_board() implementations that were not
refactored to use the equivalent functions in the Dumpstate
class. For example:

void dumpstate_board() {
dump_file("INTERRUPTS", "/proc/interrupts");
run_command("SUBSYSTEM TOMBSTONES", 5, SU_PATH, "root",
"ls", "-l", "/data/tombstones/ramdump", NULL);

}

Should be refactored to:

void dumpstate_board(){
Dumpstate& ds = Dumpstate::GetInstance();

ds.DumpFile("INTERRUPTS", "/proc/interrupts");
ds.RunCommand("SUBSYSTEM TOMBSTONES",
{"ls", "-l", "/data/tombstones/ramdump"},
CommandOptions::AS_ROOT_5);
}

BUG: 26379932
Test: manual / refactored code

Change-Id: Ia74515cc57abc18bc6966a5aed71dd679422fd0e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
b31206b67805617c79fb46ca39ccc5b26cdefd63 10-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Add a delete_odex command

Add a command to delete odex files.

Bug: 31347757
Change-Id: I29bca8751bcee8d6981c682fbbc816c73b78ac68
(cherry picked from commit 3964da0636624ff9af42d1f316bed0752e37c490)
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
6ad9c06d9e2d3706ffdd0dcb943c8e877edf5ec6 28-Sep-2016 Felipe Leme <felipeal@google.com> Fixed and improve RunCommand() when running as root.

Improved it by not try to run 'su root' on user builds.
Fixed the logic that creates the args.

BUG: 29319732
BUG: 26379932
Test: manual

Change-Id: I6b39abc8ee907f638905913425218c0a50d767c6
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
4efa14a11e82f3d8e4821e086e4f780c75cabd97 28-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Moar C++ refactoring."
c8cfc525af357377da03d6c3967883472e46c713 28-Sep-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency" am: c4dd0c3b83 am: abd9a76f5e am: 924fd128fc
am: db459af95a

Change-Id: If039f91c7e2bf38fee5796be915e53acd9fcb7a6
db459af95a75cc34b7ef3bb4ebc4eb49675cc208 28-Sep-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency" am: c4dd0c3b83 am: abd9a76f5e
am: 924fd128fc

Change-Id: I4ec9bf4e9842e9ca9353532e93b322991db685ca
678727af1ae44fe40a6d70fb175f8acfdb5d83d9 22-Sep-2016 Felipe Leme <felipeal@google.com> Moar C++ refactoring.

- Use std::string on runCommand(), DurationReport, dumpFile() and their
dependencies.
- Moves runCommand() and dumpFile() to Dumpstate class.

These 2 commands are the only ones currently used on dumpstate_board() implementations.

BUG: 26379932
Test: manual / refactored code

Change-Id: I09072d4e183851f90c07960d1f971a925ea2c801
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
4a0db9fee04a5402b94cd31f0196334e110ebd05 28-Sep-2016 Felipe Leme <felipeal@google.com> Improved usage on invalid args.

BUG: 26379932
Test: manual
Change-Id: I89689fa98ebe8ed112038575a614ea81d821d16e
umpstate/dumpstate.cpp
53ca94ab3422c278830f96752cab932c1f038a7d 28-Sep-2016 Erik Kline <ek@google.com> Add "ip xfrm policy" to dumpstate output

Bug: 30869013
Change-Id: I1f0e5d820f0153484c38ecb0f9c764fca02d786c
umpstate/dumpstate.cpp
e844a9d60a54c7dd6dbf0a8f44167b484324d08d 22-Sep-2016 Felipe Leme <felipeal@google.com> Initial work on a Dumpstate class.

dumpstate used to be a C binary that had to be "converted" to C++ in
order to use the zip_writer library, but it still keeps most of its C
idioms.

This change is the first step towards a new Dumpstate class; for now, it
just moves the state defined on dumpstate.h to it.

BUG: 26379932
Test: manual / refactored code

Change-Id: Ie689b87c4469a8951c35f3e642d7faa0722b0c03
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
5bcce574840ffc58916f6fa9beb39739b51508e6 27-Sep-2016 Felipe Leme <felipeal@google.com> Fix dumpsys timeouts.

Both dumpstate and dumpsys can timeout when a child process hangs;
usually these values match, except when running dumpsys to dump all
services, in which case we need a timeout for all services (90s) and
individual timeouts for each service (10s).

BUG: 26379932
Test: manual
Change-Id: I37129ba9980976aa9bfe8eb132cdd0870fd93e59
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
b0f669de54ffe3ef59f3597faf2b4885793853cf 27-Sep-2016 Felipe Leme <felipeal@google.com> Fixed C++ style on refactored function and variable names.

As described on
https://google.github.io/styleguide/cppguide.html#Function_Names :

"Ordinarily, functions should start with a capital letter and have a
capital letter for each new word (a.k.a. "upper camel case" or "Pascal
case")."

and

"Data members of classes (but not structs) additionally have trailing underscores. "

BUG: 26379932
Test: manual

Change-Id: I4b7f34b941c99547af667316d4b7d5e2749827d0
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
1e0ade2f79046122aff302d78a517c2b32f92cb5 27-Sep-2016 Dimitry Ivanov <dimitry@google.com> Add missing liblog dependency

Bug: http://b/31289077
Bug: http://b/27171986
Test: remove liblog from libcutils and recompile
Change-Id: I01e7a0ca758308b5f85f2a08f34a9671eaa48b10
nstalld/tests/Android.bp
45af4061a62b4909ed4a0a7c6bc8de885504d5a0 27-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Add socket dumps via ss to bugreports. am: d3b809baff am: e0e7206725
am: 4ee346ac2f

Change-Id: Id4ece86507d3ecdfed8b482a2839700114721c2d
4ee346ac2fe402280c814ff972f1c05f46b2d9cc 27-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Add socket dumps via ss to bugreports. am: d3b809baff
am: e0e7206725

Change-Id: I1b1e1b7c4e816e9168eeebcfe089cef6815a1720
e0e720672568a9e43f75357a077abeb306e77561 27-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Add socket dumps via ss to bugreports.
am: d3b809baff

Change-Id: I85daa9d7faf6cb0067955d235e4f12fe807adf5c
b78c3ae2a0763c4702494a203d29ea67035a908e 27-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed header on runCommand()."
0840f76114f35eeeb33a57eaef17e733b4b29c0c 27-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Uses new get/set property functions."
c5d6cfc018f8a6ec90be1754bfe8c0ad4a7e8cdc 27-Sep-2016 Felipe Leme <felipeal@google.com> Fixed header on runCommand().

BUG: 26379932
Fixes: 31755035
Test: manual
Change-Id: I3c1779afee8e0d601a2ed3a227999a87bb5236c7
umpstate/utils.cpp
96c2bbbf1ab3477f061f2b1b05482f5aec8c5dfa 26-Sep-2016 Felipe Leme <felipeal@google.com> Uses new get/set property functions.

Traditionally, libcutils provided C-based functions (property_get() and
property_set()) to manage system properties, but now it provides C++
counterparts that work with std::string instead.

BUG: 23102347
BUG: 26379932
BUG: 31750617

Test: manual

Change-Id: If2c6f71896682e2d8d10a7d938e0fd83820ea9e9
umpstate/dumpstate.cpp
umpstate/utils.cpp
49550fc7cca2015045161755cc110d144973ec41 26-Sep-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency" am: b32a59e797 am: f12ea76ef3 am: 2851a53929
am: 2bc204b65b

Change-Id: If8d2fde719a2f9985c8a9748d48503ab96e9c7bf
2bc204b65bad642c5d17802929e63942cd6dbf9c 26-Sep-2016 Dimitry Ivanov <dimitry@google.com> Merge "Add missing liblog dependency" am: b32a59e797 am: f12ea76ef3
am: 2851a53929

Change-Id: I6ae1d8283de37feec8c2f53af018b1ff470a2786
8d97c932b0814dac99cf65e511cfd970e2939622 26-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Use a system property to define extra command-line arguments."
9ce6aa4d22f6afee2c682cf2e40bf50575f3cc61 21-Sep-2016 Felipe Leme <felipeal@google.com> Use a system property to define extra command-line arguments.

Currently, we define 4 hardcoded init services to launch dumpstate with
different command-line options (since dumpstate must be launched by
root):

- bugreport
- bugreportplus
- bugreportwear
- bugreportremote

This approach does not scale well; a better option is to have just one
service, and let the framework pass the extra arguments through a system
property.

BUG: 31649719

Test: manual

Change-Id: I537775a7c8ea4ab04dbdaaf2bb2f513cc29f966b
umpstate/dumpstate.cpp
umpstate/dumpstate.rc
d3b809baff20a2ff7e41f4add801f71cce0665f7 26-Sep-2016 Lorenzo Colitti <lorenzo@google.com> Add socket dumps via ss to bugreports.

Bug: 23113288
Change-Id: I6304425f968fcb22c75c3f6e64bf7992e34e0889
umpstate/dumpstate.cpp
421e658dcc5e0ba81002f8a290f28e9fec08eec7 24-Sep-2016 Dimitry Ivanov <dimitry@google.com> Add missing liblog dependency

Bug: http://b/31289077
Bug: http://b/27171986
Test: remove liblog from libcutils and recompile
Change-Id: I5d6ded54613e8a29f20495d8f977064f0af2ffd6
trace/Android.bp
496548f7841cb03dafc33d9c1c187d53dc9c5eee 24-Sep-2016 Ajay Panicker <apanicke@google.com> Merge commit 'bc06c07ee7677168d71a9c809a8960f39340ff99' into blah

Change-Id: I6cbd56cd2ee42de56736642e617689c412056e42
2f531771707bcdfc12543a99c168f8462b423b13 14-Sep-2016 Ajay Panicker <apanicke@google.com> Add btsnoop_hci.log to bugreport zip (1/2)

Bug: 28672558
Test: Manual
Merged-In: I2995a9fd0e8be031c022ef8f275aae35265ba452
Change-Id: I2995a9fd0e8be031c022ef8f275aae35265ba452
umpstate/dumpstate.cpp
umpstate/utils.cpp
d886ec496952a19bee202bc3d6f670009c3a0689 14-Sep-2016 Ajay Panicker <apanicke@google.com> Add btsnoop_hci.log to bugreport zip (1/2)

Bug: 28672558
Test: Manual
Change-Id: I2995a9fd0e8be031c022ef8f275aae35265ba452
(cherry picked from commit efb524693b8b77e6c77f3ebc6b9878caa5aa9715)
umpstate/dumpstate.cpp
umpstate/utils.cpp
e5eb9cc4ff0ba43c80c4e6406024d84f617b731a 23-Sep-2016 Jeff Sharkey <jsharkey@android.com> Recursively restorecon when SELinux label changes. am: 993de79607
am: 59d31b669b

Change-Id: I51739d604afa86b993123bd8cc6d46c6743618a2
59d31b669b0fc86744b2323ba8302ea05556dc25 23-Sep-2016 Jeff Sharkey <jsharkey@android.com> Recursively restorecon when SELinux label changes.
am: 993de79607

Change-Id: Ibf9b6beaa58e7e6c2f006e8c6f064330624eb29f
560334176e1512aa2518557bd6e34ff5bf519c70 22-Sep-2016 Wei Liu <luciferleo@google.com> resolve merge conflicts of 9795ff6 to master

Change-Id: I34c069a669ece0fefee18d1e90f53cc68bd74ea9
9795ff646d02475d4e0d4776944c4f138c6cc2bc 22-Sep-2016 Wei Liu <luciferleo@google.com> Dumpstate should hold a wakelock to save bug report time.
am: f87959e007

Change-Id: I43fe43f8142e3084d69f336414c19a079dfb9ebc
993de79607f5bef0f92004f1ed8a388eda9078bc 21-Sep-2016 Jeff Sharkey <jsharkey@android.com> Recursively restorecon when SELinux label changes.

PackageManager has been pretty aggressive about asking installd to
restorecon over app data when it thinks something might have
changed. However, in the vast majority of cases these are no-op
requests, and we waste a bunch of time recursively walking all
private data, easily costing 60+ seconds on dogfooder devices.

This change updates the initial "create_app_data" command to kick off
a recursive restorecon if it detects that the top-level SELinux label
on the app private data directory changes. The "create_app_data"
command is designed to ensure that an app's storage is ready, so
PackageManager always calls it at least once per boot before apps
can run. (This change means that PackageManager no longer needs to
make separate "restorecon_app_data" calls.)

Test: booted, verified that a label change triggered restorecon
Bug: 30768146
Change-Id: I0c8d4018cf8ff888d0ae07a82adc3d61a6002aad
nstalld/commands.cpp
22f6fd53c3edaa1862cbc3ea54a0f461173c72fb 21-Sep-2016 Jeff Sharkey <jsharkey@android.com> Recursively restorecon when SELinux label changes.

PackageManager has been pretty aggressive about asking installd to
restorecon over app data when it thinks something might have
changed. However, in the vast majority of cases these are no-op
requests, and we waste a bunch of time recursively walking all
private data, easily costing 60+ seconds on dogfooder devices.

This change updates the initial "create_app_data" command to kick off
a recursive restorecon if it detects that the top-level SELinux label
on the app private data directory changes. The "create_app_data"
command is designed to ensure that an app's storage is ready, so
PackageManager always calls it at least once per boot before apps
can run. (This change means that PackageManager no longer needs to
make separate "restorecon_app_data" calls.)

Test: booted, verified that a label change triggered restorecon
Bug: 30768146
Change-Id: I0c8d4018cf8ff888d0ae07a82adc3d61a6002aad
nstalld/commands.cpp
d0974d780827ddc75a8ff41ae1e922c226f65f68 21-Sep-2016 Josh Gao <jmgao@google.com> Merge "Rename unique_fd::clear to unique_fd::reset." am: f9f04003f5 am: 44bd6ca0d0 am: d1a3db64c5
am: ebbfaf3fa3

Change-Id: I85eda7ff3e72efefc378770276a6ba8db651b252
ebbfaf3fa3d56a2cd74e6bd4a5251c4e71ab8ae3 21-Sep-2016 Josh Gao <jmgao@google.com> Merge "Rename unique_fd::clear to unique_fd::reset." am: f9f04003f5 am: 44bd6ca0d0
am: d1a3db64c5

Change-Id: Ica8691bfa5ff84dabe9e026dfae46e8093cf4fb4
9656be18407d6efb0537afdbc7dcb5f0965c74fc 19-Sep-2016 Josh Gao <jmgao@google.com> Rename unique_fd::clear to unique_fd::reset.

Test: m checkbuild
Change-Id: I8cbf2b538c270d8ef50ab6fdcf4fecbcd65899a8
umpsys/dumpsys.cpp
023394a9a3ad6ec0c8540b81d8d181e5c7e4a7e5 15-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactored dump_file() into dumpFile()."
28373da7a8dec7e92e5f3eafe9b3c53862270912 15-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactored run_command functions."
f87959e00732d7d737527f1248a71adea99ae29d 26-Aug-2016 Wei Liu <luciferleo@google.com> Dumpstate should hold a wakelock to save bug report time.

b/30832947

Change-Id: I0a4b1fcce91caa96ccbc4e890d9968e3033487de
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/utils.cpp
0bcc7caad03eed6190255591edc09a7ab3e5a7f3 14-Sep-2016 Felipe Leme <felipeal@google.com> Refactored dump_file() into dumpFile().

Also added a duration report for dumpstate_board().

BUG: 26379932
Test: manual

Change-Id: If80bb9699162ecb80715ef46c6ee039eb22ba6b7
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
30dbfa1c5fac2d8cbd5bc2e41616be9353c81733 02-Sep-2016 Felipe Leme <felipeal@google.com> Refactored run_command functions.

Back in the day, dumpstate.c had a simple run_command() function. Then on
Android N, dumpstate.c became dumpstate.cpp and that function multiplied into:

- run_command()
- run_command_as_shell()
- run_command_always()

Not only these 3 commands were pretty much copy-and-pasted, but they
didn't take advantage of C++ features (such as std::vector and
std::string).

This CL refactor them into a single runCommand() function that takes an
optional CommandOptions argument to set its behavior. Examples:

// Run as shell
runCommand("DUMPSYS MEMINFO", {"meminfo", "-a"},
CommandOptions::WithTimeout(90).DropRoot().Build());

// Run always, as shell
runCommand(nullptr, am, CommandOptions::WithTimeout(20).Build());

The legacy run_command() is still available since it's used by
device-specific dumpstate_board() implementations, but it will
eventually go away as well.

This change also:
- Refactored run_dumpsys() into runDumpsys().
- Added a .clang-format file (initially equals to dumpsys's).
- Renamed the variable names on those commands according to the style guide.

BUG: 26379932
Test: manual

Change-Id: Ie045eb2fb825e68088d231129044c59e61450d99
umpstate/.clang-format
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
7072974e8fbc22a53a378a0eaf769515fedd0bd0 14-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Add a delete_odex command am: 3964da0636 am: 3ca30f7a5d
am: 592c72e94c

Change-Id: Ib5ffd698332d1082f53c536604bbf3d430ce9d1e
592c72e94cd5c8659ac68fbb454290aa38695ec3 13-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Add a delete_odex command am: 3964da0636
am: 3ca30f7a5d

Change-Id: If0165aae60c25a6e25548eafa92f7b3b5bba2974
3ca30f7a5decc930c4e88bf90c01dbf7e874fbd6 13-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Add a delete_odex command
am: 3964da0636

Change-Id: If7f8fa9f0bb0684e386df9ad2c61975e855ea8de
a721faee570a215b1e9f965c6b07d7e438393f6a 13-Sep-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Add a delete_odex command" into nyc-mr1-dev
3964da0636624ff9af42d1f316bed0752e37c490 10-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Add a delete_odex command

Add a command to delete odex files.

Bug: 31347757
Change-Id: I29bca8751bcee8d6981c682fbbc816c73b78ac68
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
6b9c6d23f69a64f76fc26cda6989183042b0621c 19-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services

This should be reverted when all system services have been cleaned up to not
do this. A process looking up a service while running in the background will
see the service registered by the active user (assuming the service is
registered on every user switch), not the service registered by the user that
the process itself belongs to.

BUG: 30795333
Change-Id: I1b74d58be38ed358f43c163692f9e704f8f31dbe
ervicemanager/Android.bp
ervicemanager/service_manager.c
5fa90a063f77054fc6068f45f6a21f43d64364b6 02-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
ervicemanager/service_manager.c
799de20e41c8b3f5e71e39f926c9317eca3c35e3 12-Sep-2016 David Brazdil <dbrazdil@google.com> resolve merge conflicts of 8ef0ace to nyc-mr1-dev-plus-aosp
am: c338c7f0b6

Change-Id: I894942153488ea3aa7096e0726161e2406af187e
c338c7f0b6acd1cd7204e21c0d3408b6946e5024 12-Sep-2016 David Brazdil <dbrazdil@google.com> resolve merge conflicts of 8ef0ace to nyc-mr1-dev-plus-aosp

Change-Id: I6feac17131e040011eb9f243bcd70640b0e8417f
8ef0acedb784e626f68ea76e2a172c31a866b94d 12-Sep-2016 David Brazdil <dbrazdil@google.com> Merge "installd: Create VDEX files and pass their FDs to dex2oat" am: a586216175
am: 6706170398

Change-Id: I60abfdacd6bdea959e168374c2e69eb13b5760e7
a586216175d98bf7cf928a66fe464a250e5f99e4 12-Sep-2016 David Brazdil <dbrazdil@google.com> Merge "installd: Create VDEX files and pass their FDs to dex2oat"
fd55a75bad077c62f76afdec85399dbe0a2f629a 11-Sep-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in dumpstate." am: a70396971e am: 347b6f4c35 am: 666cd74e59
am: 4c8a923d4a

Change-Id: Ic8d133110bf9959c090042853bf2cce3a741b176
4c8a923d4a1f0c37361d19045ad4a89f829e75fd 11-Sep-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in dumpstate." am: a70396971e am: 347b6f4c35
am: 666cd74e59

Change-Id: Ie02f5e2a30c5df43ce0d088f93e73c981537d792
666cd74e59250c8c4f86c1f20725e00f7c8e1a7c 11-Sep-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in dumpstate." am: a70396971e
am: 347b6f4c35

Change-Id: Ib2b6733852c8087a1a0172c3f4399a622a313f50
a70396971e52a2724a3fb8ee2c81b41351382dc4 11-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix google-explicit-constructor warnings in dumpstate."
e92aa620c8d3792a039b5fe4241544f73fc05ee4 10-Sep-2016 Mathieu Chartier <mathieuc@google.com> Unlink app image if copy fails for A/B OTA am: a029c0726d am: 0e9b53d870
am: 00464faf56

Change-Id: Ia685cc9cae956f531119a475e29ea4c549d2092f
00464faf5636a347c36d8e4bfb1fd671d1f12392 10-Sep-2016 Mathieu Chartier <mathieuc@google.com> Unlink app image if copy fails for A/B OTA am: a029c0726d
am: 0e9b53d870

Change-Id: If00ecf8e62b045ac49c22ce56d406b5d169e83da
0e9b53d870380202875800f50377faadb01c2de6 10-Sep-2016 Mathieu Chartier <mathieuc@google.com> Unlink app image if copy fails for A/B OTA
am: a029c0726d

Change-Id: I06074c8c2f9ae317e607326b37c216a1ee2fd867
a029c0726d082d117f85cc7bc2faef1f1af6d51d 10-Sep-2016 Mathieu Chartier <mathieuc@google.com> Unlink app image if copy fails for A/B OTA

Usually this happens when the app was recompiled with interpret-only.
In this case, move_ab_path will fail for the app image. If this
occurs, delete the existing app image to not have a stale one wasting
storage space.

Test: Make fake AB ota, delete the a/b generated app image, take the
OTA, ensure there is no stale app image after reboot. Also tested
that other apps with valid app images still had an image.

Bug: 31323617
Change-Id: I699b5eb3dc8f82759c284a1d299865b2c3a890d0
nstalld/commands.cpp
fc5934e693ca52c89a78297e40ddb08e544e3631 08-Sep-2016 David Brazdil <dbrazdil@google.com> installd: Create VDEX files and pass their FDs to dex2oat

ART now produces a new output file called VDEX, produced alongside the
existing OAT file. This patch updates installd to compute the VDEX's
path, open it and pass the file descriptor to dex2oat.

Bug: 30937355
Change-Id: Ib5c327f1f7a36cfa0b89084d5c01b6da9f8108f2
nstalld/commands.cpp
e6851cca8a58e9d2868db65b93f63d5aa8684076 09-Sep-2016 Zhengyin Qian <qianzy@google.com> make sure anrd trace is being collected. am: afc38fe263
am: 05352fd5d5

Change-Id: Ibafb6813b1378eca32aba60ae73c664fbfde5b13
05352fd5d5e98f6ab18c12f3adff8e1f4f806ea2 09-Sep-2016 Zhengyin Qian <qianzy@google.com> make sure anrd trace is being collected.
am: afc38fe263

Change-Id: I2032769fc587c38dd62c58bbeae8a2e4e9ab073b
afc38fe263c0997385529d72d9211189b3d6d075 09-Sep-2016 Zhengyin Qian <qianzy@google.com> make sure anrd trace is being collected.

If bugreport is being taken when system is very busy, there's a chance a small
delay in creating the trace file will cause dumpstate to skip including the
file in the report. This fix makes sure the trace has been created before
proceeding.

Change-Id: I0243b8da8ad285921206e8bba88ea80125eb96a7
umpstate/dumpstate.cpp
c9165a36719ebd84fc13c91f560a1534d771e8c4 08-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag. am: 0f97c1d775 am: f7e809936d
am: 360e4f74ed

Change-Id: I959d153944b8a05e219e1bd395e11fc3e68d16a9
360e4f74ed50223db3c84088df671fa41d9620e3 08-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag. am: 0f97c1d775
am: f7e809936d

Change-Id: I2c5a89edc8780a3d00b5e3179d93938a892581d9
f7e809936dcb993378f574e54f2ed62fa29ba794 08-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag.
am: 0f97c1d775

Change-Id: Id0cb7f189d32e823cc93486edd3a4fcabd990890
0f97c1d775dd95fab5142d7aae6d34b80b4c2312 07-Sep-2016 Felipe Leme <felipeal@google.com> Added a NETWORK trace tag.

BUG: 31281543

Change-Id: Idc5759eec12f2704c9b9cc48db181f2e669ccc32
trace/atrace.cpp
acc269cafd7f948ae5f41ca122ca94f8dc0899af 07-Sep-2016 David Brazdil <dbrazdil@google.com> Merge "installd: Simplify Dalvik cache path creation" am: ad95fc06aa am: c3ca770d0a am: c0c8dad0d9
am: 3839d19a09

Change-Id: If351197869c3dcd5c7c76008f64a9b340430602a
3839d19a096ccf9f0bbf8e1f05b1acb8c7666b5f 07-Sep-2016 David Brazdil <dbrazdil@google.com> Merge "installd: Simplify Dalvik cache path creation" am: ad95fc06aa am: c3ca770d0a
am: c0c8dad0d9

Change-Id: Ic99a44e0d137f7c26106ff45776500a75b6827d9
c0c8dad0d9516a13755017cd25fb95676c1406ba 07-Sep-2016 David Brazdil <dbrazdil@google.com> Merge "installd: Simplify Dalvik cache path creation" am: ad95fc06aa
am: c3ca770d0a

Change-Id: Ia76cf16f9a79be5f59bc034920a7206871a81e0e
ad95fc06aa902ee7b96c09bb07af4061f87fe77f 07-Sep-2016 David Brazdil <dbrazdil@google.com> Merge "installd: Simplify Dalvik cache path creation"
d9e48906a92301e85b10b34da95bf34ec7179f3c 07-Sep-2016 Mathieu Chartier <mathieuc@google.com> Merge "Revert "Don't use profiles with vm safe mode"" am: 60e97a4bd4 am: 6636101423 am: 4f7537f6da
am: d948343f45

Change-Id: Iaa891dd77c5eaac49c66dcc87c38f8742af5f965
d948343f45243c3562c3f13fb449c070631bb1ab 07-Sep-2016 Mathieu Chartier <mathieuc@google.com> Merge "Revert "Don't use profiles with vm safe mode"" am: 60e97a4bd4 am: 6636101423
am: 4f7537f6da

Change-Id: I38d24d7b44f443f184f954b231733dcf07b15913
4f7537f6dadc5ef5bd4ed25e3f44d46c0bb377d5 07-Sep-2016 Mathieu Chartier <mathieuc@google.com> Merge "Revert "Don't use profiles with vm safe mode"" am: 60e97a4bd4
am: 6636101423

Change-Id: I125aaf91c35986fd1496aa2cf406cd22845c36aa
18f908b394253ae01d6c75a1e5d7376733077798 07-Sep-2016 Mathieu Chartier <mathieuc@google.com> Revert "Don't use profiles with vm safe mode"

Reason for reverting is that it is no longer necessary since
https://android-review.googlesource.com/#/c/269293/
has bene merged.

Bug: 30733908

Test: adb install facebook
Test: adb shell cmd package compile -m speed-profile comb.BBClient

This reverts commit f513d77b6df0268408ccba654b7c7c978efefc4f.

Change-Id: Ic7eba70c8be4e1392bd0f9eece09b1b6de56540d
nstalld/commands.cpp
e6f03132b74e816773f2f054f4ecb309f94b37a3 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Allow A/B dexopt only when bootcomplete am: 45cebd0e31
am: c3f64eea20

Change-Id: I31b92d9d966679970d39651374db9002a87b4529
3b88553779b4c43a2845a2de169ad784a6314712 06-Sep-2016 Andreas Gampe <agampe@google.com> otapreopt: Collect and print size of artifacts am: f1a7ad43cb
am: a7949caecb

Change-Id: Iccdf621394fe668b8899aa31646737aad7a88eba
39784f616c7e6e8c34fd05b8c8a3f2976fb72c5b 06-Sep-2016 Mathieu Chartier <mathieuc@google.com> Don't use profiles with vm safe mode am: f513d77b6d
am: e48d088e2e

Change-Id: Ia2698f877abdceea19b53c68725161da8691e9cd
a322794f492661b1c3e1d1dbaa486505079c04b4 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Try to mount vendor partition for A/B OTA am: fd12edaeab
am: 37a32604cf

Change-Id: I9d191cd01988ab4848e0de8d1e8f8e7a4e8afd3c
1f60f937c856b8ec7d855ce79eb0861657bb2942 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Add init script for A/B artifact move am: 90dc492207
am: 8c839de88a

Change-Id: I510ad14352d694544473ee7aacf3c87022b77780
261fcb4c8b4599025a9de9b79ebb1c1551d9dc37 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Implement new A/B OTA path am: d089ca1703
am: 7d14f10de3

Change-Id: Id8e8eb09d0b01c94c2ae5a59a6ae25aab22a40a2
09ff3cb16b85ca36f95d420c89539da5667240a6 06-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Add support for dex2oat very-large-app property am: a5cc10a8e8
am: aac5c6ce67

Change-Id: Ie5a1f8853052121c13172ada1283b73b7d57e816
6bb4475fd4830b0ec689d1ec575ce8d3a3146484 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Send progress updates to update_engine am: 64c4038586
am: 0681b87c28

Change-Id: I6e4aa071e18190b466ad6141082bc8196e04d0f6
f9d83c4874cdcad598104f762725c6ebe90e8449 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Filter preopted system apps am: 56f79f9620
am: 57d820ece1

Change-Id: Ic722e56eccd67a92914bf42b0d3f208f2220d3e1
7f1cf77cf6f21dd0ef83a775e8c1e37fc138611a 06-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Move app image A/B artifact am: ab15dbfb4a
am: f69886f432

Change-Id: I0ae63e77207475d98335ec463915172161ac1bf0
7f49ef05e7e7ad8355430ca11a84e481ea5556d9 06-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Fix bad merge am: 69b93aaa31
am: 748a7389ce

Change-Id: I9f5e35fa8c692c730bb3d82f293440b62fdcc9d4
01abdb50df646c979b6adc4f732ace5d3ff4ce76 06-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Change app image name computation am: 89b008dfb5
am: 5906d1bbbb

Change-Id: Ife0d1322ebdd2ddd7810dac3c327b1b12873b75d
5256790812e86e829ba866bc6b9b54e780b4130d 06-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Refactor dexopt to scoped file descriptor am: 6fb5a0179d
am: ce9b0e81ee

Change-Id: I8dc13c56b11609ff30f64174b09bc3f79e3a9caf
09e961000e73464cf6669aac09f246a5c2246b4f 06-Sep-2016 Andreas Gampe <agampe@google.com> Installd: Remove string-helpers am: 6db8db9f33
am: d7d4d60340

Change-Id: I68a49f1ee2b7980d97d6d46d046f2ef3031439d2
e7c131e25092e231443c2ffed6b193b4e91078ad 06-Sep-2016 Andreas Gampe <agampe@google.com> Otapreopt: Fix after shared-library work am: 548bdb9308
am: 261480f917

Change-Id: Ieafb61f11ac16c3391f88e73d19a3a1a6ebf36f6
45cebd0e31821014e5258af2642b43a68ecf2ead 17-Aug-2016 Andreas Gampe <agampe@google.com> Otapreopt: Allow A/B dexopt only when bootcomplete

Under certain circumstances cmd may not return because it is waiting
for a service manager. Avoid this situation by restricting the otapreopt
script to only do work when the system has completed boot (which
means that a service manager must exist).

Bug: 30797145
Change-Id: Ic1445e20f1ca06fb38e7707771bde818836c3adc
(cherry picked from commit 90ba9eb2f155a4123ec4c8b08863572360d55776)
nstalld/otapreopt_script.sh
f1a7ad43cb11607fe6270e7d00aaa3daa51e48e5 13-Aug-2016 Andreas Gampe <agampe@google.com> otapreopt: Collect and print size of artifacts

Collect and print the size of artifacts when moving after a reboot.
This helps in diagnosing issues after the fact.

Bug: 30832951
Change-Id: Iee410adf59dcbb74fa4b49edb27d028025cd8bf9
(cherry picked from commit e7d555267725ca050ddd5e891267a61a55c9e16a)
nstalld/otapreopt_slot.sh
f513d77b6df0268408ccba654b7c7c978efefc4f 06-Aug-2016 Mathieu Chartier <mathieuc@google.com> Don't use profiles with vm safe mode

vm safe mode uses interpret only compiler filter, this filter will
generate a full app image if a profile is also passed down. App
image generation without a profile currently has a bug where uses
library is not pruned correctly.

Bug: 30688277

Change-Id: I60d87d698789583b8ab797eb47d031c96caf6d9b
Test: N5X boot, package compile speed-profile comb.BBClient
(cherry picked from commit d46d37b8d4f81e3ea60aeb5106d6d83dd3040775)
nstalld/commands.cpp
fd12edaeab839f3f1f087cc75bd18b4d8af5b192 12-Jul-2016 Andreas Gampe <agampe@google.com> Otapreopt: Try to mount vendor partition for A/B OTA

Vendor apps are usually not preopted, so A/B dexopt should pick
them up. update_engine is not mounting the vendor partition, so
let otapreopt_chroot do the work.

Bug: 25612095
Bug: 29498238
Change-Id: I5a77bdb78a8e478ce10f6c1d0f911a8d6686becb
(cherry picked from commit 0ba073ce81fbe544592e0a3cd526b274e83fdf9f)
nstalld/commands.cpp
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
nstalld/otapreopt_utils.h
90dc492207d6ca5e5c700653507d22f76edfc5ef 09-Jul-2016 Andreas Gampe <agampe@google.com> Otapreopt: Add init script for A/B artifact move

Move the /data/ota -> /data/dalvik-cache move from the zygote into
a minimal shell script. Add an init rc file to execute the script
once /data is mounted. Add Makefile rules to pull these files in
with the rest of the A/B OTA dexopt components.

The move is motivated by the new naming scheme that includes the
slot name. Passing the slot name to the zygote would complicate
the process, while the value is immediately available in the script
through a simple getprop call.

Bug: 25612095
Bug: 28069686
Change-Id: I63e718d488662e1b1de2ce857629cb90aa4f611d
(cherry picked from commit 99e2b263dd0df71b55e86f0aec6657eb38b334e1)
nstalld/Android.mk
nstalld/otapreopt.rc
nstalld/otapreopt_slot.sh
d089ca1703769854356a263ca640d3e07ab8548d 27-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Implement new A/B OTA path

Refactor otapreopt_script, otapreopt_chroot and otapreopt such
that the actual work will be done as a child of the script driven
by update_engine.

The script now uses the new OtaDexoptService command to get the
right parameters for a dexopt call in otapreopt. As we reach
otapreopt_chroot and otapreopt directly, we can add parameters
without tainting the regular installd path. Use this to add the
target slot suffix, and make naming of the A/B artifacts include
the suffix instead of the generic "b."

Otapreopt_chroot startup is slightly complicated because all file
descriptors must be closed. Otherwise, dex2oat needs selinux
permissions to inherit the descriptors from update_engine.

Bug: 25612095
Bug: 28069686
Change-Id: I9d7b86ac8ecfdf91af3800f7e96f41534c0afc0f
(cherry picked from commit 0354bd0eaf24de533e86885b811f816f1e4d15c8)
nstalld/commands.cpp
nstalld/commands.h
nstalld/globals.cpp
nstalld/globals.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/installd_deps.h
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
nstalld/otapreopt_script.sh
a5cc10a8e8d47fd01c117cc51ac1f6765a1735ce 12-Jul-2016 Andreas Gampe <agampe@google.com> Installd: Add support for dex2oat very-large-app property

To support constrained devices, dex2oat supports a parameter that
can downgrade a compilation to verify-at-runtime. Expose this
through the dalvik.vm.dex2oat-very-large system property.

Bug: 29557002
Change-Id: Iace626a8ec18533d37f84a41c20729fe7e400386
(cherry picked from commit e21ac2193d4ed1fd9bc4d5328625d3868409fe4d)
nstalld/commands.cpp
64c4038586c8e64fe8cf7777457c88091f03bcbf 11-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Send progress updates to update_engine

Use the new OtaDexoptService progress API to send updates back
to update_engine.

Bug: 25612095
Bug: 29223204
Change-Id: Ie8162946d18f6fa78649a40ad5d3949d31a181cd
(cherry picked from commit 6c05a734ce443cb5effd01120c5a83b93343b6b6)
nstalld/otapreopt_script.sh
56f79f96207c9c0101a5ca0237a8da631d93d5c5 09-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Filter preopted system apps

The tool will receive requests to compile preopted system apps, as
we can't detect changes right now and need to be conservative. As
some apps cannot be stripped (signed before being preopted), they
can be re-compiled on device, producing stale files that won't be
cleaned up.

Add code to detect this situation and avoid a compile.

Bug: 25612095
Change-Id: I5f489e61b8d4e5b619cbaa01f6c59880479a46cd
(cherry picked from commit 1409090c0a92751f9fe7406a6e043cdbce2ebe4d)
nstalld/otapreopt.cpp
ab15dbfb4a113ce1fa18d3a5f1b91a95f678f272 07-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Move app image A/B artifact

In addition to odex, also move art file.

Bug: 25612095
Change-Id: I69f4c2b1e7283c9a9c361f57f5233e66679c5c28
(cherry picked from commit af8948d90605ad116c965c25e73e0fc9782112ab)
nstalld/commands.cpp
69b93aaa313d02aedb78e7a5c6d9989f75bdb0a3 08-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Fix bad merge

Don't cut off the leading dex location character.

Bug: 25612095
Change-Id: Iad556a0bb48c57f3c68ee75ee41f14e88d96b1a8
(cherry picked from commit f065032f5331e1739fe32a2db9df8c91905720f9)
nstalld/commands.cpp
89b008dfb59ac827db00a45e7de1bac1c65b9c93 04-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Change app image name computation

Refactor computation to take A/B OTAs into account.

Fix a const issue.

Bug: 25612095
Change-Id: I5cf79def532d1eeec4b35bb80014376959083a83
(cherry picked from commit d01a02ce6980de0024333b4673cff9a77be629cf)
nstalld/commands.cpp
nstalld/otapreopt.cpp
6fb5a0179d4de9c85351fd016277949804c809ed 04-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Refactor dexopt to scoped file descriptor

Refactor the goto-fail cleanup to a unique_fd-like wrapper that
includes a potential cleanup step. In preparation for changes for
A/B OTA.

Bug: 25612095
Change-Id: If6cca85c12e0951bc468cb4f212b2f2d288c6041
(cherry picked from commit afa58d175cc3e9adaa4f8df9bc7a8fac5798a50a)
nstalld/commands.cpp
6db8db9f3369c48de87f97f4d4636d446837fe32 03-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Remove string-helpers

Replace string-helpers with equivalent functions from android::base.

Bug: 25612095
Change-Id: I186461b94dffe3590c16455d4dee0c2cbe921bf4
(cherry picked from commit 4769ccafd6e6b94ab73afcb755fe59764c228eae)
nstalld/otapreopt.cpp
nstalld/string_helpers.h
548bdb930895d8fe6651eaada0bc5739ee5248c8 03-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Fix after shared-library work

Commit b63d91fd2737680351876406277b6c759f4db33c broke the installd
to otapreopt connection. Fix this. Also refactor a bit to make an
inadvertant break harder.

Bug: 25612095
Change-Id: I8e7b944ecbd5457e4ac4d6ffffdb0468618cf65f
(cherry picked from commit aef445d1c659698612c0e5a8f3d5f2b9f8a2b778)
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
249c1796a2e62f8751348e5bafce9f40e6538cba 06-Sep-2016 David Brazdil <dbrazdil@google.com> installd: Simplify Dalvik cache path creation

Installd computes Dalvik cache path for a dex file by concatenating
'/classes.dex' to the APKs absolute path and then replacing all '/'
characters with '@'. OTA preopt does the same, only in reverse order,
i.e by concatenating '@classes.dex' to altered absolute path.

This patch unifies the two approaches so as to keep only one string
constant.

Change-Id: I69bb6bca831f45c873a0eb8580cf8d4b011f3b09
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
759af114976862b2d75737f4f5752ae61231b9aa 01-Sep-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in dumpstate.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I61a0e9a8a38a09c1e33a479c3111c45c5fe7483d
umpstate/dumpstate.h
1cbdb8ad5aaa174f2275db1ca20b33a97991f3e1 25-Aug-2016 Calvin On <con@google.com> Add mangle table in dump_iptables am: 329b90922b am: 21252c85d5
am: 4025f0e9b5

Change-Id: I2791b5cfdea584886c12aea18c16f49a45421bc3
4025f0e9b56bf7189ea73b135cfe7b5d1929128b 25-Aug-2016 Calvin On <con@google.com> Add mangle table in dump_iptables am: 329b90922b
am: 21252c85d5

Change-Id: I67c546f8abd8d87d5a4464d654b88d63a50d548f
21252c85d58a4b66397d2f3c52dacca3207fa982 25-Aug-2016 Calvin On <con@google.com> Add mangle table in dump_iptables
am: 329b90922b

Change-Id: I91942e4662bb11317d0d66cfa9233f0ae5116308
3224d6809661def6a1f81924f22373422eb689ff 25-Aug-2016 Wei Liu <luciferleo@google.com> resolve merge conflicts of c6a78d3 to master

Change-Id: Ie5eb53aa470ab3406450d13e986aeae41e7a8d14
c6a78d31d69b2add046941f114ce6dd5421f191b 25-Aug-2016 Wei Liu <luciferleo@google.com> Revert "Hold a wakelock during dumpstate."
am: 5cad0ed80d

Change-Id: Ib0084fdd679dc293cdf5bd665ba85d951e7db552
2f7d559195b9cd9f43c8525300204105c61cb9ab 25-Aug-2016 Wei Liu <luciferleo@google.com> Merge "Revert "Hold a wakelock during dumpstate."" into cw-f-dev
5cad0ed80d79a49efa09995d5704f3afe42f9457 25-Aug-2016 Wei Liu <luciferleo@google.com> Revert "Hold a wakelock during dumpstate."

This reverts commit d7803db0e98809e5a17e78885d452479349f339f.

Change-Id: I20066ca30a1b53507099dc62f27c3275781c61ee
umpstate/Android.mk
umpstate/dumpstate.cpp
329b90922b15683a02a8179b89598525fd9ba480 13-Aug-2016 Calvin On <con@google.com> Add mangle table in dump_iptables

Bug: 30839895
Change-Id: I3f939c74246db96f65e7aa06b60c3b9cf6a02606
umpstate/dumpstate.cpp
3d5c237bc3d99d6f5f2ad7c01583dd438dfd3234 19-Aug-2016 Wei Liu <luciferleo@google.com> Merge commit '51f1241eb31c1cd82c8e98f310d884a64972b701' into manual_merge_51f1241

Change-Id: Ic280f17d715f981a980929c49c65097f245afcb8
51f1241eb31c1cd82c8e98f310d884a64972b701 19-Aug-2016 Wei Liu <luciferleo@google.com> Hold a wakelock during dumpstate.
am: d7803db0e9

Change-Id: I134c8cc5a656bc2d24e58d2dd8a4d200784e1049
a2cc07e7ba098b337662adf38ecc0788d43c685a 19-Aug-2016 Wei Liu <luciferleo@google.com> Merge "Hold a wakelock during dumpstate." into cw-f-dev
0d6390b4e1b7cfc04782849a7bb31bf372410b2b 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af am: ce0e72911c am: 2c39ea1025 am: fa5aafc9f3 am: 1f36bcd2ba am: 75469c1fc9 am: 083f4ecca2 am: b10cd89507
am: 46eee7d103

Change-Id: Ie304611aec749c44cc455ec1f1ab43e65926334f
fc77396ed9d63ef51741bfe2bca4010c2c6b87ae 19-Aug-2016 Arve Hjønnevåg <arve@android.com> resolve merge conflicts of 083f4ec to nyc-dev-plus-aosp
am: 504fd0a2e9

Change-Id: I7c0bd051ffd81ca419538083dfd3027a1bd716ea
504fd0a2e933628c223ec3e3db5a4ddce7ef71ea 19-Aug-2016 Arve Hjønnevåg <arve@android.com> resolve merge conflicts of 083f4ec to nyc-dev-plus-aosp

Change-Id: I1532b1e4ee225f821fcd6a9eaee11f20bac8c9e1
b10cd89507e8c492b2f5bb346d7839c8e04ffdfa 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af am: ce0e72911c am: 2c39ea1025 am: fa5aafc9f3 am: 1f36bcd2ba am: 75469c1fc9
am: 083f4ecca2

Change-Id: Ie1931218577e24e4ab0eb7328ccff60a2ca54400
083f4ecca201e508f0f5cbe0aa95882a82abdf5e 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af am: ce0e72911c am: 2c39ea1025 am: fa5aafc9f3 am: 1f36bcd2ba
am: 75469c1fc9

Change-Id: Icbe1e240a365b6f473ee060cdec384db3b49db24
75469c1fc95c276ab098b61f696d9e49b2968d78 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af am: ce0e72911c am: 2c39ea1025 am: fa5aafc9f3
am: 1f36bcd2ba

Change-Id: Ic4225509044c66a55910b827e8076cf20c4b5bba
1f36bcd2bab3d20ab05c0993d41dd29cefda26ab 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af am: ce0e72911c am: 2c39ea1025
am: fa5aafc9f3

Change-Id: I2b83c66f04f7dbfb1740d525ba6d424c9ea42c2b
fa5aafc9f3f32175e1442fe2940a02805eb76c8a 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af am: ce0e72911c
am: 2c39ea1025

Change-Id: I355431fb0c566965759cd3d07d481c475cb494d0
2c39ea10255c4cddf3e97fd00c2aa1548bc54c4f 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac am: c29c3734af
am: ce0e72911c

Change-Id: I2c36fdb4c92359a03af1c8a563d4d73b9e2898a2
ce0e72911c1f7234d70678066b21094ab0cbf350 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services am: e6bbe69ba7 am: 2cb14836ac
am: c29c3734af

Change-Id: I72992d6662bbace5cecce2b96389139c96d2e181
2cb14836ac536fe85bd2293a69a92de3d3768a62 19-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services
am: e6bbe69ba7

Change-Id: Iebb7be5ff42026adb2ff2d2b610902b995acdbc0
0b497a1057a9f0f47dd3f32fe9b4c85844a7a277 19-Aug-2016 Arve Hjønnevåg <arve@google.com> Merge "ServiceManager: Allow system services running as secondary users to add services"
d7803db0e98809e5a17e78885d452479349f339f 18-Aug-2016 Wei Liu <luciferleo@google.com> Hold a wakelock during dumpstate.

b/30832947

Change-Id: I9f6f6a9a9cef80aafea5eeb7769f4ac19baba3e5
umpstate/Android.mk
umpstate/dumpstate.cpp
e6bbe69ba739c8a08837134437aaccfea5f1d943 19-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services

This should be reverted when all system services have been cleaned up to not
do this. A process looking up a service while running in the background will
see the service registered by the active user (assuming the service is
registered on every user switch), not the service registered by the user that
the process itself belongs to.

BUG: 30795333
Change-Id: I1b74d58be38ed358f43c163692f9e704f8f31dbe
ervicemanager/Android.mk
ervicemanager/service_manager.c
fe4ccddaf536ca4dd878944d87e0671f879149cc 19-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Allow system services running as secondary users to add services

This should be reverted when all system services have been cleaned up to not
do this. A process looking up a service while running in the background will
see the service registered by the active user (assuming the service is
registered on every user switch), not the service registered by the user that
the process itself belongs to.

BUG: 30795333
Change-Id: I1b74d58be38ed358f43c163692f9e704f8f31dbe
ervicemanager/Android.bp
ervicemanager/service_manager.c
9f722efbb36088d13da991e037ae625e890300b1 18-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add i2c tracing support to atrace"
e59b6f451832f16d29adfc447e6c41bee4ddd017 18-Aug-2016 Zach Riggle <riggle@google.com> Merge "Fix vector read buffer size."
43fb6787bcb749c6d848235e82fa17a002379bbf 18-Aug-2016 Michael Wright <michaelwr@google.com> Add i2c tracing support to atrace

Change-Id: Iaf0daa0982bd8d2355d3590d43ad78711e764ee0
trace/atrace.cpp
trace/atrace.rc
22200401c000c556ff7ed6d100d4f57e18ebb24f 18-Aug-2016 Zach Riggle <riggle@google.com> Fix vector read buffer size.

Bug: 30933329
Change-Id: I154cfdbf230340fbb0f2a7c965123c36a77ade8f
umpstate/dumpstate.cpp
a74ceabe6c3d0fefc8b08d954c802b43d8c9d4fc 17-Aug-2016 Zhengyin Qian <qianzy@google.com> resolve merge conflicts of 068ecc7 to nyc-mr1-dev-plus-aosp
am: d0f89bf3df

Change-Id: I1c4eb54bb66ed940f6fba2a8a67e55e5c7a83acb
d0f89bf3df3ccbe1c8750e0ad1124c1bd2b61276 17-Aug-2016 Zhengyin Qian <qianzy@google.com> resolve merge conflicts of 068ecc7 to nyc-mr1-dev-plus-aosp

Change-Id: I8b294812ae72df1cf430b592357a2634085a5c49
c4178812a48827d077a2c1f4db872a9261b06f34 17-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add anrd trace to bugreport" into cw-f-dev
655c3ea7fc15bba5b56811a36083e2dcee2db550 17-Aug-2016 Andreas Gampe <agampe@google.com> Otapreopt: Allow A/B dexopt only when bootcomplete am: 90ba9eb2f1 am: 3573f3e105
am: 38f05d8327

Change-Id: Idce5f6f1f80d64be9f61c06c603dd4ec19c821f6
38f05d83278e971835c5b78d2067bc40c00a0ec5 17-Aug-2016 Andreas Gampe <agampe@google.com> Otapreopt: Allow A/B dexopt only when bootcomplete am: 90ba9eb2f1
am: 3573f3e105

Change-Id: I80acef4f3c5a1c4c5d9ccd987f344d30f79c18ce
068ecc731ec96f1fd1a0819dfed642c510ea69bc 11-Aug-2016 Zhengyin Qian <qianzy@google.com> Add anrd trace to bugreport

Bug: 30672082
Change-Id: If009f6339f47ceeaf6452172d18cfdae564c36ad
umpstate/dumpstate.cpp
90ba9eb2f155a4123ec4c8b08863572360d55776 17-Aug-2016 Andreas Gampe <agampe@google.com> Otapreopt: Allow A/B dexopt only when bootcomplete

Under certain circumstances cmd may not return because it is waiting
for a service manager. Avoid this situation by restricting the otapreopt
script to only do work when the system has completed boot (which
means that a service manager must exist).

Bug: 30797145
Change-Id: Ic1445e20f1ca06fb38e7707771bde818836c3adc
nstalld/otapreopt_script.sh
5b9d3bf16bab50c8067bdc932dca1e7d952a035e 17-Aug-2016 Felipe Leme <felipeal@google.com> Log total dumpstate duration and id.

BUG: 30901314
Change-Id: I2996401eaaa5abf5a3fe7c22d24fb895bdb9521b
umpstate/dumpstate.cpp
80bd6d737b1605f5438ee22e350b17ef36c0b533 15-Aug-2016 Andreas Gampe <agampe@google.com> otapreopt: Collect and print size of artifacts am: e7d5552677 am: 14db1889f5
am: 3d786efd62

Change-Id: Ie1f44bff28e577a2c44fb077f03cbd2d06aa9cb5
3d786efd62e924c87f193940ae86449f8e78d572 15-Aug-2016 Andreas Gampe <agampe@google.com> otapreopt: Collect and print size of artifacts am: e7d5552677
am: 14db1889f5

Change-Id: I38f47b668b530c570769828dce6e84f612a49ab7
e7d555267725ca050ddd5e891267a61a55c9e16a 13-Aug-2016 Andreas Gampe <agampe@google.com> otapreopt: Collect and print size of artifacts

Collect and print the size of artifacts when moving after a reboot.
This helps in diagnosing issues after the fact.

Bug: 30832951
Change-Id: Iee410adf59dcbb74fa4b49edb27d028025cd8bf9
nstalld/otapreopt_slot.sh
08626ec038b1db1842395929628292df75507626 12-Aug-2016 Irvel Nduva Matias Vega <irvel@google.com> Merge changes from topic 'Add display tracing to SurfaceInterceptor'

* changes:
Add display tracing to SurfaceInterceptor
Add display tracing to the surfacecapturereplay proto
31ab9d0603973cbaf80fe53ffe25b4113ea9a065 18-Jul-2016 Irvel <irvel@google.com> Add display tracing to the surfacecapturereplay proto

Change-Id: Ic1c5e092634fb32f05c513deab3e2b528566dc0c
urfacereplayer/proto/src/trace.proto
d9f628e453f58ab52742a6fba4ff906f702832ef 12-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Created constant for maximun number of args."
f95bbc898f4c2ce719f99ed6c264d49bda6dfa34 12-Aug-2016 Sahil Dhanju <sahildhanju@google.com> Merge "Added Display increments, more controls, and a readme to the replayer"
01041fe22aead67520962b534134b3e3291b1622 09-Aug-2016 Sahil Dhanju <sahildhanju@google.com> Added Display increments, more controls, and a readme to the replayer

Change-Id: Id21144b7f808858149772de511951546fddfb252
urfacereplayer/replayer/BufferQueueScheduler.cpp
urfacereplayer/replayer/BufferQueueScheduler.h
urfacereplayer/replayer/Color.h
urfacereplayer/replayer/Main.cpp
urfacereplayer/replayer/README.md
urfacereplayer/replayer/Replayer.cpp
urfacereplayer/replayer/Replayer.h
35c94f3c4aa99b8ad099349d3b7b70e98e72a54b 12-Aug-2016 Felipe Leme <felipeal@google.com> Created constant for maximun number of args.

BUG: 26379932
Change-Id: I839f6e3f90010ee35bc5d40e96218e9c95afdf4e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
229413cd0696867725ac365e6722c54a9c9bcb53 11-Aug-2016 Sahil Dhanju <sahildhanju@google.com> Merge "Python utility that creates a trace file to be consumed by replayer"
834003e756cd6dffcae70648067b8fccc648e5af 08-Jun-2016 Sahil Dhanju <sahildhanju@google.com> Python utility that creates a trace file to be consumed by replayer

Change-Id: Ibf566fce26273c92d52de0644ac06496dff74f59
urfacereplayer/replayer/trace_creator/trace_creator.py
0c63d9490cb9554c8fae3df93d90b3a40aed1ecf 09-Aug-2016 Arve Hjnnevg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check am: f03ba2c0d8 am: a9963dcfb7
am: cac59eae3b

Change-Id: I672617263a66261b36de2f3fb6c7829d39f87e51
f75cb435c288bdda47b3b7f8d1e40da75f4c8247 09-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Restore basic uid check am: 2b74d2c1d2 am: 8039d6e068
am: 528544025c

Change-Id: I9dd1a4d36ff39f9de77c6c33e8cd36268f77c30b
cac59eae3bfa847c5896032f62c078ec45b4865c 09-Aug-2016 Arve Hjnnevg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check am: f03ba2c0d8
am: a9963dcfb7

Change-Id: Id42cd61ca837cc5e9da644feaae10f8f7d0e6c11
528544025c09a5fcba5e3c8283403f584adc7d6e 09-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Restore basic uid check am: 2b74d2c1d2
am: 8039d6e068

Change-Id: I390b0dcc54c4bd949df775d82d267b14fe798e37
101c678909be68f602b0fb992a7629a833fa7f46 09-Aug-2016 Arve Hjnnevg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check am: 247ae46340
am: 171ab27931

Change-Id: I3cfc70e8fb1dd393a92ace283d36ee2b35585ea4
3f505a247e7066021c17044c84ee7b1a00abd1e0 09-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Restore basic uid check
am: 2b74d2c1d2

Change-Id: I01ebfcff30a8b25e3d8435b96bd437fb6e41f8a5
a9963dcfb72a36c58bf5fc119deb3ffa28025bab 09-Aug-2016 Arve Hjnnevg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check
am: f03ba2c0d8

Change-Id: I1435bfcd119116cdd242cf7714ef9535d7abc6fa
8039d6e068e1a1db99840fcb58ad1d4c3e05a79b 09-Aug-2016 Arve Hjnnevg <arve@android.com> ServiceManager: Restore basic uid check
am: 2b74d2c1d2

Change-Id: I27c3515350a64177f2e1de2599fe48eda7b3a739
247ae46340bd5aa3e384090f325cd1f7e566e88f 02-Aug-2016 Arve Hjønnevåg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
ervicemanager/service_manager.c
f03ba2c0d878071603d73b7f8e9a4a468364ac27 02-Aug-2016 Arve Hjønnevåg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
ervicemanager/service_manager.c
eb304f0a369aa0573a6999057b0b53e22c5dce81 02-Aug-2016 Arve Hjønnevåg <arve@android.com> DO NOT MERGE ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
ervicemanager/service_manager.c
fba7178ba2b29cead41d14c3c405c716dfcb0e8d 06-Aug-2016 Mathieu Chartier <mathieuc@google.com> Don't use profiles with vm safe mode am: d46d37b8d4 am: cc772f3f63
am: fdddd1b57c

Change-Id: Iaa9b5d194692967d42a986f50f09e0c13016ca1c
fdddd1b57cd9dda316791c77091de0dfbcbb7268 06-Aug-2016 Mathieu Chartier <mathieuc@google.com> Don't use profiles with vm safe mode am: d46d37b8d4
am: cc772f3f63

Change-Id: I086faba35309013f581f53439e90441e249a94e4
cc772f3f6334de7d5cd8487eef6625e73735fb82 06-Aug-2016 Mathieu Chartier <mathieuc@google.com> Don't use profiles with vm safe mode
am: d46d37b8d4

Change-Id: Ib91e3020496903d43458fee944770744be918e2c
cf6e673296e8a3a7072f055770da59543935ae48 06-Aug-2016 Mathieu Chartier <mathieuc@google.com> Merge "Don't use profiles with vm safe mode" into nyc-mr1-dev
d46d37b8d4f81e3ea60aeb5106d6d83dd3040775 06-Aug-2016 Mathieu Chartier <mathieuc@google.com> Don't use profiles with vm safe mode

vm safe mode uses interpret only compiler filter, this filter will
generate a full app image if a profile is also passed down. App
image generation without a profile currently has a bug where uses
library is not pruned correctly.

Bug: 30688277

Change-Id: I60d87d698789583b8ab797eb47d031c96caf6d9b
Test: N5X boot, package compile speed-profile comb.BBClient
nstalld/commands.cpp
f697bba2d390d7d7f3bbb3a145fe2587ee11e3a3 06-Aug-2016 Dan Willemsen <dwillemsen@google.com> resolve merge conflicts of 35ea9f8 to nyc-mr1-dev-plus-aosp

Change-Id: I6f0ff0ecfd9c91adc46c059bab440aab6d666e62
2a001e8bfe0255242740df7d9674408820f13627 05-Aug-2016 Dan Willemsen <dwillemsen@google.com> resolve merge conflicts of 0783d5f to stage-aosp-master

Change-Id: I4fe9c0391d6d41bae5fbbb0df6e00e264e87649f
29f0db6ea207bd14fc3cfc2a7516e4e7b66bf741 05-Aug-2016 Felipe Leme <felipeal@google.com> Merge "Revert "R.I.P. bugreport, long live bugreportz!""
3b650731d31f5ebc131068ae6cde811cb118672e 05-Aug-2016 Felipe Leme <felipeal@google.com> Revert "R.I.P. bugreport, long live bugreportz!"

This reverts commit 2d5f161f60f337e318ffc24bf604eb354c284847.

BUG: 30701244
BUG: 29448020

Change-Id: Idbdd1fe99ce3c17580b3a76f90c0a817c06a7b7d
ugreport/Android.bp
ugreport/bugreport.cpp
7944207fc9dd0cc4ff1010c6309df8331377b915 05-Aug-2016 Felipe Leme <felipeal@google.com> Fixed logic to print BEGIN: line for bugreportz. am: dcd1f0da54 am: c077e913ac
am: 3f068ef5a7

Change-Id: I66be5a87c11ae1165bb7ed07596a3b439a4bace6
3f068ef5a736eb8c5a00b7f22bce1c6e49122a1a 04-Aug-2016 Felipe Leme <felipeal@google.com> Fixed logic to print BEGIN: line for bugreportz. am: dcd1f0da54
am: c077e913ac

Change-Id: If962b25256948de59e7da41ec8d1baf084c4be94
2d5f161f60f337e318ffc24bf604eb354c284847 04-Aug-2016 Felipe Leme <felipeal@google.com> R.I.P. bugreport, long live bugreportz!

Change-Id: Ie146f6f72f4a9dba3942d1821c634cf2c2186b5d
Fixes: 29448020
ugreport/Android.bp
ugreport/bugreport.cpp
dcd1f0da541304421648c77db287ebe56339a6be 04-Aug-2016 Felipe Leme <felipeal@google.com> Fixed logic to print BEGIN: line for bugreportz.

BUG: 30451114
Change-Id: I0e65a38999c128a435b43ad0806e06e6e74580ff
umpstate/dumpstate.cpp
c6a9a895a4f36b1de276651cc2e4706d29fc05ff 04-Aug-2016 Felipe Leme <felipeal@google.com> Added a BEGIN:path message on bugreportz protocol. am: aabfcae816 am: 9d11fb0f99
am: 0f118e4026

Change-Id: I534f795a24b5d68f3152e6b5620846271a2eb5ab
0f118e402675c544d34dfee223918da60edb9cb0 04-Aug-2016 Felipe Leme <felipeal@google.com> Added a BEGIN:path message on bugreportz protocol. am: aabfcae816
am: 9d11fb0f99

Change-Id: I6b0ef9e3b3a580ac6132e9a25050e3f6f84e73e5
980742c0572d95db03c10bc8fa8122b3a6cfbad0 04-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added test cases to dumpsys."
d402e7dfe02e5097d1e7e62346953db3808b18cc 03-Aug-2016 Felipe Leme <felipeal@google.com> Refactored use of ON_DRY_RUN macros.

BUG: 26379932
Change-Id: Ie032d468540da3c4ac0df1ea2d88a0aac4c722a7
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
59e086f536e1dbbbfe9cb6a1826aaddef999d5ce 26-Jul-2016 Dan Willemsen <dwillemsen@google.com> Start converting Android.mk to Android.bp

See build/soong/README.md for more information.

Merged-In: Ifbe9b0072a63b4467c72b3a52148a606e5365f78
Change-Id: Ifbe9b0072a63b4467c72b3a52148a606e5365f78
trace/Android.bp
trace/Android.mk
ugreport/Android.bp
ugreport/Android.mk
umpstate/Android.bp
umpstate/Android.mk
umpsys/Android.bp
umpsys/Android.mk
nstalld/Android.bp
nstalld/Android.mk
nstalld/tests/Android.bp
nstalld/tests/Android.mk
ervice/Android.bp
ervice/Android.mk
ervicemanager/Android.bp
ervicemanager/Android.mk
ba8e8271d142acdc345d509b1745f54eba5a847e 03-Aug-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Uses a system property to set dry-run mode."
8268ed2d1c5afb1a29dfdafdcea82a8a52166b90 03-Aug-2016 Felipe Leme <felipeal@google.com> Uses a system property to set dry-run mode.

On Android N, dumpstate was using a #define to set dry-run mode, which
allows dumpstate to run much faster, which in turn is useful when
developing new dumpstate features.

The drawback of this approach is that it requires modifying dumpstate.h
locally, building a new binary, and re-redeploying it in the device; a
better and more flexible approach is to use a system
property (dumpstate.dry_run) so developers can enable /disable it during
runtime.

Change-Id: I41d1e6ae3fa6ca2be23887f59d5ad4e9df7c10e6
Fixes: 30604041
umpstate/dumpstate.cpp
umpstate/dumpstate.h
b6e244914deaffcdeea02deebf7c0da2643f601c 03-Aug-2016 Felipe Leme <felipeal@google.com> Added test cases to dumpsys.

BUG: 28980245

Change-Id: Ief6c21022abc74022256431351fd6eef789faf39
umpsys/.clang-format
umpsys/Android.bp
umpsys/dumpsys.cpp
umpsys/dumpsys.h
umpsys/main.cpp
umpsys/tests/Android.bp
umpsys/tests/dumpsys_test.cpp
2b74d2c1d2a2c1bb6e9c420f7e9b339ba2a95179 02-Aug-2016 Arve Hjønnevåg <arve@android.com> ServiceManager: Restore basic uid check

Prevent apps from registering services without relying on selinux checks.

Bug: 29431260

Change-Id: I38c6e8bc7f7cba1cbd3568e8fed1ae7ac2054a9b
ervicemanager/service_manager.c
ea309c20e59a61440888b2130d3cd3ca509debe4 03-Aug-2016 Dan Willemsen <dwillemsen@google.com> Merge "Start converting Android.mk to Android.bp"
c1ba5c4649554e744844b07cfe402b42fbe12ff3 08-Jun-2016 Sahil Dhanju <sahildhanju@google.com> Multithreaded Surface Replayer that replays traces

Change-Id: Id8d17f74e00d4796e1ea266bdaf9e8dd0af6475b
urfacecapturereplay/proto/Android.mk
urfacecapturereplay/proto/src/trace.proto
urfacereplayer/replayer/Android.mk
urfacereplayer/replayer/BufferQueueScheduler.cpp
urfacereplayer/replayer/BufferQueueScheduler.h
urfacereplayer/replayer/Color.h
urfacereplayer/replayer/Event.cpp
urfacereplayer/replayer/Event.h
urfacereplayer/replayer/Main.cpp
urfacereplayer/replayer/Replayer.cpp
urfacereplayer/replayer/Replayer.h
a05cafa14c2699cac45e6d1f411f061bf52ff9a5 29-Jul-2016 Sahil Dhanju <sahildhanju@google.com> Renamed folder holding trace protobuf and updated
Updated SurfaceInterceptor include path for protobuf

Change-Id: Iad613857ccdb876621f6fc067bcdc5083e9557f3
urfacereplayer/proto/Android.mk
urfacereplayer/proto/src/trace.proto
e05dc6d59c3be6ac42bdc7f415a7ea80a3ed1e18 26-Jul-2016 Dan Willemsen <dwillemsen@google.com> Start converting Android.mk to Android.bp

See build/soong/README.md for more information.

Change-Id: Ifbe9b0072a63b4467c72b3a52148a606e5365f78
trace/Android.bp
trace/Android.mk
ugreport/Android.bp
ugreport/Android.mk
umpstate/Android.bp
umpstate/Android.mk
umpsys/Android.bp
umpsys/Android.mk
nstalld/Android.bp
nstalld/Android.mk
nstalld/tests/Android.bp
nstalld/tests/Android.mk
ervice/Android.bp
ervice/Android.mk
ervicemanager/Android.bp
ervicemanager/Android.mk
aabfcae816485b39b244ba372c5b2678d2af03be 29-Jul-2016 Felipe Leme <felipeal@google.com> Added a BEGIN:path message on bugreportz protocol.

BUG: 30451114
Change-Id: I3607c75b184e71a9a5a6393bdbf68200abe0fc16
ugreportz/bugreportz.cpp
ugreportz/bugreportz_test.cpp
ugreportz/readme.md
umpstate/dumpstate.cpp
dc42bdae497421a51feeac76ed25d27c2b4511d1 30-Jun-2016 Felipe Leme <felipeal@google.com> Created functions to run dumpsys.

Such functions not only are less error prone (for example, uses just one
variable for both timeouts) but also will make it easier to pass
additional commands to dumpsys.

BUG: 28980245
Change-Id: Ib0a14eaafd83e71a50f5548f86144ac6403fa84b
umpstate/dumpstate.cpp
umpstate/utils.cpp
bb3ff929b0fe24bd0d5f9cb0c604858f2cf4a139 29-Jul-2016 Felipe Leme <felipeal@google.com> Merge "Revert "Created functions to run dumpsys.""
fe714f6f02094b40ec571dd3e95aaadc228ed80f 29-Jul-2016 Felipe Leme <felipeal@google.com> Revert "Created functions to run dumpsys."

This reverts commit dbfe083877f7627ea24b9286b8103c7514212c8d.

Change-Id: I488a06f3500817ff54b332d37abce3ff594f37cd
umpstate/dumpstate.cpp
umpstate/utils.cpp
8b1878d5376f5733bc0a9dad1ef2023604329129 29-Jul-2016 Felipe Leme <felipeal@google.com> Merge "Created functions to run dumpsys."
e27fd0fac41179a4beeee8607816016ede5fe11d 29-Jul-2016 mukesh agrawal <quiche@google.com> dumpsys: fix formatting of service dump times am: bca287d284
am: d1d9d717a8

Change-Id: I0aa936c156e8b78d714cbfcac66ca0fae306c757
bca287d28450d4cc23382174c86de3c84e6a0b8f 27-Jul-2016 mukesh agrawal <quiche@google.com> dumpsys: fix formatting of service dump times

The current formatting of service dump times is
confusing some bugreport parsing tools. This is
because the current service dump time message
is hard to distinguish from the bugreport section
marker.

Adjust the formatting, to make the service
dump time message distinct from the bugreport
section marker.

BUG=30401031
TEST=manual

Manual test
$ adb bugreport /tmp/bugreport.zip
$ cd /tmp
$ mkdir br
$ mv bugreport.zip br
$ cd br
$ grep 'was the duration' bugreport*.txt
------ 4.283s was the duration of 'DUMPSYS MEMINFO' ------
------ 0.053s was the duration of 'DUMPSYS CPUINFO' ------
[...many lines omitted...]
--------- 0.003s was the duration of dumpsys AtCmdFwd
--------- 0.002s was the duration of dumpsys DockObserver
[...many more lines omitted...]

Change-Id: I9d3dd75210b3984240a4b7ab49a1cc6124a269d8
(cherry picked from commit 50b7e039500b3decc78d5ffff9919d1481df4964)
umpsys/dumpsys.cpp
1b99fe95ffc7daeab51902863cca7a42b507392e 28-Jul-2016 Felipe Leme <felipeal@google.com> Added a -p option to bugreportz to show progress. am: 02b7e00c1e am: a12c863892
am: 84b0adaed4

Change-Id: Ib80ab3a5547c516dbd4b20b9f10931f069d7a84f
8e01715dbf9d44a8fb3f938e44bed39acf3674a1 28-Jul-2016 Felipe Leme <felipeal@google.com> Added unit tests to bugreportz. am: 59f5af0465 am: bd99091117
am: 560668217a

Change-Id: I553d33086fb1e6c5fbcdf4da464bf2ccf299c6fe
84b0adaed420d52624e720585fc54caf26784e1b 28-Jul-2016 Felipe Leme <felipeal@google.com> Added a -p option to bugreportz to show progress. am: 02b7e00c1e
am: a12c863892

Change-Id: I412376ba99c02edca8a966e101b75ce2b1caf435
560668217ac70f8ce097c36518de732fe8df323a 28-Jul-2016 Felipe Leme <felipeal@google.com> Added unit tests to bugreportz. am: 59f5af0465
am: bd99091117

Change-Id: I7bc8f1331d92bd540ea180a5d8a034f6dcff16da
50b7e039500b3decc78d5ffff9919d1481df4964 27-Jul-2016 mukesh agrawal <quiche@google.com> dumpsys: fix formatting of service dump times

The current formatting of service dump times is
confusing some bugreport parsing tools. This is
because the current service dump time message
is hard to distinguish from the bugreport section
marker.

Adjust the formatting, to make the service
dump time message distinct from the bugreport
section marker.

BUG=30401031
TEST=manual

Manual test
$ adb bugreport /tmp/bugreport.zip
$ cd /tmp
$ mkdir br
$ mv bugreport.zip br
$ cd br
$ grep 'was the duration' bugreport*.txt
------ 4.283s was the duration of 'DUMPSYS MEMINFO' ------
------ 0.053s was the duration of 'DUMPSYS CPUINFO' ------
[...many lines omitted...]
--------- 0.003s was the duration of dumpsys AtCmdFwd
--------- 0.002s was the duration of dumpsys DockObserver
[...many more lines omitted...]

Change-Id: I9d3dd75210b3984240a4b7ab49a1cc6124a269d8
umpsys/dumpsys.cpp
02b7e00c1e1b0bf22997ab7ed913a9451e5b6b8a 22-Jul-2016 Felipe Leme <felipeal@google.com> Added a -p option to bugreportz to show progress.

BUG: 28609499

Change-Id: I1e60078dfda7e5679fbd19f4981a5dc7a69c4fc7
ugreportz/bugreportz.cpp
ugreportz/bugreportz.h
ugreportz/bugreportz_test.cpp
ugreportz/main.cpp
ugreportz/readme.md
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
59f5af0465dcbf275a3653ac23885d12ee7e395d 22-Jul-2016 Felipe Leme <felipeal@google.com> Added unit tests to bugreportz.

BUG: 28609499

Change-Id: I5b846eeeaa7c05c3e3f66f36d31ef42c472a3099
ugreportz/.clang-format
ugreportz/Android.mk
ugreportz/bugreportz.cpp
ugreportz/bugreportz.h
ugreportz/bugreportz_test.cpp
ugreportz/main.cpp
fefc8862c27208398286d9305a4d11b08bf81c46 22-Jul-2016 Jeff Sharkey <jsharkey@android.com> Ignore setxattr() failures on tmpfs. am: 69a14f3022
am: 9819df892e

Change-Id: I255309f97bf0799e5b338693701fe99b692c8ea1
9819df892eeb472bd5dbbaca6719e8269f4fca1a 22-Jul-2016 Jeff Sharkey <jsharkey@android.com> Ignore setxattr() failures on tmpfs.
am: 69a14f3022

Change-Id: I090d6f02b2551548ca1ebd60fcd4ba2b0057922f
49c913e6bc6fdeeaf8b4f5d385240a521bc6519e 22-Jul-2016 Elliott Hughes <enh@google.com> Merge \\\"Fix a typo in the atrace help text.\\\" am: 133650e5b1 am: 97acea9a6f
am: 8f44d181a1

Change-Id: If5064bb56319771d7786d645a0e67b1ce506cfe2
97acea9a6fa645301808a847d5fea7cbd0dda294 22-Jul-2016 Elliott Hughes <enh@google.com> Merge \"Fix a typo in the atrace help text.\"
am: 133650e5b1

Change-Id: Idc66112bedc8f6a31bd73e479bd8905a7875d360
69a14f30224e5c0e8d9d71f822f5d1801356aee4 22-Jul-2016 Jeff Sharkey <jsharkey@android.com> Ignore setxattr() failures on tmpfs.

Bug: 30210614
Change-Id: Ic9dfb2439b4b1056e1a58552be2e84f4e524321e
nstalld/utils.cpp
f884a06e09694d43da8178fa90472d44d319c7b3 22-Jul-2016 Elliott Hughes <enh@google.com> Fix a typo in the atrace help text.

Change-Id: I1b9d04d3d17e851d08a8ae39e26483e106516b88
trace/atrace.cpp
391a14fea26ab9a6404ef4d7005fdf93fd045156 22-Jul-2016 Elliott Hughes <enh@google.com> resolve merge conflicts of f5b35b6 to stage-aosp-master am: b59e296147 am: b54a33a25e
am: 81fb5d1208

Change-Id: Ie3bd993dc405f8533b9321ae1057d507ec6909b3
81fb5d1208999debf3a174bf96793dd7be4549b0 22-Jul-2016 Elliott Hughes <enh@google.com> resolve merge conflicts of f5b35b6 to stage-aosp-master am: b59e296147
am: b54a33a25e

Change-Id: Ib96604eaa304105b3f1a381c68cb0f6bf3c55778
b59e2961471db9ede954a3d843e0bb545bb290fa 22-Jul-2016 Elliott Hughes <enh@google.com> resolve merge conflicts of f5b35b6 to stage-aosp-master

Change-Id: Ie1ac182893214022a68746f563765f6a271f8d1d
a252f4db5df0a3802b471680bb32f2cbbd21c548 22-Jul-2016 Elliott Hughes <enh@google.com> Clean up memory allocation in dumpTrace.

Bug: http://b/20674092
Change-Id: Id8ba2b0efc1641929790770714e48cde545fb3b0
trace/atrace.cpp
fde0beac8fa8c9a76732756424a298ae6e2c7498 21-Jul-2016 Dan Willemsen <dwillemsen@google.com> Merge "Dumpstate: Fix long lines." into stage-aosp-master
cb3d20d06ddd8b8bd28db4c3a9dc9b93212b4a08 20-Jul-2016 Christopher Ferris <cferris@google.com> Merge \\\\"Change to include linux/android/binder.h.\\\\" am: b34400ea94 am: 173b3eff35 am: 672322d5cf
am: be3aaf573d

Change-Id: I9561eb03ae0c3da693cb39cf28127fc73aeb57b7
be3aaf573db1d087f2fb0aa4b496c290c5820eae 20-Jul-2016 Christopher Ferris <cferris@google.com> Merge \\\"Change to include linux/android/binder.h.\\\" am: b34400ea94 am: 173b3eff35
am: 672322d5cf

Change-Id: I51ab527287464759590b3e1f21c4d3692ef364e6
672322d5cf3275327dab49ddf46184fb6b6e71b8 20-Jul-2016 Christopher Ferris <cferris@google.com> Merge \\"Change to include linux/android/binder.h.\\" am: b34400ea94
am: 173b3eff35

Change-Id: I1698162d5b0b04ed427a3f5e9a7b327c95b7dd77
173b3eff35f956ccc0050699bbebb2df95424646 20-Jul-2016 Christopher Ferris <cferris@google.com> Merge \"Change to include linux/android/binder.h.\"
am: b34400ea94

Change-Id: I1aab76bd51c448410d1d9ff3ae288013c81c8d52
97e0a6c78bfb554c2ea3b4630ed524267f993980 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Fix long lines.

Follow-up to commit aff684300a3b7d6984d3b3c1efddb810cd0205e7.

Change-Id: I3faa645b0da7ea27ce3a8df2dbd3b6a50bc1c2bd
(cherry picked from commit 27cd7b256eb08bf9dec7e4e8af8375711ab10225)
umpstate/dumpstate.cpp
0079a59c43db8d001c9e2174ec10984a108fef03 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Use unique_fd

ScopedFd has been deprecated (and removed) in favor of unique_fd.

Bug: 21192156
Change-Id: Ic46ca6d349bf0cc640b7d4008ac540d2c6d08568
(cherry picked from commit aff684300a3b7d6984d3b3c1efddb810cd0205e7)
umpstate/dumpstate.cpp
282aaee1b5581b4cb42454f675e0854226f66261 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Fix long lines. am: 27cd7b256e
am: 00c6b9cce6

Change-Id: I8e57a3e41858acce7342061ba6f10ab199952219
00c6b9cce68b743239cc38b6d8dac8c49d07c85d 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Fix long lines.
am: 27cd7b256e

Change-Id: Ie9e7f9f5fd3df803fc88fb182cb714160a0180ee
27cd7b256eb08bf9dec7e4e8af8375711ab10225 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Fix long lines.

Follow-up to commit aff684300a3b7d6984d3b3c1efddb810cd0205e7.

Change-Id: I3faa645b0da7ea27ce3a8df2dbd3b6a50bc1c2bd
umpstate/dumpstate.cpp
84f0bd5026b7c49e11dd2f6a6137b0657545aea4 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Use unique_fd
am: fcc8db9a36

Change-Id: Ib0d62a2c4e449a00c61e8c2c7ac13acb1d1e58d4
fcc8db9a361f93b1a9e69f2784cd41abb384aa9f 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Use unique_fd

ScopedFd has been deprecated (and removed) in favor of unique_fd.

Bug: 21192156

(cherry picked from commit aff684300a3b7d6984d3b3c1efddb810cd0205e7)

Change-Id: Ic46ca6d349bf0cc640b7d4008ac540d2c6d08568
umpstate/dumpstate.cpp
aff684300a3b7d6984d3b3c1efddb810cd0205e7 19-Jul-2016 Andreas Gampe <agampe@google.com> Dumpstate: Use unique_fd

ScopedFd has been deprecated (and removed) in favor of unique_fd.

Bug: 21192156
Change-Id: Ic46ca6d349bf0cc640b7d4008ac540d2c6d08568
umpstate/dumpstate.cpp
0170cd016c8c649da3a3d845276e6c5ffa350481 19-Jul-2016 Christopher Ferris <cferris@google.com> Change to include linux/android/binder.h.

The upstream kernels have binder.h as linux/android/binder.h, so
match that.

Bug: 30072483
Change-Id: Iacdc96629dd09c1f4be0a5767666ab64b3df8f15
ervicemanager/binder.h
b059122a5fde2d6439ce22380fa3e081b309fdc7 15-Jul-2016 Jeff Sharkey <jsharkey@google.com> Merge \\"Record \\"cache\\" inodes to clear while CE is locked.\\" into nyc-mr1-dev am: 57243a2a26
am: dfd98f988c

Change-Id: I082a6b8e3cd28a566714ec263821dccfc3e232ca
dfd98f988c72468bf1ae034b47913f89c4356030 15-Jul-2016 Jeff Sharkey <jsharkey@android.com> Merge \"Record \"cache\" inodes to clear while CE is locked.\" into nyc-mr1-dev
am: 57243a2a26

Change-Id: Ie134b81cb6c553c20fe13d7cbfbd5d7c4a754a59
1f6a7f117dcfa0e2cdb870a1bd4b20d34363ad73 15-Jul-2016 Jeff Sharkey <jsharkey@android.com> Record "cache" inodes to clear while CE is locked.

There are two situations where we need to clear cached data from
all users, including those whose CE storage might still be locked:

1. When PackageManager is clearing caches to try making room for
package updates.
2. When the device fingerprint changes, we need to clear code caches
for all apps.

To enable this, we now record the inode number of the "cache" and
"code_cache" directories in xattrs of the parent directory. This is
just enough information to find the cache directories to enable
deleting files inside. When preparing CE storage for an app, we now
create these two directories and immediately write the inode numbers.

Bug: 26056125
Change-Id: I7e442b0676a695acf962593469793a93b03c8aee
nstalld/commands.cpp
nstalld/utils.cpp
nstalld/utils.h
be199561408f0b9b48c9bddadeeb22f5ff4cb7cc 08-Jun-2016 Sahil Dhanju <sahildhanju@google.com> Add Protobuf file for the SurfaceFlinger capture and replay testing framework

Change-Id: Icb7bc1ef96683d84bf10f894621a59b51fd2d5c3
urfacecapturereplay/proto/Android.mk
urfacecapturereplay/proto/src/trace.proto
134fae930a480b87844d87757bfe56a83c76f4a6 14-Jul-2016 Wei Liu <luciferleo@google.com> Merge \\"Add bugreportwear service for Wear.\\" into nyc-mr1-dev am: c14e23cf0c
am: db310f91fc

Change-Id: I4c47eb463cc128e3a0dd88789f5bbdf51fc9c048
db310f91fcacebbeab05833e25629fafa04e0fe6 14-Jul-2016 Wei Liu <luciferleo@google.com> Merge \"Add bugreportwear service for Wear.\" into nyc-mr1-dev
am: c14e23cf0c

Change-Id: Ibb3a8170a1e82ef2e9740173d3ac78ee33530299
bb3b2513f0790d8cfdd5fe13755041f255fac526 14-Jul-2016 Andreas Gampe <agampe@google.com> Otapreopt: Try to mount vendor partition for A/B OTA am: 0ba073ce81
am: aee2a63578

Change-Id: I9f2336805eb93d47b3c430484beb8ded61270b5b
c14e23cf0c50bf8b5013060a966bf119ba9e86a8 14-Jul-2016 Wei Liu <luciferleo@google.com> Merge "Add bugreportwear service for Wear." into nyc-mr1-dev
aee2a6357856dc3f82f33e6c6de19db0f6bae291 14-Jul-2016 Andreas Gampe <agampe@google.com> Otapreopt: Try to mount vendor partition for A/B OTA
am: 0ba073ce81

Change-Id: I534d90ec38560ece5795412eeb349d1c58eea323
0ba073ce81fbe544592e0a3cd526b274e83fdf9f 12-Jul-2016 Andreas Gampe <agampe@google.com> Otapreopt: Try to mount vendor partition for A/B OTA

Vendor apps are usually not preopted, so A/B dexopt should pick
them up. update_engine is not mounting the vendor partition, so
let otapreopt_chroot do the work.

Bug: 25612095
Bug: 29498238
Change-Id: I5a77bdb78a8e478ce10f6c1d0f911a8d6686becb
nstalld/commands.cpp
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
nstalld/otapreopt_utils.h
fdb0d9dedef0cfb38d2576b72bae9bd62c23cf35 13-Jul-2016 Andreas Gampe <agampe@google.com> resolve merge conflicts of 946e2bd to master

Change-Id: I272e1f474c534131cf901c38749d5862cab10400
946e2bd60a5b73050204e546fa1dc850f399dfed 13-Jul-2016 Andreas Gampe <agampe@google.com> Merge changes from topic \'ab_ota_dexopt_target_slot\' into nyc-mr1-dev
am: 84932f8053

Change-Id: I14d81e8b5f560532973bb810291fdbf28140924a
84932f8053f92bf0ce117d82cee045c68f4ed5a5 13-Jul-2016 Andreas Gampe <agampe@google.com> Merge changes from topic 'ab_ota_dexopt_target_slot' into nyc-mr1-dev

* changes:
Otapreopt: Add init script for A/B artifact move
Otapreopt: Implement new A/B OTA path
99e2b263dd0df71b55e86f0aec6657eb38b334e1 09-Jul-2016 Andreas Gampe <agampe@google.com> Otapreopt: Add init script for A/B artifact move

Move the /data/ota -> /data/dalvik-cache move from the zygote into
a minimal shell script. Add an init rc file to execute the script
once /data is mounted. Add Makefile rules to pull these files in
with the rest of the A/B OTA dexopt components.

The move is motivated by the new naming scheme that includes the
slot name. Passing the slot name to the zygote would complicate
the process, while the value is immediately available in the script
through a simple getprop call.

Bug: 25612095
Bug: 28069686
Change-Id: I63e718d488662e1b1de2ce857629cb90aa4f611d
nstalld/Android.mk
nstalld/otapreopt.rc
nstalld/otapreopt_slot.sh
0354bd0eaf24de533e86885b811f816f1e4d15c8 27-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Implement new A/B OTA path

Refactor otapreopt_script, otapreopt_chroot and otapreopt such
that the actual work will be done as a child of the script driven
by update_engine.

The script now uses the new OtaDexoptService command to get the
right parameters for a dexopt call in otapreopt. As we reach
otapreopt_chroot and otapreopt directly, we can add parameters
without tainting the regular installd path. Use this to add the
target slot suffix, and make naming of the A/B artifacts include
the suffix instead of the generic "b."

Otapreopt_chroot startup is slightly complicated because all file
descriptors must be closed. Otherwise, dex2oat needs selinux
permissions to inherit the descriptors from update_engine.

Bug: 25612095
Bug: 28069686
Change-Id: I9d7b86ac8ecfdf91af3800f7e96f41534c0afc0f
nstalld/commands.cpp
nstalld/commands.h
nstalld/globals.cpp
nstalld/globals.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/installd_deps.h
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
nstalld/otapreopt_script.sh
dbfe083877f7627ea24b9286b8103c7514212c8d 30-Jun-2016 Felipe Leme <felipeal@google.com> Created functions to run dumpsys.

Such functions not only are less error prone (for example, uses just one
variable for both timeouts) but also will make it easier to pass
additional commands to dumpsys.

BUG: 28980245

Change-Id: Ia772069cbe825af725b5336abb42d2c12200a010
umpstate/dumpstate.cpp
umpstate/utils.cpp
002baffdc192390a0bf4498cb7926ef17555e741 12-Jul-2016 Felipe Leme <felipeal@google.com> Merge "Replaced TBD by Nougat."
ae82d857cdb93eaf15743da89df969576387a561 12-Jul-2016 Felipe Leme <felipeal@google.com> Replaced TBD by Nougat.

Change-Id: I1fcbd9d157bb64d0d6f66609ee87e2f1ed3775e5
umpstate/bugreport-format.md
9313b59979c0526a3365766a294cc9b5a610fe5c 12-Jul-2016 Andreas Gampe <agampe@google.com> Merge \\"Installd: Add support for dex2oat very-large-app property\\" into nyc-mr1-dev am: 8323edd9f5
am: 9fe248886a

Change-Id: Ie8f5acf4adf44a11af46115fa7568164ad8a134e
9fe248886a1157bdae1f56cc68a0e47979dc2e59 12-Jul-2016 Andreas Gampe <agampe@google.com> Merge \"Installd: Add support for dex2oat very-large-app property\" into nyc-mr1-dev
am: 8323edd9f5

Change-Id: I7f4f2c89b348feca29697ac2e18ceda9b88db33e
e21ac2193d4ed1fd9bc4d5328625d3868409fe4d 12-Jul-2016 Andreas Gampe <agampe@google.com> Installd: Add support for dex2oat very-large-app property

To support constrained devices, dex2oat supports a parameter that
can downgrade a compilation to verify-at-runtime. Expose this
through the dalvik.vm.dex2oat-very-large system property.

Bug: 29557002
Change-Id: Iace626a8ec18533d37f84a41c20729fe7e400386
nstalld/commands.cpp
efe3161e08e72ada77e03df58ddc1988e4ac0487 09-Jul-2016 Wei Liu <luciferleo@google.com> Add bugreportwear service for Wear.

b/30041885

Change-Id: Ic054e4406cbf067b86ea79aee59a105b82344fec
umpstate/dumpstate.rc
95519b328ba1643c42ee7c2a34183528e1ab5a30 29-Jun-2016 mukesh agrawal <quiche@google.com> dumpsys: report per-service dump times
am: 2f1eb1c16d

Change-Id: If7958d7db0be6d693a4190982edc8c207378f573
2f1eb1c16d6061ba4f79ecf67d08827bf74bed27 09-Jun-2016 mukesh agrawal <quiche@google.com> dumpsys: report per-service dump times

In WiFi soak testing, we've seen several cases where
dumpsys times out. We've been unable to pin down the
cause of the timeouts, as there's no single service
that is obviously hung.

Add reporting of service dump times, to help figure
out why dumpsys is timing out.

BUG=29090949
TEST=manual

Manual test
- load build on bullhead
$ adb shell dumpsys | grep 'was the duration'
- see non-zero values

Change-Id: Iaba60d840ac55cba171a3ccbc74c2aee8b23dce6
(cherry picked from commit 4e4c548437b7cc7748e97ecc74a525e26a441cdb)
umpsys/dumpsys.cpp
773d1341fd1b59162fe5008e5fd5e31e4144cede 29-Jun-2016 Wei Wang <wvw@google.com> dumpstate: change OOM adjustment proc interface for modern kernel am: 9c1f9bb720
am: 57ebf1c0f3

Change-Id: I300e5d35d38bf82b26681a45512e5b7947552c8a
57ebf1c0f39e4fad36ec59e7386cfecd57936710 29-Jun-2016 Wei Wang <wvw@google.com> dumpstate: change OOM adjustment proc interface for modern kernel
am: 9c1f9bb720

Change-Id: Id73600e997add6e30ff626502cc6b06d1888b70c
9c1f9bb7205e59d4bdc6f9e9601bc4b3ef210b3b 28-Jun-2016 Wei Wang <wvw@google.com> dumpstate: change OOM adjustment proc interface for modern kernel

Bug: 29831067
Change-Id: I72e2862daad5da99e7d767d7e41bde96750840ce
umpstate/dumpstate.cpp
a4ab3e7474e8215fa695d2cfdf8cf4982572ac86 25-Jun-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG
am: ced6078b0e

Change-Id: Iacabdb52ae0e4ad3a6c27e952fa9ce572b282904
85b51688593e3854d642f25b91af5457ec067ef2 24-Jun-2016 Mark Salyzyn <salyzyn@google.com> Merge \\\\"dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG\\\\" am: 00e3f2995f am: db290501a5 am: 6a12797cae
am: f6dfcc9b65

Change-Id: I2ea874ac286e3e254ee90219047ca398ad4567b1
f6dfcc9b654a89530330b7f53234e38f5fea2519 24-Jun-2016 Mark Salyzyn <salyzyn@google.com> Merge \\\"dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG\\\" am: 00e3f2995f am: db290501a5
am: 6a12797cae

Change-Id: Ifad84667b38198c90fef7e874fd093744ea0b40f
6a12797cae7a96845ac3f55c0c4d531348bec8f7 24-Jun-2016 Mark Salyzyn <salyzyn@google.com> Merge \\"dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG\\" am: 00e3f2995f
am: db290501a5

Change-Id: Ib628ab8c43db208fa891d1e19f483a1f6bea21e0
db290501a5cc20687c817e5781ea320cb1c4ab46 24-Jun-2016 Mark Salyzyn <salyzyn@google.com> Merge \"dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG\"
am: 00e3f2995f

Change-Id: Ie0eed7a01655af927304b148005e9a37f9c11883
ced6078b0e03a75d9b78e61ce25609bd2cb97b1d 24-Jun-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG

(cherry pick from commit 7d0a762ecaf9f4d005f0f6db913034c2e084d362)

Bug: 29639467
Change-Id: Iba0b1754eaebfb2b0624dcbef522b7d8456eeb50
umpstate/dumpstate.cpp
7d0a762ecaf9f4d005f0f6db913034c2e084d362 24-Jun-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG

Bug: 29639467
Change-Id: Iba0b1754eaebfb2b0624dcbef522b7d8456eeb50
umpstate/dumpstate.cpp
09fc6bcce8d5cf3a2ef4f9a7e79de8dcc07d3144 16-May-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: sscanf requires an asciiz string

(cherry pick from commit 290f4b97bb736b0652eac9667965444393e683ec)

Bug: 28770668
Change-Id: Ice56b129a243296b2691d55e8f8c35b478b1f481
umpstate/Android.mk
umpstate/utils.cpp
06531649aa866be3312654290ecc4812b3793e91 22-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\\"Run iptables as root.\\\" into nyc-dev am: ab69cc1f11 am: 18f0dd488d
am: d97f4db672

Change-Id: Ibe24390aac15bebe7a50b18e75a8a146a747eb1d
d97f4db672f4116b21fb7f20bfc01e775c9e0721 22-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\"Run iptables as root.\\" into nyc-dev am: ab69cc1f11
am: 18f0dd488d

Change-Id: Idb86e8c1e7c6bfe05d6b5885f708747510440daa
142d1324613b05ae53dad4d62951b7b160e14fcc 22-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Run iptables as root.\" into nyc-dev
am: ab69cc1f11

Change-Id: I1c45a731c685ddbde7630c588fb6e53a08489a75
18f0dd488d744afa5bda46eeb37c55f2ad801a3c 22-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Run iptables as root.\" into nyc-dev
am: ab69cc1f11

Change-Id: I4ca2677e7b99cfaa1ccc60c3efb2df642f3a7408
ab69cc1f11a7e391bd3bb017a22ed747da89b21b 22-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Run iptables as root." into nyc-dev
4149e07a5debb6d77a32c3822af16149672a428e 22-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \\"Attach profiles to bug reports\\" into nyc-mr1-dev am: 4d6b7221ff
am: 0be3db47bc

Change-Id: Id08c69a37c834bc2afc5d19eb6d8e3eae0f8c1b1
0be3db47bc7faa2a6ae5d50a871669cb7eb55935 22-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \"Attach profiles to bug reports\" into nyc-mr1-dev
am: 4d6b7221ff

Change-Id: Ic239723d7a5c63047538c56d93e30e1e9d2d8450
c0808155fd10d2d5c49bb4c8d4cafed8da28c182 18-Jun-2016 Felipe Leme <felipeal@google.com> Run iptables as root.

iptables requires root access and su is not available on user builds,
hence it must be ran before dropping uid to shell user.

BUG: 29455997

Change-Id: I10c6337b411875b061ae9556b6e9c44f83301ae1
umpstate/dumpstate.cpp
d2991962b7120319a4fa63f1a93b100adaad5dbe 03-Jun-2016 David Brazdil <dbrazdil@google.com> Attach profiles to bug reports

Includes the entire '/data/misc/profiles' folder in the bug report
ZIP file if not user build.

Bug: 28610953
Change-Id: I99d46f024e5557cf94e6045a51c46a605a00c52b
umpstate/dumpstate.cpp
114a9c80440e120267dcab17090f6bef662d7736 17-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\"Rename problematic entries.\\" into nyc-mr1-dev am: b892b69e29
am: 6f5f5fb95b

Change-Id: I8f79dbb1f9d4a0d95619a14e45b45b9ff1a78a95
6f5f5fb95bdd100f38a69a02e01b9c0b9a27f30a 17-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Rename problematic entries.\" into nyc-mr1-dev
am: b892b69e29

Change-Id: I8e39dac689f96593daa190c526079770fc2469aa
b892b69e29d0fcfbe85ef147dc1103862c69eb19 17-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Rename problematic entries." into nyc-mr1-dev
24b66eed1acd08a975546b57198940f4de9250eb 16-Jun-2016 Felipe Leme <felipeal@google.com> Rename problematic entries.

Zip entries with extensions such as .jar could cause the zip file to be
rejected as an attachment by some email providers. To circunvent such
issue, they will renamed with a '.renamed' suffix.

BUG: 28610953
BUG: 29395357
Change-Id: I9718821a53fdf0ce4f00ed360eddbf7fb4ca1cd6
umpstate/dumpstate.cpp
23fda1f16906690c95408226b3c4e565ec181451 16-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \\\"Revert \\\"Attach profiles to bug reports\\\"\\\" into nyc-dev am: ea1aa91a25 am: 393850d7b6
am: d42f3a8ba4

Change-Id: I1a92e4039e09e4397794869ecb57bf00fa33d91a
d42f3a8ba4e53506841e3df16111ce64b2f9c130 16-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \\"Revert \\"Attach profiles to bug reports\\"\\" into nyc-dev am: ea1aa91a25
am: 393850d7b6

Change-Id: I3d069ed7870ed99c2380a6282d012151a970ce2f
720c767e9c5e81451983603ef7524b599ae59b23 16-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \"Revert \"Attach profiles to bug reports\"\" into nyc-dev
am: ea1aa91a25

Change-Id: I549f25a1e2bc90ff326a4d218cae5d2ea58571f3
393850d7b6aa86b33ffe9940540d76bcb872315d 16-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \"Revert \"Attach profiles to bug reports\"\" into nyc-dev
am: ea1aa91a25

Change-Id: I736c406da5b866b712c02315a787019ad307c109
ea1aa91a25f28fb44f36b394e002ede56302eb30 16-Jun-2016 David Brazdil <dbrazdil@google.com> Merge "Revert "Attach profiles to bug reports"" into nyc-dev
236f7054ec9fcfde32c6ef39097791f0b158dfc2 16-Jun-2016 David Brazdil <dbrazdil@google.com> Revert "Attach profiles to bug reports"

This reverts commit 0faf2b870f934c1cdd883d29642fd84da3b352e2.

Bug: 28610953
Bug: 29395357
Change-Id: I609fe344dfc61311e37b91b48480d9392764a598
umpstate/dumpstate.cpp
f028a9743f7832b04620b3742bab5e99a4079ef3 15-Jun-2016 Elliott Hughes <enh@google.com> Merge \\\\"No need for dumpstate to explicitly reference \\\\'toybox\\\\'...\\\\" am: c1c06a7d6b am: b660711d76 am: e44ded8bb4
am: 090abf13b1

Change-Id: I57de63c031cb1ce7df8ee6169060e6317a15ad8d
090abf13b1c0b2fe672280b226f923d2644d18f5 15-Jun-2016 Elliott Hughes <enh@google.com> Merge \\\"No need for dumpstate to explicitly reference \\\'toybox\\\'...\\\" am: c1c06a7d6b am: b660711d76
am: e44ded8bb4

Change-Id: I374f2c5d85af0a6f5a5c82906daa19f1c1624620
b660711d7663a63ab05402920374df1443ef3221 15-Jun-2016 Elliott Hughes <enh@google.com> Merge \"No need for dumpstate to explicitly reference \'toybox\'...\"
am: c1c06a7d6b

Change-Id: Icb2f2ba9cd42e7f3c209d2f7b9e14ec8443a9a16
999eb3491d7d6efdf52639ece27aee04974a4526 14-Jun-2016 Junda Liu <junda@google.com> Merge \\"Fix typo in dump cmd line.\\" into nyc-mr1-dev am: aa0afd0a01
am: e182cca0ef

Change-Id: I8d230b1dbd8eb86c5de0e85bd7ad719ba622b373
52860035191e0a3bafb7dbd7b8140cf1527004f3 14-Jun-2016 Elliott Hughes <enh@google.com> No need for dumpstate to explicitly reference 'toybox'...

...now we've switched the symlinks over to the toybox implementations.

Change-Id: I6301e3bc8de7210bf111889ee3b014802aecf15c
umpstate/dumpstate.cpp
e182cca0ef70476ea596ea61486be02e3444ff4e 14-Jun-2016 Junda Liu <junda@google.com> Merge \"Fix typo in dump cmd line.\" into nyc-mr1-dev
am: aa0afd0a01

Change-Id: I97b497de7063cf9d1c764bc83d5444dd6f2e3158
cfc33d41c856bee305d2e73c6ca02fb0f8fbb6af 14-Jun-2016 Junda Liu <junda@google.com> Fix typo in dump cmd line.

Bug: b/29342758
Change-Id: Ic9ac15a2ade08a2cd21721721af357aa75a35ca5
umpstate/dumpstate.cpp
e403dabdd78a2a2625134b9587f48182f5e73764 14-Jun-2016 Elliott Hughes <enh@google.com> Merge \\\\"Move dumpstate over to toybox top.\\\\" am: f5e4ac0338 am: 0498cc9683 am: 41a67e15dd
am: 66e84e18c0

Change-Id: I05c52ecdfb853c19f0c4934200cddb30838e9e33
66e84e18c00bab4ab938b56a5e069926f5604160 14-Jun-2016 Elliott Hughes <enh@google.com> Merge \\\"Move dumpstate over to toybox top.\\\" am: f5e4ac0338 am: 0498cc9683
am: 41a67e15dd

Change-Id: Ife4326923f368479844b3067250163c85c2cafd7
41a67e15ddfe461c5ce16f5af32d46f270b65211 14-Jun-2016 Elliott Hughes <enh@google.com> Merge \\"Move dumpstate over to toybox top.\\" am: f5e4ac0338
am: 0498cc9683

Change-Id: Ie747d812296798d74d61bba4f9092ba0585b415d
646e92fff23cd4156e40489ca92d0a96766270ec 14-Jun-2016 Elliott Hughes <enh@google.com> Move dumpstate over to toybox top.

Change-Id: I3715b0d217aaf263687d6cab24ca470caf7c70a0
umpstate/dumpstate.cpp
a88b19a921a9c39dfc38f74f298fed2a33227511 13-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Fixed nullptr check."
a282cdaf8531ceb9a35b771755cbb5a269850adb 13-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Increased some timeouts."
259820ce5cfae5029aa24738f34e04c796b8474b 13-Jun-2016 Junda Liu <junda@google.com> Merge \\"Read gsm.version.baseband for radio version.\\" into nyc-mr1-dev am: 52a92e9d71
am: 7c7f2e5bd4

Change-Id: Id90855657c52b2b0939143d75e163763ead0bdf8
7c7f2e5bd4485ea80878efa6a97cfd7453ef129a 13-Jun-2016 Junda Liu <junda@google.com> Merge \"Read gsm.version.baseband for radio version.\" into nyc-mr1-dev
am: 52a92e9d71

Change-Id: I748b8fddf2bc99702088ae8874cb6bdab7b7e38b
52a92e9d71cbde2876ad132f8ef24193819291a8 13-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Read gsm.version.baseband for radio version." into nyc-mr1-dev
92157cddd13ca1b0f90d5d340fbef80233f33347 13-Jun-2016 Felipe Leme <felipeal@google.com> Fixed nullptr check.

arg[0] is always the command being passed to execvp and hence it will
never be null; the real args start at arg[1]

BUG: 27832567
Change-Id: I3180eae857cf028315b1da7cbd38b40994ff98b0
Fixes: 29276781
umpstate/utils.cpp
2bd2d759751f6b4427c127b06f1f7595be235043 13-Jun-2016 Andreas Gampe <agampe@google.com> Merge \\"Otapreopt: Send progress updates to update_engine\\" into nyc-mr1-dev am: 62f2016b12
am: ff9e0d35b4

Change-Id: I45b53247765e77a2dfc12aa9c4e07e5ddd9608bf
ff9e0d35b4db7610c9fcfff0ff5f3cb28c6c65bf 13-Jun-2016 Andreas Gampe <agampe@google.com> Merge \"Otapreopt: Send progress updates to update_engine\" into nyc-mr1-dev
am: 62f2016b12

Change-Id: I64f3c3ee44b30b0c1dc7e60e7bb0a6a3af3b9a3f
62f2016b123eb0e88d58dde2e695cb86c651abd5 13-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Otapreopt: Send progress updates to update_engine" into nyc-mr1-dev
6188412da39f13daed540e563f15e90f3df84db8 13-Jun-2016 Felipe Leme <felipeal@google.com> Increased some timeouts.

dumpsys meminfo from 30s to 90s.
Stack traces from 5s to 10s.

Change-Id: Ic420395811b13b4a33118d467af4c7878a55e50e
Fixes: 29275992
umpstate/dumpstate.cpp
umpstate/utils.cpp
58ad929330b752350eea60965ac813d89791308b 12-Jun-2016 Junda Liu <junda@google.com> Read gsm.version.baseband for radio version.

gsm.version.baseband is the right property to use for actual radio version.

Bug: b/29296893
Change-Id: Idf7b743f35f23261c0086449131188b1e52fb424
umpstate/dumpstate.cpp
7dd60027b9eb7d3f6a9dd5e8ec145e4340819fb7 11-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Checks if /proc/modules exist before calling lsmod."
f72ef90e9f24d40ed6ad1ef1d725adebb061eaa4 11-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds dumpstate log file to bugreport zip."
e4eca58fe7daa5e2dce7fa2b615c541aef00bc67 11-Jun-2016 Felipe Leme <felipeal@google.com> Checks if /proc/modules exist before calling lsmod.

Change-Id: I8de20d5b99cf613d8d4af699ab8487d27e79bb3f
Fixes: 29276583
umpstate/dumpstate.cpp
0f3fb20cff288f2874c46c9f4102c6c9f273a0a3 11-Jun-2016 Felipe Leme <felipeal@google.com> Adds dumpstate log file to bugreport zip.

BUG: 29276583

Change-Id: I1e1346cbeb117f9945fbb0aa138986d9e791ae4f
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
2f4e205c64900f5977aae0b7bb7935f3631066d7 11-Jun-2016 Felipe Leme <felipeal@google.com> Fixed -t order (should be *after* dumpsys :-) am: 3f83dbe2e0 am: 17421c5fa9
am: 25e0a299c3

Change-Id: I2c540e12c018ea6f87ab8042fc01bdc120494d7e
25e0a299c33ba4d978aa8765d7d70923c8fe89ab 11-Jun-2016 Felipe Leme <felipeal@google.com> Fixed -t order (should be *after* dumpsys :-) am: 3f83dbe2e0
am: 17421c5fa9

Change-Id: Id589d84697885e683020312f570a14b940611753
076e8e37b31afd879fa80ed461d6476d0ff9d92f 11-Jun-2016 Felipe Leme <felipeal@google.com> Fixed -t order (should be *after* dumpsys :-)
am: 3f83dbe2e0

Change-Id: Ia1d5d06884a35a8a586e0620ee75c54181e6b945
17421c5fa9a19ca3c57da88d744f3538e0f4ea62 11-Jun-2016 Felipe Leme <felipeal@google.com> Fixed -t order (should be *after* dumpsys :-)
am: 3f83dbe2e0

Change-Id: I047fe3a0f3990eb6827484124889f0052536bcd1
3f83dbe2e0bb9cabe598ef0812ae358b1c5b415f 11-Jun-2016 Felipe Leme <felipeal@google.com> Fixed -t order (should be *after* dumpsys :-)

BUG: 29042642
Change-Id: I1b88634b0152f849a57f8e82adc82bdc5e609db7
umpstate/dumpstate.cpp
6c05a734ce443cb5effd01120c5a83b93343b6b6 11-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Send progress updates to update_engine

Use the new OtaDexoptService progress API to send updates back
to update_engine.

Bug: 25612095
Bug: 29223204
Change-Id: Ie8162946d18f6fa78649a40ad5d3949d31a181cd
nstalld/otapreopt_script.sh
1a3600e38e1f4050aa01a093e5eded68f7751968 10-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\\"Set version to 1.0\\\" into nyc-dev am: 6ab3c01d18 am: 33168c51ed
am: 8a65416a49

Change-Id: I51a0092f4d11c552d7901cfc285b07ea69c454d4
8a65416a49629545e871be83a0d638984efb1e57 10-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\"Set version to 1.0\\" into nyc-dev am: 6ab3c01d18
am: 33168c51ed

Change-Id: Ic360ba18ba0187bb458015e288256478063ed95f
fab4f5126ea37c25f7b6a8d1a00ad1e7eb078ca4 10-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Set version to 1.0\" into nyc-dev
am: 6ab3c01d18

Change-Id: I8b950e7b4395272e57b2a62af40854ad76ff71ae
33168c51ed9beb6b5cf9b14ae07911cdf027d2bd 10-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Set version to 1.0\" into nyc-dev
am: 6ab3c01d18

Change-Id: Id05c75208093eaaab3e0732bf9c1767535e6d230
6ab3c01d1806e44976c10b34e5f6a5c5531c1da5 10-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Set version to 1.0" into nyc-dev
194198f5c1f3f12a41ec9c5ad52a0e3a5812d1c1 10-Jun-2016 Mukesh Agrawal <quiche@google.com> Merge "dumpsys: report per-service dump times"
1a5577663a61d3786ce80760c4421a9ecd02da9c 10-Jun-2016 Calvin On <con@google.com> Merge \\\"Expose more useful functions that can be used by dumpstate_board().\\\" into nyc-dev am: f678562fa4 am: 61b343b6ec
am: e82ad7b264

Change-Id: I5a6cf17428e03a0897d08f710445d03c35ae4cd3
e82ad7b264c51ea361b260287e9d185287dc4024 10-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\"Expose more useful functions that can be used by dumpstate_board().\\" into nyc-dev am: f678562fa4
am: 61b343b6ec

Change-Id: Ie9f588d6cb98834e7048686281b7a7e266780f37
7599fb5687a3f192afc49839a79ef26e5ca75562 10-Jun-2016 Calvin On <con@google.com> Merge \"Expose more useful functions that can be used by dumpstate_board().\" into nyc-dev
am: f678562fa4

Change-Id: I4a598f406bbbb9cd546a0e2f59dd085622b95b30
61b343b6ec74200dd8610065de82435856c4e676 10-Jun-2016 Calvin On <con@google.com> Merge \"Expose more useful functions that can be used by dumpstate_board().\" into nyc-dev
am: f678562fa4

Change-Id: Iafc8e259139f11a21ce3104df52fe6a74366bcfa
f678562fa46992f4f8792429f4237fb925db093f 10-Jun-2016 Felipe Leme <felipeal@google.com> Merge "Expose more useful functions that can be used by dumpstate_board()." into nyc-dev
e9bd21d5f047125eb22c5b90ae100586b5a6f187 09-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Filter preopted system apps am: 1409090c0a
am: 364bf2d208

Change-Id: Ia3eed767f34584d7a2a58b08092326b479a4da06
364bf2d208a24167afbeb2795d6386f3b6ea38d7 09-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Filter preopted system apps
am: 1409090c0a

Change-Id: I49929843bd263770e6bd643e8d8d1d6770e0cf35
1409090c0a92751f9fe7406a6e043cdbce2ebe4d 09-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Filter preopted system apps

The tool will receive requests to compile preopted system apps, as
we can't detect changes right now and need to be conservative. As
some apps cannot be stripped (signed before being preopted), they
can be re-compiled on device, producing stale files that won't be
cleaned up.

Add code to detect this situation and avoid a compile.

Bug: 25612095
Change-Id: I5f489e61b8d4e5b619cbaa01f6c59880479a46cd
nstalld/otapreopt.cpp
9c8f93a2a6ed6a764de7a617fe7a01657d0f4479 04-Jun-2016 Dan Austin <danielaustin@google.com> fixing const/non-const issues in preparation for libcxx rebase

Change-Id: I8528edd3af4a801f29c17f1f54c44be1a1a0b563
nstalld/otapreopt.cpp
497951caa6be79489d191c5b45a800c68c2f604b 31-May-2016 Dan Austin <danielaustin@google.com> Address const/non-const issues in preparation for libcxx rebase

Change-Id: I7ab9f65b41cbd2a8272810427529f46c6fbf2a0d
(cherry picked from commit 09a7987fb59ed6843d51acf0161d66ed3eb2252f)
(cherry picked from commit d1a8fe69ec033b59b56c171ac5fa9d90b886a8c5)
trace/atrace.cpp
d1a8fe69ec033b59b56c171ac5fa9d90b886a8c5 31-May-2016 Dan Austin <danielaustin@google.com> Address const/non-const issues in preparation for libcxx rebase

Change-Id: I7ab9f65b41cbd2a8272810427529f46c6fbf2a0d
(cherry picked from commit 09a7987fb59ed6843d51acf0161d66ed3eb2252f)
trace/atrace.cpp
4e4c548437b7cc7748e97ecc74a525e26a441cdb 09-Jun-2016 mukesh agrawal <quiche@google.com> dumpsys: report per-service dump times

In WiFi soak testing, we've seen several cases where
dumpsys times out. We've been unable to pin down the
cause of the timeouts, as there's no single service
that is obviously hung.

Add reporting of service dump times, to help figure
out why dumpsys is timing out.

BUG=29090949
TEST=manual

Manual test
- load build on bullhead
$ adb shell dumpsys | grep 'was the duration'
- see non-zero values

Change-Id: Iaba60d840ac55cba171a3ccbc74c2aee8b23dce6
umpsys/dumpsys.cpp
fcb6cb32b01945344fcb183861d2de3716874745 09-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\\"Improved error handling.\\\" into nyc-dev am: bbd27419ac am: 75e6dde051
am: 80b18227bf

Change-Id: I169f9018575d60d8d503b3a33cd49252266eeaa6
80b18227bf9c9b50a141b379b3f6a0d7e608e66a 09-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\"Improved error handling.\\" into nyc-dev am: bbd27419ac
am: 75e6dde051

Change-Id: Iae7f0a7c3f66545a98de7d3901ac71622acc1c4a
75e6dde051bd382869cdb74052a09264a00a0209 09-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Improved error handling.\" into nyc-dev
am: bbd27419ac

Change-Id: I55a0eb324d18c7081acb6387b51c2fdf4f7b2a62
86d648e0f7ca4d5eaad4310841ba5be53194290d 09-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Improved error handling.\" into nyc-dev
am: bbd27419ac

Change-Id: I1cdfd89997adee7d68191b66bab9e437a8be7800
bbd27419ac2a28fdfa2cf637f5f642a26a11eed8 09-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Improved error handling." into nyc-dev
261931a37e12e7e9abd3488ccd4f839a801dccb0 09-Jun-2016 Andreas Gampe <agampe@google.com> Merge \\"Installd: Move app image A/B artifact\\" into nyc-mr1-dev am: e4ad0055a8
am: 6d7a78bf24

Change-Id: Id2c395327ea604fa9b5cdfb1c2e79224c85ccafb
6d7a78bf24ec185f2e7ac62e2049408d9e51678e 09-Jun-2016 Andreas Gampe <agampe@google.com> Merge \"Installd: Move app image A/B artifact\" into nyc-mr1-dev
am: e4ad0055a8

Change-Id: Ib43de7c04404f716e15211934eb1695f399d7fd5
e4ad0055a8e9d701cde2ccc16eb779c718393014 09-Jun-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Move app image A/B artifact" into nyc-mr1-dev
f93aa9ef809d2ccbee91640c93e288f27c0933cb 09-Jun-2016 Fabien Sanglard <sanglardf@google.com> Merge "Fix typos in help section"
1634d841af26421a76ef4c723095786da6d350a4 08-Jun-2016 Felipe Leme <felipeal@google.com> Improved error handling.

adb bugreport now properly handles stderr.

BUG: 29161586
Change-Id: I7a59d1feadda3d160eae6fe447a7a3c7e0843cbb
ugreportz/bugreportz.cpp
a917ac719672142097f95b738c69d8c0a6debfa5 08-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\\"Explicitly sets dumpsys timeout.\\\" into nyc-dev am: 12af7d51a1 am: 76614b0120
am: c09b60b32a

Change-Id: Ib6304253690c0b0ab45a49103a4d7f036d6c5a31
b5c95475996c59bacb0ee760f11bf792f71e0c77 08-Jun-2016 Fabien Sanglard <sanglardf@google.com> Fix typos in help section

Change-Id: Ibbbf89fafa46e2e4e85088f79a6b0c8b2c4a3b0c
trace/atrace.cpp
c09b60b32a0a2f47de0649ef02b2b958da23918e 08-Jun-2016 Felipe Leme <felipeal@google.com> Merge \\"Explicitly sets dumpsys timeout.\\" into nyc-dev am: 12af7d51a1
am: 76614b0120

Change-Id: I635605c043a2435382ac93fb56b6ec57d7a98778
76614b0120a2603009105ce2ce323eb57c1ce7e1 08-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Explicitly sets dumpsys timeout.\" into nyc-dev
am: 12af7d51a1

Change-Id: Ieab6b2ad648ff58b3bee7ffc8d4fbc3cfb516225
bae504129035d417184f67799d00f71b6ca0defb 08-Jun-2016 Andreas Gampe <agampe@google.com> Merge \\"Installd: Change app image name computation\\" into nyc-mr1-dev am: 2fc9381a2a
am: bc4e455429

Change-Id: I7fdee1aa622e067af0e5e81c2f9061a0424ee285
6a43a90aaa6c7da128509b6fb9a0e22f50345e67 08-Jun-2016 Felipe Leme <felipeal@google.com> Merge \"Explicitly sets dumpsys timeout.\" into nyc-dev
am: 12af7d51a1

Change-Id: I1cdc06fdb732e893ea4829a780efe2a931c74598
bc4e455429e33f4901a8b027815b539bad967c08 08-Jun-2016 Andreas Gampe <agampe@google.com> Merge \"Installd: Change app image name computation\" into nyc-mr1-dev
am: 2fc9381a2a

Change-Id: I7f30bb31f4271e508996d83cec7d727d499fd76f
12af7d51a1a0c4e98955ae58a69552b8f55904eb 08-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Explicitly sets dumpsys timeout." into nyc-dev
af8948d90605ad116c965c25e73e0fc9782112ab 07-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Move app image A/B artifact

In addition to odex, also move art file.

Bug: 25612095
Change-Id: I69f4c2b1e7283c9a9c361f57f5233e66679c5c28
nstalld/commands.cpp
2fc9381a2a370142b3559c6c1445588643d6ae60 08-Jun-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Installd: Change app image name computation" into nyc-mr1-dev
7cff462202437da5bba003a8687582af21fa0a0b 08-Jun-2016 Felipe Leme <felipeal@google.com> Explicitly sets dumpsys timeout.

The run_command() function takes a timeout as argument, and dumpsys can
also optionally takes a timeout with the -t argument, hence it makes
sense to pass the same value for both (otherwise dumpsys will timeout in
10s).

BUG: 29042642
Change-Id: Ib6e987d94e966686bab71223d7f910af9e549814
umpstate/dumpstate.cpp
cc319eb2941b01c495ee1814e764d489daf84bcf 08-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \\\"Attach profiles to bug reports\\\" into nyc-dev am: 6d98bac4ab am: 1188e01847
am: 00e45ceee5

Change-Id: I4576414977625164e38f53f3aa6a92243ac51480
00e45ceee5ad336dc2a8c133dc726f63846a1804 08-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \\"Attach profiles to bug reports\\" into nyc-dev am: 6d98bac4ab
am: 1188e01847

Change-Id: I739f299d94a7ccd86c15ec15eb065d26ca48bfe8
1188e018479531c2766529772b944f6a63a11989 08-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \"Attach profiles to bug reports\" into nyc-dev
am: 6d98bac4ab

Change-Id: I30cb48eb317312e153c8936989e43e3acb3c0e14
3f7009c380445f67a98665795a2dd782f7481e2b 08-Jun-2016 David Brazdil <dbrazdil@google.com> Merge \"Attach profiles to bug reports\" into nyc-dev
am: 6d98bac4ab

Change-Id: I14404b7188e7be6c426bd550868badc3a8a91a07
6d98bac4ab65bc7ac50ee4f4108d8e07e766e005 08-Jun-2016 David Brazdil <dbrazdil@google.com> Merge "Attach profiles to bug reports" into nyc-dev
0faf2b870f934c1cdd883d29642fd84da3b352e2 03-Jun-2016 David Brazdil <dbrazdil@google.com> Attach profiles to bug reports

Includes the entire '/data/misc/profiles' folder in the bug report
ZIP file if not user build.

Bug: 28610953
Change-Id: I99d46f024e5557cf94e6045a51c46a605a00c52b
umpstate/dumpstate.cpp
3cd06438e355dc2864b3edb7fdbc3d07c3877065 08-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Fix bad merge am: f065032f53
am: 7feaca4a1c

Change-Id: I7bee9623bec05421d5ad161e9d5ecb2d22ed2bf5
7feaca4a1cba35a2aa1493d3e76ad45d20bbd8f5 08-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Fix bad merge
am: f065032f53

Change-Id: Iad40f585d16aa6bc1fdc96e4bad8aa7e013120b7
f065032f5331e1739fe32a2db9df8c91905720f9 08-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Fix bad merge

Don't cut off the leading dex location character.

Bug: 25612095
Change-Id: Iad556a0bb48c57f3c68ee75ee41f14e88d96b1a8
nstalld/commands.cpp
50d1339ce74dbc9ea2b6d2d5feccf10704717480 08-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Refactor dexopt to scoped file descriptor am: afa58d175c
am: dbbc252e09

Change-Id: Ibf6fe3cec1ba33f653f29ac5e1bd4bc0d621fc46
dbbc252e095b6c6ef778cdbf952eac7cc77a5218 08-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Refactor dexopt to scoped file descriptor
am: afa58d175c

Change-Id: I9fdb0748330846240114c43eb11c7d40fe36ff46
d01a02ce6980de0024333b4673cff9a77be629cf 04-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Change app image name computation

Refactor computation to take A/B OTAs into account.

Fix a const issue.

Bug: 25612095
Change-Id: I5cf79def532d1eeec4b35bb80014376959083a83
nstalld/commands.cpp
nstalld/otapreopt.cpp
afa58d175cc3e9adaa4f8df9bc7a8fac5798a50a 04-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Refactor dexopt to scoped file descriptor

Refactor the goto-fail cleanup to a unique_fd-like wrapper that
includes a potential cleanup step. In preparation for changes for
A/B OTA.

Bug: 25612095
Change-Id: If6cca85c12e0951bc468cb4f212b2f2d288c6041
nstalld/commands.cpp
ca496bfc76c194c95aa0c5f22a996caec678f731 07-Jun-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Remove string-helpers" into nyc-mr1-dev am: eccc933e00
am: 6478587e2a

* commit '6478587e2aefec9fbd2c59634b4749461cf8ceed':
Installd: Remove string-helpers

Change-Id: Ifdd1605391460041307a002fac2177d1ed18cfe4
6478587e2aefec9fbd2c59634b4749461cf8ceed 07-Jun-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Remove string-helpers" into nyc-mr1-dev
am: eccc933e00

* commit 'eccc933e00e45cf73664ff5acd7d1ec84e0b48d4':
Installd: Remove string-helpers

Change-Id: Ie879886553c991234875bfde4afffcdde812a311
eccc933e00e45cf73664ff5acd7d1ec84e0b48d4 07-Jun-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Remove string-helpers" into nyc-mr1-dev
2438d170dc91880e1b39b90783ea25287ab9349e 07-Jun-2016 Janis Danisevskis <jdanis@google.com> Merge "Cplusplusify the constant MIN_RESTRICTED_HOME_SDK_VERSION"
40bd3eff694ef1c660af2806bcc51bb5ac038c16 07-Jun-2016 Janis Danisevskis <jdanis@google.com> Cplusplusify the constant MIN_RESTRICTED_HOME_SDK_VERSION

Make the former macro MIN_RESTRICTED_HOME_SDK_VERSION a constexpr.

Change-Id: I0e85a0edecbcb1f5bba95e14fc36cd9561b369a7
nstalld/commands.cpp
4769ccafd6e6b94ab73afcb755fe59764c228eae 03-Jun-2016 Andreas Gampe <agampe@google.com> Installd: Remove string-helpers

Replace string-helpers with equivalent functions from android::base.

Bug: 25612095
Change-Id: I186461b94dffe3590c16455d4dee0c2cbe921bf4
nstalld/otapreopt.cpp
nstalld/string_helpers.h
249beee359da256f7c41c481d45c06765b6a1d8a 04-Jun-2016 Calvin On <con@google.com> Expose more useful functions that can be used by dumpstate_board().

BUG: 28640932
Fixes: 28867848
Change-Id: I38123e5b348f4560212559176eb60dbad4f22364
umpstate/dumpstate.cpp
umpstate/dumpstate.h
7881367486f1919343899a397b8c1c3d8c9f5209 06-Jun-2016 David Sehr <sehr@google.com> Merge "Enable profman pretty printing" into nyc-dev am: 572e23d761 am: 1ddf4d8d51
am: e802eee27e

* commit 'e802eee27e0275fe50229ff6c60002faff94744a':
Enable profman pretty printing

Change-Id: I327dee27ee94677e708dcd91a16afe6107affb5f
e802eee27e0275fe50229ff6c60002faff94744a 06-Jun-2016 David Sehr <sehr@google.com> Merge "Enable profman pretty printing" into nyc-dev am: 572e23d761
am: 1ddf4d8d51

* commit '1ddf4d8d51ba79b4efa6fe2575c6813fd619c04f':
Enable profman pretty printing

Change-Id: I401f2db6b29f66b27c71591f6335a297b3bd01cb
09c6c75d24994fff62252e98b7d27e5ef0df9158 06-Jun-2016 David Sehr <sehr@google.com> Merge "Enable profman pretty printing" into nyc-dev
am: 572e23d761

* commit '572e23d7614485a06102b00667d003b21b874bf9':
Enable profman pretty printing

Change-Id: Ib2e450b89b2805de265c44b670ab414af1b8e6ac
1ddf4d8d51ba79b4efa6fe2575c6813fd619c04f 06-Jun-2016 David Sehr <sehr@google.com> Merge "Enable profman pretty printing" into nyc-dev
am: 572e23d761

* commit '572e23d7614485a06102b00667d003b21b874bf9':
Enable profman pretty printing

Change-Id: I9ab3bbb8b940b83b3d5911932776cbdcb47f7cff
40e566de4b17a0f5f200fbf5014d30367c1992fa 02-Jun-2016 David Sehr <sehr@google.com> Enable profman pretty printing

Bug: 28748264
Change-Id: Ia625a7976d9b95ec3b7e1d03af39af9f39015f3b
nstalld/commands.cpp
94e7fa984bd3f60b8b8a486e4f17521d0f9e1885 03-Jun-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Fix after shared-library work" into nyc-mr1-dev am: 3dfafe3891
am: d6b4cb2495

* commit 'd6b4cb2495066b6104e7617e76bdc18ab0ef5560':
Otapreopt: Fix after shared-library work

Change-Id: I996b105c9aa1689ae059c6883e0ab7a309d3c50b
d6b4cb2495066b6104e7617e76bdc18ab0ef5560 03-Jun-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Fix after shared-library work" into nyc-mr1-dev
am: 3dfafe3891

* commit '3dfafe38915b9251eb2cc597be3efe60807c0e43':
Otapreopt: Fix after shared-library work

Change-Id: Ie2e78d48f4766dd8b103c3d40b6b78a1ea42fbae
aef445d1c659698612c0e5a8f3d5f2b9f8a2b778 03-Jun-2016 Andreas Gampe <agampe@google.com> Otapreopt: Fix after shared-library work

Commit b63d91fd2737680351876406277b6c759f4db33c broke the installd
to otapreopt connection. Fix this. Also refactor a bit to make an
inadvertant break harder.

Bug: 25612095
Change-Id: I8e7b944ecbd5457e4ac4d6ffffdb0468618cf65f
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
nstalld/otapreopt_chroot.cpp
b977f6161b701d1f7c9753033495c8b17dcde5c0 02-Jun-2016 Calin Juravle <calin@google.com> Merge "Create primary profile file together with app data folders" into nyc-dev am: d25aab3ce8 am: 8b31d72e90
am: 360879e61d

* commit '360879e61d2c23c0ef55bf5321be9638a0a5c793':
Create primary profile file together with app data folders

Change-Id: If44755f2a060f0b36666bf5597a92b9baba8230a
360879e61d2c23c0ef55bf5321be9638a0a5c793 02-Jun-2016 Calin Juravle <calin@google.com> Merge "Create primary profile file together with app data folders" into nyc-dev am: d25aab3ce8
am: 8b31d72e90

* commit '8b31d72e90a63c9f3dcc8bb1da2507c2cd6b684e':
Create primary profile file together with app data folders

Change-Id: Ice0f13c56d98fab704516b8974521cfd4f7ff54f
8b31d72e90a63c9f3dcc8bb1da2507c2cd6b684e 02-Jun-2016 Calin Juravle <calin@google.com> Merge "Create primary profile file together with app data folders" into nyc-dev
am: d25aab3ce8

* commit 'd25aab3ce8aab1b95ac60922981c87c6963a0a6b':
Create primary profile file together with app data folders

Change-Id: I6f1febd72495ce95d657a79d0cf3454be50ccef5
11eff20096c116fad518027d484af1e55a8aa6a9 02-Jun-2016 Calin Juravle <calin@google.com> Merge "Create primary profile file together with app data folders" into nyc-dev
am: d25aab3ce8

* commit 'd25aab3ce8aab1b95ac60922981c87c6963a0a6b':
Create primary profile file together with app data folders

Change-Id: Id186b701d0cc755be0093c704ccd2aa8e0899611
d25aab3ce8aab1b95ac60922981c87c6963a0a6b 02-Jun-2016 Calin Juravle <calin@google.com> Merge "Create primary profile file together with app data folders" into nyc-dev
b115bc40671ead5ab73350613564d1b435c5613a 02-Jun-2016 David Sehr <sehr@google.com> installd support for profman --dump-info-for am: 6727c2d0bf am: eed4df8068
am: e78e1d7fda

* commit 'e78e1d7fdadb3e27ca1c05c35dbfc57465881edf':
installd support for profman --dump-info-for

Change-Id: Idff927f9f9d3273f56a6b03764fa4c293bbd075c
e78e1d7fdadb3e27ca1c05c35dbfc57465881edf 02-Jun-2016 David Sehr <sehr@google.com> installd support for profman --dump-info-for am: 6727c2d0bf
am: eed4df8068

* commit 'eed4df806856e77d9d55d8209d7178e4b5c945e8':
installd support for profman --dump-info-for

Change-Id: I5b4a465e394b40370731d8350196d8d66f8e649a
eed4df806856e77d9d55d8209d7178e4b5c945e8 02-Jun-2016 David Sehr <sehr@google.com> installd support for profman --dump-info-for
am: 6727c2d0bf

* commit '6727c2d0bfc876c62d6ee60d8a05d26bef1d56ef':
installd support for profman --dump-info-for

Change-Id: I2289ea8e788f65deb158f422b1c3b4feb93b9477
8e0965d0d465be5e711f92eab452cff75badfad6 02-Jun-2016 David Sehr <sehr@google.com> installd support for profman --dump-info-for
am: 6727c2d0bf

* commit '6727c2d0bfc876c62d6ee60d8a05d26bef1d56ef':
installd support for profman --dump-info-for

Change-Id: I3df4eee3cb34f6c163e73351180b227b8d6864e8
6727c2d0bfc876c62d6ee60d8a05d26bef1d56ef 18-May-2016 David Sehr <sehr@google.com> installd support for profman --dump-info-for

Bug: 28748264
Change-Id: Idcd3ed86294c1d0c75c26ca938b88744a25e387a
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
06032c1120464a195dbc208a4015acf2b95a6bec 01-Jun-2016 Dan Austin <danielaustin@google.com> Merge "Address const/non-const issues in preparation for libcxx rebase"
09a7987fb59ed6843d51acf0161d66ed3eb2252f 31-May-2016 Dan Austin <danielaustin@google.com> Address const/non-const issues in preparation for libcxx rebase

Change-Id: I7ab9f65b41cbd2a8272810427529f46c6fbf2a0d
trace/atrace.cpp
21d88b64cbb973e2bb0086eb60b90afb572aa45c 31-May-2016 Mark Salyzyn <salyzyn@google.com> Merge "svcmgr: don\'t send reply to one-way txn (part deux)" into nyc-dev am: e4ecdb66d5 am: 5e91795065
am: a801f4ef95

* commit 'a801f4ef9511359d75fc4865a269ffff8ba58c0e':
svcmgr: don't send reply to one-way txn (part deux)

Change-Id: I9b2609740d371d24ee2ba8a858181b3435996b5b
a801f4ef9511359d75fc4865a269ffff8ba58c0e 31-May-2016 Mark Salyzyn <salyzyn@google.com> Merge "svcmgr: don\'t send reply to one-way txn (part deux)" into nyc-dev am: e4ecdb66d5
am: 5e91795065

* commit '5e91795065d3c7e42de3f3853919cbc9c730c78c':
svcmgr: don't send reply to one-way txn (part deux)

Change-Id: I7ac169f6b366b482554bb053092863fdfc660e91
5e91795065d3c7e42de3f3853919cbc9c730c78c 31-May-2016 Mark Salyzyn <salyzyn@google.com> Merge "svcmgr: don\'t send reply to one-way txn (part deux)" into nyc-dev
am: e4ecdb66d5

* commit 'e4ecdb66d5c2eed64cbd5b267e0621cab7b8a63b':
svcmgr: don't send reply to one-way txn (part deux)

Change-Id: Id062b1b3998ab018654bc7830f275d1ac6d64f6d
134ef03161e51f7ba19c66f2dc823fb46189b4f3 31-May-2016 Mark Salyzyn <salyzyn@google.com> Merge "svcmgr: don\'t send reply to one-way txn (part deux)" into nyc-dev
am: e4ecdb66d5

* commit 'e4ecdb66d5c2eed64cbd5b267e0621cab7b8a63b':
svcmgr: don't send reply to one-way txn (part deux)

Change-Id: I79d2d5ed2e742cf2923534e4f50a637b8edb1fff
e4ecdb66d5c2eed64cbd5b267e0621cab7b8a63b 31-May-2016 Mark Salyzyn <salyzyn@google.com> Merge "svcmgr: don't send reply to one-way txn (part deux)" into nyc-dev
ca9c12e64d44f6c67cd46819583239f0ad051a51 20-May-2016 Felipe Leme <felipeal@google.com> Set version to 1.0

BUG: 27366368
Change-Id: Iac8ed413d41d0c26a39343025920f433d5d7ddba
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
44d884b428f3af89bdcac1950840fc94cd3b8af0 31-May-2016 Erik Kline <ek@google.com> Use explicit path for /vendor/xbin/wlutil
am: 0816520c5c

* commit '0816520c5cd60519d8e221ed92497aa5464e3039':
Use explicit path for /vendor/xbin/wlutil

Change-Id: I1122b59ba30a870b823c51796c758df6e8883b91
b0a2e2cbb03408ad35b3186153446fe1e3094ede 31-May-2016 Erik Kline <ek@google.com> Use explicit path for /vendor/xbin/wlutil am: 0816520c5c am: 61f0597f2b
am: 3deb385251

* commit '3deb385251058f7ec74280504c6b69b2f5a65ae3':
Use explicit path for /vendor/xbin/wlutil

Change-Id: I1e13fac94350bd7f4fd6f201dddb9acb5790f298
3deb385251058f7ec74280504c6b69b2f5a65ae3 31-May-2016 Erik Kline <ek@google.com> Use explicit path for /vendor/xbin/wlutil am: 0816520c5c
am: 61f0597f2b

* commit '61f0597f2b572c8b7faa6c2c0b6576d9be51b18b':
Use explicit path for /vendor/xbin/wlutil

Change-Id: If1608f8bd727cd5179968bc42dc08fef283922aa
61f0597f2b572c8b7faa6c2c0b6576d9be51b18b 31-May-2016 Erik Kline <ek@google.com> Use explicit path for /vendor/xbin/wlutil
am: 0816520c5c

* commit '0816520c5cd60519d8e221ed92497aa5464e3039':
Use explicit path for /vendor/xbin/wlutil

Change-Id: I1fd9593c8d9c0b0e3dd87c9a70b6b2e81c9b100a
0816520c5cd60519d8e221ed92497aa5464e3039 30-May-2016 Erik Kline <ek@google.com> Use explicit path for /vendor/xbin/wlutil

At this time /vendor/xbin is not in root's path.

Bug: 28850734
Change-Id: Ib6c2b6f8b0285854670c843dcc437cfcc84484a8
umpstate/dumpstate.cpp
66b9dd041877b45fe4c18ffb5cfe75763c2e1abd 27-May-2016 Erik Kline <ek@google.com> Add "ip maddr" to dumpstate output for debugging. am: f7f2b0fd05 am: 139854c0ae
am: a05e2d3ee0

* commit 'a05e2d3ee0aa9175daf56145b8e097b4ac8bcf67':
Add "ip maddr" to dumpstate output for debugging.

Change-Id: Iff0ef991d7c16492c484141d635bcedbc8ad12e6
a05e2d3ee0aa9175daf56145b8e097b4ac8bcf67 27-May-2016 Erik Kline <ek@google.com> Add "ip maddr" to dumpstate output for debugging. am: f7f2b0fd05
am: 139854c0ae

* commit '139854c0aef413b63b4bd919243a79a8f5a10c55':
Add "ip maddr" to dumpstate output for debugging.

Change-Id: Ib7d1f231a5baa944ff26516ff49385705ba1ab25
139854c0aef413b63b4bd919243a79a8f5a10c55 27-May-2016 Erik Kline <ek@google.com> Add "ip maddr" to dumpstate output for debugging.
am: f7f2b0fd05

* commit 'f7f2b0fd059bc26e27c022f3fb446fc74eab6c88':
Add "ip maddr" to dumpstate output for debugging.

Change-Id: Ic3898db87bc7b726079d922ff24eaa1f8201f288
e3b9187982f730ddc2f7555e855c53b7154800ef 27-May-2016 Erik Kline <ek@google.com> Add "ip maddr" to dumpstate output for debugging.
am: f7f2b0fd05

* commit 'f7f2b0fd059bc26e27c022f3fb446fc74eab6c88':
Add "ip maddr" to dumpstate output for debugging.

Change-Id: I0f0e12abaf640f2d8d8378b526568921e125b188
f7f2b0fd059bc26e27c022f3fb446fc74eab6c88 27-May-2016 Erik Kline <ek@google.com> Add "ip maddr" to dumpstate output for debugging.

Bug: 28966611
Change-Id: I8fdab94fbd41448e52f2fed406e8f43edf7f18ad
umpstate/dumpstate.cpp
b80d214927679ca5062b070e6c7cf73f528bf481 26-May-2016 Wei Liu <luciferleo@google.com> Merge "Check the existence of raft dir." into nyc-mr1-dev am: bcd82a3859
am: 5f88e4b387

* commit '5f88e4b387f2663a0e24044c20db9a8448bf3f13':
Check the existence of raft dir.

Change-Id: Ic888d34e1fa5ff6002fe2cd64160fea1f0a290d6
5f88e4b387f2663a0e24044c20db9a8448bf3f13 26-May-2016 Wei Liu <luciferleo@google.com> Merge "Check the existence of raft dir." into nyc-mr1-dev
am: bcd82a3859

* commit 'bcd82a38595ff8404f4cd509e2ccdb1aca391b43':
Check the existence of raft dir.

Change-Id: Ibe475170aea110e645588ca4a4eb262c3db86ed1
52aa4a7a5ad85dfc364ff1f9b61e94010ef61070 25-May-2016 Mark Salyzyn <salyzyn@google.com> svcmgr: don't send reply to one-way txn (part deux)

Do not split transaction into two when sending synchronous responses.

Partially revert changes associated with binder_send_reply from
previous incantations in commit 51f592c7bad13d3d8e8f7cfec25edfef42901802
that resulted in a performance regression.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 27111612
Bug: 28696050
Bug: 28946245
Change-Id: I12edc10a2d1408a71507a7983afa7f17b5a6a81b
ervicemanager/binder.c
bc56e7dcf07e633867e1525435373a1231216b22 24-May-2016 Calin Juravle <calin@google.com> Create primary profile file together with app data folders

Bug: 28785119
Bug: 28625993
Change-Id: I12c0de85bc3dc35199acf32c10fe69f93e76d7fc
nstalld/commands.cpp
f0e78d4391fd5cea487af116106a7887720b950e 25-May-2016 Wei Liu <luciferleo@google.com> Check the existence of raft dir.

b/28430346

Change-Id: I6ceb54f60c766d7b73ae93daa81f57b5a229e291
umpstate/dumpstate.cpp
1a12f3e4966127ab2d44981336e0d1d835d2a3b2 25-May-2016 Wei Liu <luciferleo@google.com> Merge "Write compressed and encoded raft logs to stdout if not zip_writer" into nyc-mr1-dev am: c1350c4832
am: 08ac6e418b

* commit '08ac6e418bdf96b297b5bcea760720caaa3e7512':
Write compressed and encoded raft logs to stdout if not zip_writer

Change-Id: I79a3fc1480ec9034ecf1393b8728f99035590895
08ac6e418bdf96b297b5bcea760720caaa3e7512 25-May-2016 Wei Liu <luciferleo@google.com> Merge "Write compressed and encoded raft logs to stdout if not zip_writer" into nyc-mr1-dev
am: c1350c4832

* commit 'c1350c48324dd7f51fbcc72f57ffc18efdcf3246':
Write compressed and encoded raft logs to stdout if not zip_writer

Change-Id: I0fc1359e10ac09aaa4e19a7a20834ef8fb9e81c8
c1350c48324dd7f51fbcc72f57ffc18efdcf3246 25-May-2016 Wei Liu <luciferleo@google.com> Merge "Write compressed and encoded raft logs to stdout if not zip_writer" into nyc-mr1-dev
310525a3a79cef73e3a5f6841fbd08fb9dbc71e8 25-May-2016 Wei Liu <luciferleo@google.com> Write compressed and encoded raft logs to stdout if not zip_writer

Change-Id: Ib9948bebf9d5e2ef823e08b48fb67c36e0079a45
umpstate/dumpstate.cpp
effb7e8c15fca33dccdc17d818dddc53800c3e65 24-May-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 1750081 to nyc-dev-plus-aosp am: 261a733906
am: 718e76198b

* commit '718e76198b4fd94a94d5620d1a8785d0c319e612':
dumpstate: sscanf requires an asciiz string

Change-Id: I298d26bf09933048ffbb3f48dc905498de46adc2
718e76198b4fd94a94d5620d1a8785d0c319e612 24-May-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 1750081 to nyc-dev-plus-aosp
am: 261a733906

* commit '261a733906981fc2390f0803effdc55c51842a5c':
dumpstate: sscanf requires an asciiz string

Change-Id: I1e4dbbfe6056023dedf954059422c321b3b80680
261a733906981fc2390f0803effdc55c51842a5c 24-May-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 1750081 to nyc-dev-plus-aosp

Change-Id: If25f336cfc2fa02cba863987da6f55647636417e
6de1c53cc04f48eb6aface408897791889fa88eb 24-May-2016 Adam Buchbinder <abuchbinder@google.com> Merge "Add missing va_end() calls in some variadic functions."
ed4dc944aa30df03a749b76d304da67fdbb537c8 24-May-2016 Felipe Leme <felipeal@google.com> Resolve merge conflicts of 2387813 to nyc-mr1-dev-plus-aosp
am: a7f6a4534c

* commit 'a7f6a4534c076ef4f84b7f08cbd507e50d71c04b':
Expose functions used to add entries to the zip file.

Change-Id: I9680c1b12afa378941d776e434789d536e04e4b0
a7f6a4534c076ef4f84b7f08cbd507e50d71c04b 23-May-2016 Felipe Leme <felipeal@google.com> Resolve merge conflicts of 2387813 to nyc-mr1-dev-plus-aosp

BUG: 28867848

Change-Id: I6893cab64078617c34a4256b394a3686287f6278
3518381415d1c1fc580adbe1b398850dcd07ba2b 23-May-2016 Felipe Leme <felipeal@google.com> Resolve merge conflicts of 6108f5d to nyc-mr1-dev

BUG: 28867848
Change-Id: I99392f1706af5fb9268ad1b32aa7f4b10e397d84
8ede547cb09832890488b288b34053fa7f5ee4d2 23-May-2016 Adam Buchbinder <abuchbinder@google.com> Add missing va_end() calls in some variadic functions.

This addresses the following cppcheck reports:
[dumpstate/utils.cpp:666]: (error)
va_list 'ap' was opened but not closed by va_end().
[dumpstate/utils.cpp:703]: (error)
va_list 'ap' was opened but not closed by va_end().

Change-Id: I2405f063a6da1a109192484577bc18f5f40f2b99
umpstate/utils.cpp
238781333c69fdf6b06a202877fdd9ef4902e0a7 23-May-2016 Felipe Leme <felipeal@google.com> Merge "Expose functions used to add entries to the zip file." into nyc-dev
am: 6108f5d400

* commit '6108f5d4004d2a3397c22d22025b8e0eb79b8467':
Expose functions used to add entries to the zip file.

Change-Id: I6c1ce87ce8eb9edf32df7c3f0e1926acd1bc0e00
6108f5d4004d2a3397c22d22025b8e0eb79b8467 23-May-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expose functions used to add entries to the zip file." into nyc-dev
71ca15eadd3da0c102a8539f7a88294a94456623 20-May-2016 Felipe Leme <felipeal@google.com> Expose functions used to add entries to the zip file.

Currently only dumpstate.cpp is using the new functions and variables
used to add an entry to the zip file so they're defined locally, but
they should be exposed through the .h so they can be used by the
device-specific dumpstate_board() implementations.

This CL moves the following definitions to the .h:

- bugreport_dir
- ZIP_ROOT_DIR
- add_zip_entry()
- add_zip_entry_from_fd()

It also refactored functions that were taking a specific file location
to use bugreport_dir instead, to avoid pollution on main().

BUG: 28867848
Change-Id: Ic5faa203b0863bc950d640f22fb91977e52b6bfc
umpstate/dumpstate.cpp
umpstate/dumpstate.h
3d305a18f771f293b6196f95eeb41c098e7e051f 20-May-2016 Felipe Leme <felipeal@google.com> Discard empty tombstones on zipped bugreport.

Change-Id: I0717e21c4a0ad66c78690e3620cfdcf2b1bbcd59
Fixes: 27146385
umpstate/dumpstate.cpp
0a54494815166b3db195c70d25ac13cc59c7083f 20-May-2016 Wei Liu <luciferleo@google.com> Fix the DUMPSYS skip. am: 34222565fc am: 361329f32c
am: 139ba8961a

* commit '139ba8961a0e99060a4c8e26c258819235d94610':
Fix the DUMPSYS skip.

Change-Id: I360824c1fecf412c5733b862bf078902853b4649
139ba8961a0e99060a4c8e26c258819235d94610 20-May-2016 Wei Liu <luciferleo@google.com> Fix the DUMPSYS skip. am: 34222565fc
am: 361329f32c

* commit '361329f32ce8b3d202116ff7b8da42b1738d6aa7':
Fix the DUMPSYS skip.

Change-Id: I3f2d3d4b820a8c668420dee1accfa30429ffaa21
04bb08da3c14bc24ccda7cb76ab146a1a7f80a43 20-May-2016 Wei Liu <luciferleo@google.com> Fix the DUMPSYS skip.
am: 34222565fc

* commit '34222565fc9cf167d8ebe6068a9695f4b0b0f1b0':
Fix the DUMPSYS skip.

Change-Id: Iaf70874e0a63a40b68b121ef75698e5225fd8b3c
361329f32ce8b3d202116ff7b8da42b1738d6aa7 20-May-2016 Wei Liu <luciferleo@google.com> Fix the DUMPSYS skip.
am: 34222565fc

* commit '34222565fc9cf167d8ebe6068a9695f4b0b0f1b0':
Fix the DUMPSYS skip.

Change-Id: I0ea7926024cec428785687582a81326a750ca669
34222565fc9cf167d8ebe6068a9695f4b0b0f1b0 19-May-2016 Wei Liu <luciferleo@google.com> Fix the DUMPSYS skip.

b/28869921

Change-Id: Idc108b2d3cfd237f459467a3c399a0ba5e248d24
umpstate/dumpstate.cpp
290f4b97bb736b0652eac9667965444393e683ec 16-May-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: sscanf requires an asciiz string

Bug: 28770668
Change-Id: Ice56b129a243296b2691d55e8f8c35b478b1f481
umpstate/Android.mk
umpstate/utils.cpp
e4b2c911387c94403c061bd37e5f71b9d5356c94 18-May-2016 Felipe Leme <felipeal@google.com> Merge "Make bugreport_dir a common variable." into nyc-mr1-dev am: c096c45af5
am: 95fa1fe171

* commit '95fa1fe17157bbf5559fc19a67e759c66578eebe':
Make bugreport_dir a common variable.

Change-Id: Ia64bd464260753eeaa987855cc5f1714fc043d12
95fa1fe17157bbf5559fc19a67e759c66578eebe 18-May-2016 Felipe Leme <felipeal@google.com> Merge "Make bugreport_dir a common variable." into nyc-mr1-dev
am: c096c45af5

* commit 'c096c45af5623b44f98ca0c490b5ab2722ec9d7a':
Make bugreport_dir a common variable.

Change-Id: I61e7fb16df390935ab41b2caceacc3ac4d56c83d
efd7e27569b69ed854ed75fca40fc638e3c0268b 18-May-2016 Felipe Leme <felipeal@google.com> Make bugreport_dir a common variable.

Recently, new functions were added to dump specific files, and each of
them was requiring a file location, which was polluting main() with
variables specific to each function.

BUG: 28430346
BUG: 28640932
Change-Id: I90f044a2adb961e3038145dfd635cd3ed0042e34
umpstate/dumpstate.cpp
399df267c04c36791e126613e34b25f826c96831 16-May-2016 Nick Kralevich <nnk@google.com> Merge "dumpstate: convert sprintfs to snprintfs" into nyc-dev am: 853f8f9c0b am: bcfac7ea88
am: cc3ec57be9

* commit 'cc3ec57be9db06c86cce804306dff89b791d0d08':
dumpstate: convert sprintfs to snprintfs

Change-Id: I5bda9128441fd521f6c5eb6f38762899b0257c46
cc3ec57be9db06c86cce804306dff89b791d0d08 16-May-2016 Nick Kralevich <nnk@google.com> Merge "dumpstate: convert sprintfs to snprintfs" into nyc-dev am: 853f8f9c0b
am: bcfac7ea88

* commit 'bcfac7ea88a976f2449b5583352d703cb4937652':
dumpstate: convert sprintfs to snprintfs

Change-Id: Ia72e8e3a312d04429d791ec6188bc773c0647802
6f0eb8f06d118ea1b605ed0923b793b09263f6da 16-May-2016 Nick Kralevich <nnk@google.com> Merge "dumpstate: convert sprintfs to snprintfs" into nyc-dev
am: 853f8f9c0b

* commit '853f8f9c0b95120731459c1f7567af69ce457fe0':
dumpstate: convert sprintfs to snprintfs

Change-Id: Ie88fe46faad244e6d080e063a2d7d9a94a71cd45
bcfac7ea88a976f2449b5583352d703cb4937652 16-May-2016 Nick Kralevich <nnk@google.com> Merge "dumpstate: convert sprintfs to snprintfs" into nyc-dev
am: 853f8f9c0b

* commit '853f8f9c0b95120731459c1f7567af69ce457fe0':
dumpstate: convert sprintfs to snprintfs

Change-Id: I62360c6f0daec9fa1149e91141e0bb5f5a09c2d2
f0922cc1786c0c2fbf44c10b0005243ecbb4227d 15-May-2016 Nick Kralevich <nnk@google.com> dumpstate: convert sprintfs to snprintfs

Bug: 28731007
Change-Id: Icfa4d6dfaf69e989ec785146a6bde1afb6a6f345
umpstate/dumpstate.cpp
umpstate/utils.cpp
260f57bfd81bc8fe57249289ffe8d514a00fef40 12-May-2016 Wei Liu <luciferleo@google.com> Merge "Dump the raft logs into the bugreport zip file." into nyc-mr1-dev am: eda79c19a3
am: e8a2c88d24

* commit 'e8a2c88d2441d300c384c4f7deb4390956898de6':
Dump the raft logs into the bugreport zip file.

Change-Id: Iec005d2ed5f26f780e453b762b482c49abb0c7e4
e8a2c88d2441d300c384c4f7deb4390956898de6 12-May-2016 Wei Liu <luciferleo@google.com> Merge "Dump the raft logs into the bugreport zip file." into nyc-mr1-dev
am: eda79c19a3

* commit 'eda79c19a3e72260d7dea1e18de79af562a80acc':
Dump the raft logs into the bugreport zip file.

Change-Id: I2fdbc2b8a358479571ea17877406f6f3342f946e
eda79c19a3e72260d7dea1e18de79af562a80acc 12-May-2016 Wei Liu <luciferleo@google.com> Merge "Dump the raft logs into the bugreport zip file." into nyc-mr1-dev
7161c0edcd2d9283ac620c68c934ec7da005fd00 11-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Merge "Move both CE/DE storage areas to adopted storage." into nyc-dev am: cdea85e9a3 am: c7f903c78c" into nyc-mr1-dev-plus-aosp
am: 8eb9709ef4

* commit '8eb9709ef43901947e57fa48f9dd7937cfee481e':
Move both CE/DE storage areas to adopted storage.

Change-Id: I480b3b9c8f82f5721f868eaa81699a7e20ab9f38
248c1e7ea05eb8bbe86c11a7c17d8e934ea36eae 11-May-2016 Jeff Sharkey <jsharkey@android.com> Merge "Search both CE/DE storage when clearing caches." into nyc-dev am: 128074fcb9 am: e06766c783
am: 46deaab435

* commit '46deaab43549971215d8c0200a1d4760f51b7fa5':
Search both CE/DE storage when clearing caches.

Change-Id: I259e45be3069e8830f574faaa98f6aa8d0924e89
46deaab43549971215d8c0200a1d4760f51b7fa5 11-May-2016 Jeff Sharkey <jsharkey@google.com> Merge "Search both CE/DE storage when clearing caches." into nyc-dev am: 128074fcb9
am: e06766c783

* commit 'e06766c783aed6b232263fd042110035e0b819f7':
Search both CE/DE storage when clearing caches.

Change-Id: Ib488ef9ef352478e8352c9f7e88c832eda484ad3
c7f903c78c8606db728da8e44724d7a193f8c1f7 11-May-2016 Jeff Sharkey <jsharkey@android.com> Merge "Move both CE/DE storage areas to adopted storage." into nyc-dev
am: cdea85e9a3

* commit 'cdea85e9a347e9c6d159b191cf1d121ae107f956':
Move both CE/DE storage areas to adopted storage.

Change-Id: Ifcf99c3c60b0ef68e1262afb0a5d0943d039ac67
b72f355dcae8cfaae6e8de6f65aa52c2199d666c 11-May-2016 Jeff Sharkey <jsharkey@android.com> Merge "Search both CE/DE storage when clearing caches." into nyc-dev
am: 128074fcb9

* commit '128074fcb90148b40ed45bba6e650cfc2eb1f1ad':
Search both CE/DE storage when clearing caches.

Change-Id: I3307902105a26d0a3f1b0c4a59a499d0dcac88e3
51c94495be151c1da03c8266592ed33f253d4b48 11-May-2016 Jeff Sharkey <jsharkey@android.com> Move both CE/DE storage areas to adopted storage.

Public APIs now support separate CE/DE storage areas on all devices,
so they both need to be moved together.

Bug: 25861755
Change-Id: Ibe64a0c9ce0ef286adff2b66bfd432d14f1041d0
nstalld/commands.cpp
54e292e1ea87b504b552393d2e9bc800458bd0c1 11-May-2016 Jeff Sharkey <jsharkey@android.com> Search both CE/DE storage when clearing caches.

Now that we have two data storage locations, we need to scan them
both when freeing up disk space. Clean up logic to use new
get_known_users() API.

Bug: 26056125
Change-Id: Ic05c0022d6f5eb438967b69402b1900678f3858b
nstalld/commands.cpp
nstalld/utils.cpp
nstalld/utils.h
341938b446576ebf60865d8b6e5e6175f47766d0 28-Apr-2016 Wei Liu <luciferleo@google.com> Dump the raft logs into the bugreport zip file.

b/28430346

Change-Id: I3821dad5d33cdb38234f0ee6768f7d24159a4283
umpstate/dumpstate.cpp
cb82e72b71227177b724846e4c03ef61a3933ee1 06-May-2016 sergeyv <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev am: 4f1563fa12 am: a6d385eb75
am: 1a101bd298

* commit '1a101bd298429d10c48c5edb7b0e4745efeed095':
atrace: introduce category for core services

Change-Id: I0c0fdff367ab567e98b2a28c6d03eb07476f1fdb
1a101bd298429d10c48c5edb7b0e4745efeed095 06-May-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev am: 4f1563fa12
am: a6d385eb75

* commit 'a6d385eb75c459ceb291c089e38d8cf684c02965':
atrace: introduce category for core services

Change-Id: I17b8a748b14a2dfea4a5b4133bafe87261a2890e
ea685404b9ab07f5b702d1c0c9e3737108b576fa 06-May-2016 sergeyv <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev
am: 4f1563fa12

* commit '4f1563fa129157e407a223eb13ab382d1d45483b':
atrace: introduce category for core services

Change-Id: I19a16cd1219ed757d8a394d7385d4254a9b25673
4f1563fa129157e407a223eb13ab382d1d45483b 06-May-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "atrace: introduce category for core services" into nyc-dev
3e673c2afcdc9e343521976a4b08f9d5c4cc9d36 05-May-2016 George Burgess <gbiv@google.com> Merge "Add mode to open call with O_CREAT"
48443349d0cee76b1196e3eb5ba3e8a12709e3e3 05-May-2016 George Burgess IV <gbiv@google.com> Add mode to open call with O_CREAT

Change-Id: I63eb3d5499ae7e9ff9a77393763e39b747fd4611
trace/atrace.cpp
8be87cd8869f68c7567a6c4b4022f5b2507813ba 05-May-2016 Elliott Hughes <enh@google.com> resolve merge conflicts of 7a52b75 to nyc-dev-plus-aosp

Change-Id: Ic895408a1ecd4ec0d15ae06ec81029e79b67bbd7
32caf1d80b689d7763a7cf853880987ccc24a479 04-May-2016 Elliott Hughes <enh@google.com> Switch to more conventional ps arguments in dumpstate.

I'll come back and remove the "toybox" once I've switched the symlink
from toolbox to toybox...

Change-Id: I00f848ab4dade8650726b054429a2926d3d72018
umpstate/dumpstate.cpp
db40415e05e39c1f4faa62735f435b031e53af7c 03-May-2016 sergeyv <sergeyv@google.com> atrace: introduce category for core services

bug: 28200530
Change-Id: Ifc785ba2ed25d6968f4558c2958a705603c39ba5
trace/atrace.cpp
f952806e2dfebd256cfc266fd4105528a729dcfe 03-May-2016 Narayan Kamath <narayan@google.com> Merge "installd: remove spammy warning for non-existent profile dirs." into nyc-dev am: 5dda72b2a1
am: 47cad327b3

* commit '47cad327b3334ae54a9a2a7b7dec70c3596e4ae7':
installd: remove spammy warning for non-existent profile dirs.

Change-Id: I0680cd6ab5600632623064e369e98e6fdf8dc849
5d411b5ab01c7c41bd411c9fadba0ed8354d41d5 03-May-2016 Narayan Kamath <narayan@google.com> Merge "installd: remove spammy warning for non-existent profile dirs." into nyc-dev
am: 5dda72b2a1

* commit '5dda72b2a14c7d81756ec019d0f8daac228dca45':
installd: remove spammy warning for non-existent profile dirs.

Change-Id: I5cbddc96c9140197dce48361a9a9a855f704c8a9
2e063af1651976b50e2da58c4d57564d878ab9c2 02-May-2016 Narayan Kamath <narayan@google.com> installd: remove spammy warning for non-existent profile dirs.

Also gets rid of a lstat call which seems unnecessary. We can
directly open the directory and fail if the open fails.

bug: 28510519
Change-Id: Iaf2b7e69d51e2670e62cbe2807874c9b0dd471e5
nstalld/commands.cpp
b195b6ef834e5319e96ee9e21f13d32bb175562a 30-Apr-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "Atrace: store app list in multiple sysprops" into nyc-dev am: 9a8ddb6e71
am: c9d71325b7

* commit 'c9d71325b778975b5f31229c138583505097326c':
Atrace: store app list in multiple sysprops

Change-Id: I890b1a5ca08e3b867e9aa0dedfaae4c35f56f711
afd2089ad429d61ccff972e655c31e00335a03a6 30-Apr-2016 sergeyv <sergeyv@google.com> Merge "Atrace: store app list in multiple sysprops" into nyc-dev
am: 9a8ddb6e71

* commit '9a8ddb6e71605d5304226234ed01cedccf54e849':
Atrace: store app list in multiple sysprops

Change-Id: I62335b70ef0dfd27bdcb6aa9eeaba00f0208fdfb
9a8ddb6e71605d5304226234ed01cedccf54e849 30-Apr-2016 Sergei Vasilinetc <sergeyv@google.com> Merge "Atrace: store app list in multiple sysprops" into nyc-dev
4144eff1e261f6462be3753fc9543d82f9a4fd96 28-Apr-2016 sergeyv <sergeyv@google.com> Atrace: store app list in multiple sysprops

bug: 28200530
Change-Id: Ifee0f3a63cf1caf4dbd867155614f94614417af5
trace/atrace.cpp
a91c50074ee717144b9910a57ca4e5f67c273f07 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove temporary file on user builds." into nyc-dev am: d97e99f
am: 96b8077

* commit '96b80774b7d93d9f1339a7e3da4052e044fb286f':
Remove temporary file on user builds.

Change-Id: I34148e26006869866379ea5dabb2a37cab4b3a18
53925d208ade2f844f018ed2ca0fb042ce7db85d 28-Apr-2016 Felipe Leme <felipeal@google.com> Merge "Remove temporary file on user builds." into nyc-dev
am: d97e99f

* commit 'd97e99f7d4665530a699bb72ee694174cb938536':
Remove temporary file on user builds.

Change-Id: Ie53c87ba8508d024ac0bf55a62c8934fb323ccc1
d97e99f7d4665530a699bb72ee694174cb938536 28-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove temporary file on user builds." into nyc-dev
c4eee56dab06a7de1db18327f8d4831f89d1d640 22-Apr-2016 Felipe Leme <felipeal@google.com> Remove temporary file on user builds.

BUG: 27366368
Change-Id: Id85566f6ba02fcb6afc122ffe6990d0a14086375
umpstate/dumpstate.cpp
b2287e16bbc7d8389fe040ddcaf1b297d131319a 27-Apr-2016 Jeff Hao <jeffhao@google.com> Merge "Support to pass <uses-library> option through to dex2oat." into nyc-dev
am: 8335fa3

* commit '8335fa3f500addd8804869388fd91d776aa56188':
Support to pass <uses-library> option through to dex2oat.

Change-Id: I8872e82441b39c1363a8e9852b63dd68e1d71d0f
b63d91fd2737680351876406277b6c759f4db33c 16-Mar-2016 Jeff Hao <jeffhao@google.com> Support to pass <uses-library> option through to dex2oat.

This change takes an app's shared libraries specified by <uses-library>
and passes it through to dex2oat to be used during compilation.

Part of a multi-project change.

Includes fix from c09662d9bbd35840b24cae8d336a0d11c0cbdb7b

Bug: 26880306

(cherry-picked from commmit de7f0cf8a699f6f7a7d29b4a14d800bea9abbef4)

Change-Id: Ideb2aba46f4cf52acb9dd480993513a60dbfd6ce
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/otapreopt.cpp
2ea63d8c861abf88d886358ced72a32ca782f62f 27-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Atrace:use ReadFileToString to read file" am: 3cebac7
am: ab682e4

* commit 'ab682e471572d11c5aa217c9cdd5e2c5f3716598':
Atrace:use ReadFileToString to read file

Change-Id: If2ee9e48032ac71f843a4a24d9cc012587bace79
2c3e52b9b9abf83284fe372bbd68f1ae0e4d8fc1 25-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move servicemanager into system-background cpuset." into nyc-dev am: 62b6bc7 am: b1045d2
am: 8a06c8a

* commit '8a06c8a9bccdd5b820047b46643c23a3b44e3d99':
Move servicemanager into system-background cpuset.

Change-Id: I36cd1161ff88b9afe4a76b3550671894f2bd1aab
8a06c8a9bccdd5b820047b46643c23a3b44e3d99 25-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move servicemanager into system-background cpuset." into nyc-dev am: 62b6bc7
am: b1045d2

* commit 'b1045d2d75290383d1cc5517614ec5f4da939e44':
Move servicemanager into system-background cpuset.

Change-Id: Ibaa53c84ceaf7c608cb39857033bb609d2ee96cf
cb1504ae086dd1394e06d4b161b2b327d807eaff 25-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move servicemanager into system-background cpuset." into nyc-dev
am: 62b6bc7

* commit '62b6bc7c8c5e5016f575955dab147f70f8b8cc0a':
Move servicemanager into system-background cpuset.

Change-Id: If74176c4e20082988f0df33869d881fc051e1129
62b6bc7c8c5e5016f575955dab147f70f8b8cc0a 25-Apr-2016 Martijn Coenen <maco@google.com> Merge "Move servicemanager into system-background cpuset." into nyc-dev
c09662d9bbd35840b24cae8d336a0d11c0cbdb7b 22-Apr-2016 Dan Albert <danalbert@google.com> Fix a typo build break that TreeHugger caught.

Change-Id: Ib280a57db8a4958972e8e9bbbec649b01b8115cd
nstalld/otapreopt.cpp
d8419c29e3a32cf9eebed8ef7f34e27fa756b17e 02-Mar-2016 Stephane Gasparini <stephane.gasparini@intel.com> Atrace:use ReadFileToString to read file

Since wildcard support was added to atrace, it can happen
very easily that file size is large than 4096
resulting in bad status that atrace cannot find kernel function
This patch use android::base::ReadFileToString to read file
which doesn't have size limitation.

Signed-off-by: Stephane Gasparini <stephane.gasparini@intel.com>
Change-Id: Ic24a9267053302a03ff04c8b2afeb143e5b94c84
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
trace/Android.mk
trace/atrace.cpp
de7f0cf8a699f6f7a7d29b4a14d800bea9abbef4 16-Mar-2016 Jeff Hao <jeffhao@google.com> Support to pass <uses-library> option through to dex2oat.

This change takes an app's shared libraries specified by <uses-library>
and passes it through to dex2oat to be used during compilation.

Part of a multi-project change.

Bug: 26880306
Change-Id: Idce1b28b05ed5419efc7276288afe7cb109d2d4b
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/otapreopt.cpp
155cdf1126ca22600ac48852d5d55e6f946d0c57 18-Apr-2016 Jeff Sharkey <jsharkey@android.com> Merge "Consistent creation/destruction of user data." into nyc-dev
am: 82784bb

* commit '82784bbeb8668c18f8cdbafaac3faab5d296e9ac':
Consistent creation/destruction of user data.

Change-Id: I8f79173800fa8cc7d89ae0017fce0264e59d75c3
82784bbeb8668c18f8cdbafaac3faab5d296e9ac 18-Apr-2016 Jeff Sharkey <jsharkey@google.com> Merge "Consistent creation/destruction of user data." into nyc-dev
5b37399a1c180062950b7a2345343a3f2562482e 18-Apr-2016 Felipe Leme <felipeal@google.com> Merge "Added -v option to bugreportz." into nyc-dev
am: b2ec4ab

* commit 'b2ec4ab3ab3fdcfa0c0725599287b714ced54bd2':
Added -v option to bugreportz.

Change-Id: I4db1a4ac7604cdcc42735803268978df821ab02b
ceeb64281d012cfac99827adbcdb5800b2ce0542 15-Apr-2016 Felipe Leme <felipeal@google.com> Added -v option to bugreportz.

Calling 'bugreportz -v' will print its version, which will make it
easier for 'adb' to support multiple versions in the future (for
example, next version could display the bugreport progress rather than
wait until it is finished).

BUG: 27653204
Change-Id: I1bbb35a66cfc79ca534ae9eb7c2a53540755d653
ugreportz/bugreportz.cpp
ugreportz/readme.md
379a12b0072b322c7f86e690a8e8a220e500861c 15-Apr-2016 Jeff Sharkey <jsharkey@android.com> Consistent creation/destruction of user data.

Preparing and destroying users currently needs to be split across
installd, system_server, and vold, since no single party has all the
required SELinux permissions.

Start passing down flags so we only prepare/destroy storage areas
that have keys currently installed.

Add delete_dir_contents_and_dir() argument to ignore ENOENT, since
all we care about is the directory being gone.

Bug: 27896918
Change-Id: Ia1cccc9b35e6ff09e3ca50effeab676157b856e8
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/utils.cpp
nstalld/utils.h
14a1be2fc08ce757aa0340eac6e7f1a4ceb14d00 15-Apr-2016 Martijn Coenen <maco@google.com> Move servicemanager into system-background cpuset.

Bug: 24949295
Change-Id: I9149c43edf79d9acbc5af4b3dc1eae59c695a86a
ervicemanager/servicemanager.rc
e45be9d7578ebff6bee57ce1c87772807d5d0cc7 14-Apr-2016 Andy Hung <hunga@google.com> Merge "Unify dumped native stack traces" into nyc-dev
am: d74bcda

* commit 'd74bcdae53a9547fc6dea81055e8c3cf166d2909':
Unify dumped native stack traces

Change-Id: Ida78895baf045a86fcc9952074f5caa2519a3bc7
5c04e7465eda8a558244e772da1e7d2a0d5f94e2 14-Apr-2016 Andy Hung <hunga@google.com> Unify dumped native stack traces

Bug: 28179196

Change-Id: Ie728ceace7aaf38389dd9684342e351feed6e5a7
umpstate/utils.cpp
0ed202e375ae98bc9bbf847872411d0214dc4248 13-Apr-2016 Jeff Sharkey <jsharkey@android.com> Merge "Build target path before closedir()." into nyc-dev
am: da2a8ca

* commit 'da2a8ca00636f63c8cec6135a5d5675a71c505f1':
Build target path before closedir().

Change-Id: I1a66d782f3d6831c720efdd7ce9df0772513c1f0
1d992f9f7886f98e46f98430d6c1d061cc31fdb3 13-Apr-2016 Jeff Sharkey <jsharkey@android.com> Build target path before closedir().

Otherwise ent->d_name could be cleared out, and we'd aim at the
top-level data directory, which has disastrous results when clearing
app data.

Bug: 28155330
Change-Id: Icf7df835d76816dfbe2894fdae708033df983825
nstalld/utils.cpp
994d264705b3de117608b636ad3a22ae69ef108b 13-Apr-2016 Felipe Leme <felipeal@google.com> Merge "Added support for \'bugreport -z\'." into nyc-dev
am: ef1081f

* commit 'ef1081f96d3c3915fe84c505674fbd70170ed284':
Added support for 'bugreport -z'.

Change-Id: I437206ba9cd03e7b9cea4a74f2c25f83774b180a
ef1081f96d3c3915fe84c505674fbd70170ed284 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added support for 'bugreport -z'." into nyc-dev
2628e9e939fda323fa44c5cb743f4a77b12a312a 13-Apr-2016 Felipe Leme <felipeal@google.com> Added support for 'bugreport -z'.

Dumpstate now supports zipped bugreport, whose output is more complete
than the flat-file bugreports provided prior to N.

The whole workflow is split in different components:

- adb supports a 'bugreport -z <ZIP_FILE>' option, which calls a
bugreportz binary.
- bugreportz starts the dumpstatez service.
- dumpstatez starts dumpstate with some flags that opens a socket for
control (not output).
- Once dumpstate is finished, it prints the bugreport location to
stdout.
- adb pulls the zip file and renames according to the command-line
argument.
- bugreport prints a deprecation message.

The reason for a new binary (bugreportz) instead of passing arguments to
bugreport (like -z) is backward compatibility: pre-N versions of
bugreport would ignore such argument and generate a text bugreport,
which is not what adb would be expecting.

BUG: 27653204

Change-Id: I47f6f677eba11d5fb54818ae5a0b3cab069776ee
ugreport/bugreport.cpp
ugreportz/Android.mk
ugreportz/bugreportz.cpp
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/dumpstate.rc
umpstate/utils.cpp
042ad795bf197ff85106d6dfec90e5292f3ee623 13-Apr-2016 Elliott Hughes <enh@google.com> Merge "Move dumpstate off mincrypt and over to BoringSSL." into nyc-dev-plus-aosp
61a66fcfb010cb13ca5deaf0ef8d5d258629a53f 13-Apr-2016 Nick Kralevich <nnk@google.com> Drop compatibility with pre 2012 adb clients
am: a50117e

* commit 'a50117e54a97aea5b3b2c279fb5643704c460b05':
Drop compatibility with pre 2012 adb clients

Change-Id: Ifdb0e9f2d869284a20fa5f064260f5a17c2391c2
a50117e54a97aea5b3b2c279fb5643704c460b05 13-Apr-2016 Nick Kralevich <nnk@google.com> Drop compatibility with pre 2012 adb clients

On very old versions of adb, when "adb bugreport" was executed,
the command "adb shell dumpstate" was run. This was later changed
to "adb shell bugreport". Change
1e339878c128ef47271278779c2685a8dfa49cd1 added a backwards
compatibility hack (see bug 6391938).

It turns out that nobody has been able to execute
/system/bin/dumpstate as a non-root user for 2 releases now due
to SELinux restrictions, so maintaining the code bloat to support
this workaround is pointless.

Delete the code.

Bug: 6391938
Change-Id: I49eebcca1fcec5a39593c53e2e6d23ec87f65a35
umpstate/dumpstate.cpp
c4dc141d1442794170421b9ee78ae00ce6b28307 13-Apr-2016 Elliott Hughes <enh@google.com> Move dumpstate off mincrypt and over to BoringSSL.

Bug: http://b/27287913
Change-Id: I2104e3f963c62e2f9dd0b216010dbc457c6e5857
umpstate/Android.mk
umpstate/dumpstate.cpp
4a52477f0bba4f0b744bc41b9c266cef78d97ede 12-Apr-2016 Felipe Leme <felipeal@google.com> Merge "Setting v1-dev4 as default." into nyc-dev
am: 1e451b2

* commit '1e451b2d63e318d4c6724876bfff165776d6757d':
Setting v1-dev4 as default.

Change-Id: I74a5edfad36f984f85c220e768991c6a854f3619
cc37b8ecc463a3e030d673ebdd0b1cb9c5eddab8 11-Apr-2016 Felipe Leme <felipeal@google.com> Setting v1-dev4 as default.

BUG: 27618668
Change-Id: I59c3a7c256c4d059ae3c29411120d3e9c9a5d995
umpstate/dumpstate.cpp
dba2879ffc47127265a3f5c0b7a4489cb2d9c1ba 11-Apr-2016 Jeff Sharkey <jsharkey@android.com> Merge "Let\'s try casting to fix the build." into nyc-dev
am: 6c444a4

* commit '6c444a40ec9725880580c789500cc069e3121d89':
Let's try casting to fix the build.

Change-Id: Iee3fbfa51645706fabecff7a8c2fcd6fb787eb08
7240a15f8a7eead09a3206baeb3d5eca5346c32f 11-Apr-2016 Jeff Sharkey <jsharkey@android.com> Let's try casting to fix the build.

Change-Id: Icd55458caefa27823b770f499a172ca96d1f7a0b
nstalld/installd.cpp
8b53c14bc1852fe1dbddd52881e49b1be894f190 11-Apr-2016 Jeff Sharkey <jsharkey@android.com> Merge "Use inode numbers for CE storage, fix sizes." into nyc-dev
am: 82b4c7a

* commit '82b4c7a92cfb2482deb57a328f5eb9c95d5fdc5e':
Use inode numbers for CE storage, fix sizes.

Change-Id: I1c1afd079765088a03db70d6d558b9f3bdb16e6e
2f720f7ec5c9d0b91defc85878e7330b10f8e89a 11-Apr-2016 Jeff Sharkey <jsharkey@android.com> Use inode numbers for CE storage, fix sizes.

Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app. To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together. So now we only have a single
path to measure for code size.

Start measuring both CE and DE storage data usage for apps, and tweak
the reporting so that empty cache/data directories actually show up
as "0 bytes".

Fix bugs in disk usage counting, since st_blksize has no bearing on
the allocated disk space. Also don't double-count "." and ".."
directories when measuring storage.

Bug: 27828915, 27197819
Change-Id: I350b951f5c24165edb253ac663c9aae020c24dc9
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
7be8d55f5b2d687d5879a465b84304a5a23a3ede 08-Apr-2016 Josh Gao <jmgao@google.com> Merge "Don\'t include <sys/sysconf.h>." am: ac6335c
am: 2ccbf98

* commit '2ccbf98d36f7c3024777b31f5160cb00f42c8672':
Don't include <sys/sysconf.h>.

Change-Id: I62cb235634a9682331800a006ae1033f9f14281d
b18b245580e5c8230f89e3cbc2d8acdbbac87e08 08-Apr-2016 Narayan Kamath <narayan@google.com> Merge "installd: log failed unlinks." into nyc-dev
am: 45d15b8

* commit '45d15b835738497f812bec55affc9a1cba4ec343':
installd: log failed unlinks.

Change-Id: Ic03a04b4451be24086614e08877853c9157b6d0a
9d6d7b3a82eb58c4c8b6902a4adc015775852973 08-Apr-2016 Josh Gao <jmgao@google.com> Don't include <sys/sysconf.h>.

It doesn't exist in any standard, and is hence being moved. <unistd.h>
exposes everything in it already, anyway.

Bug: http://b/28067717
Change-Id: I258c607ef8799ec267151f424be27c72e295e3b6
umpstate/utils.cpp
5006f3a6bcfbe73cfae96b3f2659ce42e18bc2ea 07-Apr-2016 Narayan Kamath <narayan@google.com> installd: log failed unlinks.

bug: 28054110
Change-Id: Id46aacba293c81bb3bb6a0b9721b9b4fe11ed652
nstalld/commands.cpp
0302a258c158bd25608a2cfcc73720d545cbe379 05-Apr-2016 Roland Levillain <rpl@google.com> Close profile before leaving android::installd::clear_profile.
am: 64b59cc

* commit '64b59cc1c89225813295d1b5d6bf4183615da204':
Close profile before leaving android::installd::clear_profile.

Change-Id: I52cf3109ad82c5f45f5880050b687e0fcf8607ca
64b59cc1c89225813295d1b5d6bf4183615da204 05-Apr-2016 Roland Levillain <rpl@google.com> Close profile before leaving android::installd::clear_profile.

The profile file descriptor used to be kept open and to
produce SElinux denials when installd ran dex2oat, as that
file descriptor was passed accross security domains.

Bug: 27943553
Change-Id: Ie025082f97c2736156bd5069d7a22aacde86f039
nstalld/commands.cpp
40ed116eef5d99521d458bb51232f01dfb1af8e4 01-Apr-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: acquire /data/misc/logd/ log contents" into nyc-dev
am: 90e840f

* commit '90e840f00713bf9c1016c4f2584ef70e0a87ca14':
dumpstate: acquire /data/misc/logd/ log contents

Change-Id: I76a387d6ebfdc3627aba268a3600d3d9df93c972
90e840f00713bf9c1016c4f2584ef70e0a87ca14 01-Apr-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: acquire /data/misc/logd/ log contents" into nyc-dev
c12a8a13d307160e0d51a6cae1e0cf196a7e2afb 01-Apr-2016 Felipe Leme <felipeal@google.com> Merge "Added option to redirect stdout on run_command_always." into nyc-dev
am: 233fbed

* commit '233fbedd9dff8f55cb305f8aa97bf06dfa2d7622':
Added option to redirect stdout on run_command_always.

Change-Id: I02f5b0302fd3b6ce8da8de10ee604d33dc782dc4
29c39715b8a45ca2e97aecd8ebb63183f63da72b 01-Apr-2016 Felipe Leme <felipeal@google.com> Added option to redirect stdout on run_command_always.

There are cases where a command should not write to stdout. For example,
when sending the initial broadcast before the header is printed.

This change adds this option to run_command_always, and uses enums to
make it easier to read what's been passed to it.

BUG: 27953643

Change-Id: I9aed0cb0df4112b31d2079241114e206b9d0bb0c
umpstate/dumpstate.h
umpstate/utils.cpp
4d42dea08915ccbb61ca05903af5330d02d66755 01-Apr-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: acquire /data/misc/logd/ log contents

Bug: 27965066
Change-Id: I78c7ef4b45179729f505c3fe5d84c33a22ce41bf
umpstate/dumpstate.cpp
82646ea5d502e48a815f24c725baf852d645febf 31-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Add build id as part of bugreport name." into nyc-dev
am: fbe08bf

* commit 'fbe08bfdfdadfcf05bb83e255fa12fc44202aa73':
Add build id as part of bugreport name.

Change-Id: I2bc0916fd801da3fa2ee878565acdafb4a8e82bb
fbe08bfdfdadfcf05bb83e255fa12fc44202aa73 31-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Add build id as part of bugreport name." into nyc-dev
9385b1761aeaaee586cb4777345b18d5517821af 31-Mar-2016 Felipe Leme <felipeal@google.com> Add build id as part of bugreport name.

Rather than bugreport-DATE, the base bugreport name will be
bugreport-BUILD_ID-DATE, which will make it easier to identify
build associated with the report.

Since this change modifies the bugreport format, its version has been
increased to 'v1-dev4' and it is not enabled by default.

BUG: 27618668
Change-Id: I4492f8234520ee27c2eb0e4b8313fc937c498fea
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
3ece4c1ba40bd41f956651f8b79d4b60ea52a92a 31-Mar-2016 Felipe Leme <felipeal@google.com> Dumps systrace to a file.
am: 14e034a

* commit '14e034a02ec34b2c76afb06975bdfc943a9b5607':
Dumps systrace to a file.

Change-Id: Idb27c190029e7d94315f7fedb64310775741fe75
14e034a02ec34b2c76afb06975bdfc943a9b5607 31-Mar-2016 Felipe Leme <felipeal@google.com> Dumps systrace to a file.

The atrace command can take a while, so rather than use a pipe it's
better to write its output to a temporary file and add that file to the
zip, timing out if necessary.

BUG: 27821761
Change-Id: I09f438077d001167d92da3009016bcab815ce530
umpstate/dumpstate.cpp
umpstate/utils.cpp
c54bb31c37ebce46f8b2165dcd246c995fb6f151 30-Mar-2016 John Reck <jreck@google.com> Merge "Add an option to write the trace to a file" into nyc-dev
am: 2af4358

* commit '2af4358f78f5376e829a07259a459da91c7b9ba4':
Add an option to write the trace to a file

Change-Id: Ie5ee06d834025feaa159eb955f4caf7ea86054c3
2af4358f78f5376e829a07259a459da91c7b9ba4 30-Mar-2016 John Reck <jreck@google.com> Merge "Add an option to write the trace to a file" into nyc-dev
8d9540395b330e862243c4638b259a397d0b58cd 30-Mar-2016 Mathieu Chartier <mathieuc@google.com> Revert "Avoid unlinking app image file"
am: a812bcf

* commit 'a812bcfd06df38a360545ae6655a90a9564c3aa9':
Revert "Avoid unlinking app image file"

Change-Id: Ied465638979e1f1f89aa395b65fd70a02dd10d83
a812bcfd06df38a360545ae6655a90a9564c3aa9 30-Mar-2016 Mathieu Chartier <mathieuc@google.com> Revert "Avoid unlinking app image file"

Need unlink or the image file can change while being mmaped.

Bug: 27493510

This reverts commit 310c5e70b2e36df36811b6de7ad5c2ebd82338e5.

Change-Id: Ied09848e0b646f946f20f2ed114cac6b438bcda1
nstalld/commands.cpp
40b26b4fc597f105823bc1e2a640e4df8baea243 30-Mar-2016 John Reck <jreck@google.com> Add an option to write the trace to a file

Change-Id: I865a3f2c9f6a1fefa664b8215d1e5c94d7d0d0d3
Fixes: 27821761
trace/atrace.cpp
1cb2a7daa21ffd234084054aa58643152cc5ed73 30-Mar-2016 Calin Juravle <calin@google.com> Merge "Destroy the reference profile during uninstalls" into nyc-dev
am: 057facf

* commit '057facfdc6b512b4fe43ee19db50b5156cecff84':
Destroy the reference profile during uninstalls

Change-Id: I1754a78379f46c499e7d54ef011545bb72df5e62
21f71ccdae788a67ecf6c5b5f598ab5c36f82e31 30-Mar-2016 Calin Juravle <calin@google.com> Merge "Do not unlink the profiles if not needed" into nyc-dev
am: 4820e72

* commit '4820e72dbfccad5974dc3d88f2cb462af35c6659':
Do not unlink the profiles if not needed

Change-Id: I51ba64a994108143805e4d348ccfedfba5251f9e
057facfdc6b512b4fe43ee19db50b5156cecff84 30-Mar-2016 Calin Juravle <calin@google.com> Merge "Destroy the reference profile during uninstalls" into nyc-dev
4820e72dbfccad5974dc3d88f2cb462af35c6659 30-Mar-2016 Calin Juravle <calin@google.com> Merge "Do not unlink the profiles if not needed" into nyc-dev
022056c6a77d13763e88d698a6cf32cb5c11f17b 30-Mar-2016 Felipe Leme <felipeal@google.com> Call _exit() instead of exit() on child failure.
am: baa85bd

* commit 'baa85bd893665a48aee73d7ca7b73cd39b48f998':
Call _exit() instead of exit() on child failure.

Change-Id: I7f78e1f2550cf58467c1a191b8a0c9668277ad1d
baa85bd893665a48aee73d7ca7b73cd39b48f998 29-Mar-2016 Felipe Leme <felipeal@google.com> Call _exit() instead of exit() on child failure.

As explained on man _exit:

"The function _exit() terminates the calling process "immediately".
Any open file descriptors belonging to the process are closed;"

If exit() is called instead, the resulting zip file will be corrupted.

BUG: 27900023
BUG: 27804637
Change-Id: I6591749603753d6016f350c629b7082cf6780ae2
umpstate/dumpstate.cpp
umpstate/utils.cpp
7535e8e1995398befc866062d63c05d90eb70ccc 29-Mar-2016 Calin Juravle <calin@google.com> Destroy the reference profile during uninstalls

Bug: 27896463
Change-Id: I6b182e2c3276f6228a2ed70ee2c6f0c49c638760
nstalld/commands.cpp
cea31418f34680fcfea4ec885dc966ad3d76354f 29-Mar-2016 Calin Juravle <calin@google.com> Do not unlink the profiles if not needed

It's enough to just clear the profiles. The app might still run and we
will see misleading warning or we might miss recording profile
information.

Bug: 27895342
Change-Id: I04961f09e0965a3e4af87acb95a7c74773f7a44a
nstalld/commands.cpp
9e07425d74e861edffa645459465cfe858c6cdb4 29-Mar-2016 John Reck <jreck@google.com> Merge "Dumping a trace isn\'t an error" into nyc-dev
am: 9767bd8

* commit '9767bd89a6f5aa510c649d03e485c086d4ebd614':
Dumping a trace isn't an error
26acfb704f17d2c98ed2433324e63f30ca3715ea 29-Mar-2016 Felipe Leme <felipeal@google.com> Increased estimated max progress of bugreports.
am: faf67e3

* commit 'faf67e3fe2451e75d0369906a579d3e1386a5064':
Increased estimated max progress of bugreports.
632350257cd93e34aa1e8b354c1535864b314c38 29-Mar-2016 Dan Austin <danielaustin@google.com> resolve merge conflicts of 1ccaed4 to nyc-dev-plus-aosp

Change-Id: Ib30c59ff496ed76ec46f4c8f7d954d571bcbf4ae
ec497765371f109f4a0b42a51a4b1460e6e67fc0 24-Mar-2016 Dan Austin <danielaustin@google.com> Address const issues in preparation for libcxx rebase.

Change-Id: I25a1e2946217049e9205589d6493e06362d2173b
nstalld/commands.cpp
9767bd89a6f5aa510c649d03e485c086d4ebd614 28-Mar-2016 John Reck <jreck@google.com> Merge "Dumping a trace isn't an error" into nyc-dev
6c8ac921ead0771b36281763d3724d67c9146c62 28-Mar-2016 John Reck <jreck@google.com> Dumping a trace isn't an error

Change-Id: I6180c4f72b45b3d64c44a197e7bda3809a69c8fc
trace/atrace.cpp
faf67e3fe2451e75d0369906a579d3e1386a5064 28-Mar-2016 Felipe Leme <felipeal@google.com> Increased estimated max progress of bugreports.

The initial estimate was based on earlier work done before new sections
were added, and it was too slow.

Ideally we should have a per-device estimate, but for N we'll just
increase the common max.

BUG: 26373682
Change-Id: I1a8ce7f09fc6588ac1513a20fa1149aab8c38351
umpstate/dumpstate.h
e9b81cee10ab41bfe9afd1c55e53afd4e6b7c384 28-Mar-2016 Calin Juravle <calin@google.com> Don\'t report errors when trying to delete a non-existing profile dir
am: b06f98a

* commit 'b06f98aabc5381fd6366526d9b31b5d0345481b6':
Don't report errors when trying to delete a non-existing profile dir
b06f98aabc5381fd6366526d9b31b5d0345481b6 28-Mar-2016 Calin Juravle <calin@google.com> Don't report errors when trying to delete a non-existing profile dir

Also, put destroy_app_current_profiles behind FLAG_STORAGE_DE flag.

Bug: 27081617
Change-Id: Ib8b9ff292784c659259ceb4339b803e3580da7ed
nstalld/commands.cpp
nstalld/utils.cpp
nstalld/utils.h
eba287f319ea7ebf11313871b91f1cbcd3526337 25-Mar-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Add /data/misc/recovery
am: d6ab011

* commit 'd6ab01105bbd80dfa2fc2debc8e31d6422c378ee':
dumpstate: Add /data/misc/recovery
d6ab01105bbd80dfa2fc2debc8e31d6422c378ee 25-Mar-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Add /data/misc/recovery

(cherry picked from commit 23e86e91ff971a00f62954833a17df2dad1a13af)

Bug: 27176738
Change-Id: Ibc2342c6a29e5aebcac4875d7c2eed48fa8af7de
umpstate/dumpstate.cpp
ff342d41d717d42c2d624f0bed9f8ff24b2ef202 25-Mar-2016 Calin Juravle <calin@google.com> Merge "Do not clean profiles unconditonally during app data clean up" into nyc-dev
am: d1a6a24

* commit 'd1a6a2495ff82893728571136f4f080164c8dae5':
Do not clean profiles unconditonally during app data clean up
d1a6a2495ff82893728571136f4f080164c8dae5 25-Mar-2016 Calin Juravle <calin@google.com> Merge "Do not clean profiles unconditonally during app data clean up" into nyc-dev
308b6c91a8a2de2bdc72f580a01a957a4ff22309 25-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Improved (or warned about lack of) error handling." into nyc-dev
am: a207fca

* commit 'a207fca4eda8c17389ea13ec3762ecb2a49d81be':
Improved (or warned about lack of) error handling.
ea160d134cd46c246859072f90ab5dd05ada6364 24-Mar-2016 Felipe Leme <felipeal@google.com> Improved (or warned about lack of) error handling.

It would be safer for dumpstate to exit when execvp on a child fails; a
common occurrence is when a list of command arguments is missing NULL.

dumpstate should be more robust to detect those missing NULL-terminated
args, but that will be addressed in a future change.

BUG: 27804637
BUG: 27832567
Change-Id: Ibcbe46041a86b16e365fbb40613b8c4bdf39744c
umpstate/dumpstate.cpp
umpstate/utils.cpp
edae669f18eb99b9316891fdde627e2f385c3c64 23-Mar-2016 Calin Juravle <calin@google.com> Do not clean profiles unconditonally during app data clean up

The goal is to enable profiles to be persisted across OTAs.

This CL makes profile removal a dedicated path which will be called by
PackageManger during an app update or uninstall.

Profiles are cleared when:
- requested to do a full clean up of application data files
- specifically requested to clear them (e.g. app updates)

Profiles are destroyed (includes profile directory removal)
- for each user individually when its application data is destroyed
- for all users if the package gets uninstalled.

Bug: 27081617
Bug: 27688727
Change-Id: Id53c7625011af3cdbe8a58ac0982982fa461e5fd
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
d517cde1890aa90cde47c9a940dcf86466401435 24-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Separate profile merging and compilation" into nyc-dev
am: 950aa7c

* commit '950aa7c853ff43e95f0764f190d1721e1e82dea2':
Installd: Separate profile merging and compilation
950aa7c853ff43e95f0764f190d1721e1e82dea2 24-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Separate profile merging and compilation" into nyc-dev
de4976099a3ac9a95b8d767a35b6c3afbcf21c9a 24-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Fixed send_broadcast and fork handling issues." into nyc-dev
am: 8e48e0a

* commit '8e48e0aadae765b4ed104890ca33db32ea347a8a':
Fixed send_broadcast and fork handling issues.
73f731c30a8b7d811127b8e89e01c427b6aab622 24-Mar-2016 Felipe Leme <felipeal@google.com> Fixed send_broadcast and fork handling issues.

send_broadcast() was calling run_command_always(char*, bool, int, char*) passing:
run_command_always(NULL, 20, true, am_args);

I.e., it was passing "true" (!1) as the boolean, and 1 (true) as the
timeout value; the proper call should be:

run_command_always(NULL, true, 20, am_args);

Also, the code handling failure on child calls was calling _exit(),
which quits dumpstate - it should simply return the function instead.

BUG: 27804637

Change-Id: If8c9b40eddc8b76f92e6d11078dfe446a39ad4d4
umpstate/dumpstate.cpp
umpstate/utils.cpp
4d0f825dd76a1972a3d081e771cde28513a1c6ff 20-Mar-2016 Andreas Gampe <agampe@google.com> Installd: Separate profile merging and compilation

Create a new merge_profiles command to check and merge profiles.

(Almost) always pass a profile to a dexopt pass.

Require compilation filter input to dexopt and use it for dex2oat
(except for hard overrides like safe-mode).

Bug: 27689078
Change-Id: I1257857cc15c17e2271d1261ea4cc80752270fcb
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
9b82df88b4d9af8af07b5bbe431e16a26f8de4e7 23-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Flushes stdout when execvp fails." into nyc-dev
am: d97e18c

* commit 'd97e18c038f23cecbe3d5e95fabf4dcd2bfaac20':
Flushes stdout when execvp fails.
d97e18c038f23cecbe3d5e95fabf4dcd2bfaac20 23-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Flushes stdout when execvp fails." into nyc-dev
ec72578b8461a5601962ea8102fd74a1f86d91fb 23-Mar-2016 Felipe Leme <felipeal@google.com> Flushes stdout when execvp fails.

BUG: 27804637
Change-Id: Idf414a1d08bf51854475c74767588a4814c8d806
umpstate/utils.cpp
f790d6f577ea85083c719f4fbd7e2058e131a5d5 23-Mar-2016 Thierry Strudel <tstrudel@google.com> Merge "dumpsys: fix error condition" into nyc-dev
am: eff45d0

* commit 'eff45d06902c2a9dc523848a652d2456dfa19d7a':
dumpsys: fix error condition
eff45d06902c2a9dc523848a652d2456dfa19d7a 23-Mar-2016 Thierry Strudel <tstrudel@google.com> Merge "dumpsys: fix error condition" into nyc-dev
159a8323064d8550218bf31465e51cc5a5d14926 23-Mar-2016 Thierry Strudel <tstrudel@google.com> dumpsys: fix error condition

Bug: 27809529
Change-Id: Ia2bdac83a367e1dd550ea7a5b50eac14d84f66b2
Signed-off-by: Thierry Strudel <tstrudel@google.com>
umpsys/dumpsys.cpp
501c67c580ce83ab61a5554ed4dbf6a24cce7ce2 23-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Handled failure of execvp and increases am timeout." into nyc-dev
am: 9b02ecf

* commit '9b02ecfe308302eae98d50fa165b1faae695f3df':
Handled failure of execvp and increases am timeout.
b0133cdeaa98afa55249546f68b6167f1dde65b8 23-Mar-2016 Felipe Leme <felipeal@google.com> Handled failure of execvp and increases am timeout.

The run_command_always() call fork and runs the command in the child
code, and user to have the above logic:

if (pid == 0) {
// boiling code
execvp(command, (char**) args);
// execvp's result will be handled after waitpid_with_timeout() below...
_exit(-1); // ...but it doesn't hurt to force exit, just in case
}

Recently, the _exit(-1) line was removed and there's been reports of
dumpstate hanging after, because it tries to wait for pid 0 to
finish (and in some cases it even tries to kill it).

Also increased the timeout when running am to send broadcasts.

BUG: 27804637
BUG: 27809534
Change-Id: Ia129253e367e5886d305947e56a643fd660a33bd
umpstate/dumpstate.cpp
umpstate/utils.cpp
b8ce3f9b1b0c15ed3dec7c69cc5c490c50c247fc 23-Mar-2016 Calin Juravle <calin@google.com> Merge "Delete the entire profile directory when the app is uninstalled" into nyc-dev
am: 5b81754

* commit '5b817549fcea6f58bbeaaffbf654ddd8751ebbdc':
Delete the entire profile directory when the app is uninstalled
5b817549fcea6f58bbeaaffbf654ddd8751ebbdc 23-Mar-2016 Calin Juravle <calin@google.com> Merge "Delete the entire profile directory when the app is uninstalled" into nyc-dev
d663581d180295278e87ce30d627bb8ed9b3c87d 23-Mar-2016 Thierry Strudel <tstrudel@google.com> Merge "dumpsys: make timeout value an argument" into nyc-dev
am: ca9b292

* commit 'ca9b29213820ac399f9e2b9aac827377fa7e6622':
dumpsys: make timeout value an argument
8b78b758a8b5b831c48562233df055c22e2541af 22-Mar-2016 Thierry Strudel <tstrudel@google.com> dumpsys: make timeout value an argument

Also rework the args parsing using getopt_long.

Bug: 27788406
Change-Id: I60fd8e614616334d47b8de574f3c81a121a6ac0a
Signed-off-by: Thierry Strudel <tstrudel@google.com>
umpstate/dumpstate.cpp
umpsys/dumpsys.cpp
caa6b809a5ed024a8f3f551c5c109a5ad50ab772 22-Mar-2016 Calin Juravle <calin@google.com> Delete the entire profile directory when the app is uninstalled

We were deleting just the files themselves. We need to delete the
directory as well.

Bug: 27696217
Change-Id: I202a52c711a2132ba10b926f4d0e9ec953f25b43
nstalld/commands.cpp
1c45a2c8bd047b167b02d174db6eb9b9cadfa174 22-Mar-2016 Felipe Leme <felipeal@google.com> Fixed typo.
am: 26ae723

* commit '26ae72392e76e4acc82842f4a53ad41bcbc6811e':
Fixed typo.
26ae72392e76e4acc82842f4a53ad41bcbc6811e 21-Mar-2016 Felipe Leme <felipeal@google.com> Fixed typo.

BUG: 27419521

Change-Id: Ie9f0b24876353e532f4ebe2ff4935938c3c7a781
umpstate/dumpstate.cpp
9590e5eab9c0f6909d4441202a0f4e362b6d8515 21-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Don\'t use su to when calling am or dumpsys." into nyc-dev
am: 7363baf

* commit '7363bafd0a94aa98a267edbbcb27abc9ef72f1dd':
Don't use su to when calling am or dumpsys.
7363bafd0a94aa98a267edbbcb27abc9ef72f1dd 21-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Don't use su to when calling am or dumpsys." into nyc-dev
3ff5cc8b2e38cd9c8f2ad43e04fd1e8b5c6f2e72 21-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Capture systrace buffers." into nyc-dev
am: 7f72f4e

* commit '7f72f4e577c8f9f88096353a60c3a2b43006f7d9':
Capture systrace buffers.
71a74ac75c8687195d27642fa0db31a796102c59 17-Mar-2016 Felipe Leme <felipeal@google.com> Capture systrace buffers.

When tracing is enabled (/sys/kernel/debug/tracing/tracing_on = 1),
dumpstate will run 'atrace --async_dump' and redirect its output to a
systrace.txt entry in the zip file.

BUG: 27419521
Change-Id: Ia6de46a691b25febac31331fe0aa8701c9a84ebb
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
26f564909d238077628a9312b315b00b01712a95 18-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Added -q flag to showmap." into nyc-dev
am: 792a10b

* commit '792a10b940deeb1d0649f29a2f5777ac668ef780':
Added -q flag to showmap.
3dba69aad214a873c619d125ff0441b817947100 17-Mar-2016 Felipe Leme <felipeal@google.com> Added -q flag to showmap.

dumpstate calls showmap for each pid, and since most of them are empty,
it ends up polluting logcat with entries like:

03-17 14:49:05.974 12160 12160 E dumpstate: command '/system/xbin/su
root showmap -q 9867' failed: No such file or directory

BUG: 26906985
Change-Id: I7e064b2ec8901b6ccee49b228be96ff2847c703c
umpstate/utils.cpp
f694d5647ac284570dab485d37b024b756672180 17-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Improve logging of child commands." into nyc-dev
am: d3d45c3

* commit 'd3d45c3dddf48d557f2b0d622df8ebc1317f9bb5':
Improve logging of child commands.
de81117d037cc48041f3f3f072ccfa1b479cf0a6 17-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Load properties from files" into nyc-dev
am: b25c2d3

* commit 'b25c2d375c400556a553f64744d4a080add6a68c':
Otapreopt: Load properties from files
545d74522902faf4fc9db729da88ced37882d4f3 17-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Remove b_mount_path" into nyc-dev
am: ae3cd06

* commit 'ae3cd0687610ec585119b54ac18141f6aea4e593':
Otapreopt: Remove b_mount_path
848bf02b4b096d163c69adb2250074493f2b6fc1 17-Mar-2016 Philip Cuadra <philipcuadra@google.com> Merge "atrace: Adding dumping message to logcat." into nyc-dev
am: 325232c

* commit '325232ccb52981758ab7286e046c0c8a039b5cac':
atrace: Adding dumping message to logcat.
89286a49bdb6c8c4482b792bca6452cf17c573aa 17-Mar-2016 Andreas Gampe <agampe@google.com> Installd: Make extract-only = interpret-only
am: bb7a770

* commit 'bb7a77082fde8f73971adadf50faecdf5f660b48':
Installd: Make extract-only = interpret-only
cf6a8b47dc04f1c33ddc337b5e21f2c5b7354cb5 11-Mar-2016 Felipe Leme <felipeal@google.com> Don't use su to when calling am or dumpsys.

su is not available on user builds anymore, hence the bugreport
notifications would never be sent on those builds. Instead, it should
explicitly drop root using system calls.

BUG: 27583193
Change-Id: Ia6256b241fdd6ab4c059fb764b10b4445ad6551d
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
d3d45c3dddf48d557f2b0d622df8ebc1317f9bb5 17-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Improve logging of child commands." into nyc-dev
a34efb7ae17a7ea1078cce75be634120bd72a421 11-Mar-2016 Felipe Leme <felipeal@google.com> Improve logging of child commands.

When execvpe() is called it doesn't return, so the child error handling
should be done at the parent, otherwise the failure is not printed in the bugreport.

BUG: 27583193
Change-Id: I6161e4c72b7b0da7b82bff7fd72d7a5aaf4d6e89
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
b25c2d375c400556a553f64744d4a080add6a68c 17-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Load properties from files" into nyc-dev
ae3cd0687610ec585119b54ac18141f6aea4e593 17-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Remove b_mount_path" into nyc-dev
1842af3a4a8fccf71f5c569071518de14b3698ac 16-Mar-2016 Andreas Gampe <agampe@google.com> Otapreopt: Load properties from files

Refactor file parsing into a helper.

Load system properties, completely, from the right sources. Add code
to parse init.environ.rc for environment variables.

Bug: 25612095
Change-Id: I3e5b2ff620ccb374c775ed1922baa0d9b8ed5974
nstalld/file_parsing.h
nstalld/otapreopt.cpp
nstalld/system_properties.h
325232ccb52981758ab7286e046c0c8a039b5cac 17-Mar-2016 Philip Cuadra <philipcuadra@google.com> Merge "atrace: Adding dumping message to logcat." into nyc-dev
bb7a77082fde8f73971adadf50faecdf5f660b48 16-Mar-2016 Andreas Gampe <agampe@google.com> Installd: Make extract-only = interpret-only

Test the impact of verifying and quickening at install time and
post-OTA boot time.

Bug: 26833007
Bug: 27688727
Bug: 27689078
Change-Id: Ib2ebe71747f2b8dc7a2864f3d02b5c2217d29d6c
nstalld/commands.cpp
9fb85b0667235ebfdea00ea345febc8f6eb203d2 16-Mar-2016 Andreas Gampe <agampe@google.com> Otapreopt: Remove b_mount_path

The final chosen design runs the tool in a chroot, no B mount path
required.

Bug: 25612095
Change-Id: Iba920455799da1aff97f759afc784ce43c4bf0b1
nstalld/otapreopt.cpp
f88deda79dbd71e09ff2a1e829eed08178a51c1e 15-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Adapt for actual A/B" into nyc-dev
am: e72c378ef6

* commit 'e72c378ef6eac2b1638e759d97045c393e81bfcc':
Otapreopt: Adapt for actual A/B
e72c378ef6eac2b1638e759d97045c393e81bfcc 15-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Adapt for actual A/B" into nyc-dev
01ad5984dd202311a7e301c8c771a5d4b7c76136 10-Mar-2016 Andreas Gampe <agampe@google.com> Otapreopt: Adapt for actual A/B

Add postinstall script for update_engine hook.

Add otapreopt_chroot as a gateway between installd and otapreopt.
Installd will fork and run otapreopt_chroot, which has the permission
to set up a chroot in /postinstall and run otapreopt from the B
partition.

Bug: 25612095
Change-Id: I4264598da00053ced87c849c738ddc0bc5437304
nstalld/Android.mk
nstalld/installd.cpp
nstalld/otapreopt_chroot.cpp
nstalld/otapreopt_script.sh
0bb03528ffaacd5c612ede6a5d3a1cdbe2dd8180 15-Mar-2016 Philip Cuadra <philipcuadra@google.com> atrace: Adding dumping message to logcat.

Change-Id: Ida9e7ce8a05f8c5e44245ad0c383453d2ea7d79f
trace/atrace.cpp
7dd43c66c798e39c3bec4975f36abc89c9d114ca 15-Mar-2016 Felipe Leme <felipeal@google.com> Added zip location on log message.
am: 26bd34c984

* commit '26bd34c984f11dcfc241fecf7858d16f87f3bc1a':
Added zip location on log message.
26bd34c984f11dcfc241fecf7858d16f87f3bc1a 15-Mar-2016 Felipe Leme <felipeal@google.com> Added zip location on log message.

BUG: 27660862
Change-Id: I6e9dc816955762fde0d4ddb9ac4cbf12b607cbbd
umpstate/dumpstate.cpp
63cf7854bd6c51811bab64ba1e7a3722405c5142 15-Mar-2016 Greg Kaiser <gkaiser@google.com> Merge "installd: Avoid potential use of null \'src\'." into nyc-dev
am: d44b290d77

* commit 'd44b290d77e0c08e2ea3cca5f5afe4864f4dd0ea':
installd: Avoid potential use of null 'src'.
d44b290d77e0c08e2ea3cca5f5afe4864f4dd0ea 15-Mar-2016 Greg Kaiser <gkaiser@google.com> Merge "installd: Avoid potential use of null 'src'." into nyc-dev
10213888add66cda37de12c002fec27e82c96ba6 15-Mar-2016 Scott Bauer <bauers@google.com> DO NOT MERGE Tracing for binder locks/transactions
am: 97e5be36e3

* commit '97e5be36e3b0256b6b671ff93c1cce870dfeddb3':
DO NOT MERGE Tracing for binder locks/transactions
00087b70401bd09dfeaab9171d006e833e3cd844 14-Mar-2016 Greg Kaiser <gkaiser@google.com> installd: Avoid potential use of null 'src'.

In create_cache_path, we have code checking whether 'src' is null,
implying it's possibile it could be null here. To be safe, we move
our strlen call until after this check.

Change-Id: I6a67cdad8ebf8bdce1562ce5f0cbf98b084807ef
nstalld/installd.cpp
97e5be36e3b0256b6b671ff93c1cce870dfeddb3 09-Jun-2015 Scott Bauer <bauers@google.com> DO NOT MERGE Tracing for binder locks/transactions

Added logic to pull traces from the binder driver.

Change-Id: I9aa00b4650fc3f90d7bd55328dfef11e2514f7b4
trace/atrace.cpp
13f1ef30e1dcf8a151a72472f248c61729c70def 14-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Pass -n to netstat.
am: f7f2651e0c

* commit 'f7f2651e0c07d138679fd405999f30d0ab35e10b':
Pass -n to netstat.
f7f2651e0c07d138679fd405999f30d0ab35e10b 11-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Pass -n to netstat.

netstat does lots of DNS lookups, which will slow down the dump
process and creates the risk that the dump will be incomplete.

Bug: 26154009
Change-Id: Ibefa259bf74e85ab8dbdfac76f82c101d47686a7
umpstate/dumpstate.cpp
1643ba1d0f3547166d50be38efbd66294934a3db 12-Mar-2016 dcashman <dcashman@google.com> Merge "svcmgr: don\'t send reply to one-way txn." into nyc-dev
am: c1810b5d76

* commit 'c1810b5d7669433cd1d0c26cc019289b52b0c0df':
svcmgr: don't send reply to one-way txn.
c1810b5d7669433cd1d0c26cc019289b52b0c0df 12-Mar-2016 Daniel Cashman <dcashman@google.com> Merge "svcmgr: don't send reply to one-way txn." into nyc-dev
1ed9ca622b9376bf9072c30f56c6d5684975a336 11-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Do not log on missing B artifact" into nyc-dev
am: 0598f04574

* commit '0598f0457449ed11bb99ae792e9e69f81548a42f':
Installd: Do not log on missing B artifact
0598f0457449ed11bb99ae792e9e69f81548a42f 11-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Do not log on missing B artifact" into nyc-dev
2438c6f59cc293a887e65cd34738889043a75d46 11-Mar-2016 Andreas Gampe <agampe@google.com> Installd: Do not log on missing B artifact

For now, just swallow the warning.

Bug: 25612095
Change-Id: Ib7131464c7eb85c153cb91bf5ff9dc2a6127dd4c
nstalld/commands.cpp
51f592c7bad13d3d8e8f7cfec25edfef42901802 11-Mar-2016 dcashman <dcashman@google.com> svcmgr: don't send reply to one-way txn.

svcmgr currently assumes that all incoming transactions are synchronous
and expecting a reply. Change the BR_TRANSACTION handling code to not
send a reply to one-way transactions.

Bug: 27111612
Change-Id: If2e56d3eb53b41d059dbe7d5d10e764343c0262c
ervicemanager/binder.c
d245c0dc3b25b5687f454d367734d056804123ad 11-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Remove the route command from dumpstate." into nyc-dev
am: e4eb4f0e23

* commit 'e4eb4f0e2380f698d31b0089fb0e22020b70c2bc':
Remove the route command from dumpstate.
e4eb4f0e2380f698d31b0089fb0e22020b70c2bc 11-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Merge "Remove the route command from dumpstate." into nyc-dev
990bcce0fddc765f8d5398b431ab461a775fc10c 11-Mar-2016 Lorenzo Colitti <lorenzo@google.com> Remove the route command from dumpstate.

Its output is irrelevant and misleading, because:

1. It only looks at the "main" routing table, which is a last
resort routing table that is trumped by all other networks and
cannot even be used by non-root users.
2. The proper way to understand device routing is to look at the
output of "ip rule" and "ip route", both of which are already
in the bugreport.

Bug: 26154009
Change-Id: Ice19799639daa156a0d4dbb69915031e5582a8ed
umpstate/dumpstate.cpp
ecc5613f08168c129e938e7e9c7d307221f5cc8b 09-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Improved usage of stderr for logging." into nyc-dev
am: 8d1a222f50

* commit '8d1a222f50a93b9f078ad48cc94a2dfc50fef611':
Improved usage of stderr for logging.
107a05f72e711c92545d0be648ab79c4f858f372 09-Mar-2016 Felipe Leme <felipeal@google.com> Improved usage of stderr for logging.

Dumpstate have some macros that write logs to both ALOG and stderr,
which is useful when the latter is redirected to a file.

But prior to this change, only the log statements from dumpstate.cpp
were using it, and utils.cpp was logging to stderr directly.

This change not only uses MYLOGE for all error messages, but also closes
stderr at the very end (so it doesn't miss statements like the
parameters sent to send_broadcast) and uses MYLOGD for the overall progress.

BUG: 27437378
Change-Id: I373a523e20c98d8f445822103784fa9900c6c684
umpstate/dumpstate.cpp
umpstate/utils.cpp
0408714f12d6086a696584782a240da77702a7ef 08-Mar-2016 David Brazdil <dbrazdil@google.com> Fix name of argument
am: ebd82c66dd

* commit 'ebd82c66dd38522a85412ed502f081046acdf690':
Fix name of argument
ebd82c66dd38522a85412ed502f081046acdf690 08-Mar-2016 David Brazdil <dbrazdil@google.com> Fix name of argument

Follow-up to change I92cc374b5b6d95ca7755e08b95a9bc9060df2178.

Change-Id: I62cc634ee456c6789b48ab8d8542dffa87f4cc72
nstalld/commands.h
e6aebea24667afd1597521730535e1239684ea04 08-Mar-2016 David Brazdil <dbrazdil@google.com> Add \'rmprofiles\' command to installd
am: d828d6839f

* commit 'd828d6839f6a01e3f0b2b8b2694139dfa801c557':
Add 'rmprofiles' command to installd
d828d6839f6a01e3f0b2b8b2694139dfa801c557 08-Mar-2016 David Brazdil <dbrazdil@google.com> Add 'rmprofiles' command to installd

Adds a new command to installd which clears all profile data of
a given package.

Bug: 27516490
Change-Id: I92cc374b5b6d95ca7755e08b95a9bc9060df2178
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
8856704338b1e262f02569b0e4e7d505683e0711 04-Mar-2016 Josh Gao <jmgao@google.com> dumpsys: switch to using a pipe to work around selinux denial.
am: 49f0a0cddb

* commit '49f0a0cddbcad9be1d408425ee608ca925c6885b':
dumpsys: switch to using a pipe to work around selinux denial.
49f0a0cddbcad9be1d408425ee608ca925c6885b 04-Mar-2016 Josh Gao <jmgao@google.com> dumpsys: switch to using a pipe to work around selinux denial.

Some services can't write to the socket that we were passing in, due to
selinux policies. Use a pipe for now.

Bug: http://b/27500248
Change-Id: Ic681121597a1717d31ef356bd6fe2c2daaa86d94
umpsys/dumpsys.cpp
dcdc2d342f6419c4ae2d9aeeba23f55a4867b93d 04-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Removed temporary \'v1-dev1-dumpsys-split\' version and bumped version to \'v1-dev2\'." into nyc-dev
am: 9018f17370

* commit '9018f173702c80336f66cfc1bdad3046698325a1':
Removed temporary 'v1-dev1-dumpsys-split' version and bumped version to 'v1-dev2'.
9018f173702c80336f66cfc1bdad3046698325a1 04-Mar-2016 Felipe Leme <felipeal@google.com> Merge "Removed temporary 'v1-dev1-dumpsys-split' version and bumped version to 'v1-dev2'." into nyc-dev
d35084bdeed22804254885aaf6a7eb438ae74537 03-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Add move_ab command" into nyc-dev
am: 104c3083d6

* commit '104c3083d6535be205a1edc7c74cdac21dd1c466':
Installd: Add move_ab command
104c3083d6535be205a1edc7c74cdac21dd1c466 03-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Add move_ab command" into nyc-dev
e65b4faa798269ab6ee0d27dab03b8b5caa6f956 01-Mar-2016 Andreas Gampe <agampe@google.com> Installd: Add move_ab command

Add a command to move A/B artifacts into the right position. This
is used for apps that live in data.

Bug: 25612095
Change-Id: I40c3ca54bd0f3b2d646a14b145e733096dabbbb2
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
2e282a144aba0d6195256be85dece4efaf3de803 03-Mar-2016 Josh Gao <jmgao@google.com> dumpsys: use a socket for dumping, add timeout support.
am: 4b8f6f9adb

* commit '4b8f6f9adb8ee1a06b145c8dc83a672f8d0ac80f':
dumpsys: use a socket for dumping, add timeout support.
4b8f6f9adb8ee1a06b145c8dc83a672f8d0ac80f 01-Mar-2016 Josh Gao <jmgao@google.com> dumpsys: use a socket for dumping, add timeout support.

Passing the stdout file descriptor directly to a service to dump with
leads to bad things happening if the service hangs, or dumpsys is
terminated prematurely. For example, `dumpsys foo | cat` will not
terminate, even if the dumpsys process is killed, since the write end of
the pipe is still alive in the hung service.

Pass an intermediate socketpair when dumping services to avoid this.

Bug: http://b/26849443
Change-Id: Ide18741080355b3c680275a59172c61734eca92d
umpsys/Android.mk
umpsys/dumpsys.cpp
4c1c3a6991f3ca81d7c415e5208f4a0f5f281f75 02-Mar-2016 Calin Juravle <calin@google.com> Merge "Clean up error logs for profiles which don\'t exists." into nyc-dev
am: 0258add8ec

* commit '0258add8ec3269a70607d4d9fd4d90d2b9b83f67':
Clean up error logs for profiles which don't exists.
0258add8ec3269a70607d4d9fd4d90d2b9b83f67 02-Mar-2016 Calin Juravle <calin@google.com> Merge "Clean up error logs for profiles which don't exists." into nyc-dev
6593d1e3e5eceb29e84b968af90dec8f9c9caa62 02-Mar-2016 Calin Juravle <calin@google.com> Merge "Return an error if try to profile guide compile to a public oat file" into nyc-dev
am: 86e8a79a15

* commit '86e8a79a15849725e4964515a85fb9b34225f551':
Return an error if try to profile guide compile to a public oat file
86e8a79a15849725e4964515a85fb9b34225f551 01-Mar-2016 Calin Juravle <calin@google.com> Merge "Return an error if try to profile guide compile to a public oat file" into nyc-dev
db0326a56ed8cc1ba2ed5ec2810afe49bcd9a596 23-Feb-2016 Calin Juravle <calin@google.com> Return an error if try to profile guide compile to a public oat file

This makes sure that the oat file access is private to the app when
using profiles.

Bug: 27334750
Bug: 26080105

Change-Id: I9f5deec1a1068d0276928117134956eb233ce504
nstalld/commands.cpp
e02d2f0d2e73aa485aec06f453ed2495e5aea933 01-Mar-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Fix patchoat delta parameter" into nyc-dev
am: 2dfed2095c

* commit '2dfed2095cc60523e3d8e28dc0292f604ed21ec7':
Otapreopt: Fix patchoat delta parameter
9c74aadb40cb5982cd38410529d464485c182058 01-Mar-2016 Felipe Leme <felipeal@google.com> Removed temporary 'v1-dev1-dumpsys-split' version and bumped version to
'v1-dev2'.

BUG: 26639621
Change-Id: I5f26272d221330b01d2b873e00105a8f8b739b63
umpstate/dumpstate.cpp
febf0bf33ca81edcdaab3625e2711fa58b398cc5 01-Mar-2016 Andreas Gampe <agampe@google.com> Otapreopt: Fix patchoat delta parameter

Only give the delta, not the new base address.

Bug: 25612095
Change-Id: Ieeed5000da5e72477764fc92fe8fa016287d4cd8
nstalld/otapreopt.cpp
278edac4b541e0a671d646a0e17bdbea411c8a08 29-Feb-2016 Calin Juravle <calin@google.com> Clean up error logs for profiles which don't exists.

Bug: 27401160
Change-Id: I60f23477e90052c00fb1c1cc5abe827f4270cd07
nstalld/commands.cpp
fa28614b123dedb143520df36d7208f99f037861 27-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Rename .zip file if necessary." into nyc-dev
am: ed9e142fb6

* commit 'ed9e142fb6874cd1d3cbeb655c700c9a0126ba5a':
Rename .zip file if necessary.
ed9e142fb6874cd1d3cbeb655c700c9a0126ba5a 27-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Rename .zip file if necessary." into nyc-dev
9127435ffbb081fe91a30169f394a57fd31fd05e 27-Feb-2016 Felipe Leme <felipeal@google.com> Rename .zip file if necessary.

Users have the option to rename the suffix of the files generated by
dumpstate by letting Shell set the dumpstate.PID.name property.

This works fine for text files and used to work for zip files as well,
but now the zip file is opened earlier in the process, so it has to be
renamed at the end.

BUG: 27384407
Change-Id: I288d8eb4a3ffe0161b86cdce14f63e9bfdf865ab
umpstate/dumpstate.cpp
448b39d79a4ea4f71cd37e3ecf01de62a04b2309 26-Feb-2016 Felipe Leme <felipeal@google.com> Moved final vibration to the end of the process.
am: cc2a2fa64e

* commit 'cc2a2fa64e22378d980ae0ae95c8865ebea05f69':
Moved final vibration to the end of the process.
cc2a2fa64e22378d980ae0ae95c8865ebea05f69 25-Feb-2016 Felipe Leme <felipeal@google.com> Moved final vibration to the end of the process.

BUG: 26347468
Change-Id: I872d9175fd09b47da512cb2da11a533a921d9a5c
umpstate/dumpstate.cpp
0d682949dc680e3e705b81c71d0de5265179abe4 24-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Improved dumpstate logging." into nyc-dev
am: 503ebdbc5e

* commit '503ebdbc5ecae9dda74124a4350c40f81a695c02':
Improved dumpstate logging.
503ebdbc5ecae9dda74124a4350c40f81a695c02 24-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Improved dumpstate logging." into nyc-dev
63ad18d8ed23637a32a7c0190bdc934ba8db1465 23-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Send max duration when bugreport is finished so Shell can update metrics." into nyc-dev
am: c4e490047a

* commit 'c4e490047a7dd605fb087b71d3b97182e409985c':
Send max duration when bugreport is finished so Shell can update metrics.
c4e490047a7dd605fb087b71d3b97182e409985c 23-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Send max duration when bugreport is finished so Shell can update metrics." into nyc-dev
ee2e4a01f9ca9aae7ee111abcd5c139fc810bf65 23-Feb-2016 Felipe Leme <felipeal@google.com> Send max duration when bugreport is finished so Shell can update
metrics.

BUG: 26759986
Change-Id: If599bfb2558c523e64fd6f176eeb494d3e116928
umpstate/dumpstate.cpp
717ebe18df4f6b8f4fc48f6502690009db7b1643 22-Feb-2016 Ruchi Kandoi <kandoiruchi@google.com> Merge "dumpstate: Remove deprecated /proc/wakelocks" into nyc-dev
am: 4f6d8ab27c

* commit '4f6d8ab27cea2f2ff0f5353b847a3379c12814d7':
dumpstate: Remove deprecated /proc/wakelocks
4f6d8ab27cea2f2ff0f5353b847a3379c12814d7 22-Feb-2016 Ruchi Kandoi <kandoiruchi@google.com> Merge "dumpstate: Remove deprecated /proc/wakelocks" into nyc-dev
f9dbae88419bc5bb272a41cceadd1b4e318f5572 22-Feb-2016 Ruchi Kandoi <kandoiruchi@google.com> dumpstate: Remove deprecated /proc/wakelocks

Bug: 13930710
Change-Id: I64733a6093ca227aaee29fc58288a964b7b6b7f9
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
umpstate/dumpstate.cpp
88c7933df551f6dadd8cc931d104b01d6d1609e4 22-Feb-2016 Felipe Leme <felipeal@google.com> Improved dumpstate logging.

BUG: 26906985
Change-Id: Id439560504a365961337fddcca4ba6c1ef9f377d
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
60bbc2d2b6a8f4210af2b07bd604d6afbbc3acb2 22-Feb-2016 Calin Juravle <calin@google.com> Merge "Extract profile files in their dedicated folder" into nyc-dev
am: 085e02ec76

* commit '085e02ec76788474029a1b4e0d7c02bbbb482499':
Extract profile files in their dedicated folder
6a1648e2f161cb1d7c46aa9d27e8062521a9f314 01-Feb-2016 Calin Juravle <calin@google.com> Extract profile files in their dedicated folder

Current profiles (the ones which have not been used for
compilation) are stored in /data/misc/profiles/cur/0/pkgname/.

Reference profiles (the merged of all user profiles, used for
compilation) are stored in /data/misc/profiles/ref/pkgname.

The profile analysis flow has been changed to use profman
before calling dex2oat. profman decides if there is a need
for compilation and does the merging.

Bug: 26719109
Bug: 26563023
Bug: 26881016

Change-Id: I5a86ed5fd07a28e2e580f9c108428527ba7993b6
nstalld/commands.cpp
nstalld/globals.cpp
nstalld/globals.h
nstalld/installd_constants.h
nstalld/utils.cpp
nstalld/utils.h
2e6bfcfd6e712bd5f9e82eea5e783c1e9b072291 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Revert "Fix warnings in servicemanager and KeyCharacterMap""" into nyc-dev
am: 4318b9c88c

* commit '4318b9c88cca12485082687658ee3bab5ecd9013':
Revert "Revert "Fix warnings in servicemanager and KeyCharacterMap""
750f91cef9ce9cc5cba76661d921511750758252 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Fix warnings in servicemanager and KeyCharacterMap"" into nyc-dev
am: 3f0d762955

* commit '3f0d762955d4478256848fef92f7c5b105ff1509':
Revert "Fix warnings in servicemanager and KeyCharacterMap"
4318b9c88cca12485082687658ee3bab5ecd9013 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Revert "Fix warnings in servicemanager and KeyCharacterMap""" into nyc-dev
d57d9b900da83b1b5431d90e250f86c0047c618a 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Revert "Revert "Fix warnings in servicemanager and KeyCharacterMap""

This reverts commit b480269b0f8e933fa6fc6bd4c9e1e504e1b51508.

Change-Id: If405c0786c5bdd02e3f2c3356d56a4200c6b9dfb
ervicemanager/Android.mk
ervicemanager/binder.c
ervicemanager/service_manager.c
3f0d762955d4478256848fef92f7c5b105ff1509 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Merge "Revert "Fix warnings in servicemanager and KeyCharacterMap"" into nyc-dev
b480269b0f8e933fa6fc6bd4c9e1e504e1b51508 19-Feb-2016 Ian Pedowitz <ijpedowitz@google.com> Revert "Fix warnings in servicemanager and KeyCharacterMap"

This reverts commit d3b4c050f6bcdfd44bfb9c8ed885fd1c482c50bb.

Change-Id: I961f89d4446ac23f0e267c6541b504c4ec6b3af1
ervicemanager/Android.mk
ervicemanager/binder.c
ervicemanager/service_manager.c
1e34f4d5dc18965b4fa5dcd5211784c4438b59dd 19-Feb-2016 Colin Cross <ccross@android.com> Fix checkbuild
am: 527b5ecd6e

* commit '527b5ecd6e2453421d9d9371f2f932b5360c0a6d':
Fix checkbuild
527b5ecd6e2453421d9d9371f2f932b5360c0a6d 19-Feb-2016 Colin Cross <ccross@android.com> Fix checkbuild

Fix build breakage introduced by
I2e2acb15d1bc05c6ba09563a87d5baceebe7ebd9

Bug: 26936282
Change-Id: I944d758afd4d026a2d30b6816d88356a97ca70a5
ervicemanager/bctest.c
2d3dcdb8786578f9f5d001309f64b65aebc4a1d8 19-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix warnings in servicemanager and KeyCharacterMap" into nyc-dev
am: ee741270dd

* commit 'ee741270dd0c70f12a36a70c72dfeed428f1f273':
Fix warnings in servicemanager and KeyCharacterMap
ee741270dd0c70f12a36a70c72dfeed428f1f273 19-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix warnings in servicemanager and KeyCharacterMap" into nyc-dev
d3b4c050f6bcdfd44bfb9c8ed885fd1c482c50bb 19-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix warnings in servicemanager and KeyCharacterMap

- Suppress unused parameter warnings.
- Remove a few unused parameters.
- Set the correct formatting for size_t log.

Bug: 26936282
Change-Id: I2e2acb15d1bc05c6ba09563a87d5baceebe7ebd9
ervicemanager/Android.mk
ervicemanager/binder.c
ervicemanager/service_manager.c
cae752bea130d33a54c94ac5d30106ed70df278c 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix -Wgnu-designator warnigns in cmds/flatland/Main.cpp

Cherry-pick of https://android-review.googlesource.com/#/c/202956/

Bug: http://b/27068438
Change-Id: I83c56d8a0d19f6c86380b42b024331b5c262860a
latland/Main.cpp
0e93732cf1b32fb001d4e99e6f49b97aab91a247 17-Feb-2016 Bill Yi <byi@google.com> Merge commit 'db5c5bb0259fa024517d9a151726785facba4f02' into HEAD
90f0c71d462a3e6ce57e54cf2738dacacc0ebed2 17-Feb-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Add path for patching boot image" into nyc-dev
am: 5f15b52447

* commit '5f15b52447c547e4cf6172671c3e7139952adc6b':
Otapreopt: Add path for patching boot image
5f15b52447c547e4cf6172671c3e7139952adc6b 17-Feb-2016 Andreas Gampe <agampe@google.com> Merge "Otapreopt: Add path for patching boot image" into nyc-dev
5709b5758d75085aeab121db94e8d6dbafe0b7ae 13-Feb-2016 Andreas Gampe <agampe@google.com> Otapreopt: Add path for patching boot image

Add a path to use a preopted boot image during A/B OTA. This uses
a hard-coded check for the default preopted boot.art location.

Bug: 25612095
Change-Id: Ia6b954d5aca6b3455ac9feacdf9739fd964417e8
nstalld/otapreopt.cpp
d2f4a9e957d10b6108fa378bf440ae93257d9264 17-Feb-2016 Narayan Kamath <narayan@google.com> installd: fix path to code_cache.
am: 2f6d9e2fec

* commit '2f6d9e2fec8ab76ce35d5d6dee0a7838fc10b66c':
installd: fix path to code_cache.
2f6d9e2fec8ab76ce35d5d6dee0a7838fc10b66c 17-Feb-2016 Narayan Kamath <narayan@google.com> installd: fix path to code_cache.

Now exists in user_de, not user.

bug: 27216576
Change-Id: I9d50d9584de7b349fc9dfc829b690c20dd02eccd
nstalld/commands.cpp
4d04afa0a6f001e4fdf4d1891d9a4817a7b64032 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix -Wgnu-designator warnigns in cmds/flatland/Main.cpp" am: f4475023e7
am: 8b8d7741e6

* commit '8b8d7741e68ea10648369e1b80f8697413c22bfc':
Fix -Wgnu-designator warnigns in cmds/flatland/Main.cpp
8b8d7741e68ea10648369e1b80f8697413c22bfc 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Merge "Fix -Wgnu-designator warnigns in cmds/flatland/Main.cpp"
am: f4475023e7

* commit 'f4475023e728db1456a72b0e9a1292e11fb38245':
Fix -Wgnu-designator warnigns in cmds/flatland/Main.cpp
2660c7a85bd449e67df74c91d00309c443c1bb5a 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix -Wgnu-designator warnigns in cmds/flatland/Main.cpp

Bug: http://b/27068438
Change-Id: I3064950f761411fe5271c6259867ad437c71e66d
latland/Main.cpp
60292e5c8324475c5afbd0a6703b6b3ae2c94b1a 16-Feb-2016 Xia Yang <xiay@nvidia.com> dumpstate: remove length modifier on assignment suppressed scanf item

gcc throws warning for using the two together as there is no point specifying
storage size if the item is not to be stored. With -Werror enabled in this
module, such warning breaks the build under gcc compiling.

Change-Id: I6478c7cdb39f4709a63089191cc4ff541564cea4
umpstate/utils.cpp
861dd225fcd53f3e8d10469600648226c6e887cf 16-Feb-2016 Xia Yang <xiay@nvidia.com> dumpstate: remove -std=gnu99

-std=gnu99 no longer has effect now that dumpstate is C++.

The flag also break build if target platform is configured to default
gcc compiler since gcc throws warning for having -std=gnu99 when compiling
C++ and we have -Werror for the module.

Reproduce:
mm LOCAL_CLANG=false
...
error: command line option '-std=gnu99' is valid for C/ObjC but not for C++ [-Werror]

Change-Id: If1c272868ec4626873e7d91342b1fea51a15c52e
umpstate/Android.mk
23d6feba70063cd2cfea6473cfcb9339fd7ffe22 12-Feb-2016 Felipe Leme <felipeal@google.com> Changed permission of temporary bugreport and dumpstate log files to Shell.
am: 6fe9db67f6

* commit '6fe9db67f6c92d5fbf87d371da5cca412f672630':
Changed permission of temporary bugreport and dumpstate log files to Shell.
6fe9db67f6c92d5fbf87d371da5cca412f672630 12-Feb-2016 Felipe Leme <felipeal@google.com> Changed permission of temporary bugreport and dumpstate log files to Shell.

BUG: 27164100

Change-Id: I569cbe4854fad44c95c9bf3e2efa9c3c93317003
umpstate/dumpstate.cpp
01950f7d54f0623b3c7ce4c3bcf9af0812d5ed3c 12-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Split bugreport identifier into id and pid." into nyc-dev
am: 421c1c07e7

* commit '421c1c07e73ef91a8fb887ad0045f37335722b2e':
Split bugreport identifier into id and pid.
421c1c07e73ef91a8fb887ad0045f37335722b2e 12-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Split bugreport identifier into id and pid." into nyc-dev
8eaa0539dce19ceabfc0883f2a3756bd716378c8 11-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Send broadcasts as Shell." into nyc-dev
am: c30e3e7c09

* commit 'c30e3e7c095603c3c48b3c2691db80fec570c731':
Send broadcasts as Shell.
d5e724a4d3f77024d311b1b4e01846e41fdbe98b 11-Feb-2016 Felipe Leme <felipeal@google.com> Send broadcasts as Shell.

The BUGREPORT_STARTED was being sent as root, which would cause it to
bypass Shell restrictions when DISALLOW_DEBUGGING_FEATURES is set.

Also added the missing --receiver-background and unhardcoded shell's uid
from previous changes.

BUG: 26814173

Change-Id: I867361efafb96c7e709f83806a9301afc637a27e
umpstate/dumpstate.cpp
umpstate/utils.cpp
d46cd98bc39c82e9a6b87201db309c0d6968320d 11-Feb-2016 Srinath Sridharan <srinathsr@google.com> Split dumpsys into critical and non-critical sections.
am: fdf52d3697

* commit 'fdf52d3697aa0396bd9d8883892937b99a6772a0':
Split dumpsys into critical and non-critical sections.
fdf52d3697aa0396bd9d8883892937b99a6772a0 02-Feb-2016 Srinath Sridharan <srinathsr@google.com> Split dumpsys into critical and non-critical sections.

Order in which we report stats in bugreport can disrupt cpu and memory
stats. This CL sorts the bugreport process
from least impactful to most impactful to try and keep the
system stats as close to its initial state as possible throughout the BR (eg.
things like dumpsys meminfo should run before dumping thread stacks)

BUG: 26639621
Change-Id: I29dccfd423d83a6a69b7e025d45cb9cebfc41cc4
umpstate/dumpstate.cpp
umpstate/utils.cpp
a64e7575c35a415a658d8ec14654037d6e35b352 10-Feb-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: Continued build breakage" am: 16072e7e17
am: c01e8dc4a6

* commit 'c01e8dc4a687ae3445f68b8d005e2b29a84f6e7f':
dumpstate: Continued build breakage
c01e8dc4a687ae3445f68b8d005e2b29a84f6e7f 10-Feb-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: Continued build breakage"
am: 16072e7e17

* commit '16072e7e1717bcf1ea8be99eb7af90974dbbeeb7':
dumpstate: Continued build breakage
791ddd337080f66bcdb5a43608923cc046fefc20 10-Feb-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: Continued build breakage

- drop assignment length in scanf
- drop -std=gnu99 as invalid for C++

Change-Id: I924d2561069b3c289cb9deb475f732c46bb5a67e
umpstate/Android.mk
umpstate/utils.cpp
9eadec75146c78b4ac7f3e5d29ba75c1a9cdaf76 10-Feb-2016 Felipe Leme <felipeal@google.com> Fixed format.
am: 1b0225a479

* commit '1b0225a4792d92ff67ac8a0aa79352fad40bd805':
Fixed format.
1b0225a4792d92ff67ac8a0aa79352fad40bd805 10-Feb-2016 Felipe Leme <felipeal@google.com> Fixed format.

Change-Id: If0322e3dcf56005541aa08e0ab91dae10d2d385d
umpstate/dumpstate.cpp
6d658a2a473c6ff970d7e926cc03aec1c1e86e0f 10-Feb-2016 Felipe Leme <felipeal@google.com> Fixed C++ syntax.
am: 60869c9e1e

* commit '60869c9e1e91170d487715fc30b795d786630c54':
Fixed C++ syntax.
60869c9e1e91170d487715fc30b795d786630c54 10-Feb-2016 Felipe Leme <felipeal@google.com> Fixed C++ syntax.

Change-Id: I9702fdede589dd37cb498bbf63c0773816a7e3b8
umpstate/dumpstate.cpp
umpstate/dumpstate.h
a297c3258f6f7ea52cc2dcc42d62f85fda12a163 06-Feb-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: report process times

(cherry picked from commit 0751efa64cddfab69749236193e776058c9db595)

- Fix per-pid helper to pick up comm if cmdline is empty
and assume kernel thread.
- Add per pid report command line user time if not kernel thread,
system time and I/O time, plus percentage if non zero.

Bug: 26966375
Change-Id: I6b499f535cc3687eb468b32ae39e7d151dffb11f
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
8fecfdda012928bc2fe6d0e66fd4a4c912946254 09-Feb-2016 Felipe Leme <felipeal@google.com> Split bugreport identifier into id and pid.

Although 'pid' is more useful when diagnosing problems with the
bugreport workflow, it could be confusing to the end user. Hence, a
sequential id (started at 1 after a reboot) would be more useful.

BUG: 27076108
Change-Id: I6fd7ea8c703e8040034af183ef5cd35adfbcb4ef
umpstate/dumpstate.cpp
b01ccba97242fb123cfe0a132e7faf9cd164a8b9 09-Feb-2016 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of c1c11d20de to nyc-dev-plus-aosp.

Change-Id: Ia9520e7ac0d13b440ab5a83991585c03eccf00a0
c1c11d20de14476271c81b2d0f15ad2bf6e4b7a6 09-Feb-2016 Mark Salyzyn <salyzyn@google.com> Merge changes I6b499f53,If821ed21
am: c658aee7d6

* commit 'c658aee7d6dc56b1b3b1722412029830e966ba71':
dumpstate: report process times
Add option to #define _DUMPSTATE_DRY_RUN_ to skip the actual dumps.
0751efa64cddfab69749236193e776058c9db595 06-Feb-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: report process times

- Fix per-pid helper to pick up comm if cmdline is empty
and assume kernel thread.
- Add per pid report command line user time if not kernel thread,
system time and I/O time, plus percentage if non zero.

Bug: 26966375
Change-Id: I6b499f535cc3687eb468b32ae39e7d151dffb11f
umpstate/Android.mk
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
68116161c74676ae6f8577e5154aca774657ec60 11-Nov-2015 Felipe Leme <felipeal@google.com> Add option to #define _DUMPSTATE_DRY_RUN_ to skip the actual dumps.

(cherry picked from commit 93d705b6d742e8f00167ff2384e35c2205a6f9da)

Such option is useful when debugging dumpstate itself, since it will
finish much sooner and its output will be much smaller.

Change-Id: If821ed21715461bf82eea0b2be4b926239ad69da
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
cbce55d4fdbdd2e5a5515054c48d2116c5db2712 08-Feb-2016 Felipe Leme <felipeal@google.com> Improved dumpstate logging.

dumpstate generates 3 types of output:

- stdout: used for the bugreport itself and is redirected to a file
if requested.
- stderr: used for errors, is only useful when dumpstate is called from
adb (otherwise is ignored).
- ALOG: logged into logcat and available in the bugreport.

This current approach has 2 problems:

- stderr output is ignored when dumpstatet is called from bugreport
services.
- bugs on dumpstate are often hard to diagnose
(AKA 'Who watches the watchmen?').

This change mitigates these problems by redirecting stderr into a log
file (which will also be included in the bugreport notification) and by
keeping the .tmp file around (for the extreme cases where the .zip file
could not be generated or got corrupted).

BUG: 26906985
Change-Id: I73e7b1dd10ad9f83b7aa1043131ff3b74c426fdb
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
0078b180aeacc7b0cb89ec14cfa3326489392059 07-Feb-2016 Jeff Sharkey <jsharkey@google.com> Merge "Migrate default app data on non-FBE devices."
cc6281cf8146cddb8ace7cbd58c67321639c1520 07-Feb-2016 Jeff Sharkey <jsharkey@android.com> Migrate default app data on non-FBE devices.

When a system app requests "forceDeviceEncrypted" they expect their
default app storage to point at a consistent location regardless of
device FBE support. So when booting upgraded non-FBE devices, we
may need to migrate any data from CE to DE. Note that on non-FBE
devices these are just semantic locations with identical protection.

This migration *only* works for non-FBE devices; changing
forceDeviceEncrypted flags on an FBE device always requires a full
data wipe.

Bug: 26668510
Change-Id: I8bd5b8ba882e6bd067c0381041b27c35d6e47788
umpstate/dumpstate.rc
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
775415bf55aa602822c98ec46446c65cc54d4a35 06-Feb-2016 John Reck <jreck@google.com> Merge "Enable wildcard in the list of kernel functions" am: fda23631b9 am: ec3ae45d30
am: 2b71580ff6

* commit '2b71580ff6b444f53b9c24f86ad436696720b896':
Enable wildcard in the list of kernel functions
2b71580ff6b444f53b9c24f86ad436696720b896 06-Feb-2016 John Reck <jreck@google.com> Merge "Enable wildcard in the list of kernel functions" am: fda23631b9
am: ec3ae45d30

* commit 'ec3ae45d3094c5564f2689ede3eded5926953297':
Enable wildcard in the list of kernel functions
ec3ae45d3094c5564f2689ede3eded5926953297 06-Feb-2016 John Reck <jreck@google.com> Merge "Enable wildcard in the list of kernel functions"
am: fda23631b9

* commit 'fda23631b978bec793b67037dc2841a6a15531fb':
Enable wildcard in the list of kernel functions
fda23631b978bec793b67037dc2841a6a15531fb 06-Feb-2016 John Reck <jreck@google.com> Merge "Enable wildcard in the list of kernel functions"
010f15bb6dadc92e25cae52142ee13036adc5a73 05-Feb-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: refine calculated eMMC performance values" am: 088e7586ea am: 917b324e19
am: a960bc95b2

* commit 'a960bc95b2430ba01fc4b04b4527d32e00eeb4b5':
dumpstate: refine calculated eMMC performance values
a960bc95b2430ba01fc4b04b4527d32e00eeb4b5 05-Feb-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: refine calculated eMMC performance values" am: 088e7586ea
am: 917b324e19

* commit '917b324e19121766a9f8112d0fbc4424f172e615':
dumpstate: refine calculated eMMC performance values
917b324e19121766a9f8112d0fbc4424f172e615 05-Feb-2016 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: refine calculated eMMC performance values"
am: 088e7586ea

* commit '088e7586ea7d0103d1b5395172a4594eddbf5b4a':
dumpstate: refine calculated eMMC performance values
01d6c3935ace93f208fa3d93802b286e7484cfae 04-Feb-2016 Mark Salyzyn <salyzyn@google.com> dumpstate: refine calculated eMMC performance values

Correct the raw performance with the average queue depth. Add a
report for I/O per second, and the average queue depth. Round
values up.

Bug: 26966375
Change-Id: I2a8d233872d5e5ff79d433abba3c34d5945701f4
umpstate/dumpstate.cpp
6a45fb96bcc67f8266ec4c3aac513d64cd751610 05-Feb-2016 Jeff Sharkey <jsharkey@google.com> Merge "Follow constant refactoring in framework."
aaa1d4e930f653ec21b711eb852194c8abf35143 05-Feb-2016 David Brazdil <dbrazdil@google.com> installd: Run dex2oat with relative path to the APK

Previous CL (I6aaddffe79c55b9a6560c2d6542cf87abbd4fb11) started
passing the absolute path of an APK to dex2oat. This renders APKs
dexopted while in a temporary folder during install out-of-date when
moved to the final location.

Bug: 26409579
Change-Id: Icccf2d1bb34e2d5f4d98efae3c8f5609784abafd
nstalld/commands.cpp
a2c228770ea1cadc1d06406baad899b8c500389a 27-Jan-2016 Thomas Buhot <thomas.buhot@intel.com> Enable wildcard in the list of kernel functions

The handling of the -k option is too restrictive
as it stricly checks the names of the kernel functions
after it wrote them in /d/tracing/set_ftrace_filter.

However, a common usage of that function filtering with ftrace
is to use a wildcard character (*) that the ftrace tracer
automatically expands to all the matching kernel functions.

This enables the support of the wildcard (*) character
in the -k option to trace kernel functions.

Change-Id: Ifffae975c20e1c253157a3a6b44a14b4f342b9d0
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
trace/atrace.cpp
aa7ddfd8347fa947618a7668b013521e95722c5c 03-Feb-2016 Jeff Sharkey <jsharkey@android.com> Follow constant refactoring in framework.

Bug: 25796509
Change-Id: Ib19aa570fb5fbf26752c5487f1221c9959b1143a
nstalld/commands.cpp
nstalld/installd_constants.h
27eabcc8a2f7afc8776a73d27443fc7f98918374 04-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Added --skip option to skip services."
85b3c70ed574f790b60e3633dfbf7649533635a1 04-Feb-2016 Felipe Leme <felipeal@google.com> Merge "Added --help option to dumpsys."
41fdcbfa119698122cae9913ea85ea1d2cf9668a 03-Feb-2016 Mathieu Chartier <mathieuc@google.com> Create app images only if dalvik.vm.appimageformat property exists

If the dalvik.vm.appimageformat property does not exist, do not
generate an application image.

Other improvements:
unlink app image if the property is not set, or we are extract only.

Bug: 22858531
Change-Id: I50d8b66787a4e8b6135ad2b00744c7f1ae7c7f53
nstalld/commands.cpp
859aef6a32ba03aae8e487078deb469a3ff84e6b 03-Feb-2016 Felipe Leme <felipeal@google.com> Added --skip option to skip services.

This option will be used by dumpstate so critical services (like meminfo
and cpuinfo) can be dumped earlier on and then skipped later (when the
rest of the services are dumped).

BUG: 26639621
Change-Id: Ied61431c4d03d7d2eb010edd77872fb7e6bae3bd
umpsys/dumpsys.cpp
416fa12cd0949c7f12e2067b36ac7ac64ba70b4a 03-Feb-2016 Mathieu Chartier <mathieuc@google.com> Pass app image format property to dex2oat

Enables using lz4 for app images.

Bug: 22858531

Change-Id: Ife2bca8883c2868d30b45e0eec210f96d589068e
nstalld/commands.cpp
e80d58db65d29ed4647e631a81aed644fea00913 03-Feb-2016 Mathieu Chartier <mathieuc@google.com> Avoid generating app images for extract only

The extract only app images have no resolved classes and only
contain dex cache arrays.

Bug: 22858531
Change-Id: I4351ef374f66d2882cc23fca14495e63a0e30e89
nstalld/commands.cpp
bbfd2b89434e57cb0720d59383b5bf5339492028 03-Feb-2016 Felipe Leme <felipeal@google.com> Added --help option to dumpsys.

When invoked with --help, dumpsys will print:

usage: dumpsys
To dump all services.
or:
dumpsys [--help | -l | SERVICE [ARGS]]
--help: shows this help
-l: only list services, do not dump them
SERVICE: dumps only service SERVICE, optionally passing ARGS to it

BUG: 26639621
Change-Id: Ic7f7a5ec80fb3da1dc5a412b07ef2859d31b09d2
umpsys/dumpsys.cpp
c1af8c2dde672f3b9a8a8b5e5ae6e91906f9ce52 03-Feb-2016 Mathieu Chartier <mathieuc@google.com> Merge "Avoid unlinking app image file"
111b9d06cc0fc72438782c9234f28675e5077ef4 03-Feb-2016 Felipe Leme <felipeal@google.com> Improved how the Shell directories are created.

When dumpstate is run for the first time, the
/data/data/com.android.shell/files/bugreports does not exist, which was
crashing dumpstate because the code that added the version.txt entry was
not checking if the zip_writer was NULL.

The crash itself was fixed by adding a sanity check in the functions
that add entries to the zip file, but that only hid the real problem:
it is necessary to create the parent directories before creating the zip
file, otherwise the first run will always generate a .txt file (since
dumpstate falls back to .txt when it cannot create the .zip).

This change also improves how the parent directories are created by
checking if they exist first, rather than always calling mkdir().

BUG: 26949960

Change-Id: I1434be5c36a3fad0b3a2a26c7eaaab03a1228c30
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
809d74e92c16cf694c929b8ca2b54515af13e9fe 02-Feb-2016 Felipe Leme <felipeal@google.com> Added metadata entries to zipped bugreport:

- version.txt: bugreport format version
- main-entry.txt: name of the entry containing the main bugreport (flat file)

Also documented the zip format versions on bugreport-format.txt.

BUG: 26910355
BUG: 26639621

Change-Id: I76b9f6d330c36ad554fae8e691c9ea3ab3c97edd
umpstate/bugreport-format.md
umpstate/dumpstate.cpp
c2a3d7aa1636d1fda62d65d7bd557a26428f1380 02-Feb-2016 Andreas Gampe <agampe@google.com> Merge "Installd: Introduce otapreopt"
73dae11162aa61396c06cbdb05b954764e944e02 19-Nov-2015 Andreas Gampe <agampe@google.com> Installd: Introduce otapreopt

Add a tool for dexopt during OTA. The tool will use /data/ota as
an ANDROID_ROOT wrt/ the dalvik-cache, compiling a new boot image
and system apps into this directory. Other apps will be compiled
to odex files suffixed with ".b".

Bug: 25612095
Change-Id: I6ac382973f13850f6b37402a1b2330c0014b47d9
nstalld/Android.mk
nstalld/installd.cpp
nstalld/installd_constants.h
nstalld/otapreopt.cpp
nstalld/string_helpers.h
nstalld/system_properties.h
608385dd151e36a93f3e3f4a7514b1e720d20ae9 01-Feb-2016 Felipe Leme <felipeal@google.com> Redirect output to file ASAP, otherwise printf() calls might be missed.

Also removed the duraction reporter on add_zip_entry_from_fd - since it
was spamming the report and the timing could be infered by calculating the
delta between each ALOGD entry anyways - and logged PID and statistics.

BUG: 26885492
Change-Id: Iadb00957daac68b7a40b0e36ee5cce2b82264588
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
310c5e70b2e36df36811b6de7ad5c2ebd82338e5 29-Jan-2016 Mathieu Chartier <mathieuc@google.com> Avoid unlinking app image file

Avoid erasing the image file in installd in case we abort compilation
due to no new profile data. This prevents the application image file
being turned into a 0 byte file in this case.

The ART image writer erases the file before writing.

Bug: 22858531
Change-Id: I0b35905698662cef80eecfc350e5504bf62a5ac1
nstalld/commands.cpp
e37d62803210f258ddb843c7d8d0494127069342 29-Jan-2016 Jeff Sharkey <jsharkey@android.com> Remove "updatecmds" feature.

This feature is very old and hasn't been used in many releases. In
addition, it was never taught about multi-user layouts, and it would
be incredibly hard to maintain in the new FBE world where CE keys
may not appear until several reboots after an OTA.

Bug: 26854442
Change-Id: Ibd8660e2a727469cd5ae41dab5e1014a9cfb6748
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/installd_constants.h
0b53106639154710039fc4185662f2b4101e8e91 29-Jan-2016 Felipe Leme <felipeal@google.com> Merge "Proper fix of am args."
43fd1bbc6675430a4ecfde07e88a414ed5c41c0c 29-Jan-2016 Felipe Leme <felipeal@google.com> Proper fix of am args.

BUG: 26871362
Change-Id: If3411b69ea1feef827cd23ef81baa8c0ffeaa309
umpstate/dumpstate.cpp
942c50d1e5fa92a8e9b5c5a20a6918ee72ee68f2 29-Jan-2016 Felipe Leme <felipeal@google.com> Merge "Fixed usage --receiver-foreground on am call."
b0b4aa2d1df3c2c1f591776083a33cd28ad306bd 29-Jan-2016 Felipe Leme <felipeal@google.com> Fixed usage --receiver-foreground on am call.

BUG: 26871362
Change-Id: Ied8e663eec59c83a06a8f2a6e2908c02ac1558c8
umpstate/dumpstate.cpp
umpstate/utils.cpp
f5248da50134b087cbe8b58d2e1d2310537911e3 28-Jan-2016 Chien-Yu Chen <cychen@google.com> dumpstate: enable cameraserver

Enable bugreport callstack dump for cameraserver.

Bug: 24511454
Change-Id: I8f4b14a95b3a1abedc4cf072335f0f31b18006af
umpstate/utils.cpp
83cfc439d07b9f2381cad577b3dbc701a50a9dee 21-Oct-2015 Mathieu Chartier <mathieuc@google.com> Application image support for installd DO NOT MERGE

DO NOT MERGE

sort of
(cherry picked from commit edc8bc48fbf143e35578bf6cccf980dfab076196)

Bug: 22858531

Change-Id: I5a9dfcf67d2232e8755886085e9ba1bb37494d39
nstalld/commands.cpp
c19f9a1f088966369f2540cfa29e8ff8886da05a 28-Jan-2016 Chien-Yu Chen <cychen@google.com> Merge changes from topic 'camera-hardening'

* changes:
media: Add a metadata type for native handle from camera
Restart cameraserver when servicemanager restarts
4e9344367260d4dc7f876235109ddda43da05d7b 28-Jan-2016 Mathieu Chartier <mathieuc@google.com> Merge "Pass application image fd to dex2oat"
edc8bc48fbf143e35578bf6cccf980dfab076196 21-Oct-2015 Mathieu Chartier <mathieuc@google.com> Pass application image fd to dex2oat

Open application image and pass the fd to dex2oat.

Bug: 22858531

Change-Id: I5a9dfcf67d2232e8755886085e9ba1bb37494d39
nstalld/commands.cpp
edb0b0c309dd1a48d127f691e6d9b29392d1af44 27-Jan-2016 Felipe Leme <felipeal@google.com> Pass --receiver-foreground to AM intents.

BUG: 26805230
Change-Id: I29181367522353817c730b398550a738a4776594
umpstate/utils.cpp
770410dcf2f72cf4e806442263e63719a0be0f5a 27-Jan-2016 Felipe Leme <felipeal@google.com> Fixed performance issue by moving buffer allocation outside loop.

Also improved logging.

BUG: 26637170
BUG: 26777547
Change-Id: I99511f3f71c58eba1f5539508f9a685d0a58cc58
umpstate/dumpstate.cpp
umpstate/utils.cpp
876de450004b02b9c028ece0d3ca850504caaa4d 26-Jan-2016 Mark Salyzyn <salyzyn@google.com> Merge "Revert "dumpstate: Add security log dump"" am: 316923d359
am: fd0d76730f

* commit 'fd0d76730f06bec15c90e9a9da64ee19361c3a9f':
Revert "dumpstate: Add security log dump"
fd0d76730f06bec15c90e9a9da64ee19361c3a9f 26-Jan-2016 Mark Salyzyn <salyzyn@google.com> Merge "Revert "dumpstate: Add security log dump""
am: 316923d359

* commit '316923d3597af72d1cbd9eb2745a02706275fdb8':
Revert "dumpstate: Add security log dump"
43afe5d0b537999d5de9613626eca24f34cc52ef 26-Jan-2016 Mark Salyzyn <salyzyn@google.com> Revert "dumpstate: Add security log dump"

This reverts commit c7ad8cb82f035576c28707a8cbeb16b7ead2a4e7.

Bug: 26029733
Change-Id: I0c61f4d2c0aa9e07c6cc7b190d803e98c3a98d40
umpstate/dumpstate.cpp
f3599b35c5f7f86cced0f3386a6c80e0b552f358 26-Jan-2016 Nick Kralevich <nnk@google.com> dumpstate.cpp: collect command line earlier

We need to collect the command line before we use it.

Bug: 26777547
Change-Id: I715adce62511c4cc553eb462d853559687a1677f
umpstate/dumpstate.cpp
abc47e39adcc034c60a06abc8c0acc6f7dfad8bc 04-Dec-2015 Chien-Yu Chen <cychen@google.com> Restart cameraserver when servicemanager restarts

Bug: 24511454
Change-Id: I50187d506ebe8a1e2debe82b2c2a8d0f7b3f6523
ervicemanager/servicemanager.rc
b0fad6d04ba05fbad5ce31c7382be174ed5a70b1 30-Dec-2015 David Brazdil <dbrazdil@google.com> installd: Rename USEJIT to EXTRACTONLY

Change-Id: I8d68e32dd9bbb7f6eee2f3aad886792d85cb12ca
nstalld/commands.cpp
nstalld/installd_constants.h
9a034c2ada5bd513619b72729071a10528f158ad 19-Jan-2016 Calin Juravle <calin@google.com> Merge "Add profile guided compilation hooks in installd"
60a794dc845b942907ca035ddc554eb8e0c7ebb6 23-Dec-2015 Calin Juravle <calin@google.com> Add profile guided compilation hooks in installd

Bug: 26080105
Change-Id: I6aaddffe79c55b9a6560c2d6542cf87abbd4fb11
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
eecb2d205366351af42fd0cd9e1a95de3980764e 12-Jan-2016 Janis Danisevskis <jdanis@google.com> Change permissions of apps' home dir to 0700 for SDK > 23

This patchset changes the installd such that apps' home
directory has permissions set to 0700 if build for a
target SDK version. In consequence the commands

create_app_data and move_complete_app

get one more parameter, the target SDK version.
Apps built for a lower SDK version will still have
home directories with permissions set to 0751.

Bug: 7208882
Change-Id: I0213834dd946c72f5d7e31965a9dc517ced268db
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
e02657d627a85628ec6f0f398fb85283b8d91bfa 13-Jan-2016 Jeff Sharkey <jsharkey@android.com> Remove older migration code.

We used to offer to migrate pre-multi-user devices to the new
multi-user layout around JB, but the new layout has been the default
for many years now, so it's safe to remove this logic.

All core directory creation is now handled by init.rc where FBE
policies can be setup correctly, so we shouldn't be in the business
of doing system bootstrapping here.

Remove some lingering FBE debugging code.

Bug: 26466827
Change-Id: I1dfe9c8fc02b64013a5c45cea99bf8f61f7d1d5b
nstalld/installd.cpp
nstalld/utils.cpp
nstalld/utils.h
a03c747ff6e1afb5c1dc86560705bd979cd5c49f 13-Jan-2016 Jeff Sharkey <jsharkey@android.com> Still not safe to mutate DE on secondary users.

Bug: 25796509, 26535916
Change-Id: I694b4a1b5fe3e31578f431bcddf7d6c4070f7852
nstalld/commands.cpp
c7d1b2250e8245a7e4e144758bc3ccd33b8d6319 11-Jan-2016 Jeff Sharkey <jsharkey@android.com> Let callers specify which storage to operate on.

Since CE and DE storage can have different availability lifecycles,
callers can't operate on both at the same time. Let them use flags
to specify which storage to work with.

Remove old unused methods, and name consistently in preparation for
eventual move to AIDL.

Bug: 26466827
Change-Id: Id5d7d03f5d8814864eea801f5a46496c085afdff
nstalld/commands.cpp
nstalld/commands.h
nstalld/installd.cpp
nstalld/installd_constants.h
35f475653c2ca922acc358c607b204c8fafd6ad5 12-Jan-2016 Dan Stoza <stoza@google.com> Merge "Revert "libgui: Remove custom BufferQueue allocators""
70982a5f95f68295244e5f6cc037c193713a5259 12-Jan-2016 Dan Stoza <stoza@google.com> Revert "libgui: Remove custom BufferQueue allocators"

This reverts commit acd56150573d3a6d449c0de01f93c6f269d121e3.

Change-Id: I877f63a57fbddb4dcff71b3909b460ecc05981eb
latland/GLHelper.cpp
latland/GLHelper.h
0dc12aa5fc8e3db2f3342884b7d8c1a8d8aabe4a 11-Jan-2016 Dan Stoza <stoza@google.com> Merge "libgui: Remove custom BufferQueue allocators"
acd56150573d3a6d449c0de01f93c6f269d121e3 08-Jan-2016 Dan Stoza <stoza@google.com> libgui: Remove custom BufferQueue allocators

Removes the ability to set a custom GraphicBuffer allocator for a
BufferQueue. Custom-allocated buffers may still be used through the
attachBuffer call.

Change-Id: I127bdfb496fc089a61c7e266c8bd2b906d41f32e
latland/GLHelper.cpp
latland/GLHelper.h
cbbdf73608bace91270622034e4813a2355b7bf1 07-Jan-2016 Michal Karpinski <mkarpinski@google.com> Improvements for SHA256_file_hash()

Bug: 26154009
Change-Id: I7cee0563edb7e8030716ae2925a940f3c158721e
umpstate/dumpstate.cpp
4db754fd7c13993d81d98157f10e8015422d1e3a 11-Dec-2015 Michal Karpinski <mkarpinski@google.com> dumpstate.cpp changes to accomodate remote bugreports

Added four new commands to dumpstate() - route, printenv, netstat
and lsmod.
Added -R flag for remote bugreports, which will send
android.intent.action.REMOTE_BUGREPORT_FINISHED broadcast with an extra
SHA256 hash counted by a new method SHA256_file_hash(path).

Bug: 26154009
Change-Id: Ibd7cb8f38dfc8f0fa3fda3e56dcd04b7d1fe68b9
umpstate/Android.mk
umpstate/dumpstate.cpp
c9677274372318e2b1cd817c24cd44f312aee662 07-Jan-2016 Michal Karpinski <mkarpinski@google.com> Merge "Adding new bugreportremote service"
635ca31754ae734b0c540ac5600d58ae55cd4237 05-Jan-2016 Felipe Leme <felipeal@google.com> Include mount info on zipped bugreport.

BUG: 7280247
Change-Id: Iae2a7881c11564c8dbd3641f5ee5ab72c181da2a
umpstate/dumpstate.cpp
umpstate/utils.cpp
a700b5a68f1dd58efb460757bc8d6aacc6a98fc0 05-Jan-2016 Colin Cross <ccross@android.com> Merge "libinstalld: add dependency on libselinux" am: 9dee30750e
am: 3c2103ef33

* commit '3c2103ef33d40b95f773cc2224f0399833b1a8cc':
libinstalld: add dependency on libselinux
3c2103ef33d40b95f773cc2224f0399833b1a8cc 05-Jan-2016 Colin Cross <ccross@android.com> Merge "libinstalld: add dependency on libselinux"
am: 9dee30750e

* commit '9dee30750e85dcfc02fb9fd4cc6169957de91d0b':
libinstalld: add dependency on libselinux
9dee30750e85dcfc02fb9fd4cc6169957de91d0b 05-Jan-2016 Colin Cross <ccross@android.com> Merge "libinstalld: add dependency on libselinux"
e82a27d0c1e3f2cef6f13a1a9efff55638601752 05-Jan-2016 Felipe Leme <felipeal@google.com> Adds recovery files when writing to zip file.

BUG: 25351711
Change-Id: I3bac7a0d3a6f388b46570595d22436f0a4f74bee
umpstate/dumpstate.cpp
0c80cf0caaf5dce5ef4d0265b249bd1ec680cca1 05-Jan-2016 Felipe Leme <felipeal@google.com> Adds all tombstone files when writing to zipped file.

Currently, a bugreport simply cats any tombstone file modified in the
last half an hour into the bugreport. This is a problem since the
tombstones contain a lot of really valuable information, and sometimes
users don't get a bugreport in this time frame. In addition, some of our
monkey testing has the same problem.

Since now dumpstate can create a zip file, we can include all directly
on it, although still using the old mechanism when it's creating it (for example, when invoked through 'adb bugreport').

BUG: 25974224
Change-Id: Ie29fd7d91953d91232b0db1c9588043aee13f93e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
1e9edc619c6b1ca3998a26eaa4882b55ce801f12 22-Dec-2015 Felipe Leme <felipeal@google.com> Refactored zipfile generation.

Previously, the bugreport.zip was only created at after dumpstate
finished, at which point the temporary file was added to it.

With this refactoring, the bugreport.zip is created earlier on and the
temporary file is added at the end: although this change doesn't alter
the final result, it allows future changes to add more files to the .zip

BUG: 26293568
Change-Id: Ic0a111d009aac954c9746130df226a2dfeb679bc
umpstate/dumpstate.cpp
c41017f1c29f44c5690095bfb6fc07c605459005 05-Jan-2016 Felipe Leme <felipeal@google.com> Merge "Prints out how long it takes to generate each section."
78f2c86235d5882a8dc84c85a1c1864062e5f3af 21-Dec-2015 Felipe Leme <felipeal@google.com> Prints out how long it takes to generate each section.

It's done using a DurationReporter helper class that prints starts
counting when constructed and prints the duration when destructed.

Typical usage:

function do_something() {
DurationReporter duration_reporter(title);
// Do something.
}

Change-Id: I87134d9a1b003300384376c242a3c034a46244c4
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
ff1697c120a5d97a61307709fc2227830ceefa38 24-Dec-2015 Nick Kralevich <nnk@google.com> Merge "More O_CLOEXEC" am: 43e4260831
am: 66824c36ce

* commit '66824c36ce08ae86a057440e33a5fe1a23ef01f1':
More O_CLOEXEC
66824c36ce08ae86a057440e33a5fe1a23ef01f1 24-Dec-2015 Nick Kralevich <nnk@google.com> Merge "More O_CLOEXEC"
am: 43e4260831

* commit '43e4260831cc3d0d96c05fe18a8cad3018b5795f':
More O_CLOEXEC
0fe7ce375ed6c9fcd86b8bb3a836bc37c9740831 24-Dec-2015 Nick Kralevich <nnk@google.com> More O_CLOEXEC

Change-Id: I31991ed089f395174857e86e509b8190ad98f92a
ervicemanager/binder.c
4213ebe488949ff50d78944b027afd1865e8d05f 22-Dec-2015 Colin Cross <ccross@android.com> libinstalld: add dependency on libselinux

libinstalld uses headers from libselinux, add a LOCAL_SHARED_LIBRARIES
dependency on libselinux.

Change-Id: Ic12c55547526638810bcc1ac952d205f2f163fd3
nstalld/Android.mk
6834ea7ee3338066e44235c990da1ab75417e33e 21-Dec-2015 Felipe Leme <felipeal@google.com> Removed the -p option since screenshots are now taken by Shell.

BUG: 26274653
Change-Id: I55760fe01bded0d194f2c56ebc809d555ceedf77
umpstate/dumpstate.rc
03d61d95fa6a321bf26548b320a1a9c8dc78e124 18-Dec-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: increase logcat timeout to 40 seconds (DO NOT MERGE)

- temporary measure until root issues can be resolved.

Bug: 23685592
Change-Id: Ia33f4e3928a457c3dcd730ad2c2c57d13fbf133d
umpstate/dumpstate.c
b922d6941c257f39af42d4dd4c66e6657b9bae73 15-Dec-2015 Michal Karpinski <mkarpinski@google.com> Adding new bugreportremote service

Bug: 26152603
Change-Id: Ibe5c908f69b0f2cd704ab5c7f71a7ff13da021e3
umpstate/dumpstate.rc
e28d4180ebefdac9c4c5cae0e94ad29bdc5a51de 17-Dec-2015 Nick Kralevich <nnk@google.com> Merge "atrace.rc: tracing should be disabled by default." am: cbd4cc737c
am: 982e451512

* commit '982e4515128f69638249427715ad9bb321361aa8':
atrace.rc: tracing should be disabled by default.
982e4515128f69638249427715ad9bb321361aa8 16-Dec-2015 Nick Kralevich <nnk@google.com> Merge "atrace.rc: tracing should be disabled by default."
am: cbd4cc737c

* commit 'cbd4cc737cc99b2ae7ac22ca4b2bb52b86b8e6ae':
atrace.rc: tracing should be disabled by default.
cc7f8ad7d5837e764fdc6242839213c20e7f84fc 16-Dec-2015 Nick Kralevich <nnk@google.com> atrace.rc: tracing should be disabled by default.

Bug: 26217098
Change-Id: I6066c433d19c2d1c220669a9a78f5085af8c1d4b
trace/atrace.rc
9609bbd79668dbc3c8c16c773c92637de98bfa70 15-Dec-2015 Andy Hung <hunga@google.com> dumpstate: add audioserver

enable bugreport callstack dump of /system/bin/audioserver

Bug: 24511453
Change-Id: I1c73c2ec299913b717e69b357bd669babafe58d1
umpstate/utils.cpp
32a59625e0a70eb38648320ddde84e6c91cc9cef 15-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Migrated dumpstate to C++."
am: 1f62517b36

* commit '1f62517b3654a3c0e95ea4d5b3664fac8115acdf':
Migrated dumpstate to C++.
515eb0db0a03de0a721ef034b3f3898e1d7e42e7 15-Dec-2015 Felipe Leme <felipeal@google.com> Migrated dumpstate to C++.

Changes required:

- Explicity casting function pointers.
- Moving variables initialization before 'goto' statements.
- Changing string references from 'char *' to 'const char *'.
- Using 'extern "C"' so device-dependent implementation of
'dumpstate_board()' can be written in C or C++.

BUG: 25563823

Change-Id: Ibeb70fd23e64e9b530736b554a372cb232fe1a44
umpstate/Android.mk
umpstate/dumpstate.c
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/libdumpstate_default.c
umpstate/libdumpstate_default.cpp
umpstate/utils.c
umpstate/utils.cpp
f1d82f4aca7e6b535aa74464906fb06c9807c0af 14-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Moved 'bugreportplus' from init.rc to dumpstate.rc"
8d1d572f907fe68e666f8d77dd30b7b15afd9a45 14-Dec-2015 Felipe Leme <felipeal@google.com> Moved 'bugreportplus' from init.rc to dumpstate.rc

BUG: 26034608
Change-Id: I633a5c0ca34ab60cfd5b9c8052b546970288d9d6
umpstate/dumpstate.rc
c545a3ae0b89766194ab4d7380dfc5cccaa4d5be 14-Dec-2015 Greg Hackmann <ghackmann@google.com> Merge "atrace: add database tag" am: 8b9c0e1af1
am: 361515a9b5

* commit '361515a9b5c64f625305d0824048bb65a71c9595':
atrace: add database tag
361515a9b5c64f625305d0824048bb65a71c9595 14-Dec-2015 Greg Hackmann <ghackmann@google.com> Merge "atrace: add database tag"
am: 8b9c0e1af1

* commit '8b9c0e1af14bf07b216edd1b995048790ddabaca':
atrace: add database tag
8b9c0e1af14bf07b216edd1b995048790ddabaca 14-Dec-2015 Greg Hackmann <ghackmann@google.com> Merge "atrace: add database tag"
dca3004731b77dad2bdb26336e0061f63bacf35c 14-Dec-2015 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: Add security log dump" am: bc611a1d3e
am: 0c124edf7c

* commit '0c124edf7c633588e300f1855d22739194ba7194':
dumpstate: Add security log dump
0c124edf7c633588e300f1855d22739194ba7194 14-Dec-2015 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: Add security log dump"
am: bc611a1d3e

* commit 'bc611a1d3e2beea849a251fecda096ed142519a6':
dumpstate: Add security log dump
c7ad8cb82f035576c28707a8cbeb16b7ead2a4e7 11-Dec-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: Add security log dump

Bug: 26029733
Change-Id: I2e5b44d642bbac7f62f63388dd8a3123f2abeafe
umpstate/dumpstate.c
0ce5c9846967ab5339de133cc75d933a9ff8dcfc 11-Dec-2015 Andy Hung <hunga@google.com> Merge "Restart audioserver if servicemanager restarts"
7def230c05111876d44f56cd2a4f711b4b408c48 11-Dec-2015 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: build breakage @2482293" am: c93d0937e4
am: 8197219a6e

* commit '8197219a6e34d72174fc69ff60608afec912a4f4':
dumpstate: build breakage @2482293
8197219a6e34d72174fc69ff60608afec912a4f4 11-Dec-2015 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: build breakage @2482293"
am: c93d0937e4

* commit 'c93d0937e4e86a260f4dc6b91971b6750f67a3f3':
dumpstate: build breakage @2482293
4b45d6732c649aa15799076d68e5fb5a170819bc 11-Dec-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: build breakage @2482293

aosp is in C, internal is C++, struct must be explicit

Bug: 24200279
Change-Id: I1c9d8156a86db6de73ee5b70063e63b38170b052
umpstate/utils.c
f55d402132afa4b9dd38aa69e50ec7b7efb1927c 11-Dec-2015 Mark Salyzyn <salyzyn@google.com> resolve merge conflicts of 01c1129fe6 to master.

Change-Id: I84f862b4858ecc97461750833a0e6f9cf96c34c4
01c1129fe60785ee7b5707fbaabf24f44f030c13 11-Dec-2015 Mark Salyzyn <salyzyn@google.com> Merge "dumpstate: Dump eMMC 5.0 stats"
am: f9b3fc457f

* commit 'f9b3fc457f22be834e6bc6c3f704d7ddb38dcbb8':
dumpstate: Dump eMMC 5.0 stats
8c8130eb68c89987a94db084608a4229bad06c18 09-Dec-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: Dump eMMC 5.0 stats

Extended csd EXT_CSD_REV, PRE_EOL_INFO, DEVICE_LIFE_TIME_EST_TYP_A,
and DEVICE_LIFE_TIME_EST_TYP_B fields printed if available. Allow
dumpstate access to /sys/kernel/debug/mmc0/mmc0:0001/ext_csd.

Bug: 24200279
Change-Id: I310bdcf546a9307cf927f109359ad5a6d24b70f8
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/dumpstate.rc
umpstate/utils.c
8c5ac0a92605a62bff21c23c520ecbf833d683bc 09-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Fixed logic that was passing NULL to a std::string parameter and crashing dumpstate."
3634a1e3459cb609da709646107e246cafbc01f9 09-Dec-2015 Felipe Leme <felipeal@google.com> Fixed logic that was passing NULL to a std::string parameter and
crashing dumpstate.

BUG: 8420215
Change-Id: If2f3ebad559683b5b6a8c2209de93ac3bec4fb1e
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
b744ac2a7d537dd7227a23ebfc43cff0259dee27 09-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Take screenshot right away when invoked with -P."
02d0de56c75347a0cb8d5a8565dc8c4ee7616057 12-Nov-2015 Andreas Gampe <agampe@google.com> Installd: Refactor in preparation for OTA

Refactor installd code so reuse with a few key plugin functions is
possible. Do a bit of code cleanup.

Bug: 25612095
Change-Id: I544604f0a391583a4c07887a8234343a3a255942
nstalld/Android.mk
nstalld/commands.cpp
nstalld/commands.h
nstalld/globals.cpp
nstalld/globals.h
nstalld/installd.cpp
nstalld/installd.h
nstalld/installd_constants.h
nstalld/installd_deps.h
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
nstalld/utils.h
9dc117c415d0df0a3acd900709d05deabe975704 07-Dec-2015 Elliott Hughes <enh@google.com> Track rename from base/ to android-base/.

Change-Id: I13839256a0fb159a3b53009c2cb6b0fa639bad2e
umpstate/dumpstate.cpp
e338bf60701e5b955ab0a097f2631f2190218894 07-Dec-2015 Felipe Leme <felipeal@google.com> Take screenshot right away when invoked with -P.

Traditionally, the screenshot was not taken right away because it could
skew other services like the Surface Flinger, and such approach often
resulted on irrelevant screenshots.

Now there is more user-friendly workflow, where the bugreport progress
is shown in the UI and the user can take further actions. In this
workflow, it's ok to take the screeshot right away, since the other
features might already be causing interference: if the user doesn't want
interference, the old workflow should be used instead.

Since the new workflow requires the -P (for Progress) parameter, such
parameter can also be used to determine when to take the screenshot.

Also added progress statistics at the end of the bugreport.

BUG: 8420215
Change-Id: I9dad8ea59d47848f217182ccec0f527b42e07f50
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
32717f851ec39e44b43dcd2053b091daff5e1753 07-Dec-2015 Todd Kennedy <toddke@google.com> Merge "Create new ephemeral app directory"
c7b8a11974f0bf0b13f47b9fb40059b1c50ec9b6 05-Dec-2015 Elliott Hughes <enh@google.com> Merge "Track rename from base/ to android-base/." am: f31cf3ab0f am: c21980bc12
am: 803823f8b6

* commit '803823f8b6663578922be595755351a9e710d93c':
Track rename from base/ to android-base/.
803823f8b6663578922be595755351a9e710d93c 05-Dec-2015 Elliott Hughes <enh@google.com> Merge "Track rename from base/ to android-base/." am: f31cf3ab0f
am: c21980bc12

* commit 'c21980bc12db67c763a18b1abaa3ddd3689b1687':
Track rename from base/ to android-base/.
c21980bc12db67c763a18b1abaa3ddd3689b1687 05-Dec-2015 Elliott Hughes <enh@google.com> Merge "Track rename from base/ to android-base/."
am: f31cf3ab0f

* commit 'f31cf3ab0f53394200c0f22a4591db741ba1ccb0':
Track rename from base/ to android-base/.
e4ec9eb7b4c452493589983970ba5ccc501728d1 05-Dec-2015 Elliott Hughes <enh@google.com> Track rename from base/ to android-base/.

Change-Id: I62c18891ffe319d20ff084f5ca2aa0c038c23cd3
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/utils.cpp
e902acb2ec74bc1b3cbf2359283e3bd9eccd88e9 04-Dec-2015 Martijn Coenen <maco@google.com> Merge "DO NOT MERGE: add support for new sched tracepoint" into mnc-dr1.5-dev
ad5f6c475934ac6a658a203069a9f055540946e7 30-Nov-2015 Felipe Leme <felipeal@google.com> Minor improvements in the bugreport progress workflow:

- Allow users to rename the suffix in the bugreport files by setting the
dumpstate.pid.name system property. For example, instead of
bugreport-2015-12-02-15-23-46, it could be bugreport-My-App-Crashed.

- Dynamically adjust the max weight if the current progress overflows
the previous max (and set the dumpstate.pid.max system property
accordingly, so UI can be updated as well).

- Strip .txt from the name sent on BUGREPORT_STARTED.

BUG: 25794470
Change-Id: I7634ddd2975bcf93d6612d16c09da1cd7b4e1d91
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
5c1a910e6a2d2c42002dc6ed88ff770336afcb3f 24-Nov-2015 Todd Kennedy <toddke@google.com> Create new ephemeral app directory

Bug: 25119046
Change-Id: I829f7ae1df09f2b7af1cd64fbbad6c1f5a2d716d
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/utils.cpp
8ab87b6efebb50892b6e28b9acfd4c33a2a88ac8 01-Dec-2015 Felipe Leme <felipeal@google.com> Merge "Fix initial value of do_update_progress."
08b5578b7370b11e6eeb1f2619fd9d54b0536760 01-Dec-2015 Felipe Leme <felipeal@google.com> Fix initial value of do_update_progress.

Since it was set to 1, dumpstate (and bugreport as well) would fail if
-o option was not set.

BUG: 25944860
Change-Id: Iafcb2bc6a4120ebff237f25a998a3c528d7bc1aa
umpstate/utils.cpp
cfe500d01f0bf47f23d175b7998c43261951ec68 23-Nov-2015 Ruchi Kandoi <kandoiruchi@google.com> sched: Adds the optional tracing for CPU hotplug.

Change-Id: Ibff70a2176f8b8e2ba18a9246c350b990d545962
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
trace/atrace.cpp
trace/atrace.rc
bb5a53e19d98f4a9f9b617b47be64025859dc80b 30-Nov-2015 Ruchi Kandoi <kandoiruchi@google.com> Merge "atrace: Add trace points for cpu frequency limits."
e159c7f25d52636b01e9d8bc7d6175c2263696be 30-Nov-2015 Sharvil Nanavati <sharvil@google.com> Increase raft timeout to 10min so we get complete logs from older devices. am: 804339a59e am: 7126caa17f am: c3ee5e8fb9
am: 47c010ce75

* commit '47c010ce750a1af707f6eee28cd5458fba6f1439':
Increase raft timeout to 10min so we get complete logs from older devices.
47c010ce750a1af707f6eee28cd5458fba6f1439 30-Nov-2015 Sharvil Nanavati <sharvil@google.com> Increase raft timeout to 10min so we get complete logs from older devices. am: 804339a59e am: 7126caa17f
am: c3ee5e8fb9

* commit 'c3ee5e8fb94e1af7338e4217afb3365531ae0309':
Increase raft timeout to 10min so we get complete logs from older devices.
c3ee5e8fb94e1af7338e4217afb3365531ae0309 30-Nov-2015 Sharvil Nanavati <sharvil@google.com> Increase raft timeout to 10min so we get complete logs from older devices. am: 804339a59e
am: 7126caa17f

* commit '7126caa17f4b76632335daa8090ba9e37db35102':
Increase raft timeout to 10min so we get complete logs from older devices.
9c5440cdfc1fe6a5604abfd91e8d160542a36212 30-Nov-2015 Felipe Leme <felipeal@google.com> Merge "Adds a -P option so dumpstate can report its progress."
e29bf4fcf1206e992a11bfe1f2b9a3bba511cc1c 30-Nov-2015 Martijn Coenen <maco@google.com> Merge "Atrace: support streaming data to stdout." am: 83a98b101c am: 78d4fb8e77
am: b134014110

* commit 'b1340141101a2528cb6680862aa9d88df491bc3d':
Atrace: support streaming data to stdout.
bd65161021cecc8d0cda8a5efb5650ce9782fee9 30-Nov-2015 Tim Murray <timmurray@google.com> DO NOT MERGE: add support for new sched tracepoint

This tracepoint gives systrace the means to display the reason
for uninterruptible sleep.

bug 23350688

Change-Id: I9ee5b6904c27bcb5bd67c86fda66d45d0a3c0999
trace/atrace.cpp
78d4fb8e771f85f6d7f04f6c0eb7aed1992b3a43 30-Nov-2015 Martijn Coenen <maco@google.com> Merge "Atrace: support streaming data to stdout."
am: 83a98b101c

* commit '83a98b101c2850a936c0e612e4eb16d815db025e':
Atrace: support streaming data to stdout.
d95358713b98875733e91fe8fb0459a0b88eab14 26-Nov-2015 Martijn Coenen <maco@google.com> Atrace: support streaming data to stdout.

Change-Id: I8534a9c69f25ecdd82230a5d8b4b8d1c4d58439e
trace/atrace.cpp
804339a59e4abcbcf5a50a60ff0543e6b404e572 28-Nov-2015 Sharvil Nanavati <sharvil@google.com> Increase raft timeout to 10min so we get complete logs from older devices.

Devices like dory get slammed when bugreports are taken and can't
compress all the raft logs in the current 5min timeout. Our dogfooders
spend their precious time getting us bugreports and then we can't act
on them because we have broken raft logs. :(

This change bumps up the timeout in the hopes that we can get complete
logs from even our slowest devices.

Change-Id: I10741a6185b39544f4c0531f0ee74864d74a1aa4
umpstate/dumpstate.c
b82c925d3cd54d5eff9f4f9e6d5aeb41f75365f5 28-Nov-2015 Nick Kralevich <nnk@google.com> dumpstate: call su before executing librank

librank uses /proc/PID/pagemap . Rather than granting dumpstate
CAP_SYS_ADMIN, have librank run from the SU domain.

Addresses the following denial:

avc: denied { sys_admin } for pid=6442 comm="librank" capability=21 scontext=u:r:dumpstate:s0 tcontext=u:r:dumpstate:s0 tclass=capability permissive=0

This also allows us to remove the setuid bit from librank,
which will be done in a different commit.

Bug: 25739721
Change-Id: Ibf20d67dbe01b95e5cbb860a7e0eb767b8beb74a
umpstate/dumpstate.cpp
ffcc71175aa6c6ed9e3a3deb446f8ba561d63df5 20-Nov-2015 Ruchi Kandoi <kandoiruchi@google.com> atrace: Add trace points for cpu frequency limits.

Change-Id: I6a20eaedb2943c3cde137ec091d898fc250ea763
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
trace/atrace.cpp
trace/atrace.rc
71bbfc57974331dce79242ce806d92035fce06ba 23-Nov-2015 Felipe Leme <felipeal@google.com> Adds a -P option so dumpstate can report its progress.

The old workflow was:

1. dumpstate starts.
2. When dumpstate finishes, it sends a BUGREPORT_FINISHED event.
3. Shell's BugreportReceiver receives the BUGREPORT_FINISHED and issues a
system notification so user can share the bug report.

The new workflow is:

1. When dumpstate starts, it sends a BUGREPORT_STARTED with its pid and
the estimated total effort.
2. When Shell's BugreportReceiver receives the BUGREPORT_STARTED, it:
2.1 Issues a system notification so user can watch the
progresss (which is 0% initially).
2.2 Starts a service (BugreportProgressService) responsible for
polling the dumpstate progress (using system properties and the
pid) and updating the system notification.
3. As dumpstate progress, it updates the proper system property.
4. When dumpstate finishes, it sends a BUGREPORT_FINISHED event.
5. When Shell's BugreportReceiver receives the BUGREPORT_FINISHED, it:
5.1 Finishes the service if necessary.
5.2 Issues a system notification so user can share the bug report.

This CL handles the dumpstate changes only, the Shell changes will be
handled in a separate CL.

BUG: 25794470
Change-Id: I6e04203411802c88ab0d093420ccdfd26700d565
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
bbd7d991db7cdb0f09a765d23e32c7441eb0393f 01-Dec-2014 Greg Hackmann <ghackmann@google.com> atrace: add database tag

Change-Id: I96acc1afa8d2eeac5585ee482d3f35716da49950
Signed-off-by: Greg Hackmann <ghackmann@google.com>
trace/atrace.cpp
36b3f6ff17e456dea81501006e33d5fdd1d3b480 20-Nov-2015 Felipe Leme <felipeal@google.com> Allow broadcasting of bug reports without a screenshot.

BUG: 25751868
Change-Id: Ideaa6c549f639aa64b30225147b2fad6c5f2d556
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
f83543ab9d466b5d5ccfa7546e4d752a1d18f3d5 09-Oct-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: add -v printable to logcat

(cherry pick from commit 7831638e2a142cbb082d63a60ad5c04ff63933e8)

In the case where binary data lands in an utf-8 log buffer,
ensure that the content is made printable.

Bug: 23517551
Change-Id: I41696372d07228875d01a19f0c7ab2cb7494b7ef
umpstate/dumpstate.c
2b6afaa3d48f0cb83a70e506b3392f52923a2ce5 20-Nov-2015 Felipe Leme <felipeal@google.com> Merge "Fixed check if zip file was generated properly."
0be2b76ce9a0c943f7aad445bdf5be796c937618 20-Nov-2015 Felipe Leme <felipeal@google.com> Fixed check if zip file was generated properly.

During the earlier development stages, this function was returning an
int and later it was changed to boolean, but the check was not updated.

BUG: 25563823
Change-Id: I77f50bf2184d5dd4da2156a5eca4c8a555b567a4
umpstate/dumpstate.cpp
a749eb554e49a01ec1e203b1dd530c6336cdc704 19-Nov-2015 Jeff Sharkey <jsharkey@google.com> Merge "Temporarily relax device-encryption failures."
ea0e4b19d942f62ea21ca4e70f939f3d4aa14b37 19-Nov-2015 Jeff Sharkey <jsharkey@android.com> Temporarily relax device-encryption failures.

Long-term fix is to get vold connected before doing initial package
scan, and prepare all user directories.

Bug: 25796509
Change-Id: Ibcfc44411e9921cf3fa3d0510d300808a2a62e7e
nstalld/commands.cpp
0db38b1133ad18201c0e5c436dd33bdff787ccaf 19-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add support for new sched kernel tracepoint" am: 61c9506a09 am: 31a851cd75
am: 3619cb2909

* commit '3619cb2909cbd21cfd080fb1142fd77207cee1d8':
Add support for new sched kernel tracepoint
31a851cd7580d6babdc011b3f50da760e7e4274a 19-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add support for new sched kernel tracepoint"
am: 61c9506a09

* commit '61c9506a09959ae07832cc019818f869403d3f2a':
Add support for new sched kernel tracepoint
5672bb755e306d9c315c47190df4a79f7f52889c 19-Nov-2015 Riley Andrews <riandrews@google.com> Add support for new sched kernel tracepoint

This tracepoint gives systrace the means to display the reason
for uninterruptible sleep.
trace/atrace.cpp
trace/atrace.rc
23294f4cdfbc37bdf66885d07b87d11348be6972 19-Nov-2015 Jeff Sharkey <jsharkey@google.com> Merge "More device-encrypted directory work."
ebf728fd43ab5c7d11a1f9e5fdc775d6740fae0a 18-Nov-2015 Jeff Sharkey <jsharkey@android.com> More device-encrypted directory work.

Unify package directory creation logic, and always create user_de
directories to be ready for emulation mode. Also clean up the new
user_de directories on user deletion, package uninstallation, and
data clearing. Also run restorecon over the new user_de paths.

Bug: 22358539
Change-Id: I65ab1562db8455dae6e99dbd8965409b1bf3c6b0
nstalld/commands.cpp
nstalld/installd.h
nstalld/utils.cpp
2e1d20d3cff8835b5aeab7adf3d137a87579e9ef 19-Nov-2015 Todd Kennedy <toddke@google.com> Merge "use negative mask" am: 4e427f0aab am: 469295f68e
am: d0711b42b7

* commit 'd0711b42b757bcc4ffc2ad8a9989cf728d4bb034':
use negative mask
f24aae872d79982899fed4911141b05c874b0c50 18-Nov-2015 Calin Juravle <calin@google.com> Merge "Remove obsolete profile handling from installd." am: 8161da7a0e am: a51f45a601
am: 357cb908fa

* commit '357cb908faa88b915c1d2c977f16e533e855f19f':
Remove obsolete profile handling from installd.
469295f68e283977b0a5ff7e04a4413697f7eee7 17-Nov-2015 Todd Kennedy <toddke@google.com> Merge "use negative mask"
am: 4e427f0aab

* commit '4e427f0aabf89b118b9a8f2b128f71a058755ba7':
use negative mask
e296e00df65461629a20cd03b5b041a59935d00f 16-Nov-2015 Todd Kennedy <toddke@google.com> use negative mask

the test should be for _invalid_ bits; as it's written,
it tests for valid bits

Change-Id: Id5e42e865449a7877fe58aca9fb47675fa7452c9
nstalld/commands.cpp
ed24d2ae2cd6e8b0afb86efa555f18bcfaf74a64 12-Nov-2015 Christopher Ferris <cferris@google.com> Fix a few bugs related to dumping files.

Fixes:

- Fix double print of header in dump_file.

- Fix a few possible file descriptor leaks.

- Add /d/ as another directory which should be skipped when printing out
last mod time of a file.

- Fix possible crash if the path passed to _dump_file_from_fd is less than
the length of one of the directory checks.

Change-Id: I450dfab76fd0ce4d4dca9ed39c82a980054f3cc3
umpstate/dumpstate.h
umpstate/utils.cpp
74ee857d166f0696fe94628bbce391641343c418 16-Nov-2015 Felipe Leme <felipeal@google.com> Merge "Added option (-z) to generate a zipfile with the bugreport."
806313fe8168fe7e68c21a839966fd6c31ec8189 25-Sep-2015 Todd Kennedy <toddke@google.com> Allow using the JIT

Instead of the JIT only being available for eng builds [or configurable
via environment variable], allow the JIT to be enabled programatically.

(cherry picked from commit 12434f8cce66a753ef49c07b503f9625e01366c8)

Change-Id: Id3c5ae227ed400e489bb723a56c516dfc12acd89
nstalld/commands.cpp
nstalld/installd.h
90907aca732cf5cbb80cc95993f2401857254069 25-Sep-2015 Todd Kennedy <toddke@google.com> Pass dexopt flags as integer

Instead of using a series of booleans, create a single flags integer
that contains all of the dexopt options.

(cherry picked from commit 76e767ca14bcbb4bc809cd1279ece82a3aabe8a4)

Change-Id: I35542aa73ca57b0e765d19b1339b1429849c1ae8
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
a51f45a6014907d0e0fd06f0fcffed592c843419 16-Nov-2015 Calin Juravle <calin@google.com> Merge "Remove obsolete profile handling from installd."
am: 8161da7a0e

* commit '8161da7a0e54bc4af36e49353e4caad02de384dc':
Remove obsolete profile handling from installd.
8161da7a0e54bc4af36e49353e4caad02de384dc 16-Nov-2015 Calin Juravle <calin@google.com> Merge "Remove obsolete profile handling from installd."
d907b32052aca02ad679e6ae786848d328723080 17-Oct-2015 keunyoung <keunyoung@google.com> add vehicle_network_service to stack dump

bug: 24095928
Change-Id: I32874f36003cd0dfacc8d9d5b568e6fc963bfa43
umpstate/utils.cpp
0b904612c12ab59d1e86c978eb8f7662a101f4b8 13-Nov-2015 Elliott Hughes <enh@google.com> Merge "Move dumpstate to top -H rather than top -t." am: 20986bf383 am: 5e02b1bfbb
am: 439903c2ff

* commit '439903c2ff50cb632891006b9dfad0b4993b8384':
Move dumpstate to top -H rather than top -t.
5e02b1bfbbaedfb3703cd0f56e6bcac3aa4edfd9 13-Nov-2015 Elliott Hughes <enh@google.com> Merge "Move dumpstate to top -H rather than top -t."
am: 20986bf383

* commit '20986bf3830dabae74837660403c43f92c9131bd':
Move dumpstate to top -H rather than top -t.
b32c7e14ccc6507f6ce3fc02414ba04b797f4558 13-Nov-2015 Elliott Hughes <enh@google.com> Move dumpstate to top -H rather than top -t.

Change-Id: Ibc26b51e92425b2de7870a7a2890fc3566909cda
umpstate/dumpstate.c
6e01fa6f95fb20a2faab33561056d2e74cc097cb 12-Nov-2015 Felipe Leme <felipeal@google.com> Added option (-z) to generate a zipfile with the bugreport.

Currently, dumpstate generates a text file and Shell zips it, but that
breaks the android.intent.action.BUGREPORT_FINISHED contract.

Also changed some string variables from char* to std::string.

BUG: 25563823
Change-Id: I6e61798bf559fa9f79f629b22fd410752da2bbf7
umpstate/Android.mk
umpstate/dumpstate.cpp
55b42a67f69767976ff16ab443b3e7142db693e1 11-Nov-2015 Felipe Leme <felipeal@google.com> Closes stdout when it is redirected to a file.

Bug: 19271141
Change-Id: I2990542649e64bf0a281bb9e322ed7b3b98a75c1
umpstate/dumpstate.cpp
673b641c6eb3708ce4af72ebc07c79c79b46a452 12-Nov-2015 Felipe Leme <felipeal@google.com> Merge "Add option to #define _DUMPSTATE_DRY_RUN_ to skip the actual dumps."
93d705b6d742e8f00167ff2384e35c2205a6f9da 11-Nov-2015 Felipe Leme <felipeal@google.com> Add option to #define _DUMPSTATE_DRY_RUN_ to skip the actual dumps.

Such option is useful when debugging dumpstate itself, since it will
finish much sooner and its output will be much smaller.

Change-Id: If821ed21715461bf82eea0b2be4b926239ad69da
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/utils.cpp
63ec2d64196144b2d15d2baffedccfa011d6494f 09-Nov-2015 Jeff Sharkey <jsharkey@android.com> Create device-encrypted directories for apps.

When device has FBE, create device-encrypted storage location when
installing apps.

Also remove "renamepkg" unused command.

Bug: 22358539
Change-Id: Ic56eeecdc64bdaa7429b93426727a243a4e45f47
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/utils.cpp
8620bb4118a68721d10c29529dc6978847d08d00 10-Nov-2015 Felipe Leme <felipeal@google.com> Migrated dumpstate to C++.

Changes required:

- Explicity casting function pointers.
- Moving variables initialization before 'goto' statements.
- Changing string references from 'char *' to 'const char *'.
- Using 'extern "C"' so device-dependent implementation of
'dumpstate_board()' can be written in C or C++.

BUG: 25563823
Change-Id: I5712c2adbe181c6d17983cbb136b17757900b4ba
umpstate/Android.mk
umpstate/dumpstate.c
umpstate/dumpstate.cpp
umpstate/dumpstate.h
umpstate/libdumpstate_default.c
umpstate/libdumpstate_default.cpp
umpstate/utils.c
umpstate/utils.cpp
07e25abb0a9e8fa973dd9b85ba7b711f8d722e20 09-Nov-2015 Nick Kralevich <nnk@google.com> Merge "Allow read access to /proc entries for other UIDs" am: fd53598220 am: 877b5daecc
am: 3e606062b3

* commit '3e606062b3b2e8143f5353a7028e78b25a803aa8':
Allow read access to /proc entries for other UIDs
877b5daeccaf25a84745b2dfc9f6c5d4f3787ccf 09-Nov-2015 Nick Kralevich <nnk@google.com> Merge "Allow read access to /proc entries for other UIDs"
am: fd53598220

* commit 'fd53598220e19fbb91270f1f1831f6c69c669aaa':
Allow read access to /proc entries for other UIDs
ab46a4922655bc75848660da4268ab85d72a6010 08-Nov-2015 Nick Kralevich <nnk@google.com> Allow read access to /proc entries for other UIDs

Allow dumpstate (aka adb bugreport), servicemanager, and
surfaceflinger to access /proc entries associated with other UIDs.

Bug: 23310674
Change-Id: I385dcf0db3376ba979409cbe6fe1a468d36237ef
umpstate/dumpstate.c
ervicemanager/servicemanager.rc
df9dadd5e5c287110d837c38aaec12bcf5e5d151 04-Nov-2015 Calin Juravle <calin@google.com> Remove obsolete profile handling from installd.

Bug: 24698874
Bug: 17173268
Change-Id: I140d70262f8f8fa7afd52c3cf63b4abaf401a479
nstalld/commands.cpp
nstalld/installd.h
nstalld/utils.cpp
6e20913454d65c233a7b4d51cf12c5c848f7a84d 04-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add ipi tracing to irq tracing." am: c84da67d72 am: b813f5e2e8
am: 6ea4e35ab1

* commit '6ea4e35ab1c4fc93b9dc176423e6e425c85bf360':
Add ipi tracing to irq tracing.
b813f5e2e8b6a799b14720097bb9e1394e2c5262 04-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add ipi tracing to irq tracing."
am: c84da67d72

* commit 'c84da67d723ce4bafc3622cd269207ea3995ff1c':
Add ipi tracing to irq tracing.
c84da67d723ce4bafc3622cd269207ea3995ff1c 04-Nov-2015 Riley Andrews <riandrews@google.com> Merge "Add ipi tracing to irq tracing."
14f8cf12e2764ff554dd0e3b72cc8711b14adffe 03-Nov-2015 Bill Yi <byi@google.com> Merge commit '75c5de42b759bdcfa7c0e6103fb959c28d686116' into HEAD
412e4f6da5cc9353b4bd05200fe81e3497316370 03-Nov-2015 Riley Andrews <riandrews@google.com> Add ipi tracing to irq tracing.
trace/atrace.cpp
0571e36eb74df46059d23b841659094e0f6d6371 03-Nov-2015 Elliott Hughes <enh@google.com> Merge "Further reduce duplication in bugreport ps output." am: 670508d09a am: 1fa95dd57b
am: 91ff9d56d5

* commit '91ff9d56d5991de50b6bda4134121643166727cd':
Further reduce duplication in bugreport ps output.
91ff9d56d5991de50b6bda4134121643166727cd 02-Nov-2015 Elliott Hughes <enh@google.com> Merge "Further reduce duplication in bugreport ps output." am: 670508d09a
am: 1fa95dd57b

* commit '1fa95dd57b61735b816e29c74a7613e261ba538d':
Further reduce duplication in bugreport ps output.
1fa95dd57b61735b816e29c74a7613e261ba538d 02-Nov-2015 Elliott Hughes <enh@google.com> Merge "Further reduce duplication in bugreport ps output."
am: 670508d09a

* commit '670508d09acf64fad83d0c7ac90330d3db89c861':
Further reduce duplication in bugreport ps output.
430666bebd49cefcf88831c6fc6c3c86cad4ea48 02-Nov-2015 Elliott Hughes <enh@google.com> Further reduce duplication in bugreport ps output.

PROCESSES and PROCESSES AND THREADS can be combined. There's nothing in
the former that isn't in the latter.

Change-Id: I105a6d8d35488236ef6dbf4107496ea7e5ad70ea
umpstate/dumpstate.c
08e94903390a96530131c9b419bd5f31f1e0d989 30-Oct-2015 Andy Hung <hunga@google.com> Restart audioserver if servicemanager restarts

Bug: 24511453
Change-Id: I55e6c5a6eed02033179dc47ced0c1b9c4f9f89ab
ervicemanager/servicemanager.rc
54ddf8fc37034c303e50724d8feab9504fd50b13 31-Oct-2015 Elliott Hughes <enh@google.com> Merge "Reduce duplication in bugreport ps output." am: 8ebad13b34 am: ed59c4e629
am: ac6e708560

* commit 'ac6e7085600bcfa222261d578f65d8c08a87c230':
Reduce duplication in bugreport ps output.
ac6e7085600bcfa222261d578f65d8c08a87c230 31-Oct-2015 Elliott Hughes <enh@google.com> Merge "Reduce duplication in bugreport ps output." am: 8ebad13b34
am: ed59c4e629

* commit 'ed59c4e629c0c72871866e75789e0ece829f4823':
Reduce duplication in bugreport ps output.
ed59c4e629c0c72871866e75789e0ece829f4823 31-Oct-2015 Elliott Hughes <enh@google.com> Merge "Reduce duplication in bugreport ps output."
am: 8ebad13b34

* commit '8ebad13b340921a40a367c9f1808d0c26147e2a6':
Reduce duplication in bugreport ps output.
a3533a3ae6bf8d0e1780c153cafdec86926ec22c 31-Oct-2015 Elliott Hughes <enh@google.com> Reduce duplication in bugreport ps output.

PROCESSES AND THREADS and PROCESSES (SELINUX LABELS) can be combined.
I suspect we can just remove PROCESSES too, since it's a strict
subset of the other information, but one step at a time. (The worry
is that someone's actually parsing this output, but it would be good
to find out who's doing that as soon as possible so we can work with
them as we transition to a more complete ps implementation.)

Change-Id: I5f1085f8853f7a988f7edcaeefdd7b63175c1473
umpstate/dumpstate.c
d89c86de37b23e0fed0e995afea71c78d5e71ac4 26-Oct-2015 Martijn Coenen <maco@google.com> Merge "Support tracing pagecache stats."
7048161951761cd5fe0109c34204ba8229f9eddf 23-Oct-2015 Martijn Coenen <maco@google.com> Support tracing pagecache stats.

Change-Id: Iac12fd8d0238db30d1415418d2b4f168fd4195c2
trace/atrace.cpp
f2bf93bb080b07159ec1395c1ea8edcf5e00e829 15-Oct-2015 Dianne Hackborn <hackbod@google.com> Temporary hack to get rid of new virtuals.

Seems like it breaks some prebuilt binaries.

Change-Id: Ia5e35beb4538364b2ab3618fbf21b2e9c9ee2363
md/cmd.cpp
23eb1e20cf59e1238b65cc108f31dfbfd85b2337 08-Oct-2015 Dianne Hackborn <hackbod@google.com> Add new "shell command" feature to Binder objects.

IBinder has a new common interface for sending shell commands
to it. This can be implemented by system services to provide
a shell interface to the service, without needing to have separate
shell java code.

Also add a new "cmd" command line tool, which invokes the shell
command method on a system service. This is much like dumpsys,
but for shell commands.

Change-Id: I95dc80c881a28cefb76957ad4d4fd9b3ed9630df
md/Android.mk
md/MODULE_LICENSE_APACHE2
md/NOTICE
md/cmd.cpp
1fd88a560df8f58c3a798b25f64795e8306e527f 12-Oct-2015 Jason Parks <jparks@google.com> am 8b435c07: am 7b2b968d: am 33c3c1bd: Merge "Revert "do not dumpstate raft BUG: 24159112"" into cw-e-dev

* commit '8b435c07eece971ab032d450777e0e1723299de1':
Revert "do not dumpstate raft BUG: 24159112"
8b435c07eece971ab032d450777e0e1723299de1 12-Oct-2015 Jason Parks <jparks@google.com> am 7b2b968d: am 33c3c1bd: Merge "Revert "do not dumpstate raft BUG: 24159112"" into cw-e-dev

* commit '7b2b968db484118668b70d040464f379a7e9e915':
Revert "do not dumpstate raft BUG: 24159112"
31baf8d3c2833d13056b0be679f66ed0e53c8d26 12-Oct-2015 Jason Parks <jparks@google.com> Revert "do not dumpstate raft BUG: 24159112"

This reverts commit 05c862252d5021f55a69281473c67d76e7097422.

Change-Id: Ib5984796734d2a0e33f47e0fb4e446b787e0d14f
umpstate/dumpstate.c
382f5fb38f61c12531d5ff782b6d5b622464d64e 10-Oct-2015 Nick Kralevich <nnk@google.com> am 748c546b: am c4db5ece: am 8e0c88ea: Merge "servicemanager: log pid and uid on selinux denial"

* commit '748c546b15dbaef6b1c480bed733fd6b16ce4cdc':
servicemanager: log pid and uid on selinux denial
05eb0e57b7bc46aa3b6a654d148d8b0a53274fbf 10-Oct-2015 Mark Salyzyn <salyzyn@google.com> am 2abef0c3: am ca78bbfd: am 52b25375: Merge "dumpstate: add -v printable to logcat"

* commit '2abef0c38bacf39df950dfe66d90b820c876d8b9':
dumpstate: add -v printable to logcat
c4db5ece1b34ada975041c167215d41a58f788ca 10-Oct-2015 Nick Kralevich <nnk@google.com> am 8e0c88ea: Merge "servicemanager: log pid and uid on selinux denial"

* commit '8e0c88ea489a7b395a3d349f81000fb2639bf448':
servicemanager: log pid and uid on selinux denial
8e0c88ea489a7b395a3d349f81000fb2639bf448 10-Oct-2015 Nick Kralevich <nnk@google.com> Merge "servicemanager: log pid and uid on selinux denial"
ca78bbfd85dcff3c635b813d1cbe882b576b433c 09-Oct-2015 Mark Salyzyn <salyzyn@google.com> am 52b25375: Merge "dumpstate: add -v printable to logcat"

* commit '52b2537550a6fc43587980887858c7e7150255b0':
dumpstate: add -v printable to logcat
7831638e2a142cbb082d63a60ad5c04ff63933e8 09-Oct-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: add -v printable to logcat

In the case where binary data lands in an utf-8 log buffer,
ensure that the content is made printable.

Bug: 23517551
Change-Id: I41696372d07228875d01a19f0c7ab2cb7494b7ef
umpstate/dumpstate.c
bb40f1706ef9b90176e657c5d20e5be715aa702b 08-Oct-2015 Nick Kralevich <nnk@google.com> am 313762d8: am ae0405d6: Merge "dumpstate: execute procrank using su"

* commit '313762d88e7820e689879e08f4a93eac3cf8af99':
dumpstate: execute procrank using su
313762d88e7820e689879e08f4a93eac3cf8af99 08-Oct-2015 Nick Kralevich <nnk@google.com> am ae0405d6: Merge "dumpstate: execute procrank using su"

* commit 'ae0405d607f9ed08d708ee990716a7881a6cfd4d':
dumpstate: execute procrank using su
2b1f88b6ac78e330ff006da6fecf8bc9d976ec67 08-Oct-2015 Nick Kralevich <nnk@google.com> dumpstate: execute procrank using su

procrank is a setuid binary which only exists on userdebug/eng
builds. Instead of executing the setuid binary, run the binary using
the su command. This eliminates one more setuid binary, and allows
the tightening of the SELinux policy.

Bug: 18342188
Change-Id: I81d06196a29489feaefb2fea0cf5c4ff1e273d2f
umpstate/dumpstate.c
8fb0f92e0fe3c286ebb120bae9e1570ee109fa12 02-Oct-2015 William Roberts <william.c.roberts@intel.com> servicemanager: log pid and uid on selinux denial

The audit logs for servicemanager were missing the pid and uid of the source.
This is useful for debugging.

Before:
... SELinux : avc: denied { find } for service=android.security.keystore scontext=u:r:system_app:s0 ...
After:
... SELinux : avc: denied { find } for service=android.security.keystore pid=1252 uid=1000 scontext=u:r:system_app:s0 ...

Change-Id: Id1a6f38b99f11a31315439620ead2f01108b18b2
Signed-off-by: William Roberts <william.c.roberts@intel.com>
ervicemanager/service_manager.c
4e547008e319012739ff33fad184417df1777506 02-Oct-2015 Erik Wolsheimer <ewol@google.com> am af83daab: am ddf5f250: am 05c86225: do not dumpstate raft BUG: 24159112

* commit 'af83daabad1ded6350d266f35ed1354826714cf4':
do not dumpstate raft BUG: 24159112
af83daabad1ded6350d266f35ed1354826714cf4 02-Oct-2015 Erik Wolsheimer <ewol@google.com> am ddf5f250: am 05c86225: do not dumpstate raft BUG: 24159112

* commit 'ddf5f2509b48ee85dc352ee245f34a9d6307be39':
do not dumpstate raft BUG: 24159112
05c862252d5021f55a69281473c67d76e7097422 02-Oct-2015 Erik Wolsheimer <ewol@google.com> do not dumpstate raft
BUG: 24159112

Change-Id: I344aa73808992b5f84cb0536201a3ab2eb6f2b3c
umpstate/dumpstate.c
72da7fb77cc0aaeb272b0359679c841d02d5edfe 28-Sep-2015 Andreas Gampe <agampe@google.com> Installd: Fully decouple pre- and post-bootcomplete properties

Do not fall back to dalvik.vm.dex2oat-threads if
dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use
the value of dalvik.vm.image-dex2oat-threads. Instead use the
default behavior of dex2oat in that situation.

(cherry picked from commit 919461cbeef3e9f35388fc099a5fcdae1cb79cc6)

Bug: 24413760
Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6
nstalld/commands.cpp
ae26dc9b923752831f9e92d94d18113b5b2919c1 28-Sep-2015 Andreas Gampe <agampe@google.com> am 56376be0: am 54412fe2: am 28b1d678: Merge "Installd: Fully decouple pre- and post-bootcomplete properties"

* commit '56376be00aeb0f800cfbca27f22dd2314dbc6586':
Installd: Fully decouple pre- and post-bootcomplete properties
cc390af4e134f31e1b059351000f7403fd3c009d 28-Sep-2015 Todd Kennedy <toddke@google.com> am 00b5f9a2: am 534a49dc: am 905c1446: Merge "Allow using the JIT"

* commit '00b5f9a2019040b8874761468eb39b3323ce9ec5':
Allow using the JIT
56376be00aeb0f800cfbca27f22dd2314dbc6586 28-Sep-2015 Andreas Gampe <agampe@google.com> am 54412fe2: am 28b1d678: Merge "Installd: Fully decouple pre- and post-bootcomplete properties"

* commit '54412fe2ae0fb5a9dc81b999d726b5a909de3bd7':
Installd: Fully decouple pre- and post-bootcomplete properties
54412fe2ae0fb5a9dc81b999d726b5a909de3bd7 28-Sep-2015 Andreas Gampe <agampe@google.com> am 28b1d678: Merge "Installd: Fully decouple pre- and post-bootcomplete properties"

* commit '28b1d678a4721e9f02b7b9498492fb3d623f21be':
Installd: Fully decouple pre- and post-bootcomplete properties
28b1d678a4721e9f02b7b9498492fb3d623f21be 28-Sep-2015 Andreas Gampe <agampe@google.com> Merge "Installd: Fully decouple pre- and post-bootcomplete properties"
00b5f9a2019040b8874761468eb39b3323ce9ec5 28-Sep-2015 Todd Kennedy <toddke@google.com> am 534a49dc: am 905c1446: Merge "Allow using the JIT"

* commit '534a49dc3282d1056f92c7ed6e0ef7fa2f9ec74e':
Allow using the JIT
919461cbeef3e9f35388fc099a5fcdae1cb79cc6 28-Sep-2015 Andreas Gampe <agampe@google.com> Installd: Fully decouple pre- and post-bootcomplete properties

Do not fall back to dalvik.vm.dex2oat-threads if
dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use
the value of dalvik.vm.image-dex2oat-threads. Instead use the
default behavior of dex2oat in that situation.

Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6
nstalld/commands.cpp
534a49dc3282d1056f92c7ed6e0ef7fa2f9ec74e 28-Sep-2015 Todd Kennedy <toddke@google.com> am 905c1446: Merge "Allow using the JIT"

* commit '905c1446ea602b4649a248bfe878626cae01a87a':
Allow using the JIT
12434f8cce66a753ef49c07b503f9625e01366c8 25-Sep-2015 Todd Kennedy <toddke@google.com> Allow using the JIT

Instead of the JIT only being available for eng builds [or configurable
via environment variable], allow the JIT to be enabled programatically.

Change-Id: Id3c5ae227ed400e489bb723a56c516dfc12acd89
nstalld/commands.cpp
nstalld/installd.h
e784f9815897062a97e70e1d67769f05ca04f403 26-Sep-2015 Todd Kennedy <toddke@google.com> am 1307cbb3: am a5359950: am d529cd47: Merge "Pass dexopt flags as integer"

* commit '1307cbb38a424cf299f3240a679649070348cf55':
Pass dexopt flags as integer
1307cbb38a424cf299f3240a679649070348cf55 26-Sep-2015 Todd Kennedy <toddke@google.com> am a5359950: am d529cd47: Merge "Pass dexopt flags as integer"

* commit 'a5359950298f0bd5833ab72b7a26aef9fc45056f':
Pass dexopt flags as integer
a5359950298f0bd5833ab72b7a26aef9fc45056f 26-Sep-2015 Todd Kennedy <toddke@google.com> am d529cd47: Merge "Pass dexopt flags as integer"

* commit 'd529cd470afa98512bf2eab7a58dae5a9b6e4847':
Pass dexopt flags as integer
76e767ca14bcbb4bc809cd1279ece82a3aabe8a4 25-Sep-2015 Todd Kennedy <toddke@google.com> Pass dexopt flags as integer

Instead of using a series of booleans, create a single flags integer
that contains all of the dexopt options.

Change-Id: I35542aa73ca57b0e765d19b1339b1429849c1ae8
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
a037f97dcf15000154e73aea4e92248c17a586f8 24-Sep-2015 Todd Kennedy <toddke@google.com> am 7f413889: Merge "Installd: Take boot status as dexopt parameter"

* commit '7f413889a3f0bff0c159141abb498650305f2089':
Installd: Take boot status as dexopt parameter
13f141910ba383404145924df64ad6626fe5b42f 21-Sep-2015 Andreas Gampe <agampe@google.com> Installd: Take boot status as dexopt parameter

Expect the boot status explicitly as a parameter so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.

Bug: 23898216
(cherry picked from commit 72ebebed876a62e719b098e43d9d516361bde029)
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
434fbee3404ccc1007ad955ba892412e1e9df9cf 22-Sep-2015 Andreas Gampe <agampe@google.com> am 591457b7: am 6263caf7: am 83af0cc2: am 72ebebed: Installd: Take boot status as dexopt parameter

* commit '591457b71413d5d044c3ab1cd74b954f37d18e2f':
Installd: Take boot status as dexopt parameter
591457b71413d5d044c3ab1cd74b954f37d18e2f 22-Sep-2015 Andreas Gampe <agampe@google.com> am 6263caf7: am 83af0cc2: am 72ebebed: Installd: Take boot status as dexopt parameter

* commit '6263caf72f343dfbb18e7061c5453f78cfa19e72':
Installd: Take boot status as dexopt parameter
83af0cc22c77c31df1f08d65f29509b6123b6399 22-Sep-2015 Andreas Gampe <agampe@google.com> am 72ebebed: Installd: Take boot status as dexopt parameter

* commit '72ebebed876a62e719b098e43d9d516361bde029':
Installd: Take boot status as dexopt parameter
72ebebed876a62e719b098e43d9d516361bde029 21-Sep-2015 Andreas Gampe <agampe@google.com> Installd: Take boot status as dexopt parameter

Expect the boot status explicitly as a parameter so that we do not
have to rely on dev.bootcomplete, which isn't meaningfully set
when the device needs the decryption screen on boot.

Bug: 23898216
Change-Id: I9b34298caf70b1e5d40970cc0d04c469016a80a7
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
ebb28d9d614fb7b25406429c339cd3e0247500f2 18-Sep-2015 Andreas Gampe <agampe@google.com> am c5a6696f: Merge "Installd: Allow different behavior before bootcomplete"

* commit 'c5a6696f3e51e253b78baacdec99ed34e79bc3fd':
Installd: Allow different behavior before bootcomplete
94dd3d3c5be4de57278ee668218a3464585795c0 15-Sep-2015 Andreas Gampe <agampe@google.com> Installd: Allow different behavior before bootcomplete

Check dev.bootcomplete in dex2oat(). Use the information for
two changes.

Only switch to the background when we're post bootcomplete.
This will ensure better utilization after upgrades.

Add a second dex2oat-threads property that is used pre
bootcomplete. A separation of these phases allows using less
cores when the device is up, freeing up resources for other
purposes, e.g., avoid jank. The precedence during boot is the
boot property, or the image property if the former doesn't
exist, or the default property as a fallback.

Bug: 23898216
Bug: 24004256

(cherry picked from commit 21948005f0294a64a42932b21a33ae75295dc3d9)

Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d
nstalld/commands.cpp
569b32aae264d045a20bc7884bde3aef4c9cb277 17-Sep-2015 Andreas Gampe <agampe@google.com> am f1fa40ba: am 6f3c7877: am da5b88ad: am d693fc4c: Merge "Installd: Allow different behavior before bootcomplete" into mnc-dr-dev

* commit 'f1fa40ba1901e5486663ff2898d2ac0a3ee899e5':
Installd: Allow different behavior before bootcomplete
f1fa40ba1901e5486663ff2898d2ac0a3ee899e5 17-Sep-2015 Andreas Gampe <agampe@google.com> am 6f3c7877: am da5b88ad: am d693fc4c: Merge "Installd: Allow different behavior before bootcomplete" into mnc-dr-dev

* commit '6f3c78771f92f269fb9e44c98f821cdc942474e9':
Installd: Allow different behavior before bootcomplete
da5b88adac403bbce0669fe9db531897b8be9e7c 17-Sep-2015 Andreas Gampe <agampe@google.com> am d693fc4c: Merge "Installd: Allow different behavior before bootcomplete" into mnc-dr-dev

* commit 'd693fc4c50873485794d1e0f444547d3253a56d3':
Installd: Allow different behavior before bootcomplete
d693fc4c50873485794d1e0f444547d3253a56d3 17-Sep-2015 Andreas Gampe <agampe@google.com> Merge "Installd: Allow different behavior before bootcomplete" into mnc-dr-dev
21948005f0294a64a42932b21a33ae75295dc3d9 15-Sep-2015 Andreas Gampe <agampe@google.com> Installd: Allow different behavior before bootcomplete

Check dev.bootcomplete in dex2oat(). Use the information for
two changes.

Only switch to the background when we're post bootcomplete.
This will ensure better utilization after upgrades.

Add a second dex2oat-threads property that is used pre
bootcomplete. A separation of these phases allows using less
cores when the device is up, freeing up resources for other
purposes, e.g., avoid jank. The precedence during boot is the
boot property, or the image property if the former doesn't
exist, or the default property as a fallback.

Bug: 23898216
Bug: 24004256
Change-Id: I5063f3fc4b437cbe88c4e94584e01c1c78eccc4d
nstalld/commands.cpp
ff12cba77b5b88f3978070bb970d7721225271ee 16-Sep-2015 Pablo Ceballos <pceballos@google.com> Merge "BQ: Modify consumer buffer count interfaces"
d26c8e2ba416591ccfd71fb1ff0728f23b8bd36a 15-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am 38549260: am a8273f09: am 872269a5: am 6afc38c4: Dump the ND offload status and address table in bugreports.

* commit '3854926074376ebe32d60d4736c99a2e111b3442':
Dump the ND offload status and address table in bugreports.
3854926074376ebe32d60d4736c99a2e111b3442 15-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am a8273f09: am 872269a5: am 6afc38c4: Dump the ND offload status and address table in bugreports.

* commit 'a8273f094437d1e1d3c074e35c325e4512e5c465':
Dump the ND offload status and address table in bugreports.
872269a579e776c61ac5777e70ca2981771117d6 15-Sep-2015 Lorenzo Colitti <lorenzo@google.com> am 6afc38c4: Dump the ND offload status and address table in bugreports.

* commit '6afc38c45af45eb8f64793bca2903b3f4c55579b':
Dump the ND offload status and address table in bugreports.
6afc38c45af45eb8f64793bca2903b3f4c55579b 09-Sep-2015 Lorenzo Colitti <lorenzo@google.com> Dump the ND offload status and address table in bugreports.

Also, move NetworkDiagnostics between the two runs of getting the
wifi counters, so we can see the effect on the counters of
sending our probe packets.

Bug: 23661687
Change-Id: I3f81c003a35f50ac1cb8e77d0a8c73dae4fd91f3
umpstate/dumpstate.c
0c359bfe4c94071f944a8ba33ddafa3c6cae650a 07-Sep-2015 Martijn Coenen <maco@google.com> am c3268ada: am c2874048: am 5ca0c2ed: am 624408ee: Merge "Map realtime to clock_monotonic." into mnc-dr-dev

* commit 'c3268ada4d95de3ab61dc8c44b4ddea2969353d6':
Map realtime to clock_monotonic.
c3268ada4d95de3ab61dc8c44b4ddea2969353d6 07-Sep-2015 Martijn Coenen <maco@google.com> am c2874048: am 5ca0c2ed: am 624408ee: Merge "Map realtime to clock_monotonic." into mnc-dr-dev

* commit 'c2874048d0bbc6739b083bd84c7476a7fa6550e3':
Map realtime to clock_monotonic.
5ca0c2ede8a8d3f499dd7d27832713d4ce16d4ba 07-Sep-2015 Martijn Coenen <maco@google.com> am 624408ee: Merge "Map realtime to clock_monotonic." into mnc-dr-dev

* commit '624408eecb0d278cb1de1bb088699e25b319d15e':
Map realtime to clock_monotonic.
448e0b5ec6ff1738ef07be95a3c459c937332c8b 04-Sep-2015 Tom Cherry <tomcherry@google.com> am 4ebbcb13: am 5943d9bc: am 477b1e87: Merge "move init.trace.rc to frameworks/native"

* commit '4ebbcb1385623001b10431bdfaba6abaf7061dcf':
move init.trace.rc to frameworks/native
4ebbcb1385623001b10431bdfaba6abaf7061dcf 04-Sep-2015 Tom Cherry <tomcherry@google.com> am 5943d9bc: am 477b1e87: Merge "move init.trace.rc to frameworks/native"

* commit '5943d9bc4751808d165e2c5f0e2c04a99aa077d6':
move init.trace.rc to frameworks/native
5943d9bc4751808d165e2c5f0e2c04a99aa077d6 04-Sep-2015 Tom Cherry <tomcherry@google.com> am 477b1e87: Merge "move init.trace.rc to frameworks/native"

* commit '477b1e873a894a4331535bf1a59d76ec0cdd809a':
move init.trace.rc to frameworks/native
f4cb3cea6671c114930bbff12a91e65144697d9a 03-Sep-2015 Tom Cherry <tomcherry@google.com> move init.trace.rc to frameworks/native

init.trace.rc will be renamed to atrace.rc and use the LOCAL_INIT_RC
mechanism to be included on /system appropriately.

Bug 23186545

Change-Id: Ic5833b4bb6e6364e4fef6ab4882ae75f8f3856e9
trace/Android.mk
trace/atrace.rc
19e3e06e3c65a7c001a6fe0971744ba5ff536515 20-Aug-2015 Pablo Ceballos <pceballos@google.com> BQ: Modify consumer buffer count interfaces

- Rename setDefaultMaxBufferCount() to setMaxBufferCount(). Modify it
to be hard maximum on the number of buffers that can't be overwritten
by the producer.
- Enforce the maximum buffer count in setMaxAcquiredBufferCount(),
setMaxDequeuedBufferCount(), and setAsyncMode().
- Remove mOverrideMaxBufferCount as it's no longer needed since
overriding is no longer possible.
- Expose setMaxAcquiredBufferCount() in GLConsumer.
- Remove disableAsyncBuffer(), it was only being used for single buffer
mode. Single buffer mode is now achievable with setMaxBufferCount().

Bug 13174928

Change-Id: Ia33799f42751272a711fbd8559f7602ce9f18e4f
latland/GLHelper.cpp
2ce8e26b32bc0b3364ae8d55abb9082c56365607 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> am 1debd697: am d8ffffa9: am 40a8bb3b: Merge "Add a tag for tracing system server."

* commit '1debd697581f97cc271d740c835102b740b1f121':
Add a tag for tracing system server.
1debd697581f97cc271d740c835102b740b1f121 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> am d8ffffa9: am 40a8bb3b: Merge "Add a tag for tracing system server."

* commit 'd8ffffa9b660e8ee4b7294b8b2422d05829dfb7e':
Add a tag for tracing system server.
d8ffffa9b660e8ee4b7294b8b2422d05829dfb7e 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> am 40a8bb3b: Merge "Add a tag for tracing system server."

* commit '40a8bb3b2290f77a90735633eab350133f9bb9d2':
Add a tag for tracing system server.
40a8bb3b2290f77a90735633eab350133f9bb9d2 02-Sep-2015 Yasuhiro Matsuda <mazda@google.com> Merge "Add a tag for tracing system server."
0bcd97a7485d971c5276e19b1a6c2672539dc38d 15-Jul-2015 Martijn Coenen <maco@google.com> Map realtime to clock_monotonic.

This maps a monotonic timestamp to the
corresponding real-time timestamp, which
can be used to match up the traces with
other logs that use real-time.

Also write clock_sync records first instead of at
the end, to avoid not being to write it due to the
buffer being full.

Bug: 23668823
Change-Id: I644aeea496197e194ec30f808f754e3e043d905f
trace/atrace.cpp
48f7ec35a2f8f31a6fe8530ece855e9c23900924 21-Aug-2015 Tom Cherry <tomcherry@google.com> update bundled rc files to their contents from rootdir/init.rc

Bug 23186545

Change-Id: Ic6b2ba78ff90242b031ab1e88a81da8118f9eafd
ervicemanager/servicemanager.rc
1380c8488e6bb57b7af21b3d189ae0fc941085b3 21-Aug-2015 Tom Cherry <tomcherry@google.com> am 32592270: am 64e13880: Merge "bundle init.rc contents with its service"

* commit '32592270d40d6060e19aa97949aee72c8aca0807':
bundle init.rc contents with its service
a1f3f54c2752b4108f3b21baea6d5fd73738cbff 21-Aug-2015 Tom Cherry <tomcherry@google.com> am 32592270: am 64e13880: Merge "bundle init.rc contents with its service"

* commit '32592270d40d6060e19aa97949aee72c8aca0807':
bundle init.rc contents with its service
74155996d931edbd19ed5b3f71a58ceff920b451 14-Aug-2015 Tom Cherry <tomcherry@google.com> bundle init.rc contents with its service

Bug: 23186545
Change-Id: I2a70a39122b146d5bbc9b55156e769782e011bff
umpstate/Android.mk
umpstate/dumpstate.rc
nstalld/Android.mk
nstalld/installd.rc
ervicemanager/Android.mk
ervicemanager/servicemanager.rc
e2d7b5a7942667172187c8b2f788ab63baba947e 13-Aug-2015 Riley Andrews <riandrews@google.com> am 7bd45d00: am 4997a57a: Merge "Tracing for binder locks/transactions"

* commit '7bd45d0010622e559f7795243ec8e548f641266b':
Tracing for binder locks/transactions
2fa4b0ce3b94c4a15aad5d8dafc494e990d0edc2 13-Aug-2015 Riley Andrews <riandrews@google.com> am 7bd45d00: am 4997a57a: Merge "Tracing for binder locks/transactions"

* commit '7bd45d0010622e559f7795243ec8e548f641266b':
Tracing for binder locks/transactions
4997a57a9ae90bbb058dec90222d423a7de0e7e7 13-Aug-2015 Riley Andrews <riandrews@google.com> Merge "Tracing for binder locks/transactions"
df1bc67019f4eda8acfd4b97d4c4fd98b55edcb8 12-Aug-2015 Mark Salyzyn <salyzyn@google.com> resolved conflicts for merge of d213f5e7 to cw-e-dev

Change-Id: Iaea0fdd483b4d0988df442f9b291b99943009829
ecc0763e6c96c418ea4ee6c993d58d16a58407b3 30-Jul-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: add logcat -b all -S

(cherry pick from commit e3c4df96083231b519dad919fd0ed6624100b368)

- For those that are proud to call themselves logspam police
- Every time someone declares that something is too chatty, or that
they lost their logs because they were declared too chatty and
their associated logs were aggresively pruned we generally
ask them to report the logger statistics to pinpoint what software
product that is the elephant in the room.
- Every time we want to spawn a new 'stop being so spammy' bug spawned
off a bugreport collected for another purpose, we *wish* we had the
logger statistics to help add gravitas to the claim that some piece
of software is the top, or near the top, polluter.

Bug: 22351810
Change-Id: Ifae33cd21d0ae2917a3b4381502d723725b1701c
umpstate/dumpstate.c
592e6282cd722ba8075239db85a2707e53f3d3f7 10-Aug-2015 Nick Kralevich <nnk@google.com> am 0e3234b7: am 1efe1bdd: Merge "More O_DIRECTORY | O_NOFOLLOW changes"

* commit '0e3234b7f11048d8291d5427cc0acfb77ba6b843':
More O_DIRECTORY | O_NOFOLLOW changes
2379e15da458aa9aac09c1834eb893540d522ac2 10-Aug-2015 Nick Kralevich <nnk@google.com> am 0e3234b7: am 1efe1bdd: Merge "More O_DIRECTORY | O_NOFOLLOW changes"

* commit '0e3234b7f11048d8291d5427cc0acfb77ba6b843':
More O_DIRECTORY | O_NOFOLLOW changes
8b7acacc93930df9fa9e1ebea4a4394195b2332e 10-Aug-2015 Nick Kralevich <nnk@google.com> More O_DIRECTORY | O_NOFOLLOW changes

Fix a few other spots where we're not using O_NOFOLLOW
with O_DIRECTORY.

Add O_CLOEXEC for good measure.

https://code.google.com/p/android/issues/detail?id=181945

Bug: 23044050
Change-Id: Ib535cbba29cdd587443ea9e1e75831f57fd7a93c
nstalld/utils.cpp
e34de3a77b5f4d408af3f812b304475e858246ec 10-Aug-2015 Nick Kralevich <nnk@google.com> am c45bad1d: am a1b2eaa2: Merge "installd _delete_dir_contents: add O_NOFOLLOW"

* commit 'c45bad1dc14a7af1e72ad3585b3b057c38fcec3f':
installd _delete_dir_contents: add O_NOFOLLOW
6611bd6489b9efd3bc41c13aea71387891cef300 10-Aug-2015 Nick Kralevich <nnk@google.com> am c45bad1d: am a1b2eaa2: Merge "installd _delete_dir_contents: add O_NOFOLLOW"

* commit 'c45bad1dc14a7af1e72ad3585b3b057c38fcec3f':
installd _delete_dir_contents: add O_NOFOLLOW
7fd646708c4248b0ee2bb35176b58b298a7b8ae0 10-Aug-2015 Nick Kralevich <nnk@google.com> installd _delete_dir_contents: add O_NOFOLLOW

Add O_NOFOLLOW to make sure we're not following symlinks.

https://code.google.com/p/android/issues/detail?id=181945

Bug: 23044050
Change-Id: I3408309fd401aefb6ebecb2a052bba198eed7633
nstalld/utils.cpp
7cc4977ccd98a4ee557c8382bbc705eef702bdb6 30-Jun-2015 Yasuhiro Matsuda <mazda@google.com> Add a tag for tracing system server.

This change is needed for
https://android-review.googlesource.com/#/c/157562/

BUG: 21739901
Change-Id: Ic4616065749236fbde9263b8f1898c434913564a
trace/atrace.cpp
946fa8171d9c2089fa0b37c14e61fa767a5c8fdc 03-Aug-2015 Todd Kennedy <toddke@google.com> am f3486868: am 2bb9861d: Merge "Add a trace constant for PackageManager"

* commit 'f3486868a80b1e0619738b6200142b8cb9742679':
Add a trace constant for PackageManager
8728064cab62c423a2869b3353b6fc72e9e0a19c 03-Aug-2015 Todd Kennedy <toddke@google.com> am f3486868: am 2bb9861d: Merge "Add a trace constant for PackageManager"

* commit 'f3486868a80b1e0619738b6200142b8cb9742679':
Add a trace constant for PackageManager
67457c0e868fb6c383b3f729b46b5bd6588093ff 03-Aug-2015 Mark Salyzyn <salyzyn@google.com> resolved conflicts for merge of eb7718b1 to mnc-dr-dev-plus-aosp

Change-Id: I28e749b040fc97e36f73d11c0f2e8ca487d5b158
01e111b5a02440c0684494e9286709285e20097f 31-Jul-2015 Todd Kennedy <toddke@google.com> Add a trace constant for PackageManager

Change-Id: Icd9afc86c88296919e4750d71cb0aef314194bee
trace/atrace.cpp
56c6da786ae4937fdc99862e1de3b93ecd4fc988 01-Aug-2015 Mark Salyzyn <salyzyn@google.com> am eb7718b1: am 5b7e9dc7: Merge "dumpstate: add logcat -b all -S"

* commit 'eb7718b1d2f0f0a9a735b41d15c24761f5e4cfc9':
dumpstate: add logcat -b all -S
e3c4df96083231b519dad919fd0ed6624100b368 30-Jul-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: add logcat -b all -S

- For those that are proud to call themselves logspam police
- Every time someone declares that something is too chatty, or that
they lost their logs because they were declared too chatty and
their associated logs were aggresively pruned we generally
ask them to report the logger statistics to pinpoint what software
product that is the elephant in the room.
- Every time we want to spawn a new 'stop being so spammy' bug spawned
off a bugreport collected for another purpose, we *wish* we had the
logger statistics to help add gravitas to the claim that some piece
of software is the top, or near the top, polluter.

Change-Id: Ifae33cd21d0ae2917a3b4381502d723725b1701c
umpstate/dumpstate.c
f87f4431a2ba7246c8cfa58312587b7bb81abaf6 30-Jul-2015 Yasuhiro Matsuda <mazda@google.com> am 607b913e: am 366c38f8: Merge "Enable atrace to read categories from file."

* commit '607b913e8a911a9acf8ea38c6ab2c60ca2ad702d':
Enable atrace to read categories from file.
d0cbde8e944d2578d7fd74d634a7d173df5c3403 30-Jul-2015 Yasuhiro Matsuda <mazda@google.com> am 607b913e: am 366c38f8: Merge "Enable atrace to read categories from file."

* commit '607b913e8a911a9acf8ea38c6ab2c60ca2ad702d':
Enable atrace to read categories from file.
366c38f82393c8a3e9419c0dbe6320504a4d741b 30-Jul-2015 Yasuhiro Matsuda <mazda@google.com> Merge "Enable atrace to read categories from file."
3b7261d5de91fb03fc97cb05fd8448a399e2b0a5 27-Jul-2015 Nick Kralevich <nnk@google.com> am ed32594d: am 2cb9994c: Merge "dumpstate: remove unnecessary mkdir"

* commit 'ed32594d0bdfc2fb675d2e5fb0259d3d22b42aff':
dumpstate: remove unnecessary mkdir
4aec04465c3e3a775f2b7ba34218535af8eb5c2f 26-Jul-2015 Nick Kralevich <nnk@google.com> am ed32594d: am 2cb9994c: Merge "dumpstate: remove unnecessary mkdir"

* commit 'ed32594d0bdfc2fb675d2e5fb0259d3d22b42aff':
dumpstate: remove unnecessary mkdir
f0b539618fbf7ea3800461b757cf416a3369b6cb 26-Jul-2015 Nick Kralevich <nnk@google.com> dumpstate: remove unnecessary mkdir

/data/anr is now created in init.rc. This code is unnecessary.

Bug: 22385254
Change-Id: I4ea9c311d52eee7fb6b90235fbd12a4c9364d71f
umpstate/utils.c
8d4cb7ffc11050eebb4d06684e0eb14d9aadacb5 24-Jul-2015 Sharvil Nanavati <sharvil@google.com> Dump raft logs in bugreports if they exist.

Change-Id: I7773b8b86675d9ebf3f6d158eaaa11e47619800e
umpstate/dumpstate.c
a2307aefd06f1310660ef1d35ce01bcfc72c9633 21-Jul-2015 Jeff Sharkey <jsharkey@android.com> Only restorecon_data once for all users.

restorecon_data already iterates across all found users internally,
so we don't need to call it for each UID moved. In fact, this was a
bug that caused data for the owner to be relabeled when moving apps
back to internal storage.

Bug: 21813384
Change-Id: I5ba76d4f30d129365864c8a25b665f344b99a6b4
nstalld/commands.cpp
5041a4e6bf7364653c69e2e39f95cf1087163459 17-Jul-2015 Andreas Gampe <agampe@google.com> Installd: Add a swap override flag

Add dalvik.vm.dex2oat-swap system property to override a default
decision.

Bug: 20658562

(cherry picked from commit c968c0175e967e39e72f557b5e014b9575ba4727)

Change-Id: I34368c6e435d1a9ceec20a0bf1c8c6213e527f5e
nstalld/commands.cpp
c968c0175e967e39e72f557b5e014b9575ba4727 17-Jul-2015 Andreas Gampe <agampe@google.com> Installd: Add a swap override flag

Add dalvik.vm.dex2oat-swap system property to override a default
decision.

Bug: 20658562
Change-Id: I34368c6e435d1a9ceec20a0bf1c8c6213e527f5e
nstalld/commands.cpp
31f08986f83fa6f2dcf55523b2cf706460aeed7c 07-Jul-2015 Jeff Sharkey <jsharkey@android.com> Split app move into separate copy/delete steps.

App movement now has three distinct stages: copying, scanning, and
cleanup. Previously, a battery pull late in the move process would
end up with packages.xml pointing at the old location which had been
torn down. Now, we update packages.xml to point at the new location
as the "source of truth" before we start deleting the old location.

Bug: 21831336
Change-Id: I62b8916c673265c240e2574ea968cdce5a7a0074
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
1bcb35bf87cc2f7ef6c8a26238910ca9b88ea73d 25-Jun-2015 Hao Li <hao.i.li@intel.com> Installd: Fix delete_code_cache() clearing the wrong cache dir

Fix a typo in delete_code_cache() introduced by commit c03de09, which
causes the function to empty /data/data/<package_name>/cache/ rather
than /data/data/<package_name>/code_cache/.

The following CTS test case should now pass:

com.android.cts.appsecurity.SplitTests#testClearCodeCache

Change-Id: I2d9452d70ed39b3ea29ad65fb35e788c2fef5100
Signed-off-by: Hao Li <hao.i.li@intel.com>
Signed-off-by: Yu Ning <yu.ning@intel.com>
nstalld/commands.cpp
4ba2b63bff492815a86954c272a36d886f5bccec 15-May-2015 John Reck <jreck@google.com> Fix async_stop

Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
(cherry picked from commit 2c237ee1d5961b9d11618e0c5a97b3bb7fb694b2)
trace/atrace.cpp
46c51fb1adf8bc011b7d5b1c98a89303acb8c57b 29-Jun-2015 Yasuhiro Matsuda <mazda@google.com> Enable atrace to read categories from file.

Add -f option to atrace, which enables atrace to use the
categories written in the specified file.

BUG: 21739901
Change-Id: I2cf1f277280434b28c426c68e2864b62aebd20cc
trace/atrace.cpp
ae473363270724550699a7fd9c110a839f79964c 09-Jun-2015 Scott Bauer <bauers@google.com> Tracing for binder locks/transactions

Added logic to pull traces from the binder driver.

Change-Id: I9aa00b4650fc3f90d7bd55328dfef11e2514f7b4
trace/atrace.cpp
a2ccb9e43db52a18d088c1d440676335cb4b9e68 24-Jun-2015 Daichi Hirono <hirono@google.com> Fix directory path of codecache.

Previously installd removed the normal cache directory when delete_code_cache is
called. It should delete the code cache directory.

BUG=21206499

Change-Id: I5774430e389e22805fa7984b4c83420c3677ca75
nstalld/commands.cpp
528c8ddc60df7b3d291b389117e4db878a20ad48 28-May-2015 David Srbecky <dsrbecky@google.com> Rename --include-cfi to --generate-debug-info.

This follows a change in dex2oat.

(cherry picked from commit 741a6ff2e264b96edbca3ac95e720b21c8e39382)

Bug: 21924613
Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
nstalld/commands.cpp
3822b8b79cf533ee8573794176838406c32a1c20 24-Apr-2015 Andreas Gampe <agampe@google.com> Installd: Add debug.gencfi to run_dex2oat

Add the debug.gencfi system property that forces generation of
CFI data.

(cherry picked from commit 816243d470bade03c264e67e39590f6852581898)

Bug: 21924613
Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
nstalld/commands.cpp
8f37aa5011bf5d8c0a67126b92e3b435ffd4dca0 12-Jun-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: modify logcat timeout to compensate for storage speed

(cherry pick from commit f989162bb89dff6387f2021101306a1be6d875f7)

Discover the logcat buffer size, divide by the worst storage
speed in kb/s, and multiply by ten to estimate the timeout in
ms for each named buffer. If that value is less than 20 seconds,
then select 20 seconds. Apply this to each logcat request.

Bug: 21555259
Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc
umpstate/dumpstate.c
94a9875f7565617a000814039a4134420397a6aa 12-Jun-2015 Sharvil Nanavati <sharvil@google.com> Merge "Remove Bluedroid kernel dump from dumpstate." into mnc-dev
f989162bb89dff6387f2021101306a1be6d875f7 12-Jun-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: modify logcat timeout to compensate for storage speed

Discover the logcat buffer size, divide by the worst storage
speed in kb/s, and multiply by ten to estimate the timeout in
ms for each named buffer. If that value is less than 20 seconds,
then select 20 seconds. Apply this to each logcat request.

Bug: 21555259
Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc
umpstate/dumpstate.c
3ba7e729a7680d397113d3289fe1aae50463d56b 12-Jun-2015 Sharvil Nanavati <sharvil@google.com> Remove Bluedroid kernel dump from dumpstate.

Bluedroid doesn't have much of a kernel component and no devices
expose a bluedroid node in debugfs.

Change-Id: I5600e88c543a109257d95591704a8f2a7261dfdc
umpstate/dumpstate.c
47a7dc81d0fedc1e85091f0e8a868768d0e8cadd 10-Jun-2015 Erik Kline <ek@google.com> Merge "Incorporate network diagnostics during a bugreport" into mnc-dev
d845c96128a40ca5802c0840ae190fa0af7d4735 04-Jun-2015 Narayan Kamath <narayan@google.com> Add an installd command to link files

Given a pair of absolute paths {from_path, to_path} , check that
they are both valid apk subpaths (eg. /data/app/package/foo) and
link(2) to_path to from_path. This is required by staged installs,
where we link existing apks and oat files to their staging location.

bug: 20889739
Change-Id: I3b5e3b43677af68be59308121a4409caaa6a72f0
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/utils.cpp
90926336c19e45a1618b6251529b0071877bfdd4 09-Jun-2015 Erik Kline <ek@google.com> Incorporate network diagnostics during a bugreport

Bug: 21449922
Change-Id: I81a3774683c08f5d4ab4ea75bec45d279fb210ec
umpstate/dumpstate.c
2139c7fa37e581f6d2f573003afc16fbef700ad1 03-Jun-2015 Stephen Smalley <sds@tycho.nsa.gov> Call selinux_status_open() prior to use of selinux_status_updated().

The selinux_status_*() interfaces require calling selinux_status_open()
first. Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

(cherrypicked from commit bea0746b241d15626cf0a56828efc1d4640dbda7)

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
ervicemanager/service_manager.c
bea0746b241d15626cf0a56828efc1d4640dbda7 03-Jun-2015 Stephen Smalley <sds@tycho.nsa.gov> Call selinux_status_open() prior to use of selinux_status_updated().

The selinux_status_*() interfaces require calling selinux_status_open()
first. Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
ervicemanager/service_manager.c
741a6ff2e264b96edbca3ac95e720b21c8e39382 28-May-2015 David Srbecky <dsrbecky@google.com> Rename --include-cfi to --generate-debug-info.

This follows a change in dex2oat.

Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
nstalld/commands.cpp
bfb1f1cc832840b7232c25a91d49eb39aa79687f 16-May-2015 Elliott Hughes <enh@google.com> Don't use TEMP_FAILURE_RETRY on close in frameworks/native.

Bug: http://b/20501816
Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6
(cherry picked from commit 997abb668b9248c2174c6cf169a0b7c6a02fd2cb)
ugreport/bugreport.cpp
umpstate/utils.c
997abb668b9248c2174c6cf169a0b7c6a02fd2cb 16-May-2015 Elliott Hughes <enh@google.com> Don't use TEMP_FAILURE_RETRY on close in frameworks/native.

Bug: http://b/20501816
Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6
ugreport/bugreport.cpp
umpstate/utils.c
2c237ee1d5961b9d11618e0c5a97b3bb7fb694b2 15-May-2015 John Reck <jreck@google.com> Fix async_stop

Change-Id: I68a258cf71cfcd999bbd568ab3c96255c11bec41
trace/atrace.cpp
cbe13ef59b25b6df226c09b9351f0f615bc68dda 25-Feb-2015 Aaron Schulman <aschulman@google.com> Added Voltage and Current regulator ftrace events to atrace

Cherry-pick of c2c6ecd1195481f5813a721a7d20a73c0795c135 from AOSP

Tracing the state of the voltage and current regulators enables a developer
to attribute power consumption measurements to specific perhipherals and
cores. Unlike other indirect methods of tracing when peripherals and cores
are toggled, the regulator ftrace event indicates the exact point in time
when the kernel switches on or off the device. For example, in the following
trace, a developer can see exactly when the krait2 core starts receiving
power, and and when the voltage is set for voltage scaling.

mpdecision-2172 [000] ...1 1566.665481: regulator_enable: name=krait2
mpdecision-2172 [000] ...1 1566.665493: regulator_enable_delay: name=krait2
mpdecision-2172 [000] ...1 1566.665495: regulator_enable_complete: name=krait2
<...>-4133 [002] ...1 1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000)

Change-Id: Ia322206ef74496daf1d9baa03545d8e89e398487
Signed-off-by: Aaron Schulman <aschulman@google.com>
trace/atrace.cpp
05815996c965b99c4cc4ea96f6b6c4a9123cdf1c 07-May-2015 Chris Craik <ccraik@android.com> Merge "Added Voltage and Current regulator ftrace events to atrace"
326842fca4883f1256aa9ed019bb3206ee76fca7 30-Apr-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: report per-partition MMC performance

(Cherry pick from commit 540e3de99fa1baa5eaf3eb3d49f4e98fd9f5bd91)

Change-Id: If5cabe186d8377056effa1c0672a90e277cd7221
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
d792118c493806eeb24a8203f508e6e18fe93bd7 01-May-2015 Jeff Sharkey <jsharkey@android.com> Offer to move both code and data together.

We now move code under /data/app/com.example when a complete move
is requested. This really only works for new cluster-style installs
that also have native libraries and OAT contained inside.

Teach measuring code about cluster-style installs when measuring
app footprint. Also offer to measure private data space for all
users.

Bug: 19993667, 20275578
Change-Id: I6df7b947cb5cc8a4552f56f4b64a661e8512389f
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
540e3de99fa1baa5eaf3eb3d49f4e98fd9f5bd91 30-Apr-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: report per-partition MMC performance

Change-Id: If5cabe186d8377056effa1c0672a90e277cd7221
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
8b3e133e413774047da8005771f57c21dd31e1e3 28-Apr-2015 Ashish Sharma <ashishsharma@google.com> Inclide checkin format of dumpsys package in bugreport.

Change-Id: I809377f80e314b358eba22fa916e53c81cac2c47
umpstate/dumpstate.c
816243d470bade03c264e67e39590f6852581898 24-Apr-2015 Andreas Gampe <agampe@google.com> Installd: Add debug.gencfi to run_dex2oat

Add the debug.gencfi system property that forces generation of
CFI data.

Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
nstalld/commands.cpp
1044367a73266c687dd3c7177c5e53e1ee60a438 10-Apr-2015 Jeff Sharkey <jsharkey@android.com> am a36a43b3: am c200d20e: am dfc30ae3: Merge "Command to move private app data between volumes."

* commit 'a36a43b354b248cef9407de42fb6b87e1c7085f6':
Command to move private app data between volumes.
e36372423000a906bafae68844ebc6c42d09335a 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> Command to move private app data between volumes.

New "mvuserdata" command will move all private app data from one
volume UUID to another. It leverages the existing "cp" toybox
command to do the heavy lifting for all known users, preserving
details like timestamps and permissions. It invokes restorecon()
to correctly label the new location when the copy is finished.

Changes installd to no longer drop capabilities, so we run as root
again. This also allows us to exec "cp" with CAP_DAC_OVERRIDE and
CAP_FOWNER still in effect.

Bug: 19993667
Change-Id: I1f407a7c4a1af97ca5afc27b04eb16b4936cbdef
nstalld/Android.mk
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/utils.cpp
16af1b044e67370d9f7e44b1e0b60ced60a85ba9 10-Apr-2015 Jeff Sharkey <jsharkey@android.com> am 8571e647: am 997eb5dd: am 44a38d93: Merge "Start accepting volume UUIDs from framework."

* commit '8571e647da1e9c2227d22034ba6462235273cb02':
Start accepting volume UUIDs from framework.
6fe28a06012250da85f808a0869f87e06e0bcce9 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> Start accepting volume UUIDs from framework.

We're now parsing and passing through volume UUIDs sent across the
command socket. The "!" argument value is treated as null, which
means internal storage.

Bug: 19993667
Change-Id: I17729a769ce687a2e94e85991a6338c77ded0b66
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
fe62ea5d0616c9226b26b8139fa3a0396a776d88 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> am ad6f4996: am 25327881: am 066fadb9: Merge "More volume UUID awareness."

* commit 'ad6f4996dc909dcb8e6e369bf41be514077fb142':
More volume UUID awareness.
41ea424413c0381ef2aa15fc5bd5d4b88abd23c4 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> More volume UUID awareness.

Teach free_cache() and restorecon_data() about building per-volume
paths. Also clean up restorecon_data() by using std::string when
building paths.

Clearer names for path building utility methods, and tests to verify.

Bug: 19993667
Change-Id: Iacfbcdaa5b901cc2490bc8eba366dfdeb44f1d93
nstalld/Android.mk
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/tests/Android.mk
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
e92939471a172d3b64d1ba990d53c2321b51c4e5 09-Apr-2015 Andreas Gampe <agampe@google.com> am 6930a29a: am cae83eca: am f9ab2ad2: Merge "Installd: Fix Clang build"

* commit '6930a29af13f4a958fa7cba544233d2febe4040b':
Installd: Fix Clang build
5fd5dd676a8ebf33489c9326e269b5840468566e 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> am 65fe5dfd: am cbde9b92: am d107c305: Merge "Plumb through volume UUID when building paths."

* commit '65fe5dfdcd08650e0dfbb39f4a716567fb910cab':
Plumb through volume UUID when building paths.
0ad7a11003ad76381452c3751368b8e3f42b1f6a 09-Apr-2015 Andreas Gampe <agampe@google.com> Installd: Fix Clang build

Remove some unused parameters and variables.

Change-Id: I507ae48fe1744b800ceb29192d463fd26c2ccda7
nstalld/commands.cpp
d107c305f74592e8078754b317d840a2dde661db 09-Apr-2015 Jeff Sharkey <jsharkey@android.com> Merge "Plumb through volume UUID when building paths."
9cebc2bc77cf22dc4273c0342694fb8f51bca04d 09-Apr-2015 Richard Uhler <ruhler@google.com> am b8d1ee37: am 19db8c88: am ab91d03b: Merge "installd: Add support for SELF_PATCHOAT_NEEDED."

* commit 'b8d1ee37c4a6897442f5d381d5eb7162e04fcebd':
installd: Add support for SELF_PATCHOAT_NEEDED.
ab91d03b0dfebf40e98034670892c278ae0a46e5 09-Apr-2015 Richard Uhler <ruhler@google.com> Merge "installd: Add support for SELF_PATCHOAT_NEEDED."
82f393aad651fbf06d8c6872ac10a739ff2a3e42 09-Apr-2015 Mark Salyzyn <salyzyn@google.com> am d029e95a: am 1b0a8702: am ad436ab5: Merge "dumpstate: scrub APANIC"

* commit 'd029e95a58ea0927ebd3431d9991cd316e568002':
dumpstate: scrub APANIC
f423b57dd98fcba8d0e34f98d28a9afc41577508 08-Apr-2015 Mark Salyzyn <salyzyn@google.com> dumpstate: scrub APANIC

Bug: 19525200
Change-Id: Ia2d2857cac953fb4ceafb66ddf775d89d7a777b1
umpstate/dumpstate.c
c03de09173f98506e73e7cf7df21fe11795d4b24 08-Apr-2015 Jeff Sharkey <jsharkey@android.com> Plumb through volume UUID when building paths.

Since app data paths can live on expanded storage devices, accept the
target volume UUID when building paths. The null UUID indicates the
default internal storage.

To improve readability, start using std::string in several places,
which throws when allocations fail. For now, perform last-second
sanity checks on incoming path arguments, but we'll eventually want
to check arguments as they come through installd.cpp, instead of
crashing the entire daemon.

Also remove "lib" symlink code from install() and make_user_data(),
since we're no longer supporting /data/app-lib. The framework
already uses linklib() to create the right symlink for the selected
ISA-specific library dir.

Bug: 19993667
Change-Id: Ib9343575ffb62bf3981e19375de8f3822fc31e28
nstalld/Android.mk
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
nstalld/tests/Android.mk
nstalld/tests/installd_utils_test.cpp
nstalld/utils.cpp
c92fb6247d4c4fbc34c0a5deb26ccf538ca9ec81 26-Mar-2015 Richard Uhler <ruhler@google.com> installd: Add support for SELF_PATCHOAT_NEEDED.

Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
nstalld/commands.cpp
nstalld/installd.cpp
nstalld/installd.h
580e51458e2a9f4f73ba174b1ad459c7e2d5c23d 07-Apr-2015 Jeff Sharkey <jsharkey@android.com> am eb3704a5: am 9e99fce8: am 1cd030be: Merge "Switch installd to compile as C++."

* commit 'eb3704a58e62c0f85cfea776df1040b677263c80':
Switch installd to compile as C++.
19803807cd7ae01868fcfa50305f4a7dd13765e2 07-Apr-2015 Jeff Sharkey <jsharkey@android.com> Switch installd to compile as C++.

This is the minimal change needed to switch it over to C++, which
paves the way for using more robust utilities like std::string.

Change-Id: I80ed6280146875eb6ddbbb340c05450388ca13f0
nstalld/Android.mk
nstalld/commands.c
nstalld/commands.cpp
nstalld/installd.c
nstalld/installd.cpp
nstalld/installd.h
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
nstalld/utils.cpp
e23a13299a4f6f2488935b4786cdbb46f46e3d3c 07-Apr-2015 Jeff Sharkey <jsharkey@android.com> Valid APK paths now include expanded storage.

Apps on expanded storage live at /mnt/expand/<uuid>/app/com.example,
so we need to relax one more directory level.

Bug: 19993667
Change-Id: I347ec7b92435ea69e632ed5d5fdfabe38ce0b56e
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
7897031f3e5292fb744445557b755fcb28f11329 07-Apr-2015 Fyodor Kupolov <fkupolov@google.com> am b58e6cbf: am 4914f85f: am 8f43f77d: Merge "Use AID_SYSTEM as uid when creating oat dir"

* commit 'b58e6cbfa726add05bbe5e31e8ca13815ccf2049':
Use AID_SYSTEM as uid when creating oat dir
8eed7e6a9bb527af7380ec13b390c6e2955eba6a 07-Apr-2015 Fyodor Kupolov <fkupolov@google.com> Use AID_SYSTEM as uid when creating oat dir

Previously AID_INSTALL was used, which was causing permission denied errors
when PackageManager was trying to recursively rename staging directory

Bug: 19550105
Bug: 20087446
Change-Id: I3a9e3056c1fbc1ce0077a3ce52cf77ea6b5085ee
nstalld/commands.c
c0bae30131626bf1141cebffc38a54278929baeb 07-Apr-2015 Jeff Sharkey <jsharkey@android.com> Merge "Valid APK paths now include expanded storage."
969baf52d9d0366be5d523a38ef89eaa314b2e8b 07-Apr-2015 Jeff Brown <jeffbrown@google.com> Merge "Add support for int64, float, double types to service command."
d46898fed050b6e2b93ecd3a3da4143b5108024a 07-Apr-2015 Jeff Brown <jeffbrown@google.com> Add support for int64, float, double types to service command.

Comes in handy for invoking transactions that require these types.

Change-Id: I8f14519a2531ab2ec7f3218ecda6d1868f6dd7b3
ervice/service.cpp
7d78005a27c9e4e9b19504521af59c0836ace7b1 07-Apr-2015 Jeff Sharkey <jsharkey@android.com> Valid APK paths now include expanded storage.

Apps on expanded storage live at /mnt/expand/<uuid>/app/com.example,
so we need to relax one more directory level.

Bug: 19993667
Change-Id: I347ec7b92435ea69e632ed5d5fdfabe38ce0b56e
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
62b58afc2127ffde5ba41f23d449f8a148f2d633 07-Apr-2015 Elliott Hughes <enh@google.com> am 7b5f82d8: am 46072d58: am a60ff367: Merge "Remove useless \'svcmgr_handle\' (which had wrong type)."

* commit '7b5f82d8d726e4bcd21c19340c0743a728bc0253':
Remove useless 'svcmgr_handle' (which had wrong type).
a60ff367a4f55ea319625cf500687c5025604f40 07-Apr-2015 Elliott Hughes <enh@google.com> Merge "Remove useless 'svcmgr_handle' (which had wrong type)."
0b41ad5d6ec86cd2d481969dcff7e88f2805324f 04-Apr-2015 Elliott Hughes <enh@google.com> Remove useless 'svcmgr_handle' (which had wrong type).

Also use the 'ptr' union member rather than 'handle'.

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Change-Id: I68e5336cd3af3bc61dbddd2b33d7e1512c0c329c
ervicemanager/service_manager.c
177861d98f0a44bb94c6d9a2fed176fa4a226dbf 04-Apr-2015 Elliott Hughes <enh@google.com> am 2d4cf62a: am 8d9f899a: am 031fec0b: Merge "ServiceManager: Print kernel/userspace binder version"

* commit '2d4cf62a2cdfbfbbca5757eb7dd1498d118bf7c9':
ServiceManager: Print kernel/userspace binder version
018cf41a15a349fbe788b240d13afbb4e985481b 19-Feb-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Print kernel/userspace binder version

This patch adds extra logging for the binder version in case the userspace
and kernel versions differ.

Change-Id: I9859b29099726cfcfe5ca23d88ed2e101a06af1a
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/binder.c
b3fb52f7d80434001534b9680a45d20e93b598dd 03-Apr-2015 Fyodor Kupolov <fkupolov@google.com> am bce77997: am ebca76c2: am 9cad1985: Merge "Fix errors caused by unused variables"

* commit 'bce7799786ae712bba9b58f1f99cd12ee05b5cf3':
Fix errors caused by unused variables
35eefd2fa70c5100f0a543686b4814ecff787985 03-Apr-2015 Fyodor Kupolov <fkupolov@google.com> am a46d5e4b: am 63750cb6: am 4eb88f88: Merge "Support for storing OAT files in app directory"

* commit 'a46d5e4b9a598330e2a79395dbd201ab88aded00':
Support for storing OAT files in app directory
26ff93c1a783d02c177a47f0a80249070fe43682 03-Apr-2015 Fyodor Kupolov <fkupolov@google.com> Fix errors caused by unused variables

Change-Id: Ie52ae0e9a642504ee7b78c6bc54b61549cfb0342
nstalld/commands.c
4eb88f883911eb1208e85a9c176481176242af13 03-Apr-2015 Fyodor Kupolov <fkupolov@google.com> Merge "Support for storing OAT files in app directory"
f386c961eac36ff1d37b5c448905305b7473e0b1 02-Apr-2015 Mark Salyzyn <salyzyn@google.com> am a231a128: am 0f9bf17a: am 23b204e1: Merge "servicemanager: service_manager missing include for string.h"

* commit 'a231a1287815e80a5ab11e30254005b81254d891':
servicemanager: service_manager missing include for string.h
13df5f5f8fbc5a3fdfdd5d1ba5dc853cf3f017f0 01-Apr-2015 Mark Salyzyn <salyzyn@google.com> servicemanager: service_manager missing include for string.h

service_manager.c gets string.h inherited from
private/android_filesystem_config.h it should
not rely on this in the future. The intent is
to move fs_config function into libcutils and
thus deprecate any need for string.h in this
include file.

Bug: 19908228
Change-Id: Icc95ee02bf02c596463868b1330d209d1bd5c58a
ervicemanager/service_manager.c
a053c841df11c4b8b2e89724a55bc4fd428ca013 31-Mar-2015 Andreas Gampe <agampe@google.com> am 059e9c02: am 8c60cec0: am 5881c8dd: Merge "Installd: Support dex2oat threads system property"

* commit '059e9c023eb025472db6775f9c2a95191dd6c2bf':
Installd: Support dex2oat threads system property
8d7af8b2418cc5e7e59746f0cb359a75ed0bdfd1 31-Mar-2015 Andreas Gampe <agampe@google.com> Installd: Support dex2oat threads system property

Check dalvik.vm.dex2oat-threads in installd and pass to dex2oat.

Bug: 19992386
Change-Id: I5e7806cf560607d31a1d6901dffb14bee538c9cc
nstalld/commands.c
88ce4ff7a95ea2008fa28f12b880ee526e331440 03-Mar-2015 Fyodor Kupolov <fkupolov@google.com> Support for storing OAT files in app directory

Changes to installd:
- dexopt now allows oat_dir param for custom output directory
- Added helper method calculate_oat_file_path for calculating oat file
output location based on oat_dir and apk_path.

Bug: 19550105
Change-Id: I6b079207310583adeb6dad918a58034a059e34c4
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
c1c024a50c9b1cfd2c74d507de60ad4a52ca9dbd 27-Mar-2015 John Reck <jreck@google.com> am 3e785e2e: am 88c52865: am 0faebfb2: Merge "Add trace_event_clock_sync to atrace"

* commit '3e785e2ef93b068630d0ffb5178a5f38cc249a3d':
Add trace_event_clock_sync to atrace
469a194051f1657b3f77ff2f5d84a60f7521faba 26-Mar-2015 John Reck <jreck@google.com> Add trace_event_clock_sync to atrace

Change-Id: I8adce15210d82df09ff3a39ddd8df617aeb16a42
trace/atrace.cpp
59d996fb0d7050013078bd80f24b698363e69fa8 26-Mar-2015 Richard Uhler <ruhler@google.com> am da08fc67: am b84a3dde: am bc5aceb1: Merge "Store odex files in oat/<isa>/ directory."

* commit 'da08fc672ff9643ada87a38fb98c7bd604b678ad':
Store odex files in oat/<isa>/ directory.
009b8771323ce69658c1ac0254c3259186107fb6 18-Mar-2015 Richard Uhler <ruhler@google.com> Store odex files in oat/<isa>/ directory.

Previously odex files were stored alongside the dex location as:
dex location: /foo/bar/base.apk
odex location: /foo/bar/<isa>/base.odex

This changes where odex files are stored, adding an "oat" directory:
dex location: /foo/bar/base.apk
odex location: /foo/bar/oat/<isa>/base.odex

See also the corresponding changes in platform/art and platform/build.

Bug: 19550105
Change-Id: I4c6be4f0c41ff175904846db8e360c4af815b265
nstalld/commands.c
ab62d4a4a7a17bb7ef9f9b00b27abd325adf0c92 24-Mar-2015 Mathieu Chartier <mathieuc@google.com> am a290b4b9: am b4cf4d7d: am 6dad1713: Merge "Use verify-at-runtime if debug.usejit is true"

* commit 'a290b4b9121dab04c2989ab88017b8286075914b':
Use verify-at-runtime if debug.usejit is true
6dad1713040a46ec6e2ca1b0df2cbe4240e9e2e9 21-Mar-2015 Mathieu Chartier <mathieuc@google.com> Merge "Use verify-at-runtime if debug.usejit is true"
d4a7b459f4f383988440c0512513b321ce03fc22 20-Mar-2015 Mathieu Chartier <mathieuc@google.com> Use verify-at-runtime if debug.usejit is true

Bug: 19735273
Change-Id: Ib65b50dbde00184544a1341f351a0fe0ef504d32
nstalld/commands.c
4796bc3b27186de67f1af732be87e20ab1757198 19-Mar-2015 Nick Kralevich <nnk@google.com> am 4b9d0b9b: am f3201498: Merge "dumpstate: add O_CLOEXEC"

* commit '4b9d0b9b676afec086bf579015b2f74623b357fd':
dumpstate: add O_CLOEXEC
cd67e9f059e270017d5defd8784c89dd8e6bcde7 19-Mar-2015 Nick Kralevich <nnk@google.com> dumpstate: add O_CLOEXEC

Add O_CLOEXEC to various file descriptor calls, to avoid
leaking file descriptors to dumpstate's child processes.

Bug: 18342188
Change-Id: I74c47a98dfddc29c618067ad53d879b98ed1d87a
umpstate/dumpstate.c
umpstate/utils.c
7ecaa009878259292c614acd6a81699d4738baf1 10-Mar-2015 Andreas Gampe <agampe@google.com> am 53cab935: am 1fc747d2: am 5a25a63d: Merge "Installd: Pass debuggable flag"

* commit '53cab935d54b6ca013c6a236e09d9160a6aa7f54':
Installd: Pass debuggable flag
1fc747d20c1a390e1de3d482d2eafde6dc7e6236 10-Mar-2015 Andreas Gampe <agampe@google.com> am 5a25a63d: Merge "Installd: Pass debuggable flag"

* commit '5a25a63de2693177b15817fb19b684ca7bfec582':
Installd: Pass debuggable flag
598c25e23f7c97470e09a2316513ddf2efdfb670 03-Mar-2015 Andreas Gampe <agampe@google.com> Installd: Pass debuggable flag

Pass the debuggable flag from the package manager to dex2oat.

Change-Id: Id17ec72babe2ee88713a0d274eff86508de30666
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
8f1ef92edc1864a92907ed37aedf4db9de2727cc 05-Mar-2015 Nick Kralevich <nnk@google.com> am f11b58f2: am fcf1689c: am 5fec7915: Merge "service_manager: reorder permission checks for find"

* commit 'f11b58f296039a0bf90336e4c38c014f11542092':
service_manager: reorder permission checks for find
fcf1689c1a1654cb3b480356a1ba3ebf198f2943 05-Mar-2015 Nick Kralevich <nnk@google.com> am 5fec7915: Merge "service_manager: reorder permission checks for find"

* commit '5fec79156d749322dcc0376da1d6cf4d9ee9ccf4':
service_manager: reorder permission checks for find
b27bbd18bb65b3744ae066fcd6826285dec8b469 05-Mar-2015 Nick Kralevich <nnk@google.com> service_manager: reorder permission checks for find

Reorder the find permission checks. This avoids generating misleading
SELinux denials when a service doesn't exist, or when a service is
prohibited to isolated apps.

The original reason for structuring the code this way is explained
in https://android-review.googlesource.com/#/c/100530/4/cmds/servicemanager/service_manager.c@172
The concern at the time was to avoid leaking a situation where
a caller could probe for the existance of a service. This turns out
to be unnecessary. The same return value is used for both a
permission denied and a service not found. The only side effect
is the generation of an SELinux audit log, which likely won't be
accessible to the calling application.

Change-Id: I9760e1821ed16102fa5f9bec07f8c34944565be9
ervicemanager/service_manager.c
123edd9f812c93973de923397f2a5cb6fdaa4135 26-Feb-2015 Christopher Ferris <cferris@google.com> resolved conflicts for merge of 04e13acd to master

Change-Id: I9bbc9907a5cbde8b374398493bc0dc6b056ea734
69a141e07fab2672cf2cc23dcc124c46995fbf98 26-Feb-2015 Christopher Ferris <cferris@google.com> am 9d68ed0e: Merge "Add timeout for dump_file."

* commit '9d68ed0ecd3a101c13a163cfe730b13b1564b442':
Add timeout for dump_file.
9d68ed0ecd3a101c13a163cfe730b13b1564b442 26-Feb-2015 Christopher Ferris <cferris@google.com> Merge "Add timeout for dump_file."
59b0b568d0ce20394e6d491342ad0b06682dfa45 25-Feb-2015 Mark Salyzyn <salyzyn@google.com> resolved conflicts for merge of d6c8ae9c to master

Change-Id: I3cbb6ed0958b4328aca1798c7fe6080c31555a3a
2f655daeea66bf5d0e065b45a7abd515cfeeaf97 26-Feb-2015 Mark Salyzyn <salyzyn@google.com> am bb67beca: Merge "dumpstate: add pstore read"

* commit 'bb67beca35e7d570ede193a316a92022fbc2f810':
dumpstate: add pstore read
2262c16372570f57d3107d574abe2c80825d286e 16-Dec-2014 Mark Salyzyn <salyzyn@google.com> dumpstate: add pstore read

Call logcat -L to pull any LAST Android logs. If the kernel is not
configured for PSTORE and PSTORE_PMSG, the hopes are the empty
content will pressure vendors to slice up and configure support.

Change-Id: I5fddfa1e0f59f24fccc30b257ba68af8a8cf8640
umpstate/dumpstate.c
54bcc5ffd5a79f4f194089c58d3de571532bf39b 10-Feb-2015 Christopher Ferris <cferris@google.com> Add timeout for dump_file.

It turns out dump_file is used on a number of /proc and system files.
In one case, the read of a file stalled and caused a bugreport to
hang forever. It's still possible if there is a kernel bug that this
could stall forever, but less likely.

Also, change the return type of nanotime to uint64_t.

Testing:
- Created a named fifo and verified that dump_file fails with a timeout.
- Created a large /data/anr/traces.txt to verify that large files still
dump properly and that the additional NONBLOCK parameter doesn't cause
a problem.
- Created a dummy /data/tombstones/tombstone_00 to verify that the
dump of these files still works.
- Compared a dump using the old dumpstate to the new dumpstate to verify
nothing obviously different.

Bug: 19117030
Change-Id: I0d3dd27583c853cdaccd2fd278748cb5f9ccd4fb
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
c2c6ecd1195481f5813a721a7d20a73c0795c135 25-Feb-2015 Aaron Schulman <aschulman@google.com> Added Voltage and Current regulator ftrace events to atrace

Tracing the state of the voltage and current regulators enables a developer
to attribute power consumption measurements to specific perhipherals and
cores. Unlike other indirect methods of tracing when peripherals and cores
are toggled, the regulator ftrace event indicates the exact point in time
when the kernel switches on or off the device. For example, in the following
trace, a developer can see exactly when the krait2 core starts receiving
power, and and when the voltage is set for voltage scaling.

mpdecision-2172 [000] ...1 1566.665481: regulator_enable: name=krait2
mpdecision-2172 [000] ...1 1566.665493: regulator_enable_delay: name=krait2
mpdecision-2172 [000] ...1 1566.665495: regulator_enable_complete: name=krait2
<...>-4133 [002] ...1 1566.666891: regulator_set_voltage: name=krait2 (1075000-1100000)

Change-Id: I964d50be89bbfc554d2ab3e32a18514d1b1e70f4
Signed-off-by: Aaron Schulman <aschulman@google.com>
trace/atrace.cpp
28d41f5640cab96b5cac4b4b233ae9f721c96975 19-Feb-2015 Bill Yi <byi@google.com> Merge commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb' into HEAD
326db4f16749e5fd4c29662b654bdebcd606c291 18-Feb-2015 Svetoslav <svetoslavganov@google.com> Merge "Remove unnecessary settings state dump."
d527bcbc10b1fb6b998b94bbac7bfbfd3a9efdf6 17-Feb-2015 Svetoslav <svetoslavganov@google.com> Remove unnecessary settings state dump.

The settings provider now implements dump, hance special dump
code is no longer needed.

Change-Id: I93af3f6acac4ac70d6bbf569d2348cb16b8c0946
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
6576937ff165cfd8e2230cbeb40c6d783675c517 17-Feb-2015 Elliott Hughes <enh@google.com> am 75b81aee: Merge "Add missing <sys/file.h> include for flock."

* commit '75b81aee3830d0a8c7c10e3ca7f1652543dbbaca':
Add missing <sys/file.h> include for flock.
2ead70ce6791f93d2ac4f95dea5097f51584d285 16-Feb-2015 Elliott Hughes <enh@google.com> Add missing <sys/file.h> include for flock.

Change-Id: I5c9bb4aa74d8a36d44e086bbcb5d60876727ce4c
nstalld/commands.c
34e32466466ad3f46697798c9f9644d62390c9b5 10-Feb-2015 Christopher Ferris <cferris@google.com> am 8511b3ae: Merge "Remove -z option."

* commit '8511b3ae5eb42810f97f7c3e993d7f80d3393b83':
Remove -z option.
ff4a4dc7e6e3ead12020b4dc17548d767a419dde 10-Feb-2015 Christopher Ferris <cferris@google.com> Remove -z option.

This option doesn't work with the current selinux protections and
doesn't serve much of a purpose. You can get the same results running
this:

dumpstate | gzip > /data/local/tmp/dump.txt.gz

Bug: 19271141
Change-Id: Icc76200df33dc708e30c556ec8a0f393f995fe7c
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
16c62c468aacf40496a7cad94f49795a797cdd37 04-Feb-2015 Christopher Ferris <cferris@google.com> am 50ad67e4: Merge "Add better timeout mechanism for running commands."

* commit '50ad67e4ce6b07b5f5f4649ace81ed9a8b2c2eac':
Add better timeout mechanism for running commands.
1a9a3386151d90152cc18d995b9877b50ca84d90 30-Jan-2015 Christopher Ferris <cferris@google.com> Add better timeout mechanism for running commands.

Change-Id: I60fc9e7d59c3e0e4b8b2f69f79c6903240bfd131
umpstate/utils.c
42b5e6d49c92c3ec89fec7c68438a61e9e021e72 30-Jan-2015 Elliott Hughes <enh@google.com> am 51bfedd8: Merge "Add missing includes."

* commit '51bfedd821c79ae34ee1caffd9ae958faa71ecec':
Add missing includes.
824e30e5ed35b8f416fea12ce574b012aedaaab5 30-Jan-2015 Elliott Hughes <enh@google.com> Add missing includes.

Change-Id: I1dad32ab459c25063a70cf52100a29d00fea3a90
ervicemanager/bctest.c
ervicemanager/binder.c
e55073a96ca7e9447592988614664b3c9666d93a 28-Jan-2015 Elliott Hughes <enh@google.com> am 0e17a265: Merge "Switch dumpstate to "ip link list"."

* commit '0e17a265f5e8bf233a3e3b74fc03ada3dc467bed':
Switch dumpstate to "ip link list".
a59828a5d2740433164872e9a0b44363e2ba0cd4 28-Jan-2015 Elliott Hughes <enh@google.com> Switch dumpstate to "ip link list".

Change-Id: Ia1db51c866890f09fbd4316764dea5982554598f
umpstate/dumpstate.c
2e5a1cf27ec7ba3ff64cae479ceb5670439470da 25-Jan-2015 Elliott Hughes <enh@google.com> am 346329b7: Merge "Move atrace from the obsolete bzero to memset."

* commit '346329b7a70b594895be0aec5dc00f9f4108b533':
Move atrace from the obsolete bzero to memset.
346329b7a70b594895be0aec5dc00f9f4108b533 25-Jan-2015 Elliott Hughes <enh@google.com> Merge "Move atrace from the obsolete bzero to memset."
3da5d235dab9469ccec567c4ebbb5206f4558a18 25-Jan-2015 Elliott Hughes <enh@google.com> Move atrace from the obsolete bzero to memset.

(This file wasn't including <strings.h> for bzero or <string.h> for memset.)

Change-Id: Icef0e0dbfd36ebd21058cfd8c747e0a17aee8308
trace/atrace.cpp
3dea840d212429956144790189127b30d976bf63 24-Jan-2015 Christopher Ferris <cferris@google.com> am c0e10c6f: Merge "Refactor of the bugreport code."

* commit 'c0e10c6f03eaa126aeb745e0b209ad0b219ade6e':
Refactor of the bugreport code.
9b73bf07d73dbab5b792632e1e233edbad77f5fd 21-Jan-2015 Christopher Ferris <cferris@google.com> Refactor of the bugreport code.

Implemented these changes:

- Make this code C++.
- Avoid hangs by adding a timeout.
- Add the necessary TEMP_FAILURE_RETRY calls.
- Restructure the code a bit.

Bug: 18800936

Change-Id: Iba9f86a4c7beee4f0f36e51234855f4c0834db47
ugreport/Android.mk
ugreport/bugreport.c
ugreport/bugreport.cpp
31ef85529d86a9db68b002f51ec84fd9938908ab 14-Jan-2015 Christopher Ferris <cferris@google.com> Use the timeout stack dump functions.

Use the native stack dumping functions that allows time outs. If
debuggerd locks up, before a bugreport would hang forever. Now
it will timeout properly and still get all of the other information.

Bug: 18766581

(cherry picked from commit 457731f69e3106b5aae8fc04f9565af1d875876c)

Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
umpstate/utils.c
8d129cbf5a8affebaf0883450d637132e2f9f512 15-Jan-2015 Christopher Ferris <cferris@google.com> am 457731f6: Use the timeout stack dump functions.

* commit '457731f69e3106b5aae8fc04f9565af1d875876c':
Use the timeout stack dump functions.
457731f69e3106b5aae8fc04f9565af1d875876c 14-Jan-2015 Christopher Ferris <cferris@google.com> Use the timeout stack dump functions.

Use the native stack dumping functions that allows time outs. If
debuggerd locks up, before a bugreport would hang forever. Now
it will timeout properly and still get all of the other information.

Bug: 18766581
Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
umpstate/utils.c
d195f87b2dd4aa731a21ef3acd321e2441c5bffb 10-Jan-2015 Christopher Ferris <cferris@google.com> Fix message when a command times out.

The previous version printed out the nanoseconds elapsed, not seconds.

Bug: 18766581

(cherry picked from commit 67c5a8af9ed128d8bb56d4723303aef6f0a4500f)

Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
umpstate/utils.c
d8dc9405c3d5bb2cc20950ed8d6fe25c1239e8e1 12-Jan-2015 Christopher Ferris <cferris@google.com> am 4f9bfffe: Merge "Fix message when a command times out."

* commit '4f9bfffe23d40fdaabe91ea7c7691e52800edb79':
Fix message when a command times out.
67c5a8af9ed128d8bb56d4723303aef6f0a4500f 10-Jan-2015 Christopher Ferris <cferris@google.com> Fix message when a command times out.

The previous version printed out the nanoseconds elapsed, not seconds.

Change-Id: I10f6d7bf7b7a4647658313ed83781fda6fd744a5
umpstate/utils.c
ee7ed02077f1acd5d27575177f4edf2c6939c2e4 07-Jan-2015 Andreas Gampe <agampe@google.com> am 96e4409e: Merge "Installd: Disallow relocation for decryption"

* commit '96e4409e8c38b1d79285eca9886d44ff850b5748':
Installd: Disallow relocation for decryption
14e084d39ac44e9d4d0a0143bf1f111011343d34 07-Jan-2015 neo.chae <neo.chae@lge.com> Installd: Disallow relocation for decryption

When decrypting a device, a tmpfs is temporarily mounted as /data,
the size of which is usually small. When the zygote, system server
and necessary apps are brought up, they will be compiled into the
tmpfs.

If the system image contains prebuilts, they will be relocated instead
of compiled. This is unnecessary. In this special situation it is
acceptable to run out of the prebuilt oat files without relocation,
which can save space in the tmpfs.

This patch ensures that apps are not being relocated.

Change-Id: I42bfb7e3039574b7e4f2772e0d395f093d59ed1b
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
nstalld/commands.c
4fb9f9377e03e1c01b34a7e1b6f3f9be8f78358d 22-Dec-2014 Andreas Gampe <agampe@google.com> am d3255076: Merge "Installd: Swap file for dex2oat"

* commit 'd325507698d8379e431a8c8fefcfafe59956bd88':
Installd: Swap file for dex2oat
e1c01353c4dc6058a384eea9853238d2a87040db 11-Dec-2014 Andreas Gampe <agampe@google.com> Installd: Swap file for dex2oat

Add swap file support for dex2oat to installd. Only use in low-memory
mode.

Bug: 18596910

(cherry picked from commit f68ce4de7fcfcc090af7985972b304eed7dbaf63)

Change-Id: I131448f3907115054a592af73db86d2b9257ea33
nstalld/commands.c
f68ce4de7fcfcc090af7985972b304eed7dbaf63 11-Dec-2014 Andreas Gampe <agampe@google.com> Installd: Swap file for dex2oat

Add swap file support for dex2oat to installd. Only use in low-memory
mode.

Bug: 18596910
Change-Id: I131448f3907115054a592af73db86d2b9257ea33
nstalld/commands.c
37321282ec4ec411440c9dd5d1b0934851a6c6a6 16-Dec-2014 Andreas Gampe <agampe@google.com> am 1be4021c: Merge "Installd: Remove dalvik paths"

* commit '1be4021c2a867c7e067a3c5b937a054f0eb7817f':
Installd: Remove dalvik paths
bd872e49561282682793ab526616d609f7fbb274 15-Dec-2014 Andreas Gampe <agampe@google.com> Installd: Remove dalvik paths

Dalvik is dead. Dexopt is dead.

Change-Id: I9ff6b638a3e2c52ae7aec33d7b08a7bee012854f
nstalld/commands.c
bbe43a4cdd0ea9a06d09e451dc256b7de59b5817 25-Nov-2014 Dianne Hackborn <hackbod@google.com> am e8a4dce8: Merge "Work on issue #18486438: Reduce size of bugreport output" into lmp-mr1-dev

* commit 'e8a4dce8169ba5fdcd86a5fc29aa6986de1711b0':
Work on issue #18486438: Reduce size of bugreport output
e8a4dce8169ba5fdcd86a5fc29aa6986de1711b0 24-Nov-2014 Dianne Hackborn <hackbod@google.com> Merge "Work on issue #18486438: Reduce size of bugreport output" into lmp-mr1-dev
7fb390d10c896c861ba6205f2232669586ac5085 23-Nov-2014 Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Mark 2 unused paramters as such

Mark 2 unused paramters to prevent clang from erroring out

Change-Id: Ifc9b4a5b820bd6318e9259e737e708d25fdb174b
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
nstalld/installd.c
4ba58f69cd91af1921299c585a5ade1a1a7eb8ed 22-Nov-2014 Dianne Hackborn <hackbod@google.com> Work on issue #18486438: Reduce size of bugreport output

Don't put packages.xml in to the output.

Change-Id: I88a682866365886506a003a64deb4a29c16ba21c
umpstate/dumpstate.c
236e790608aa3d60630d3946f54fb9a3ae01b19f 21-Nov-2014 Greg Hackmann <ghackmann@google.com> am e4c7ec84: Merge "atrace: make fs-specific sysfs entries optional" into lmp-mr1-dev

* commit 'e4c7ec847d83edfb54c215f3ab6093efeb17a586':
atrace: make fs-specific sysfs entries optional
8b1a27740dc9910ffbdf0df775056b6647fe111c 21-Nov-2014 Mike Lockwood <lockwood@google.com> am 754f16fc: Merge "Fix installd command line parser"

* commit '754f16fcf4b56f52450f91e3e840bad8a2cc997c':
Fix installd command line parser
754f16fcf4b56f52450f91e3e840bad8a2cc997c 21-Nov-2014 Mike Lockwood <lockwood@google.com> Merge "Fix installd command line parser"
8d84b6f9f576fe51b2cb4a54042bf95af923e55b 21-Nov-2014 Elliott Hughes <enh@google.com> am ba4a43c6: Merge "Kill INCLUDE_SYS_MOUNT_FOR_STATFS."

* commit 'ba4a43c6c78547444446181b4fae20a5d61d35ff':
Kill INCLUDE_SYS_MOUNT_FOR_STATFS.
e80d32c3c2ec4f2acc917c92c9c943e81de80496 20-Nov-2014 Greg Hackmann <ghackmann@google.com> atrace: make fs-specific sysfs entries optional

The availability of these sysfs entries will vary based on the kernel's
supported filesystems, so don't block the disk category if some of them
are missing.

Bug: 18467498

Change-Id: I96200f1b5cf3f1a8fa8186602552adc96ddffc04
Signed-off-by: Greg Hackmann <ghackmann@google.com>
trace/atrace.cpp
ba4a43c6c78547444446181b4fae20a5d61d35ff 20-Nov-2014 Elliott Hughes <enh@google.com> Merge "Kill INCLUDE_SYS_MOUNT_FOR_STATFS."
9a4e7f492e6e80bb171111d307658be7e2132ae3 20-Nov-2014 Elliott Hughes <enh@google.com> Kill INCLUDE_SYS_MOUNT_FOR_STATFS.

Change-Id: I692179cae9d476dd5a0b5fa92813b61934dd7c87
nstalld/installd.h
091ea779d4e575856c04d51d82f45cc8a6155b5e 10-Nov-2014 Narayan Kamath <narayan@google.com> Add an installd command to mark the end of boot.

bug: 18280671

(cherry picked from commit b1a6c2f95a455aa2829340fcc8d233493855f4d4)

Change-Id: I97542875ffff1b68ab324e9b04fb9266c82633cc
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
35e5423d4df88e8a0d0b4a7d4ca723e43a3bf35c 14-Nov-2014 Ian Rogers <irogers@google.com> am 11bf9e5c: Merge "Add support for dalvik.vm.isa.<instruction set>.variant"

* commit '11bf9e5c2f90101d56d918e1b3fe780b873e5566':
Add support for dalvik.vm.isa.<instruction set>.variant
741625a17e80bc0ad8e728ba73536386efb1fb4d 12-Nov-2014 Dmitriy Ivanov <dimitry@google.com> resolved conflicts for merge of 37878b1e to lmp-mr1-dev-plus-aosp

Change-Id: I748a7d2fb43fd63189f4688edbd0991e2b609dba
b1a6c2f95a455aa2829340fcc8d233493855f4d4 10-Nov-2014 Narayan Kamath <narayan@google.com> Add an installd command to mark the end of boot.

bug: 18280671

Change-Id: I6b3aeaf143ab3b78881f163ec5c17b9bf20172ed
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
16a95b267ac6aac75453f65f1bc382ce65c0741e 09-Nov-2014 Ian Rogers <irogers@google.com> Add support for dalvik.vm.isa.<instruction set>.variant

Bug: 18056890
Change-Id: Ia266fa9f2a79158ced82016106aa1cd2529259c9
nstalld/commands.c
cd647d01e5e5a17c272f1a0c691c39cb24ae107c 06-Nov-2014 Igor Murashkin <iam@google.com> am 106e5820: Merge "installd: Set priority to background for dexopting" into lmp-mr1-dev

* commit '106e582053121f1934c33a6c98d35377e8ae384a':
installd: Set priority to background for dexopting
106e582053121f1934c33a6c98d35377e8ae384a 06-Nov-2014 Igor Murashkin <iam@google.com> Merge "installd: Set priority to background for dexopting" into lmp-mr1-dev
9e87a8014055606b514b1c72b21915e17db7d513 06-Nov-2014 Igor Murashkin <iam@google.com> installd: Set priority to background for dexopting

This fixes jank caused by dex2oat while installing an application in the
background.

Bug: 17497551
Change-Id: I5a69b00c0fd76ae22a0d1adb242bef6c18a75743
nstalld/commands.c
62bb385728121b456782d205f6e27d0c18be9c0b 29-Oct-2014 Serguei Katkov <serguei.i.katkov@intel.com> Fix installd command line parser

Parser does not take into account that the last argument can be empty.
In this case it will skip end of line marker and continue parsing.

Change-Id: I2d029a69ed22cef497893e592ff3275ced97f85f
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
nstalld/installd.c
ea14602e6e1e415f3c6b53ef498d4deff00c23ac 05-Nov-2014 Mark Salyzyn <salyzyn@google.com> am 9cea6ccb: dumpstate: report device uptime mmc performance

* commit '9cea6ccbd8789f9583c78ce2b36ac5dd75717b6c':
dumpstate: report device uptime mmc performance
9cea6ccbd8789f9583c78ce2b36ac5dd75717b6c 04-Nov-2014 Mark Salyzyn <salyzyn@google.com> dumpstate: report device uptime mmc performance

Bug: 18085992
Change-Id: Ibc0a37d3d2649d1e6708d9357f37ed75f2cea121
umpstate/dumpstate.c
de0cdcd42c9d62b3df3e30163e281c6c056f7adf 28-Oct-2014 Patrick Auchter <auchter@motorola.com> am 70ec2941: atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing

* commit '70ec2941530766bdca09ef2983a3ff794c028ee6':
atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing
70ec2941530766bdca09ef2983a3ff794c028ee6 30-Sep-2014 Patrick Auchter <auchter@motorola.com> atrace: fix Sync Manager tracing preventing enabling of kernel sync tracing

Both Sync Manager tracing and kernel sync tracing were using "sync" to
enable tracing and since Sync Manager was found first, this prevented
enabling kernel sync tracing.

To fix this, use "syncman" to enable Sync Manager tracing.

Change-Id: Id3b799e01e5041c582cd752c8c40d3e36954f821
Signed-off-by: Iliyan Malchev <malchev@google.com>
trace/atrace.cpp
54d613e33c3c93382ac846509967bac2faf72047 21-Oct-2014 Arve Hjønnevåg <arve@android.com> am bf46706f: Merge "dumpstate: Add trusty version if driver is found" into lmp-mr1-dev

* commit 'bf46706f366f0446e60971e32acfcd221b7f19cf':
dumpstate: Add trusty version if driver is found
2db0f5f31c015b5a89b619f8c95a9bf95c09c75b 16-Oct-2014 Arve Hjønnevåg <arve@android.com> dumpstate: Add trusty version if driver is found

Change-Id: I7780ea8e1d777c222a73408f70d8a6d49dee1d92
umpstate/dumpstate.c
664a72d3ac5e4389041e3a59ff243a5583a4b823 16-Oct-2014 Robin Lee <rgl@google.com> am 91c395f6: am 60fd3fee: Migrate CA certificates to all users

* commit '91c395f6c344682f1ae5926766d4d7247dee6df4':
Migrate CA certificates to all users
0adea3b792ecddab7dbb450135e04d6736e872c6 15-Oct-2014 Robin Lee <rgl@google.com> am 60fd3fee: Migrate CA certificates to all users

* commit '60fd3feecab4336d964ca8e31c7c3220e1afb558':
Migrate CA certificates to all users
60fd3feecab4336d964ca8e31c7c3220e1afb558 07-Oct-2014 Robin Lee <rgl@google.com> Migrate CA certificates to all users

Copies the /data/misc/keychain/cacert-* directories to all users on
the device, whereas previously they were simply copied to user 0.

This is a shallow copy so anything that wasn't supposed to be there
will disappear.

Bug: 17811821
Change-Id: Iae5909ab8d5efdb83c9c8fdf0e10ab7060d022cc
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
5653d5de0d021ba5f5ba8671085a8e0a9fcb37d2 02-Oct-2014 Christopher Ferris <cferris@google.com> am a91968fd: Merge "Accept socket connection before tracing." into lmp-dev

* commit 'a91968fd099378d1673c7443be16adcb97ee40af':
Accept socket connection before tracing.
f625a249b9a0de54eedf3fa0aaa549c1fb568298 02-Oct-2014 Christopher Ferris <cferris@google.com> am a91968fd: Merge "Accept socket connection before tracing." into lmp-dev

* commit 'a91968fd099378d1673c7443be16adcb97ee40af':
Accept socket connection before tracing.
ed9354fc846895dc53397fbb5323bef00b3a3834 02-Oct-2014 Christopher Ferris <cferris@google.com> Accept socket connection before tracing.

Sometimes dumping threads takes a long time and bugreport times
out. This change will cause us to accept the bugreport socket connection
before dumping threads and should avoid the failed to connect to dumpstate
service problems we've seen.

Bug: 17758374
Change-Id: I80afa0353cf1c340873f481a8d1d7faffff54120
umpstate/dumpstate.c
7f8ecd6dba1637f035be88e426b8c617b803c98b 01-Oct-2014 Narayan Kamath <narayan@google.com> am cde4b13a: Merge "Allow more than one dex2oat extra option"

* commit 'cde4b13a12a0bc8a7bd031f5d5c1b2b2bdd13335':
Allow more than one dex2oat extra option
28da32889bad10835eedd2a6c8ee50591b17e4e2 01-Oct-2014 Narayan Kamath <narayan@google.com> am cde4b13a: Merge "Allow more than one dex2oat extra option"

* commit 'cde4b13a12a0bc8a7bd031f5d5c1b2b2bdd13335':
Allow more than one dex2oat extra option
63a8e04d2da0daf6802ecea2048f9eb9a9a8b878 23-Sep-2014 Lorenzo Colitti <lorenzo@google.com> am d9485403: Merge "Include the VPN server IP address in the VPN state file." into lmp-dev

* commit 'd94854030c76fc4ee4126ca1707a76fbd1f29126':
Include the VPN server IP address in the VPN state file.
7a99e281dd367ff9bc107e59944d11399ac1deee 23-Sep-2014 Lorenzo Colitti <lorenzo@google.com> am d9485403: Merge "Include the VPN server IP address in the VPN state file." into lmp-dev

* commit 'd94854030c76fc4ee4126ca1707a76fbd1f29126':
Include the VPN server IP address in the VPN state file.
a9e8374c72bf39c55bfe42d917a0c4be03a14a33 18-Sep-2014 Lorenzo Colitti <lorenzo@google.com> Include the VPN server IP address in the VPN state file.

This will be used by LegacyVpnRunner to create a throw route
pointing at it.

Bug: 17462989
Change-Id: I3ebf0cec726dd12b2c57ba5d66775f8c02b25b70
p-up-vpn/ip-up-vpn.c
b0d8d00b2916aef7b01ad42f6d441f5b46b7731a 08-Sep-2014 Yevgeny Rouban <yevgeny.y.rouban@intel.com> Allow more than one dex2oat extra option

All extra options are provided as one argument to dex2oat.
The patch splits all options to individual ones.

Change-Id: Ied65bb9cf38b114611e88a8d5d86305021700d0b
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
nstalld/commands.c
4355c0c98644c37f0511257403bbfb71b342e2df 12-Sep-2014 Dan Albert <danalbert@google.com> am e1e3d278: Merge "Clean cruft out of makefiles."

* commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2':
Clean cruft out of makefiles.
9e8b528926506b3fa9ca7df52fef5f56ec6149c7 12-Sep-2014 Dan Albert <danalbert@google.com> resolved conflicts for merge of 07c9557f to lmp-dev-plus-aosp

Change-Id: Ic212ab2ee90b1cc7db7203210b047c870bb5c476
6f3e466b1491f654be412fe572d3f94f39e84c98 12-Sep-2014 Jeff Brown <jeffbrown@google.com> am 70b9e6c8: Merge "Make dumpstate vibrate immediately." into lmp-dev

* commit '70b9e6c8f3221bbbeefc85c70746541a5b318afc':
Make dumpstate vibrate immediately.
b79dfe672138805b4f70183fd738d9af58591148 12-Sep-2014 Dan Albert <danalbert@google.com> Clean cruft out of makefiles.

Cleans up manual uses of stlport and bionic (and removes uses of private
bionic headers).

Change-Id: I157309d702e59152adfa3450939082248ae4c043
nstalld/tests/Android.mk
99d9fb15b4a1eb534261ae81b2cf25aec4447bd0 11-Sep-2014 Chih-Hung Hsieh <chh@google.com> Fix warnings on unused variables and parameters.

BUG: 17474723
Change-Id: If40f5e765090cfb970e4129b78b1e74cf8bad217
nstalld/commands.c
nstalld/installd.c
nstalld/utils.c
1dc94e315680b47fe430ef90f46c50a25c92fb6d 11-Sep-2014 Jeff Brown <jeffbrown@google.com> Make dumpstate vibrate immediately.

Previously, the vibration was not performed until after stacks
were gathered which takes a long time. Moved the vibration
to happen earlier so we provide better user feedback for the
three-button salute when collecting a bug report.

Deleted some dead code for playing begin/end sounds.

Improved the timing measurement code to help track down why
bug reports are so slow. (They take over a minute now which
can cause us to lose valuable diagnostic information.)

Bug: 17474152
Change-Id: Iac73f7993d7dc85196aad96f459b22fd4a710f94
umpstate/dumpstate.c
umpstate/utils.c
500c086a7e93dd485dc98bae5ab8430bc165c301 09-Sep-2014 Christopher Ferris <cferris@google.com> am 5ef471c5: Merge "Use time() instead of clock() for timeouts." into lmp-dev

* commit '5ef471c5f986a52c681a29856c38f72127cdf8ac':
Use time() instead of clock() for timeouts.
e2c86c71c2a214f6a8bd3335616a58484919dcb1 09-Sep-2014 Christopher Ferris <cferris@google.com> Use time() instead of clock() for timeouts.

The clock() function returns the processor time used by the process. This
is not a good timeout mechanism since the code is suspended most of the
time waiting for the forked process to finish. Replace with the time()
function.

Bug: 17154069

(cherry picked from commit 89d4949f86f4f7b6710e951afefad186c667fd6e)

Change-Id: I42f0f24ee53ef99955fd482a1089e39d491f3bd5
umpstate/utils.c
5ef471c5f986a52c681a29856c38f72127cdf8ac 09-Sep-2014 Christopher Ferris <cferris@google.com> Merge "Use time() instead of clock() for timeouts." into lmp-dev
89d4949f86f4f7b6710e951afefad186c667fd6e 09-Sep-2014 Christopher Ferris <cferris@google.com> Use time() instead of clock() for timeouts.

The clock() function returns the processor time used by the process. This
is not a good timeout mechanism since the code is suspended most of the
time waiting for the forked process to finish. Replace with the time()
function.

Bug: 17154069
Change-Id: Ib383329f9db269445d71a100553b08e71fddda3f
umpstate/utils.c
0ffb91383f7777ccc8335d7e30d16fd73ca416ed 09-Sep-2014 Jeff Sharkey <jsharkey@android.com> am 464e539c: Merge "Add new system APK locations." into lmp-dev

* commit '464e539cd3e931aaca99a67d0addc6d68bd96b3d':
Add new system APK locations.
770180a4dd86f8bda6af2e6db4676e99a5bb1548 09-Sep-2014 Jeff Sharkey <jsharkey@android.com> Add new system APK locations.

Add /system/priv-app and /oem/app paths to system paths. Also allow
rmdex on system apps, and quietly ignore when it was already removed.

Also relax logging when clearing code cache, since it's optional.

Bug: 17205122
Change-Id: I4fc4d0f63a3596937c4defbd64e1f8a1c563f02d
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
2a8bb978d506162a2cff801f24659207790cffd3 08-Sep-2014 Nick Kralevich <nnk@google.com> am 51eec3b9: Merge "Fix relabeling of secondary user package directories."

* commit '51eec3b98788039afc5fd7ffe76612c7f8d9b39c':
Fix relabeling of secondary user package directories.
8ac2a648b6c12c15bb1a62c8f827dabf0ced9704 08-Sep-2014 Stephen Smalley <sds@tycho.nsa.gov> Fix relabeling of secondary user package directories.

When relabeling secondary user package directories, we need to use
the uid of the directory rather than the primary package UID;
otherwise, levelFrom=user will not work correctly.

Change-Id: I0d76ec6ec6fe56a566023ca5e1398efdf28fc81e
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
nstalld/commands.c
ad2a4083fe4010c282999a2c3a8795665ae6a5e9 29-Aug-2014 Brian Carlstrom <bdc@google.com> am 8c1642ad: Merge "Remove obsolete prunedexcache"

* commit '8c1642ad4ea8fbeb7d03f30e5f50e03c28d40065':
Remove obsolete prunedexcache
8b17ac6bd6b5114babac619cad3ff03fbf10a953 29-Aug-2014 Alex Light <allight@google.com> Remove obsolete prunedexcache

Bug: 16875245

(cherry picked from commit 5f727f86942a188354c028356f1167794fdc8655)

Change-Id: I06e14c405aa4af295795982c1d236be3cb00e893
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
5f727f86942a188354c028356f1167794fdc8655 29-Aug-2014 Alex Light <allight@google.com> Remove obsolete prunedexcache

Bug: 16875245

Change-Id: I06e14c405aa4af295795982c1d236be3cb00e893
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
18a9457edde6163539338e05a31c3431bc747c5f 27-Aug-2014 Jeff Sharkey <jsharkey@android.com> am 7903c6a2: Merge "Make clear data stricter." into lmp-dev

* commit '7903c6a263354506ace10fc32aa65c231b64f62b':
Make clear data stricter.
7903c6a263354506ace10fc32aa65c231b64f62b 27-Aug-2014 Jeff Sharkey <jsharkey@android.com> Merge "Make clear data stricter." into lmp-dev
3316fe472fd68377eba9983c43dfce4281209103 27-Aug-2014 Jeff Sharkey <jsharkey@android.com> Make clear data stricter.

It should nuke everything under the data directory. PMS will come
around and generate the lib symlink after we're finished.

Bug: 16739202
Change-Id: Ib70af2e1450e3bed6781fb497b9cc67e1e594c49
nstalld/commands.c
7330016a75085631064daab303e1efe583f75125 27-Aug-2014 Calin Juravle <calin@google.com> am 97477d20: Set compiler filter flag to true when vmSafeMode is present.

* commit '97477d203eaf0c3235bbe2415356f20a0431cada':
Set compiler filter flag to true when vmSafeMode is present.
4f60ac2bbc3c7fe502348a0739481287adff443c 21-Aug-2014 Calin Juravle <calin@google.com> Add vm_safe_mode to dexopt.

The flag enforces interpret-only flag for dex2oat.

Bug: 12457423

(cherry picked from commit b1efac103523efccbe671e76cc0eaaeab810415b)
(cherry picked from commit 97477d203eaf0c3235bbe2415356f20a0431cada)

Change-Id: I215339527e998b24e274c8df42a5024839e6a9fa
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
97477d203eaf0c3235bbe2415356f20a0431cada 27-Aug-2014 Calin Juravle <calin@google.com> Set compiler filter flag to true when vmSafeMode is present.

Bug: 12457423
Change-Id: I33345c5cce76681d8a6592ebae8c9f96a9f0f8bd
nstalld/commands.c
2d509c01132cfa745b3fb2e40e67805cd0bc7f22 26-Aug-2014 Calin Juravle <calin@google.com> am 7de2bde3: Merge "Add vm_safe_mode to dexopt." into lmp-dev

* commit '7de2bde3c4c3a6ecc7e6f21e3f3322688b718c4a':
Add vm_safe_mode to dexopt.
7de2bde3c4c3a6ecc7e6f21e3f3322688b718c4a 26-Aug-2014 Calin Juravle <calin@google.com> Merge "Add vm_safe_mode to dexopt." into lmp-dev
188fb813c1f1d4bb7edc81c7be8d287d3456d301 26-Aug-2014 Calin Juravle <calin@google.com> am 20558f11: Merge "Pass isa features flag to dex2oat." into lmp-dev

* commit '20558f1154abcf3360fd972f6d2c80bb80f78502':
Pass isa features flag to dex2oat.
e9eb12c2911aaefe0464afa7c798310f2d927438 19-Aug-2014 Calin Juravle <calin@google.com> Pass isa features flag to dex2oat.

Bug: 16716262

(cherry picked from commit 8fc7315a67fdbf9b56cc6fa061f0773be2223a81)

Change-Id: I3cb1d82604612bc7212bcbdeef685bc05b695b6a
nstalld/commands.c
20558f1154abcf3360fd972f6d2c80bb80f78502 26-Aug-2014 Calin Juravle <calin@google.com> Merge "Pass isa features flag to dex2oat." into lmp-dev
b1efac103523efccbe671e76cc0eaaeab810415b 21-Aug-2014 Calin Juravle <calin@google.com> Add vm_safe_mode to dexopt.

The flag enforces interpret-only flag for dex2oat.

Bug: 12457423
Change-Id: Ifdafcc1afa32996577fa44c5682eeb58c79772ac
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
8fc7315a67fdbf9b56cc6fa061f0773be2223a81 19-Aug-2014 Calin Juravle <calin@google.com> Pass isa features flag to dex2oat.

Bug: 16716262
Change-Id: Ifbc3a1520bc177aa87855edb60c36346f24c77cd
nstalld/commands.c
03d45ded3c81cbff8e646e81a8fcde1e028f4204 25-Aug-2014 Andres Morales <anmorales@google.com> am 47c166a9: Merge "Fix deadlock when killing adb bugreport" into lmp-dev

* commit '47c166a9ad740707f86719e0de56e20c73f407c1':
Fix deadlock when killing adb bugreport
47c166a9ad740707f86719e0de56e20c73f407c1 25-Aug-2014 Andres Morales <anmorales@google.com> Merge "Fix deadlock when killing adb bugreport" into lmp-dev
2e671bbdb741c2926b6df7b240fdc31c7361f330 21-Aug-2014 Andres Morales <anmorales@google.com> Fix deadlock when killing adb bugreport

Leave default signal handler (terminate) for parent process,
add SIG_IGN as signal handler for children and let them
go down when the parent gets SIGPIPE.

Bug: 17109154
Change-Id: Id33db3e97a32f289eb2a9a1a0ca8acbe3dcd285d
umpstate/dumpstate.c
umpstate/utils.c
01f481649d128a3e520faa5e62ce3a9a4ef54483 22-Aug-2014 Calin Juravle <calin@google.com> am c597b6dd: Fix validation of system paths in installd.

* commit 'c597b6dd895dbb2b28c757ce7a2651b3cdc9b00c':
Fix validation of system paths in installd.
f53c08befc7c43bd68e451c87a096e881128ddf5 19-Aug-2014 Calin Juravle <calin@google.com> Fix validation of system paths in installd.

System apps are now installed under their own directory
(system_app_dir/app_dir/app.apk). The new path doesn't pass installd
validation because of obsolete checks which verify that the path does
not contain subdirectories past the system_app_dir.

The CL fixes the validation to accept at most on subdirectory.

Bug: 17109858

(cherry picked from commit c597b6dd895dbb2b28c757ce7a2651b3cdc9b00c)

Change-Id: Ic5f15d1864c6af9f4c4b07dc27244ebbb521ad5e
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
c597b6dd895dbb2b28c757ce7a2651b3cdc9b00c 19-Aug-2014 Calin Juravle <calin@google.com> Fix validation of system paths in installd.

System apps are now installed under their own directory
(system_app_dir/app_dir/app.apk). The new path doesn't pass installd
validation because of obsolete checks which verify that the path does
not contain subdirectories past the system_app_dir.

The CL fixes the validation to accept at most on subdirectory.

Bug: 17109858
Change-Id: I13abb52c0016610ff436f6a26bb6b3b85dc4dfb0
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
c542d1141d8e54d6224295bded87c55c16bd5f8f 22-Aug-2014 Calin Juravle <calin@google.com> am 67cfe0c0: Merge "Allow apk path to contain one subdirectory." into lmp-dev

* commit '67cfe0c0660c36ca385ad0eeb1352a2df721b49c':
Allow apk path to contain one subdirectory.
9d76156266d3de1a3b61c9b0f385ce24e0cb9eed 15-Aug-2014 Calin Juravle <calin@google.com> Allow apk path to contain one subdirectory.

In the current directory layout this prevented rm_dex and move_dex
commands to validate the apk path and thus cleaning up resources.

Bug: 16888084

(cherry picked from commit fd88ff2edd954117e36372fb095b6f5f35aad0e3)

Change-Id: I1002529b0c35852c67540d3165d1444523460592
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
67cfe0c0660c36ca385ad0eeb1352a2df721b49c 22-Aug-2014 Calin Juravle <calin@google.com> Merge "Allow apk path to contain one subdirectory." into lmp-dev
368e2eceb7c709179ca65560fbd7f91b5d010f50 21-Aug-2014 Colin Cross <ccross@android.com> am 61a4eecb: Merge "atrace: avoid unnecessary writes to trace_clock" into lmp-dev

* commit '61a4eecbe615bc94944161c4cf4aa590dfca1b2e':
atrace: avoid unnecessary writes to trace_clock
fd88ff2edd954117e36372fb095b6f5f35aad0e3 15-Aug-2014 Calin Juravle <calin@google.com> Allow apk path to contain one subdirectory.

In the current directory layout this prevented rm_dex and move_dex
commands to validate the apk path and thus cleaning up resources.

Bug: 16888084
Change-Id: Iba579d075a9c6d7de047e7ffef95441498257086
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
b1ce49b2ed9ea953a7f534b4f36b6acb56fc0749 20-Aug-2014 Colin Cross <ccross@android.com> atrace: avoid unnecessary writes to trace_clock

Writing to trace_clock erases the trace buffer, even if the value
hasn't changed. This prevents use of --async_start and --async_dump
to leave background tracing running and dump after an even that
needs debugging, because --async_dump writes to trace_clock and
resets the buffer before it can read it.

Read and parse the current value from trace_clock before writing,
and skip the write if the value isn't changing.

Change-Id: Ia2ec5bb654fb0bd179771b511ff261731ba47dca
trace/atrace.cpp
7477a8a0a31f5fd7d5bf34596d7a717df60842ce 19-Aug-2014 Colin Cross <ccross@google.com> am b1f0f288: Merge changes I4cfb3138,I45356c29 into lmp-dev

* commit 'b1f0f288e30c0448cabd46d19c60b3bd0d272f74':
atrace: add memory reclaim tracing
atrace: Add IRQ events
580407f1075fe97d7466724f71cc03816b7404fe 19-Aug-2014 Colin Cross <ccross@android.com> atrace: add memory reclaim tracing

Add "memreclaim" to trace direct reclaim, shrink slab cycles, and
kswapd waking up and sleeping.

Change-Id: I4cfb313820a3a9aa5a9d07a39c42db41c24304a6
trace/atrace.cpp
f440d398faad3bafe2e7f365c62163aca45e36a3 12-Apr-2014 Dan Willemsen <dwillemsen@nvidia.com> atrace: Add IRQ events

Add "irq" to trace irq and softirq events.

Change-Id: I45356c2912a1fa130667ada7b21e9fb54ddcfba5
trace/atrace.cpp
9612a31003dc84d522728d2481def385d25d20ab 16-Aug-2014 Jeff Brown <jeffbrown@google.com> am c8c5e4c6: Merge "Add trace tag for power management." into lmp-dev

* commit 'c8c5e4c66b858fc41bdb696421eb13c3ea65a238':
Add trace tag for power management.
c8c5e4c66b858fc41bdb696421eb13c3ea65a238 16-Aug-2014 Jeff Brown <jeffbrown@google.com> Merge "Add trace tag for power management." into lmp-dev
46ab27e6247d64ca593c474ea2ebe4f82c9f80d5 15-Aug-2014 Brian Carlstrom <bdc@google.com> am e18987ef: Disable verification based on vold.decrypt. [frameworks/native]

* commit 'e18987efb5e39ca1bed15527b7b82bde55c99669':
Disable verification based on vold.decrypt. [frameworks/native]
e18987efb5e39ca1bed15527b7b82bde55c99669 15-Aug-2014 Brian Carlstrom <bdc@google.com> Disable verification based on vold.decrypt. [frameworks/native]

Bug: 15165413
Change-Id: Ie70bf4e1348b7b8b2454cf9b498b272416d61c34
nstalld/commands.c
f7765c4a175bda9f631e4c828539f4a169c7bca4 15-Aug-2014 Brian Carlstrom <bdc@google.com> Disable verification based on vold.decrypt. [frameworks/native]

Bug: 15165413

(cherry picked from commit e18987efb5e39ca1bed15527b7b82bde55c99669)

Change-Id: Ie55ef400c9d1f231b3be64248c756ac798a11ffe
nstalld/commands.c
3200b0bf507936ecf43784191880e4e91c54568c 15-Aug-2014 Jeff Brown <jeffbrown@google.com> Add trace tag for power management.

Also added a couple of other existing missing tags in atrace.

Bug: 17004602
Change-Id: I6f697a2a15922bd4695acfa203d45eaae40cd00e
trace/atrace.cpp
f12e678d4b869d7d3d2f3a6622160cfddd76c497 11-Aug-2014 Andreas Gampe <agampe@google.com> am 1a22eb7b: Merge "Change an accidental ALOGE to an ALOGV"

* commit '1a22eb7ba1062ed1ee35cdb9d797019699cbce8b':
Change an accidental ALOGE to an ALOGV
1a22eb7ba1062ed1ee35cdb9d797019699cbce8b 11-Aug-2014 Andreas Gampe <agampe@google.com> Merge "Change an accidental ALOGE to an ALOGV"
93b1b9a42cc2ad002c9011810428ad250ae42e81 11-Aug-2014 Narayan Kamath <narayan@google.com> am 82e98c21: Merge "Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup"

* commit '82e98c21f8606e0de8c6beb4372bc4ae9f52b515':
Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup
3b14e5b1f3fd1f3ef66696dc7ce4e53b6af3c309 08-Aug-2014 Brian Carlstrom <bdc@google.com> Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup

Bug: 15927194

(cherry picked from commit 0378aaf257aee92539d30543914a50c4481c6a18)

Change-Id: I462b5ac256c4d091ed4023cf4b97dd6a4abcaa5f
nstalld/commands.c
a7915d437c3971943f82dfc2370fe7a5df522801 11-Aug-2014 Alex Light <allight@google.com> Change an accidental ALOGE to an ALOGV

Change-Id: If07bcef597dd9e531ce6d92c7780ba6ad5090f9a
nstalld/commands.c
0378aaf257aee92539d30543914a50c4481c6a18 08-Aug-2014 Brian Carlstrom <bdc@google.com> Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup

Bug: 15927194
Change-Id: Id8bc188de68d62fd5f91a99aaaa6c8f2dea06abd
nstalld/commands.c
41cd9eb42471e99831fbbbb72b841202bbf33648 30-Jul-2014 Brian Carlstrom <bdc@google.com> Disable compilation based on vold.decrypt. [frameworks/native]

Bug: 15165413

(cherry picked from commit 538998f204d1e542e235de9e7ce18ef4dc68c9cc)

Change-Id: Idae36efa1cb3fb99b51fa0a79b6bb037981d1c71
nstalld/commands.c
9a87db6e1f48fb58398ac186968b08d000342098 29-Jul-2014 Brian Carlstrom <bdc@google.com> Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]

This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413

(cherry picked from commit cf51ba1360ee13459830a0502b0d454d0145544f)

Change-Id: I6613c9710878d56ed8c121e0caded76a64430f76
nstalld/commands.c
43c5d30795faf08ab639b8d88c2eceaf2b648c93 21-Jul-2014 Alex Light <allight@google.com> Make system use patchoat to relocate during runtime.

Make installd understand a patchoat directive and carry it out.

Bug: 15358152

(cherry picked from commit 7365a10689df23334d245b211ce272502ad20669)

Change-Id: Id84a15e626ddde63876914068d3d9aa037abc65b
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
021843c78d214717c720f27d64273746cb4bd96e 05-Aug-2014 Brian Carlstrom <bdc@google.com> am 8ce28672: Merge "Make system use patchoat to relocate during runtime."

* commit '8ce28672106956eeff6d0ed2d1d826ec192e58ee':
Make system use patchoat to relocate during runtime.
7365a10689df23334d245b211ce272502ad20669 21-Jul-2014 Alex Light <allight@google.com> Make system use patchoat to relocate during runtime.

Make installd understand a patchoat directive and carry it out.

Bug: 15358152

Change-Id: Ibe92d8b55a24bbf718b0416a21b76e5df7a2de26
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
755d35f5fad7821f853f3d315b41cf2e3f1e38fd 04-Aug-2014 Brian Carlstrom <bdc@google.com> am 74b3ecf4: Merge "Disable compilation based on vold.decrypt. [frameworks/native]"

* commit '74b3ecf485254d8cb4ae2b1d4d5221454738a58d':
Disable compilation based on vold.decrypt. [frameworks/native]
6461ddb4e1ea95bd416995c50e2cb93d93d9d390 04-Aug-2014 Brian Carlstrom <bdc@google.com> am 9c49e21d: Merge "Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]"

* commit '9c49e21d80cb55b7d77fdf118f06b88100141678':
Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]
538998f204d1e542e235de9e7ce18ef4dc68c9cc 30-Jul-2014 Brian Carlstrom <bdc@google.com> Disable compilation based on vold.decrypt. [frameworks/native]

Bug: 15165413
Change-Id: Ibc39ab82e02e42345c6e2667ac45884f2e0cf7a4
nstalld/commands.c
d4c3d38957870fa27423dbc55d99d68772fbd490 30-Jul-2014 Lorenzo Colitti <lorenzo@google.com> Improve network connectivity dumping.

1. Explicitly dump IP addresses.

Currently, some IP addresses are dumped using netcfg, but that
only dumps the first IPv4 address on each interface. Instead,
call ip -4 addr and ip -6 addr explicitly to dump all IPv4 and
IPv6 addresses on the system.

2. Disable dumping /proc/net/{ipv6,}route, because:

- We already dump all IPv4 and IPv6 routes in the tables that
we use.
- /proc/net/route is confusing because it only includes routes
in the main table, which are all but unused. It's also in
unreadable host-byte-order hex.
- /proc/net/ipv6_route is confusing because it includes routes
from all tables but does not say what table they are in.

3. Instead of dumping the contents of /proc/net/arp , use
"ip -4 neigh show" and "ip -6 neigh show" to dump the
neighbour caches for both IPv4 and IPv6.

Bug: 16663736
Change-Id: Id3e509b877ab7b00eb2399b6a9868b12245da2f0
umpstate/dumpstate.c
cf51ba1360ee13459830a0502b0d454d0145544f 29-Jul-2014 Brian Carlstrom <bdc@google.com> Move from dalvik.vm.image-dex2oat-flags to dalvik.vm.dex2oat-filter [frameworks/native]

This will allow us to conditionally change the compiler-filter based on other properties.

Bug: 15165413
Change-Id: Iff27dc2904f4f0d7c25a684cd6ba16a597f252fd
nstalld/commands.c
7dc7f3221f26b771c266a26ec785eb74287922f1 23-Jul-2014 Christopher Ferris <cferris@google.com> Add dumping of tombstones to dumpstate.

Dump only those tombstones modified within the last half an hour.

Change-Id: I8ce836b2e19eba7a9c0c31a4f312f9a382526da7
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
1fe6107b66516b225e0843836d60a69b1b57f3c3 23-Jul-2014 Christopher Ferris <cferris@google.com> Add dumping of tombstones to dumpstate.

Dump only those tombstones modified within the last half an hour.

Change-Id: I8ce836b2e19eba7a9c0c31a4f312f9a382526da7
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
d2a049220a8299ab19a96d6dcc12b7034da28d28 19-Jul-2014 Elliott Hughes <enh@google.com> Always #include <sys/...>, not <linux/...>.

(cherry picked from commit 1e4ee9afd2de12af98dbf476b73e2d43f605384c)

Change-Id: Ie005774484f98bb33c8f867cddb778ac04a1d4ea
umpstate/dumpstate.c
119b765a053f650b4b47256245ce836f8c403d7f 19-Jul-2014 Elliott Hughes <enh@google.com> Fix implicit declaration of function 'prctl' in installd.

(cherry picked from commit ec535c5ba515f58791aa5044ba116d35a10a188e)

Change-Id: I3da977d85ce544b23ff00934fdbd201d683e9210
nstalld/installd.c
1e4ee9afd2de12af98dbf476b73e2d43f605384c 19-Jul-2014 Elliott Hughes <enh@google.com> Always #include <sys/...>, not <linux/...>.

Change-Id: I9a3f574e0dd1d3ba39312254513b8b193b610c09
umpstate/dumpstate.c
ec535c5ba515f58791aa5044ba116d35a10a188e 19-Jul-2014 Elliott Hughes <enh@google.com> Fix implicit declaration of function 'prctl' in installd.

Change-Id: I469ee15a0a8a79d005b15aad5097b6c13c20ab7e
nstalld/installd.c
0d6180f122127a9541e6193e0e6eceb5b08c608c 17-Jul-2014 Colin Cross <ccross@android.com> dumpstate: fix dumping traces for vm processes on 64-bit

dumpstate was not dumping any stack traces for vm processes because
it was failing the string compare for /system/bin/app_process.
64-bit devices use app_process32 and app_process64 instead of
app_process, and zygote64 alongside zygote. Change the string
matching to be prefix matching.

(cherry picked from commit 8eb25d552b07ffa799b7b61ad46d0109e7512741)

Change-Id: I6b1568161fae278f0e6107990e5b750cf0ca902b
umpstate/utils.c
8eb25d552b07ffa799b7b61ad46d0109e7512741 17-Jul-2014 Colin Cross <ccross@android.com> dumpstate: fix dumping traces for vm processes on 64-bit

dumpstate was not dumping any stack traces for vm processes because
it was failing the string compare for /system/bin/app_process.
64-bit devices use app_process32 and app_process64 instead of
app_process, and zygote64 alongside zygote. Change the string
matching to be prefix matching.

Change-Id: I6970e1b1fedfcd601f8db6af62852422fcb71d59
umpstate/utils.c
c796b681e52fbb792da9a5b4f30e935cc927c1d7 16-Jul-2014 Jeff Sharkey <jsharkey@android.com> Offer to delete code cache directories.

Bug: 16187224
Change-Id: Ia860b051a34ffdfb4f6e0ea19f90cb73509c4eee
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
2a0e40945b5f7adf2055b2f439b3ba4c6389ddc3 08-Jul-2014 Riley Spahn <rileyspahn@google.com> Add MAC for remaining service_manager functionality.

Add SELinux MAC for the list and find functionality
to service_manager. By default the list action uses
the service_manager_type attribute as its target
object.

(cherry picked from commit c67e6307cadb1f2cd876907c42d39b8374b93acd)

Change-Id: Iaf14b21346822a6b544091a0f4a9949117934b9a
ervicemanager/service_manager.c
f3381cf1a645f857dccad9a4369ae23054e9d7d4 11-Jul-2014 Matthew Xie <mattx@google.com> dump bluedroid kernel status do not merge

Change-Id: I4617f770088f86ceda2caf58bd1fdae81b3e31df
(cherry picked from commit ed3b9a09771a79b62fd4a5943d3845e7ceee6a34)
umpstate/dumpstate.c
652c485467598240ecbb3a60516ad1140eddfab1 13-Jul-2014 Nick Kralevich <nnk@google.com> service_manager: check binder passed lengths

1) Pass length through to str8 function.
2) Fix implicit function definition warning.
3) Check for NULL from bio_get_string16 functions.

Bug: 15886919
Bug: 15888753

(cherry picked from commit 7d42a3c31ba78a418f9bdde0e0ab951469f321b5)

Change-Id: I1f826b88826561ea126d811c087ba30623141511
ervicemanager/service_manager.c
c67e6307cadb1f2cd876907c42d39b8374b93acd 08-Jul-2014 Riley Spahn <rileyspahn@google.com> Add MAC for remaining service_manager functionality.

Add SELinux MAC for the list and find functionality
to service_manager. By default the list action uses
the service_manager_type attribute as its target
object.

Change-Id: I7630f21a9f3232ae3d6d8b9a1119230b40899aef
ervicemanager/service_manager.c
7d42a3c31ba78a418f9bdde0e0ab951469f321b5 13-Jul-2014 Nick Kralevich <nnk@google.com> service_manager: check binder passed lengths

1) Pass length through to str8 function.
2) Fix implicit function definition warning.
3) Check for NULL from bio_get_string16 functions.

Bug: 15886919
Bug: 15888753
Change-Id: I78a401d55b84f382ab83911be32b8d501998aa82
ervicemanager/service_manager.c
16cec83a6604777ffdf89b72d9fc474f0c0b73b5 09-Jul-2014 Robin Lee <rgl@google.com> am 8098af6e: am 7c5be65f: Merge "Rename \'mkuser\' command to \'mkuserconfig\'"

* commit '8098af6ea29e9d28a6314d12963cef3107de9c18':
Rename 'mkuser' command to 'mkuserconfig'
8098af6ea29e9d28a6314d12963cef3107de9c18 09-Jul-2014 Robin Lee <rgl@google.com> am 7c5be65f: Merge "Rename \'mkuser\' command to \'mkuserconfig\'"

* commit '7c5be65f2819bf0328715bc405483788dd7a81f2':
Rename 'mkuser' command to 'mkuserconfig'
fe91d89b4f33f753b8b20049221609af7b552b9d 09-Jul-2014 Brian Carlstrom <bdc@google.com> am d441dbc6: am cbb9d0d7: Merge "Make dex2oat heap size product configurable [frameworks/native]"

* commit 'd441dbc6436dbf8cb13f0b784c7d16f022b7586e':
Make dex2oat heap size product configurable [frameworks/native]
c88da7cc21c61b9ac8fcac11aa812f647ffb181c 09-Jul-2014 Sreeram Ramachandran <sreeram@google.com> resolved conflicts for merge of 928e05b1 to master

Change-Id: I1d1e623a1f95baa4375a87242ce71ea789884649
d441dbc6436dbf8cb13f0b784c7d16f022b7586e 09-Jul-2014 Brian Carlstrom <bdc@google.com> am cbb9d0d7: Merge "Make dex2oat heap size product configurable [frameworks/native]"

* commit 'cbb9d0d74008e460963a3c3094f654c50a04a295':
Make dex2oat heap size product configurable [frameworks/native]
928e05b12b21a846ac956e83d46635bbab592ea7 09-Jul-2014 Sreeram Ramachandran <sreeram@google.com> am 0d2bee0c: Merge "Dump all the correct routing tables."

* commit '0d2bee0c0baec56ec98867d7e044602097525248':
Dump all the correct routing tables.
1aa9565ce1c6c12c3c5b38f8fdaddd489d18fea6 08-Jul-2014 Nick Kralevich <nnk@google.com> am f9cfae24: Merge "Remove inline access control in service_manager."

* commit 'f9cfae24123bae199a07bee2dd1c307906c6e6d0':
Remove inline access control in service_manager.
cbb9d0d74008e460963a3c3094f654c50a04a295 09-Jul-2014 Brian Carlstrom <bdc@google.com> Merge "Make dex2oat heap size product configurable [frameworks/native]"
e46a75a0f6007967cd0d161959af844772cdc330 28-Jun-2014 Brian Carlstrom <bdc@google.com> Make dex2oat heap size product configurable [frameworks/native]

Bug: 15919420
Change-Id: I0e629ff4f7541f0dde7380e0dbc8dab1c13df7bd
nstalld/Android.mk
nstalld/commands.c
2b3bba34aec65b612be8d1f52cd124d9c30955f9 09-Jul-2014 Sreeram Ramachandran <sreeram@google.com> Dump all the correct routing tables.

The list of tables is maintained in /data/misc/net/rt_tables by netd.

Change-Id: I55475c08c5e43bcf61af916210e680c47480ac32
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
7c5be65f2819bf0328715bc405483788dd7a81f2 09-Jul-2014 Robin Lee <rgl@google.com> Merge "Rename 'mkuser' command to 'mkuserconfig'"
f9cfae24123bae199a07bee2dd1c307906c6e6d0 08-Jul-2014 Nick Kralevich <nnk@google.com> Merge "Remove inline access control in service_manager."
0830ce19ae120801814e49659bd775b838fb73e8 08-Jul-2014 Nick Kralevich <nnk@google.com> resolved conflicts for merge of 1aa9565c to master

Change-Id: I30582926ab2d2e2b97cb95aaedcd54ba51832aba
1da16cebe65b859a5cbd961a0667267393cb333b 28-Jun-2014 Brian Carlstrom <bdc@google.com> am a5726eb9: Merge "Use current max product dalvik.vm.heapsize as default dex2oat heap size"

* commit 'a5726eb954588bd27ffa55a5193e7c0f8bd9eac3':
Use current max product dalvik.vm.heapsize as default dex2oat heap size
3aa138617b42b87069dbac0b441bd14dca2d8609 27-Jun-2014 Brian Carlstrom <bdc@google.com> Use current max product dalvik.vm.heapsize as default dex2oat heap size

Bug: 15919420
Change-Id: I7ea3bbfe787026f272e50690ab3b84f894600191
nstalld/commands.c
1244edcb85811e9e58d9d40fd05f10dd22e497ca 26-Jun-2014 Riley Spahn <rileyspahn@google.com> Remove inline access control in service_manager.

Remove the hardcoded tuples of UIDs and the services that
each is allowed to register. We will rely only on permissions
from SELinux.

Change-Id: I1c44555a6e274814282398865b30ee938f40dabb
ervicemanager/service_manager.c
53e0776d967324e2908e3be56b80cddb2c9d9e03 27-Jun-2014 Brian Carlstrom <bdc@google.com> Use current max product dalvik.vm.heapsize as default dex2oat heap size

Bug: 15919420

(cherry picked from commit 3aa138617b42b87069dbac0b441bd14dca2d8609)

Change-Id: I569ba111c6163e94dd1b09b21ef374f05d263e72
nstalld/commands.c
e49ba8e2ed8e17156eb00c8fc8e2285df62bc018 24-Jun-2014 Dan Stoza <stoza@google.com> GLConsumer: Stop using default constructor params

Removes the dependency on default constructor parameters for
GLConsumer so that a different constructor prototype can safely be
added.

Change-Id: I0da924bbd4c141edbf305598c1be8bc575654680
latland/GLHelper.cpp
b410863d6aae1e923ff163942adef01ff6a2ea81 24-Jun-2014 Narayan Kamath <narayan@google.com> am 9bc8c62e: am 357df19b: Merge "Exclude subdirectories when pruning the dex cache."

* commit '9bc8c62ea4d86d948af7a2aade8b0b5502a84b6a':
Exclude subdirectories when pruning the dex cache.
9bc8c62ea4d86d948af7a2aade8b0b5502a84b6a 24-Jun-2014 Narayan Kamath <narayan@google.com> am 357df19b: Merge "Exclude subdirectories when pruning the dex cache."

* commit '357df19b14b8387a480ed68dd6ea92eeb1aa4edc':
Exclude subdirectories when pruning the dex cache.
357df19b14b8387a480ed68dd6ea92eeb1aa4edc 24-Jun-2014 Narayan Kamath <narayan@google.com> Merge "Exclude subdirectories when pruning the dex cache."
1e57e4af8afb5a3b8b657e1c9ca3f9810e266083 17-Jun-2014 Narayan Kamath <narayan@google.com> Exclude subdirectories when pruning the dex cache.

This requires a companion package manager change to prune
each instruction specific dex cache individually.

bug: 15677279

Change-Id: I5891981512bde20e49bff65b1842c28886f2b177
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
314f2f7751809c836517eb57c00e4f71f256e0be 17-Jun-2014 Brian Carlstrom <bdc@google.com> am 724473b3: am 71f9956a: Merge "Fix obsolete argument name"

* commit '724473b359d63bf707bd1fe04abdc82edc5fd22d':
Fix obsolete argument name
724473b359d63bf707bd1fe04abdc82edc5fd22d 17-Jun-2014 Brian Carlstrom <bdc@google.com> am 71f9956a: Merge "Fix obsolete argument name"

* commit '71f9956a23885e64626828a1afa8c512e29be8cc':
Fix obsolete argument name
71f9956a23885e64626828a1afa8c512e29be8cc 17-Jun-2014 Brian Carlstrom <bdc@google.com> Merge "Fix obsolete argument name"
7195fcc2185c35b45a8f28c79fde4999b38850e8 16-Jun-2014 Brian Carlstrom <bdc@google.com> Fix obsolete argument name

Change-Id: I8030f055ee49dc86d4592f36791edddfc0d60a31
nstalld/commands.c
24730ee6215ca4d69e7737111743c613db58a51d 16-Jun-2014 Narayan Kamath <narayan@google.com> am 395a6a64: am 8c9bcff8: Merge "Add an installd command to prune dex files."

* commit '395a6a642dc3f7c2fe99080bbfcb31a20cb2fba9':
Add an installd command to prune dex files.
395a6a642dc3f7c2fe99080bbfcb31a20cb2fba9 16-Jun-2014 Narayan Kamath <narayan@google.com> am 8c9bcff8: Merge "Add an installd command to prune dex files."

* commit '8c9bcff892ae30897a971c3b97305e70db5b5bd3':
Add an installd command to prune dex files.
f40c1fe5ae6afb9ce1fb179c3b0686d22ca98469 13-Jun-2014 Nick Kralevich <nnk@google.com> am 3dd3de03: Merge "installd: change profile files to 0660"

* commit '3dd3de03de17546d785ed2a741fc645c1a0fcad5':
installd: change profile files to 0660
e9ecca2758a245b5a8a8052c413f2c0b4e6d7d9d 13-Jun-2014 Wink Saville <wink@google.com> Merge "Merge kwd to master"
9f12f80d4af350789a64f5c30531ce790d9b6ea3 12-Jun-2014 Nick Kralevich <nnk@google.com> am 18c9394c: Merge "Add SELinux checks when adding a service."

* commit '18c9394ce1a4869eb5cf91eece02a4e944e2eebc':
Add SELinux checks when adding a service.
69154df9efd3ffb7580b72a0138f58a2f5443db6 05-Jun-2014 Riley Spahn <rileyspahn@google.com> Add SELinux checks when adding a service.

Add a MAC check to the svc_can_register function in
service_manager. The types are defined in
external/sepolicy/service.te and the mapping from service
names is defined in external/sepolicy/service_contexts.
Currently uses the property context backend to parse the
contexts file.

Bug: 12909011
Change-Id: I5d90a614263c60571c7c70c2882e6fa929911ca5
ervicemanager/Android.mk
ervicemanager/service_manager.c
653e1cf46a0b3695e86bf0a0f6c658e2f600ca56 11-Jun-2014 Wink Saville <wink@google.com> Merge kwd to master

Change-Id: Idb607c0aa32f80fe4fe1539aedea7a221e9e7f04
ervicemanager/service_manager.c
14be6fa62e0ca3217611bc13dbc96f961aa5e43f 11-Jun-2014 Calin Juravle <calin@google.com> am 17e1d2ca: am 7281ca65: Merge "Pass --top-k-profile-threshold to dex2oat if available."

* commit '17e1d2ca97a711ab539044912bb985a10ccbc9fd':
Pass --top-k-profile-threshold to dex2oat if available.
17e1d2ca97a711ab539044912bb985a10ccbc9fd 11-Jun-2014 Calin Juravle <calin@google.com> am 7281ca65: Merge "Pass --top-k-profile-threshold to dex2oat if available."

* commit '7281ca65d00171b846497abca357a005a401e16b':
Pass --top-k-profile-threshold to dex2oat if available.
0db0f97d87bae8118e135d5a30edf7f0146098c0 12-Jun-2014 Nick Kralevich <nnk@google.com> installd: change profile files to 0660

Profiling information leaks data about how people interact
with apps, so we don't want the data to be available
to other apps. Only the app and system_server need access.

Don't create the /data/dalvik-cache/profiles directory. init.rc
does it for us now.

Change-Id: Ic1b44009faa30d704855e97631006c4b990a4ad3
nstalld/utils.c
8c9bcff892ae30897a971c3b97305e70db5b5bd3 16-Jun-2014 Narayan Kamath <narayan@google.com> Merge "Add an installd command to prune dex files."
7281ca65d00171b846497abca357a005a401e16b 11-Jun-2014 Calin Juravle <calin@google.com> Merge "Pass --top-k-profile-threshold to dex2oat if available."
a3db3622c5d13f94a75c20e3f3d657df7fb4a765 13-Jun-2014 Nick Kralevich <nnk@google.com> am f40c1fe5: am 3dd3de03: Merge "installd: change profile files to 0660"

* commit 'f40c1fe5ae6afb9ce1fb179c3b0686d22ca98469':
installd: change profile files to 0660
f15b30a47c82f8a0bdd4e9d517ff6840a754e6cb 12-Jun-2014 Nick Kralevich <nnk@google.com> am 9f12f80d: am 18c9394c: Merge "Add SELinux checks when adding a service."

* commit '9f12f80d4af350789a64f5c30531ce790d9b6ea3':
Add SELinux checks when adding a service.
7c8bec01790087748ec7afa69a31789828b751f9 10-Jun-2014 Robin Lee <rgl@google.com> Rename 'mkuser' command to 'mkuserconfig'

Brings the name more in line with what it actually does.

Change-Id: I0adb14deb1a035abdbe51714356bd0c94ccf04c5
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
3aee2c5c749dc2589f001b26fae1ec958ec89524 10-Jun-2014 Narayan Kamath <narayan@google.com> Add an installd command to prune dex files.

This is a straightforward port of logic from
PackageManagerService#pruneDexFiles.

bug: 14407732

Change-Id: I892cff027ddcbb1a4fb37a7af5ecf1697049a188
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
4fdff4616699708e58d875273c3c1a85ba4c63bd 06-Jun-2014 Calin Juravle <calin@google.com> Pass --top-k-profile-threshold to dex2oat if available.

Also, don't pass --profile-file if the file is empty.
Bug: 12877748

Change-Id: I587d198e64da709930e2cea50a87fed1525281e5
nstalld/commands.c
8400b2c6dd985808a23e00a8ccedee67904ab547 09-Jun-2014 Robin Lee <rgl@google.com> am 04eb4227: am c4193f1f: Merge "Migrate keychain directories to /data/misc/user/0"

* commit '04eb4227b0ee880141d6ffbf170e79b78affea15':
Migrate keychain directories to /data/misc/user/0
04eb4227b0ee880141d6ffbf170e79b78affea15 09-Jun-2014 Robin Lee <rgl@google.com> am c4193f1f: Merge "Migrate keychain directories to /data/misc/user/0"

* commit 'c4193f1fef52314b451f55cce48ce44f94b875b6':
Migrate keychain directories to /data/misc/user/0
c4193f1fef52314b451f55cce48ce44f94b875b6 09-Jun-2014 Robin Lee <rgl@google.com> Merge "Migrate keychain directories to /data/misc/user/0"
95081df451a0b3d1a67e9d956c4c062d47e339f7 09-Jun-2014 Calin Juravle <calin@google.com> am fb617aa8: am 06642342: Merge "Don\'t always add profile-file option to dex2oat"

* commit 'fb617aa82ad2b6671aa1bc37afa115418cd9091c':
Don't always add profile-file option to dex2oat
fb617aa82ad2b6671aa1bc37afa115418cd9091c 09-Jun-2014 Calin Juravle <calin@google.com> am 06642342: Merge "Don\'t always add profile-file option to dex2oat"

* commit '066423423f04bf1c5972b1d611e01e2e17df3727':
Don't always add profile-file option to dex2oat
57c69c39640a7d6a08b3afb56361d76f7ecf1250 06-Jun-2014 Calin Juravle <calin@google.com> Don't always add profile-file option to dex2oat

Add profile-file option to dex2oat only if the profiler is active and
the file exists.

Bug: 12877748
Bug: 15275634
Change-Id: Icef76514c912c88311ed108f2be7a6329131f741
nstalld/commands.c
80b3d8fce208b4ce189018704a3e8738b5bf7590 05-Jun-2014 wsmlby <wsmlby@google.com> Merge "Add dual mode to flatland"
57c9a00616b7c8efcae0b4fb3797804f2d1bf013 05-Jun-2014 wsmlby <wsmlby@google.com> Add dual mode to flatland

Change-Id: I3544e12c9c911cfdd73fa20d038068c9eccb4161
latland/Android.mk
958ad9181a661deeaf95ad83d184cda1fa4171d7 05-Jun-2014 Robin Lee <rgl@google.com> am 53b49268: am 8adb5a82: Merge "Add installd command to create /data/misc user dir"

* commit '53b4926828fae0e78b467d49a6084b324bcbdcb7':
Add installd command to create /data/misc user dir
53b4926828fae0e78b467d49a6084b324bcbdcb7 05-Jun-2014 Robin Lee <rgl@google.com> am 8adb5a82: Merge "Add installd command to create /data/misc user dir"

* commit '8adb5a822d44ed43aa0ec9a8948a7820fdfcd375':
Add installd command to create /data/misc user dir
07053fcb61436221fac2281394e98ec9d0feab3d 29-Apr-2014 Robin Lee <rgl@google.com> Migrate keychain directories to /data/misc/user/0

With new CA certificates being stored in /data/misc/user/<userid>/
existing ones need to be moved into the same place.

After this update only the owner user will have custom trusted CAs; all
other users will revert to the default set.

Change-Id: I14a4cd6048685902ad5dd3b53494b03fadc41c04
nstalld/installd.c
095c763dd9aa26a206d10ab7c1d7e1c569298fb3 25-Apr-2014 Robin Lee <rgl@google.com> Add installd command to create /data/misc user dir

New command 'mkuser <id>' sets up a user directory in /data/misc/user/,
readable by all apps within that user and writeable by the local system
process.

Change-Id: I5ddde8c4a80f606e723bb41aa64581a0720842d5
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
9882be8960f534408d06702fc01fed1ccd7818ad 19-Apr-2014 Eric Laurent <elaurent@google.com> add sound trigger native service

Change-Id: I5d6fe1ecacca3a941317f841009322bafdf6adcd
ervicemanager/service_manager.c
3e54077d429e983ec9c4c7eaef561587eef4d49c 29-May-2014 Elliott Hughes <enh@google.com> am e77cb931: am 259c2508: am 03e2f8fa: Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC."

* commit 'e77cb9317de54ea0041eeef7966b818257158f64':
Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
e77cb9317de54ea0041eeef7966b818257158f64 29-May-2014 Elliott Hughes <enh@google.com> am 259c2508: am 03e2f8fa: Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC."

* commit '259c25080d8b7f3b66e27e4d8ac3a268738ebe3f':
Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
259c25080d8b7f3b66e27e4d8ac3a268738ebe3f 29-May-2014 Elliott Hughes <enh@google.com> am 03e2f8fa: Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC."

* commit '03e2f8fa13a791d744758ec9ffe27f52cab730d0':
Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.
03e2f8fa13a791d744758ec9ffe27f52cab730d0 29-May-2014 Elliott Hughes <enh@google.com> Merge "Modified atrace.cpp to recognize ATRACE_TAG_BIONIC."
28ec03035d61828047f6bbc57be3b71f4c57b7fb 29-May-2014 Brian Carlstrom <bdc@google.com> am e67810fd: am 97a51ad4: Merge "Move to dalvik.vm.lib.2 to force default to libart"

* commit 'e67810fd7a00ffa92337c6f3aa6114136ce12613':
Move to dalvik.vm.lib.2 to force default to libart
e67810fd7a00ffa92337c6f3aa6114136ce12613 29-May-2014 Brian Carlstrom <bdc@google.com> am 97a51ad4: Merge "Move to dalvik.vm.lib.2 to force default to libart"

* commit '97a51ad44ae3dcf4976076382923ddcae16233ee':
Move to dalvik.vm.lib.2 to force default to libart
856bc78efcda3d1584ba7d6f8f4b041d5f640de0 28-May-2014 Brian Carlstrom <bdc@google.com> Move to dalvik.vm.lib.2 to force default to libart

Bug: 14298175

(cherry picked from commit c4ac3124ffb51f13bb4206e9f8452a3712eb09cb)

Change-Id: I97cc3ff7a269e671b315afa8673dae43d1f86bf1
nstalld/commands.c
750aa9743c0c4c592213fbb39b8d328bd0075fd6 28-May-2014 Brigid Smith <brigidsmith@google.com> Modified atrace.cpp to recognize ATRACE_TAG_BIONIC.

Bug: 15116468
Change-Id: I621532fb53b8317f5a513edfbeb0c50c265342fc
trace/atrace.cpp
c4ac3124ffb51f13bb4206e9f8452a3712eb09cb 28-May-2014 Brian Carlstrom <bdc@google.com> Move to dalvik.vm.lib.2 to force default to libart

Bug: 14298175
Change-Id: Id3892a32848fb22fbf4c2861218b51f68e830b34
nstalld/commands.c
203fe88ed8a47a370d07d69d14db2fb58f5a26ee 22-May-2014 Santos Cordon <santoscordon@google.com> DO NOT MERGE Allow "telecomm" service to be registered with the phone UID.

Change-Id: I9180797451dcb2e9029b20bed47f5d5cb8cddb9f
(cherry picked from commit 3fb4de7193e582f9429f34ad0325e85ae514ece2)
ervicemanager/service_manager.c
2f9a3e73bfd9f51b8e08b16b0bfdea33efeaa89d 13-May-2014 Nick Kralevich <nnk@google.com> am 449e0dbe: am fc1b9fa3: am b66ee6c3: Merge "Ensure that app lib symlinks are correctly labeled when created."

* commit '449e0dbe94126553c96cece21da54b40a6880f11':
Ensure that app lib symlinks are correctly labeled when created.
449e0dbe94126553c96cece21da54b40a6880f11 13-May-2014 Nick Kralevich <nnk@google.com> am fc1b9fa3: am b66ee6c3: Merge "Ensure that app lib symlinks are correctly labeled when created."

* commit 'fc1b9fa3178d1452629d75e2afa1a9d72f03fc1c':
Ensure that app lib symlinks are correctly labeled when created.
fc1b9fa3178d1452629d75e2afa1a9d72f03fc1c 13-May-2014 Nick Kralevich <nnk@google.com> am b66ee6c3: Merge "Ensure that app lib symlinks are correctly labeled when created."

* commit 'b66ee6c32d87961d5b9f0be97b5fdccb928fd453':
Ensure that app lib symlinks are correctly labeled when created.
3a98389263ea0bf9656bcc6869855099194f498c 13-May-2014 Stephen Smalley <sds@tycho.nsa.gov> Ensure that app lib symlinks are correctly labeled when created.

At present, the app lib symlinks are created before setting
the package directory security context, and therefore default
to system_data_file. Upon a later restorecon_recursive,
they are relabeled to the same type as the package directory,
e.g. app_data_file. Avoid this inconsistency by setting the
package directory security context before creating the symlink
so that it inherits the same security context.

Change-Id: I1ee6ccd8a2aa63a4d2efda67f313c97932235911
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
nstalld/commands.c
fc4e37887707588d18297188dd6922224901b8d0 01-May-2014 Narayan Kamath <narayan@google.com> am 44df726a: am cb079c89: Merge "Add instruction-set arguments to installd commands."

* commit '44df726a6cf4fe1119e146c9a18c78966a6305d3':
Add instruction-set arguments to installd commands.
44df726a6cf4fe1119e146c9a18c78966a6305d3 01-May-2014 Narayan Kamath <narayan@google.com> am cb079c89: Merge "Add instruction-set arguments to installd commands."

* commit 'cb079c899ac9d9c5ec90840249821f58c817406c':
Add instruction-set arguments to installd commands.
1b4003207750ea8fe8c7b03eb32d80f1df83979e 11-Apr-2014 Narayan Kamath <narayan@google.com> Add instruction-set arguments to installd commands.

The instruction-set is used to construct the dalvik cache
path and is also passed down to dex2oat.

(cherry picked from commit 791781bfb8cdcdf90e32968159603e2fe5098d94)

Change-Id: I43396b16f6eaecacf0fb7d052526fc5a239167ac
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
bd81c258c2ac9f41a9263a20953d6f0f63a88887 01-May-2014 Nick Vaccaro <nvaccaro@google.com> am 45fcfb48: am 85453ecc: dumpstate: increase poll timeout waiting for SIGQUIT logging

* commit '45fcfb48ef9e65747e7a3f35e1a4da232f6e161a':
dumpstate: increase poll timeout waiting for SIGQUIT logging
45fcfb48ef9e65747e7a3f35e1a4da232f6e161a 30-Apr-2014 Nick Vaccaro <nvaccaro@google.com> am 85453ecc: dumpstate: increase poll timeout waiting for SIGQUIT logging

* commit '85453ecc90a94564e586f0f97c9ec2c0cf831501':
dumpstate: increase poll timeout waiting for SIGQUIT logging
85453ecc90a94564e586f0f97c9ec2c0cf831501 30-Apr-2014 Nick Vaccaro <nvaccaro@google.com> dumpstate: increase poll timeout waiting for SIGQUIT logging

Increased the maximum time dumpstate will wait for SIGQUIT process
to finish dumping its thread stacks to the logfile to 5 seconds.

Bug: 14057177
Change-Id: I0b43004512855d202f2fe0ea7b0e934e77a3a070
umpstate/utils.c
791781bfb8cdcdf90e32968159603e2fe5098d94 11-Apr-2014 Narayan Kamath <narayan@google.com> Add instruction-set arguments to installd commands.

The instruction-set is used to construct the dalvik cache
path and is also passed down to dex2oat.

Change-Id: Ie480841b3e917dabe23ad4d5f4a0b08990500a51
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
e4f00b2aaea069474c342e257a0e8e191245905a 29-Apr-2014 Bill Yi <byi@google.com> Merge commit '6d05ef2310bdc84811d5b0385b009ad11447a749' into HEAD
aaa22fd38c1d2ad1707f8178019196d7d612dd72 29-Apr-2014 Brian Carlstrom <bdc@google.com> am 58ea37fe: am 108ed9fa: Merge "Fix incorrect odex path handling"

* commit '58ea37fe26fc733db478e606374f08d8a9d070cc':
Fix incorrect odex path handling
58ea37fe26fc733db478e606374f08d8a9d070cc 29-Apr-2014 Brian Carlstrom <bdc@google.com> am 108ed9fa: Merge "Fix incorrect odex path handling"

* commit '108ed9fa946ec516c0d853927c76ebbfca1dcb23':
Fix incorrect odex path handling
0e8ae16f084e3d4772ea6dd33a9b72925d7b40d5 28-Apr-2014 Chih-Wei Huang <cwhuang@linux.org.tw> Fix incorrect odex path handling

It's wrong to just concatenate the apk_path and .odex.
The bug prevents the prebuilt odex being used since Kitkat.

The patch is copied from the code of JellyBean.

Change-Id: I0ce8a877e3df8ae1ab9a0e3aeeef2d5253efc223
nstalld/commands.c
dd306d43ed38550cfdbef66402d7fa3de5ba3a23 16-Apr-2014 Mohamad Ayyash <mkayyash@google.com> Merge "atrace: Add f2fs sync and ext4 write tracepoints."
26dbcbe01367a8d4b0ca89c8590758aa72ee045c 09-Apr-2014 Mohamad Ayyash <mkayyash@google.com> atrace: Add f2fs sync and ext4 write tracepoints.

Change-Id: I76fa32f7d80aaeafc26494d9018b7a004e7dc3d2
trace/atrace.cpp
db1d823b4c4163d1cfea1b087ba4bc9bda721d71 09-Apr-2014 Nick Kralevich <nnk@google.com> am 236ed6d3: am 82fb5809: Merge "restorecon the profile directory."

* commit '236ed6d3d376b12573cca6878d3b5013371f5bc8':
restorecon the profile directory.
236ed6d3d376b12573cca6878d3b5013371f5bc8 09-Apr-2014 Nick Kralevich <nnk@google.com> am 82fb5809: Merge "restorecon the profile directory."

* commit '82fb58095524c833b0470c4b236aa8a70acf2a0f':
restorecon the profile directory.
a240733137d1a0c006ca68415a0f8ed28cc4b11a 09-Apr-2014 Stephen Smalley <sds@tycho.nsa.gov> restorecon the profile directory.

This is required so that it will be assigned the correct SELinux
security context on first creation by installd.

Bug: 13927667
Change-Id: I4857d031f9e7e60d48b8c72fcb22a81b3a2ebaaa
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
nstalld/utils.c
96668903e4d11893ea1f68525713542b0adb5404 31-Mar-2014 Nick Kralevich <nnk@google.com> am 4b3d6e31: am 3ebb877e: Merge "Modify installd\'s restorecon function."

* commit '4b3d6e310016140026b0b6c9dca757bf37d6d26a':
Modify installd's restorecon function.
4b3d6e310016140026b0b6c9dca757bf37d6d26a 31-Mar-2014 Nick Kralevich <nnk@google.com> am 3ebb877e: Merge "Modify installd\'s restorecon function."

* commit '3ebb877e52a2661de56c3f44827f33824e735730':
Modify installd's restorecon function.
da30dc7336f03ca629fe173db1425fdce989119c 27-Mar-2014 Robert Craig <rpcraig@tycho.ncsc.mil> Modify installd's restorecon function.

Changes above with PMS and below with libselinux
have resulted in a few changes to the restorecon data
api. This change is needed in order to support the new
way to issue a recursive restorecon of certain
/data/data directories.

The restorecondata function has also been modified to
find all users on the device for a given package name
(argument to the function) and to issue a separate
recursive restorecon call for each.

Change-Id: Ie440cba2c96f0907458086348197e1506d31c1b6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
nstalld/commands.c
nstalld/installd.c
9cddbd258d24029a6498898e96cb53aa62349767 26-Mar-2014 Nick Kralevich <nnk@google.com> am d9ee7dee: am b1a8c016: Merge "Send libselinux logging to logcat."

* commit 'd9ee7dee2cf42c0e672c7ac85c0252a22d3e5f08':
Send libselinux logging to logcat.
d9ee7dee2cf42c0e672c7ac85c0252a22d3e5f08 26-Mar-2014 Nick Kralevich <nnk@google.com> am b1a8c016: Merge "Send libselinux logging to logcat."

* commit 'b1a8c016371282a3cd3b113e6b2c0310372babf2':
Send libselinux logging to logcat.
7abb52bcafa2f7b422dfe22c5ea275c2fa9e6201 26-Mar-2014 Stephen Smalley <sds@tycho.nsa.gov> Send libselinux logging to logcat.

Otherwise we can't readily see log messages from libselinux calls
made by installd.

Change-Id: I319b30c181470468fe19dd5fbe9251ef03f1163b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
nstalld/installd.c
d0d436647511a422d355e80d7ddd6a22ecf5a6f6 25-Mar-2014 Xia Wang <xiaw@google.com> am a0da27d5: am 9c7db080: Build the benchmark test to /data/local/tmp/ for automated test

* commit 'a0da27d546865d075322c410121e9c3101cec449':
Build the benchmark test to /data/local/tmp/ for automated test
a0da27d546865d075322c410121e9c3101cec449 25-Mar-2014 Xia Wang <xiaw@google.com> am 9c7db080: Build the benchmark test to /data/local/tmp/ for automated test

* commit '9c7db08049e1d36c2f60dd703f27c432bc8cfbc5':
Build the benchmark test to /data/local/tmp/ for automated test
6d05ef2310bdc84811d5b0385b009ad11447a749 24-Mar-2014 Xia Wang <xiaw@google.com> am 9c7db080: Build the benchmark test to /data/local/tmp/ for automated test

* commit '9c7db08049e1d36c2f60dd703f27c432bc8cfbc5':
Build the benchmark test to /data/local/tmp/ for automated test
9c7db08049e1d36c2f60dd703f27c432bc8cfbc5 27-Feb-2014 Xia Wang <xiaw@google.com> Build the benchmark test to /data/local/tmp/ for automated test

Change-Id: I27a5ee24636ff9752a35dbab793821f6b7a79221
(cherry picked from commit b7925f1364b56708e072884a5ae9dba2d32b58e6)
latland/Android.mk
bb9c93bb6e9a4c020d8166fd1ede59352a10ac94 19-Mar-2014 Nick Kralevich <nnk@google.com> am 5d58e309: am 1bf30245: Merge "Extend installd to support SELinux restorecon function."

* commit '5d58e3092d70231da57140a7d9d9fbb87fd4b8e6':
Extend installd to support SELinux restorecon function.
5d58e3092d70231da57140a7d9d9fbb87fd4b8e6 19-Mar-2014 Nick Kralevich <nnk@google.com> am 1bf30245: Merge "Extend installd to support SELinux restorecon function."

* commit '1bf30245cbb8be7279fadcf4071cecc8db91789f':
Extend installd to support SELinux restorecon function.
e9887e46cea4a095e4219927eadbe4c57bb1a5ee 20-Feb-2014 Robert Craig <rpcraig@tycho.ncsc.mil> Extend installd to support SELinux restorecon function.

Implement new restorecondata function which will allow
the relabeling of /data/data and /data/user directories.
This is needed in the case of certain OTAs. Not every
boot will apply this relabeling however. Consult change
I77bf2a0c4c34b1feef6fdf4d6c3bd92dbf32f4a1 for
clarification on this issue.

Change-Id: I05e8b438950ddb908e46c9168ea6ee601e6d674f
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
2c22093c1c6131c5ec11e6d68ec0d4ae6eaed080 17-Mar-2014 Dan Stoza <stoza@google.com> Merge "Remove deprecated BufferQueue constructor"
993146092f8205d9747f082ccd63c09b536caa4e 14-Mar-2014 Mark Salyzyn <salyzyn@google.com> am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"

* commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb':
native frameworks: 64-bit compile issues
6780a2d6a5351977a793c08935bd3492c9942494 13-Mar-2014 Dan Stoza <stoza@google.com> Remove deprecated BufferQueue constructor

Bug: 13415624
Change-Id: I1c17833511b5961af5a9bbb9cc3d627ce558d424
latland/GLHelper.cpp
d4dabf872ac0a12e12aebae9032f7d62762c2aeb 13-Mar-2014 Mark Salyzyn <salyzyn@google.com> am cdbf28b3: Merge "native frameworks: 64-bit compile issues"

* commit 'cdbf28b3f7f5327f4cb0eb95b8326bf4c24c87ba':
native frameworks: 64-bit compile issues
92dc3fc52cf097bd105460cf377779bdcf146d62 12-Mar-2014 Mark Salyzyn <salyzyn@google.com> native frameworks: 64-bit compile issues

- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)

Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
trace/atrace.cpp
latland/Composers.cpp
latland/GLHelper.cpp
latland/Main.cpp
nstalld/commands.c
nstalld/utils.c
d105876a6c4f51199b2e24e5aa0384721cd23d0c 12-Mar-2014 Anwar Ghuloum <anwarg@google.com> am 85864b87: am 06ed9491: Merge "Fix parameter ordering for installd\'s dex2oat execl."

* commit '85864b8724b3908d2f5aa861276ce5e80d7f820e':
Fix parameter ordering for installd's dex2oat execl.
85864b8724b3908d2f5aa861276ce5e80d7f820e 12-Mar-2014 Anwar Ghuloum <anwarg@google.com> am 06ed9491: Merge "Fix parameter ordering for installd\'s dex2oat execl."

* commit '06ed9491418ce84e4272bf4201545fa6cfe3932e':
Fix parameter ordering for installd's dex2oat execl.
4bc054019d148444e0d0308e21ee26db53e43b72 11-Mar-2014 Anwar Ghuloum <anwarg@google.com> Fix parameter ordering for installd's dex2oat execl.

Change-Id: Ibd6fd46c6ec3137874f9a3d5eea134bc804e039a
nstalld/commands.c
e98151e004fa57184c3e688e268f8b9c36c41f8a 11-Mar-2014 Andy McFadden <fadden@android.com> Remove "screenshot"

This is the old screenshot utility, which relies on direct access
to the framebuffer device. It was replaced a long time ago by
"screencap", which talks to SurfaceFlinger (and includes a fallback
that tries to use the FB dev).

Change-Id: Id75a574bc78033761070b64d528fed06e23a0189
creenshot/Android.mk
creenshot/screenshot.c
544b09523b791935ffe9aa64d1f20335f7e2dc78 08-Mar-2014 Dave Allison <dallison@google.com> am 13c6fb10: am 1649c77e: Merge "ART profiler"

* commit '13c6fb1026531635f409f111d78d561592d2ede9':
ART profiler
13c6fb1026531635f409f111d78d561592d2ede9 08-Mar-2014 Dave Allison <dallison@google.com> am 1649c77e: Merge "ART profiler"

* commit '1649c77ed29eada5de32ace97033b9d898e9a6eb':
ART profiler
d93707342a61e66bc3eb2145628158452f577f42 30-Jan-2014 Dave Allison <dallison@google.com> ART profiler

Add args to the installd commands for profiler usage.
Make installd create the profile files and allow apps
to write to them.

The profile files are in /data/dalvik-cache/profiles. This
central location is needed due to permissions issues with
dex2oat reading from an app's data directory. The solution
is to put the profile file in a directory owned by the
install user and make the file writeable by the shared group
id of for the app. The app can read and write to these files
only in the profiles directory. The 'system' user also needs
to be able to read the files in order to determine the amount
of change to the file over time.

Bug: 12877748
Change-Id: I9b8e59e3bd7df8a1bf60fa7ffd376a24ba0eb42f

Conflicts:
cmds/installd/commands.c
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/utils.c
62d0f901fd7cfe70a09659aa58f631b479a16e35 06-Mar-2014 Mathieu Chartier <mathieuc@google.com> Don't pass in empty arg to dex2oat.

We would occassionally pass in an empty arg "" instead of a NULL.
This caused problems since dex2oat isn't made to handle empty args.

(cherry picked from commit f53dbfeda39c290ed67b0682d559a80cb42ceb79)

Change-Id: Ia2d60b895391bf83b5d250c20ddb8a4917d347a6
nstalld/commands.c
1d84e25648efcda02e53910530f59a3c3351f152 06-Mar-2014 Mathieu Chartier <mathieuc@google.com> am 3c39e03c: Merge "Don\'t pass in empty arg to dex2oat."

* commit '3c39e03c08094ce65608cae8a45dd726cf10b5c3':
Don't pass in empty arg to dex2oat.
f53dbfeda39c290ed67b0682d559a80cb42ceb79 06-Mar-2014 Mathieu Chartier <mathieuc@google.com> Don't pass in empty arg to dex2oat.

We would occassionally pass in an empty arg "" instead of a NULL.
This caused problems since dex2oat isn't made to handle empty args.

Change-Id: Ibb1aed64a4aa17459b2a75a5a2abcf13c7fa8ac7
nstalld/commands.c
cd44310a132ffa9144e6628c05a6cf07175ce9a0 05-Mar-2014 Brian Carlstrom <bdc@google.com> am c9e60374: am e19c99aa: Merge "Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags"

* commit 'c9e60374f5144e94103e5b866570be114aa165c8':
Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags
c9e60374f5144e94103e5b866570be114aa165c8 05-Mar-2014 Brian Carlstrom <bdc@google.com> am e19c99aa: Merge "Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags"

* commit 'e19c99aad605c395f53bf39ae1a27e298e7e33ce':
Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags
0ae8e39ebcc26836ba55a5ee4481825a0f473a9e 11-Feb-2014 Brian Carlstrom <bdc@google.com> Add dalvik.vm.dex2oat-flags to mimic dalvik.vm.dexopt-flags

Change-Id: Ic048ed654ea0ae38c9684e5fa5b14742b6b83305
nstalld/commands.c
87eb08dc07088a608228774df7667f2d70b6804d 28-Feb-2014 Narayan Kamath <narayan@google.com> am ad0f05be: am b98c4761: Merge "Correcting include path in installd test project\'s Android.mk"

* commit 'ad0f05bed95dc816a5b1e4bea23b0736458c1857':
Correcting include path in installd test project's Android.mk
ad0f05bed95dc816a5b1e4bea23b0736458c1857 28-Feb-2014 Narayan Kamath <narayan@google.com> am b98c4761: Merge "Correcting include path in installd test project\'s Android.mk"

* commit 'b98c4761e0c80a8d8138910e0a5e5fc8baff8282':
Correcting include path in installd test project's Android.mk
7400742285b9cf670eabd7e439e07bb903da935b 27-Feb-2014 Ramin Zaghi <ramin.zaghi@arm.com> Correcting include path in installd test project's Android.mk

installd project has moved from frameworks/base to frameworks/native
and so its test project's c_include path defined in Android.mk
has to match the change.

Change-Id: I597125ff659f51edbd9fc95371790e2d567c78be
nstalld/tests/Android.mk
b7925f1364b56708e072884a5ae9dba2d32b58e6 27-Feb-2014 Xia Wang <xiaw@google.com> Build the benchmark test to /data/local/tmp/ for automated test

Change-Id: I27a5ee24636ff9752a35dbab793821f6b7a79221
latland/Android.mk
20c7adbfaabe401ad111b2ff28ea44b287bd49c0 14-Feb-2014 Dianne Hackborn <hackbod@android.com> am b37b312b: am 7d86b454: Merge "frameworks/native: move idmap to frameworks/base"

* commit 'b37b312b829c7ab5107c2f96d0a95a557f67a831':
frameworks/native: move idmap to frameworks/base
b37b312b829c7ab5107c2f96d0a95a557f67a831 14-Feb-2014 Dianne Hackborn <hackbod@android.com> am 7d86b454: Merge "frameworks/native: move idmap to frameworks/base"

* commit '7d86b45472898373bbe3ef03286b66d71ea82b79':
frameworks/native: move idmap to frameworks/base
7d86b45472898373bbe3ef03286b66d71ea82b79 14-Feb-2014 Dianne Hackborn <hackbod@android.com> Merge "frameworks/native: move idmap to frameworks/base"
165c8bdfb585b224325423b21301620f9097dc64 13-Feb-2014 Nick Kralevich <nnk@google.com> am 0e4d2885: am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '0e4d2885a34d31f5dbe5a08bdb654953abaf82a2':
Convert all selinux_android_restorecon and _setfilecon calls to new API.
0e4d2885a34d31f5dbe5a08bdb654953abaf82a2 13-Feb-2014 Nick Kralevich <nnk@google.com> am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."

* commit '2044ac43e53b517526b3c70dc4fbc60ffc01693f':
Convert all selinux_android_restorecon and _setfilecon calls to new API.
2044ac43e53b517526b3c70dc4fbc60ffc01693f 13-Feb-2014 Nick Kralevich <nnk@google.com> Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
07a47281504a59a888e744f461c42f97fd2f0e64 12-Feb-2014 Colin Cross <ccross@android.com> frameworks/native: move idmap to frameworks/base

idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: Ieee30ba9d8170d3118acc89f0617981228a6974b
dmap/Android.mk
dmap/create.cpp
dmap/idmap.cpp
dmap/idmap.h
dmap/inspect.cpp
dmap/scan.cpp
297097957f5023b73b2c5c369d0c02cbebd20fa5 11-Feb-2014 Dianne Hackborn <hackbod@android.com> am 6e5fdb15: am 6c14f0ad: Merge "Runtime resource overlay, iteration 2"

* commit '6e5fdb1551ca7d117bf7e1acca133a077a8701f0':
Runtime resource overlay, iteration 2
6e5fdb1551ca7d117bf7e1acca133a077a8701f0 11-Feb-2014 Dianne Hackborn <hackbod@android.com> am 6c14f0ad: Merge "Runtime resource overlay, iteration 2"

* commit '6c14f0ad82be418c742e56fe586657ea0f394b05':
Runtime resource overlay, iteration 2
6c14f0ad82be418c742e56fe586657ea0f394b05 11-Feb-2014 Dianne Hackborn <hackbod@android.com> Merge "Runtime resource overlay, iteration 2"
667c3a19d8bb4877c0d5d84807b991e62a91f3ed 11-Feb-2014 Dianne Hackborn <hackbod@android.com> am 99188064: am 340aa8cb: Merge "New command line tool \'idmap\'"

* commit '99188064fd3b2d4ca85b02afefa4adb2562f8940':
New command line tool 'idmap'
99188064fd3b2d4ca85b02afefa4adb2562f8940 11-Feb-2014 Dianne Hackborn <hackbod@android.com> am 340aa8cb: Merge "New command line tool \'idmap\'"

* commit '340aa8cbd4afbb68b16f369336cc1c202582f021':
New command line tool 'idmap'
340aa8cbd4afbb68b16f369336cc1c202582f021 11-Feb-2014 Dianne Hackborn <hackbod@android.com> Merge "New command line tool 'idmap'"
26288202e7bdf2e897a11bf31a15685d7c20945f 07-Feb-2014 Stephen Smalley <sds@tycho.nsa.gov> Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
umpstate/utils.c
nstalld/commands.c
nstalld/installd.c
ba91e5af4510536f1c66a7d2183c976d430788f6 04-Feb-2014 Arve Hjønnevåg <arve@android.com> am 8641112a: am 4e7fd950: Merge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set."

* commit '8641112a1c3d4ff3ed68131d07eed01b715ac906':
Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.
8641112a1c3d4ff3ed68131d07eed01b715ac906 04-Feb-2014 Arve Hjønnevåg <arve@android.com> am 4e7fd950: Merge "Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set."

* commit '4e7fd9506103dcc9750788caf1f94b8d1348f37b':
Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.
f3ad11cf3ce60436bcdeec577d1e35c67ccae460 03-Feb-2014 Arve Hjønnevåg <arve@android.com> Use 64 bit binder interface if TARGET_USES_64_BIT_BINDER _or_ TARGET_IS_64_BIT is set.

Change-Id: I46a29939fa29ec9421ab6dff3285502f69a31745
ervicemanager/Android.mk
88f6ad18de946307b9b1db68faad84b991528e88 03-Feb-2014 Arve Hjønnevåg <arve@android.com> am c93865de: am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...

* commit 'c93865de80a16d3638936890fb42eb175284044b':
ServiceManager: Implement PING_TRANSACTION
ServiceManager: Use 32/64 bit types from new binder header
Binder: Use 64 bit pointers in 32 processes if selected by the target
Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
Binder: Make binder portable
ServiceManager: Fix the binder interface
ServiceManager: Store handles in uint32_t instead of void *
ServiceManager: Generic Fixes
ServiceManager: Add extra error handling
ServiceManager: Fix Android.mk
ServiceManager: Make use of kernel exported structures
c93865de80a16d3638936890fb42eb175284044b 03-Feb-2014 Arve Hjønnevåg <arve@android.com> am 58242fc2: Merge changes Ib0e5a037,I1bd7c38e,Icfc67c2a,I96c64312,I59528054, ...

* commit '58242fc29881cf29d56ee6e5fde6d73b16d0b67c':
ServiceManager: Implement PING_TRANSACTION
ServiceManager: Use 32/64 bit types from new binder header
Binder: Use 64 bit pointers in 32 processes if selected by the target
Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true
Binder: Make binder portable
ServiceManager: Fix the binder interface
ServiceManager: Store handles in uint32_t instead of void *
ServiceManager: Generic Fixes
ServiceManager: Add extra error handling
ServiceManager: Fix Android.mk
ServiceManager: Make use of kernel exported structures
63568b1430d741f40ca008391c854ef1cc880138 31-Jan-2014 MÃ¥rten Kongstad <marten.kongstad@sonymobile.com> Runtime resource overlay, iteration 2

Support any number of overlay packages. Support any target package.

UPDATED PACKAGE MATCHING
------------------------
In Runtime resource overlay, iteration 1, only a single overlay package
was considered. Package matching was based on file paths:
/vendor/overlay/system/framework-res.apk corresponded to
/system/framework-res.apk. Introduce a more flexible matching scheme
where any package is an overlay package if its manifest includes

<overlay targetPackage="com.target.package"/>

For security reasons, an overlay package must fulfill certain criteria
to take effect: see below.

THE IDMAP TOOL AND IDMAP FILES
------------------------------
Idmap files are created by the 'idmap' binary; idmap files must be
present when loading packages. For the Android system, Zygote calls
'idmap' as part of the resource pre-loading. For application packages,
'idmap' is invoked via 'installd' during package installation (similar
to 'dexopt').

UPDATED FLOW
------------
The following is an outline of the start-up sequences for the Android
system and Android apps. Steps marked with '+' are introduced by this
commit.

Zygote initialization
Initial AssetManager object created
+ idmap --scan creates idmaps for overlays targeting 'android', \
stores list of overlays in /data/resource-cache/overlays.list
AssetManager caches framework-res.apk
+ AssetManager caches overlay packages listed in overlays.list

Android boot
New AssetManager's ResTable acquired
AssetManager re-uses cached framework-res.apk
+ AssetManager re-uses cached 'android' overlays (if any)

App boot
ActivityThread prepares AssetManager to load app.apk
+ ActivityThread prepares AssetManager to load app overlays (if any)
New AssetManager's ResTable acquired as per Android boot

SECURITY
--------
Overlay packages are required to be pre-loaded (in /vendor/overlay).
These packages are trusted by definition. A future iteration of runtime
resource overlay may add support for downloaded overlays, which would
likely require target and overlay signatures match for the overlay to
be trusted.

LOOKUP PRIORITY
---------------
During resource lookup, packages are sequentially queried to provide a
best match, given the constraints of the current configuration. If any
package provide a better match than what has been found so far, it
replaces the previous match. The target package is always queried last.

When loading a package with more than one overlay, the order in which
the overlays are added become significant if several packages overlay
the same resource.

Had downloaded overlays been supported, the install time could have been
used to determine the load order. Regardless, for pre-installed
overlays, the install time is randomly determined by the order in which
the Package Manager locates the packages during initial boot. To support
a well-defined order, pre-installed overlay packages are expected to
define an additional 'priority' attribute in their <overlay> tags:

<overlay targetPackage="com.target.package" priority="1234"/>

Pre-installed overlays are loaded in order of their priority attributes,
sorted in ascending order.

Assigning the same priority to several overlays targeting the same base
package leads to undefined behaviour. It is the responsibility of the
vendor to avoid this.

The following example shows the ResTable and PackageGroups after loading
an application and two overlays. The resource lookup framework will
query the packages in the order C, B, A.

+------+------+- -+------+------+
| 0x01 | | ... | | 0x7f |
+------+------+- -+------+------+
| |
"android" Target package A
|
Pre-installed overlay B (priority 1)
|
Pre-installed overlay C (priority 2)

Change-Id: If49c963149369b1957f7d2303b3dd27f669ed24e
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
5ee3dafa98443cef8c0139aa6b2b9a4766412615 31-Jan-2014 MÃ¥rten Kongstad <marten.kongstad@sonymobile.com> New command line tool 'idmap'

Introduce a new tool 'idmap' to handle generation and verification of
idmap files. The tool is modelled on 'dexopt', and is intended to be
used similarly, notably by 'installd'.
See cmds/idmap/idmap.cpp for further documentation on 'idmap'.

Note: this commit is interdependent on a commit in project build/ to add
'idmap' to PRODUCT_PACKAGES.

Note: the changes to androidfw are only stubs. The actual implementation
will be provided in Runtime resource overlay, iteration 2.

Change-Id: I7131b74ece1e46c8a9c0a31d103e686aa07da2bb
dmap/Android.mk
dmap/create.cpp
dmap/idmap.cpp
dmap/idmap.h
dmap/inspect.cpp
dmap/scan.cpp
e5245cbf5d4e830cf605ef07f5d284d7c5d2867e 29-Jan-2014 Arve Hjønnevåg <arve@android.com> ServiceManager: Implement PING_TRANSACTION

Stop printing "invalid id " to stderr every time a process tries to
connect to the servicemanager.

Change-Id: Ib0e5a0375bfa2dec2c2f9cd668bd5dda46ed6588
ervicemanager/binder.h
ervicemanager/service_manager.c
399b6c3bbc0d887ab016a8bb686ff16d36edc6c8 29-Jan-2014 Arve Hjønnevåg <arve@android.com> ServiceManager: Use 32/64 bit types from new binder header

Change-Id: I1bd7c38ed9f43125cf9c63aa533434ee7ca06f80
ervicemanager/binder.c
ervicemanager/binder.h
e91fff0a2dfe7d312286b140c8069c820627da8c 29-Jan-2014 Arve Hjønnevåg <arve@android.com> Add BINDER_IPC_32BIT to CFLAGS unless TARGET_USES_64_BIT_BINDER is true

Change-Id: I96c643123b0314c361b7f48a18d5c22c660d4ff5
ervicemanager/Android.mk
e0dd0b85145f4a9c004019feaeb9bc27ab98f9ad 31-Jan-2014 Brian Carlstrom <bdc@google.com> am af3efe8c: Merge "frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default"

* commit 'af3efe8ce7e2eeb7a98552af5cf38d8a9720f018':
frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default
3a345f0df5f62d77e875a289e9aee89f0d1b526e 19-Dec-2013 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Fix the binder interface

This patch adds support for binder transactions on 64bit systems
without breaking the existing 32bit ABI. It has been tested on
the Android emulator and ARMv8 Model.

Most of the changes in this patch just follow the binder ABI.

Change-Id: I8c37b847ea65008d56554d34d4696fe3d22f7533
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/bctest.c
ervicemanager/binder.c
ervicemanager/service_manager.c
5fb1b8836aa5cf0f38b49bc7bfb8343b84fdf9bf 30-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Store handles in uint32_t instead of void *

This patch corrects the types used for storing handles.

Change-Id: If9c10782345f1de9e12b4b3fd6be9e02e6b568cd
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/bctest.c
ervicemanager/binder.c
ervicemanager/binder.h
ervicemanager/service_manager.c
9b738bb4110926b85da65d36b2e6f1a50199ec4c 10-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Generic Fixes

This patch fixes some of the ServiceManager issues. The following patches
of the series add fixes to the ABI.

Change-Id: Ib479234c8704e12592f1b149ddec67881bc50230
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/binder.c
ervicemanager/binder.h
ervicemanager/service_manager.c
a44542ca74b7da5b44ba30c205c3244805bb0600 30-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Add extra error handling

This patch extends the error handling. It also adds a check for a matching
binder version - kernel/userspace.

Change-Id: I43a262934b38c5711536aaa42754fed1ef04b39e
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/bctest.c
ervicemanager/binder.c
ervicemanager/service_manager.c
dc832dc5513f0767c153f90a57356c3466f45dd4 30-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Fix Android.mk

This patch fixes Android.mk and enables building bctest as an optional
module without any extra hacks.

Change-Id: Icaf8bf9452776db2ea4a2ba75f3abf05b4e2cdab
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/Android.mk
bcf38880c65297da58194eb0c0ce8d6e2bab7d94 10-Jan-2014 Serban Constantinescu <serban.constantinescu@arm.com> ServiceManager: Make use of kernel exported structures

This patch switches ServiceManager to use the structures exported in the
kernel headers rather then redefining its own.

struct binder_txn is replaced with struct binder_transaction_data and struct
binder_object with struct flat_binder_object, both defined in the binder driver
header <linux/binder.h>.

Change-Id: I3b3e97918173ea35a289e184774ae06193192da3
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
ervicemanager/binder.c
ervicemanager/binder.h
ervicemanager/service_manager.c
87a12bf53b3411ad61fdbf7ca5f86e90c38fc722 30-Jan-2014 Brian Carlstrom <bdc@google.com> frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default

Bug: 12798969

(cherry picked from commit 0c05d3aca6d63625513d5f42706e81c2d7834fd9)

Change-Id: I3db785c3f8a3d242d7a0127ed5bec9ecca67f52c
nstalld/commands.c
0c05d3aca6d63625513d5f42706e81c2d7834fd9 30-Jan-2014 Brian Carlstrom <bdc@google.com> frameworks/native: Rename persist.sys.dalvik.vm.lib to allow new default

Bug: 12798969
Change-Id: I6b40317eceb3d89b0acff88238a9a9ab423c4d78
nstalld/commands.c
5ecd4beef8f10f91febf916414c65d3d0e1cf734 29-Jan-2014 John Spurlock <jspurlock@google.com> Dump system settings for all users

Change-Id: Ic832b19fe698da1984876b2949c3f26990ae5076
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
9fcca4ee1746774cc7a10f4257f4aa50e01ad46e 16-Jan-2014 Guang Zhu <guangzhu@google.com> releax wait timeout on start of dumpstate service

Bug: 12181612
Change-Id: If7ae97de1e42890dac37d036ead669ccda65e688
ugreport/bugreport.c
b281d8140461322d2a9808244ce9ce3d31b35b9d 18-Dec-2013 Nick Kralevich <nnk@google.com> am e2d412f0: am e7394ba8: am c02c35fb: Merge "restorecon /data/media when re-creating it for multi-user upgrade."

* commit 'e2d412f0466ac6a1a33e2c2563ed2192b58bfa87':
restorecon /data/media when re-creating it for multi-user upgrade.
e2d412f0466ac6a1a33e2c2563ed2192b58bfa87 18-Dec-2013 Nick Kralevich <nnk@google.com> am e7394ba8: am c02c35fb: Merge "restorecon /data/media when re-creating it for multi-user upgrade."

* commit 'e7394ba8bd9cd90a0fb72f6c50522a41cd7877fd':
restorecon /data/media when re-creating it for multi-user upgrade.
47a351834f202386b01a27d42ec41ceb1f17b754 17-Dec-2013 Stephen Smalley <sds@tycho.nsa.gov> restorecon /data/media when re-creating it for multi-user upgrade.

Change-Id: I112c61863f2104d1962697c54cff25106e9b48a0
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
nstalld/installd.c
34ced636fbeff4f7f60ef87fb832d0b56a95d30e 11-Dec-2013 Todd Poynor <toddpoynor@google.com> am 2a83daa8: dumpstate: dump console-ramoops instead of last_kmsg if present

* commit '2a83daa8a3e1eab292dc1464bbe78f025f4bc0e9':
dumpstate: dump console-ramoops instead of last_kmsg if present
2a83daa8a3e1eab292dc1464bbe78f025f4bc0e9 23-Nov-2013 Todd Poynor <toddpoynor@google.com> dumpstate: dump console-ramoops instead of last_kmsg if present

Change-Id: I41a922b33f0b6b4e8e150a92e46032501a165e33
umpstate/dumpstate.c
17dc96ecde7c1cd3fe93e8960f7a37e98867fb80 03-Dec-2013 Nick Kralevich <nnk@google.com> am 651dc744: am bef08b8d: Merge "Handle policy reloads within installd rather than restarting it."

* commit '651dc7440b10c8a4090bd5469a2e90d3bfe8356e':
Handle policy reloads within installd rather than restarting it.
bef08b8d1b30976ff273fc9041bc8d934f52fea9 27-Nov-2013 Nick Kralevich <nnk@google.com> Merge "Handle policy reloads within installd rather than restarting it."
b5e47621293e265402b372bcf2f380ab8a49247d 20-Sep-2013 Nick Kralevich <nnk@google.com> am e4e91c4e: resolved conflicts for merge of e678897f to klp-dev-plus-aosp

* commit 'e4e91c4ead821afb5aced2e33ee39d8878eb4d1e':
Proper security labeling of multi-user data directories.
e4e91c4ead821afb5aced2e33ee39d8878eb4d1e 20-Sep-2013 Nick Kralevich <nnk@google.com> resolved conflicts for merge of e678897f to klp-dev-plus-aosp

Change-Id: Ie2a5e7a917ab7f5a0ee98300b880d22c7a10bf70
30a7d5a5a959edea1555296c5c8ede57df0e5925 13-Sep-2013 Mike Lockwood <lockwood@google.com> Add support for "input" service running as user AID_INPUT

Change-Id: I8b6700c25ea2264fb3e1c16e18df281eb67b931f
ervicemanager/service_manager.c
880d1a957ebcb63fb9d3724e2f91c58b7ff0cd54 29-Jul-2013 Robert Craig <rpcraig@tycho.ncsc.mil> Proper security labeling of multi-user data directories.

Add seinfo paramater to appropriate make directory
functions. This allows proper labeling for multi-user
scenarios.

Change-Id: Iaba7c40645bc7b6cc823d613da0c3782acf6ddd5
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
2a5fd8b064cc4a1b58b4cd2dde1128e4fd5e1e8e 11-Sep-2013 Mike Lockwood <lockwood@google.com> servicemanager: Add support for "audio" service running as AID_AUDIO user

Change-Id: Ia41f1edd05f233ac5ce43c34eb8ab3ab76ffa194
ervicemanager/service_manager.c
3b010de1c12b2f8b6c7a1aa7b187fe46a95e22bf 05-Sep-2013 Dianne Hackborn <hackbod@google.com> am ecc05fb5: am 59b1516f: Fix issue #10422349: Limit/change the battery history data in batterystats

* commit 'ecc05fb5430ebb57710850f22d2a370c2af86e9d':
Fix issue #10422349: Limit/change the battery history data in batterystats
ecc05fb5430ebb57710850f22d2a370c2af86e9d 05-Sep-2013 Dianne Hackborn <hackbod@google.com> am 59b1516f: Fix issue #10422349: Limit/change the battery history data in batterystats

* commit '59b1516f4cefcfd599f4e5e9c4a227a48d1ace65':
Fix issue #10422349: Limit/change the battery history data in batterystats
59b1516f4cefcfd599f4e5e9c4a227a48d1ace65 05-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10422349: Limit/change the battery history data in batterystats

Use new compact option to include history when dumping battery stats.

Change-Id: I3833a88db76d8791bd5c2e8f6ff414af65472a42
umpstate/dumpstate.c
b3fb0ae7fd296031f1fa22f3ac058973a5621ebb 30-Aug-2013 Rom Lemarchand <romlem@google.com> fix incorrect aspect ratio label

2048x1536 was labeled as 3:2 when it is 4:3.

Change-Id: I981af139ba3d1c6f111772aeaccf95c679999370
latland/Main.cpp
68bfe1fea6b6d7976e09b447f589ee51c86e7483 27-Aug-2013 John Reck <jreck@android.com> am 05f0a81a: Merge "Add libpng include path"

* commit '05f0a81a93f0d41fa4115c752e617849d145fe5b':
Add libpng include path
e9b2dfe3fd31c1a099b954145389b66bd5d556bf 27-Aug-2013 John Reck <jreck@google.com> Add libpng include path

Forward compatibility change

Change-Id: Iae792715d9a9aea34f53cd6383981371835c4a31
creenshot/Android.mk
creenshot/screenshot.c
a8113c12ccb8a47f4756f33aa286ffbb5cfab6fd 21-Aug-2013 Dmitry Shmidt <dimitrysh@google.com> am 072ca28d: am 56968ec0: Merge "dumpstate: Fix wifi list of networks dump" into klp-dev

* commit '072ca28d7860829083f17d9e24863329010536cf':
dumpstate: Fix wifi list of networks dump
1d6b97c869718001010cce3db387c73fd11bf32e 21-Aug-2013 Dmitry Shmidt <dimitrysh@google.com> dumpstate: Fix wifi list of networks dump

Bug: 9056601

Change-Id: Ia0adb67afdf3d478033d0ee34bbb95e621e2fe51
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
umpstate/dumpstate.c
bebc84e19c1fdfb9419b3b3b403d4b8f3edaca20 15-Aug-2013 Mathias Agopian <mathias@google.com> am 99b535ad: am 5bbe0ab6: fix build. optional test broke.

* commit '99b535ad06fa033784c251394143287f9b0b89c8':
fix build. optional test broke.
5bbe0ab655713849fbfe750d4d09690106f95d7f 15-Aug-2013 Mathias Agopian <mathias@google.com> fix build. optional test broke.

Change-Id: I0ed5e2cd4c8945ee95673ed0eec5820d9def5097
latland/Composers.cpp
latland/GLHelper.cpp
c8919373b26dc94f3e34dc23e8659635880b8d9b 14-Aug-2013 Todd Poynor <toddpoynor@google.com> am b52bfbb1: am 5025593d: Merge "dumpstate: switch to HAL static libraries" into klp-dev

* commit 'b52bfbb1c4ee3e19d4ce54f3d9e149878696edf1':
dumpstate: switch to HAL static libraries
4f5b9a701b3d480ae4437ec60062ecb6c94446ee 14-Aug-2013 Todd Poynor <toddpoynor@google.com> dumpstate: switch to HAL static libraries

Change-Id: I865a0b4b4a84a2d54a239e7b09874287f0c1ad56
umpstate/Android.mk
umpstate/dumpstate.c
umpstate/libdumpstate_default.c
05cf62d1c85bc4e9716bf7adbbcba8036eef6ace 13-Aug-2013 John Reck <jreck@google.com> Fix libpng includes

png.h now includes pnglibconf.h
update the include path so it can find it

Change-Id: I594f1613e42405072029ae4cd7f9f8d0e03b2434
creenshot/Android.mk
creenshot/screenshot.c
bd558d61871218f5b13df2fe4b7cc3b530ee947c 16-Apr-2013 Stephen Smalley <sds@tycho.nsa.gov> Handle policy reloads within installd rather than restarting it.

Restarting installd upon policy reloads has reportedly caused
stability problems for some users. Stop restarting installd
and instead handle policy reloads within it.

Change-Id: I697a736d8e414cfc6cfa131ed7b97c7f7694d022
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
nstalld/installd.c
656a6b9e3645bfe2cf073b69cbb9d02832f62c26 23-Jul-2013 Alex Ray <aray@google.com> dumpstate: remove libutils dependency

Change-Id: I9745f389402c01b90877612e060ac996eba99964
umpstate/dumpstate.c
7ffaa7c60d51cc0eb731158de2ac3df9c50cc0b4 22-Jul-2013 Mathias Agopian <mathias@google.com> move services executables sources in their respective src folder

Change-Id: Ic65434a26c7fed1699abf0851fec6faa40e09c0c
nputflinger/Android.mk
nputflinger/main.cpp
ensorservice/Android.mk
ensorservice/main_sensorservice.cpp
urfaceflinger/Android.mk
urfaceflinger/main_surfaceflinger.cpp
595264f1af12e25dce57d7c5b1d52ed86ac0d0c9 17-Jul-2013 Mathias Agopian <mathias@google.com> BufferQueue improvements and APIs changes

this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
latland/GLHelper.cpp
7f069d79e7f04192610ef93901c89835fea46444 16-Jul-2013 Mathias Agopian <mathias@google.com> Merge "always pass the BufferQueue explicitely to consumers"
f8bca79df3f7b5beb184d4ccc0a71d1e99719753 16-Jul-2013 Jeff Sharkey <jsharkey@android.com> Merge "Change legacy "persona" references to userid_t."
40c9e0a3989222b4c27c88f54b6acf67b58a68cf 15-Jul-2013 Jeff Brown <jeffbrown@google.com> Add skeleton of input flinger.

Change-Id: I7f25080e446d4d3d9de9b18fe432a09bc751e0d9
nputflinger/Android.mk
nputflinger/main.cpp
abe4fe5b46157ecd2a52d28abf938c816c3ce878 11-Jul-2013 Jeff Sharkey <jsharkey@android.com> Change legacy "persona" references to userid_t.

Offers stronger typing with no functional change.

Change-Id: I09f0262470feec5cfdf26658f998c20550af84d4
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
76b45c126be0208f6f8e8f3025b0aa8a26d3fc3a 15-Jul-2013 Nick Kralevich <nnk@google.com> dumpstate: Show SELinux process labels

Change-Id: Ie19586a3b733bd4420f6b20b5d253d42c2f165ea
umpstate/dumpstate.c
8f938a53385a3c6d1c6aa24b3f38437bb2cc47ae 13-Jul-2013 Mathias Agopian <mathias@google.com> always pass the BufferQueue explicitely to consumers

Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
latland/GLHelper.cpp
1bd5068a5180ac12dda374e15c7b1f70e8334284 11-Jul-2013 Dianne Hackborn <hackbod@google.com> Fix cmd line arguments for usagestats.

Change-Id: I9a1436aa1d1665924ba62a568bb4b66d67ae2814
umpstate/dumpstate.c
e7a8b17e37ef359567fbbd9beb8c2445494f6402 30-Jun-2013 Brian Carlstrom <bdc@google.com> Renaming dalvik.vm.lib to persist.sys.dalvik.vm.lib

Change-Id: If31695e04bb813eb75b2fdd00e5d70ced4fbb0e9
nstalld/commands.c
5cd46aa3399ddeaf12a211390dfde66c796ab299 10-Jul-2013 Dianne Hackborn <hackbod@google.com> Update to follow procstats options changes.

Change-Id: I6f016c944cfcd01bbbcf3cf37bc7ff05482f0012
umpstate/dumpstate.c
3e5fa73722c100fc9017c7a47b17a8e727aa34e1 04-Jul-2013 Dianne Hackborn <hackbod@google.com> Update to use --include-committed for procstats.

Change-Id: I5ce737b624c5617c94054d6bedebca754fbf16a9
umpstate/dumpstate.c
d3fa5616160c53d5bec8cd91d65f3732413c1a56 03-Jul-2013 Ken Sumrall <ksumrall@android.com> Add support for mmc trace events

Change-Id: I1d9f2a85e50f8e30d418fb97c01ce7b0fbb680bd
trace/atrace.cpp
02bea9786d2ecc4c04f35fd7d9b73d4dd2b73735 27-Jun-2013 Dianne Hackborn <hackbod@google.com> Add checkin dumps to bug reports.

This is a duplicate of the associated human-readable dumps
of these services, but much better for automated parsing.

Change-Id: I902b768b03aeac1472f03f96913f9b8ada5dba9c
umpstate/dumpstate.c
1705fc44fb85c4232637f9f7189c3bdca98a63d5 22-Mar-2013 Brian Carlstrom <bdc@google.com> Moving dex2oat installd patches from frameworks/base

(cherry picked from commit 3fa3a652ba9a7c5b23b6f2bc7c1851d4e23e430f)

Change-Id: I2f9bb66e1b0463bef41805f2d220160880121813
nstalld/commands.c
nstalld/installd.c
12861530ef22f0954837bfd7f3a1a33f9c4b6333 14-Jun-2013 Amith Yamasani <yamasani@google.com> Merge "Add a note about emulated sdcard in rawbu usage dump"
b82bf9dfc97c44852283630eac24ae92b49f85f6 14-Jun-2013 Amith Yamasani <yamasani@google.com> Add a note about emulated sdcard in rawbu usage dump

Change-Id: I95af9175235a18716d63a863b482a323392e4fa2
awbu/backup.cpp
caad555f3efaf77941c4eacd4f6c84eb22d14f6d 14-Jun-2013 keunyoung <keunyoung@google.com> add dumpsys -l to list available services

- for people with poor memory like me :)

Change-Id: I60160ca333ac4864bb8328f164cc2e9eba3660fc
umpsys/dumpsys.cpp
c40f4e64f267c78ff04862456092002d318a8adc 29-May-2013 jp abgrall <jpa@google.com> am 4b2b0a74: am 74bd799e: Merge "Exit dumpstate on SIGPIPE to avoid cascading child crashes"

* commit '4b2b0a7494c872b7d545a9abe2d08ca0d0325073':
Exit dumpstate on SIGPIPE to avoid cascading child crashes
4b2b0a7494c872b7d545a9abe2d08ca0d0325073 29-May-2013 jp abgrall <jpa@google.com> am 74bd799e: Merge "Exit dumpstate on SIGPIPE to avoid cascading child crashes"

* commit '74bd799ec20d2420459fa382533b1cc39ca9a54c':
Exit dumpstate on SIGPIPE to avoid cascading child crashes
885f888c55587e9366542b5155a06c321cde175a 06-May-2013 John Michelau <w14107@motorola.com> Exit dumpstate on SIGPIPE to avoid cascading child crashes

When dumpstate ignores SIGPIPE it can lead to a cascade of tombstones /
coredumps since many of its children don't handle or ignore it. It's
best to just exit dumpstate once the pipe is broken.

Change-Id: Ic0c57ecf4171f0c0a07837e51c41cb1876e1350c
umpstate/dumpstate.c
f0f2841d95a26247dfa0b31a6bfa8b010fe89aa2 23-May-2013 Tim Murray <timmurray@google.com> Add RenderScript category for atrace.

Change-Id: I069a301329f4a579c7b2716fa52c3f4a0ae0062b
trace/atrace.cpp
7f9efade0d37566600a64ff2e80531270fdfdb3d 09-May-2013 Jamie Gennis <jgennis@google.com> am d2a92b5b: am db733579: Merge "atrace: add the \'dalvik\' trace category" into jb-mr2-dev

* commit 'd2a92b5b97b5a107d327744f216abdea8e0cda89':
atrace: add the 'dalvik' trace category
002e1e58dfe19dd3e49a59c6827cbf51573941a2 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
umpsys/dumpsys.cpp
ervice/service.cpp
d2a92b5b97b5a107d327744f216abdea8e0cda89 08-May-2013 Jamie Gennis <jgennis@google.com> am db733579: Merge "atrace: add the \'dalvik\' trace category" into jb-mr2-dev

* commit 'db733579a4c64eddd7dadb4ac15f54658ccfc0fb':
atrace: add the 'dalvik' trace category
db733579a4c64eddd7dadb4ac15f54658ccfc0fb 08-May-2013 Jamie Gennis <jgennis@google.com> Merge "atrace: add the 'dalvik' trace category" into jb-mr2-dev
eff2e8d2374692213204468433e3d96e7472ea02 08-May-2013 Jamie Gennis <jgennis@google.com> atrace: add the 'dalvik' trace category

Bug: 8856374
Change-Id: Ie7759328333d21d8123ce9d4f1a177cae5ede51e
trace/atrace.cpp
63d076e3399c77cc610e81b4b173faa0a89efd23 07-May-2013 Erik Gilling <konkers@android.com> flatland: add 1920x1200 to 16:10 resolutions

Change-Id: Ie7540c1ca4ec2c7ea8a307ce118d35479cdf499c
latland/Main.cpp
7bfdf27539cb5082e9d11da780d2d24405a008d6 07-May-2013 Erik Gilling <konkers@android.com> flatland: add 3:2 tests

Change-Id: I90496207fbf972c9a8e6baa2188a7732a282f879
latland/Main.cpp
ba018b3fa5ab6f40bdcc2af62ddeeebd7bad1ea5 03-May-2013 Dianne Hackborn <hackbod@google.com> am 4fc27d79: Merge "Fix issue #8768456: Settings > App Info under reports..." into jb-mr2-dev

* commit '4fc27d79c29646b08ff059abc19cc4a7bccaa316':
Fix issue #8768456: Settings > App Info under reports...
8b41780d73930b37b6254cc1dac5607c843839c0 02-May-2013 Dianne Hackborn <hackbod@google.com> Fix issue #8768456: Settings > App Info under reports...

...app storage size for apps w/ .so files

The lib directories are tagged with the apk install number,
so must be explicitly passed down to installd.

Change-Id: Iae8815afd6ba964f5b2ed86a0d04a91827391ed6
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
0c71bb90f96f485940fd3b73c307fedee958042d 13-Apr-2013 Dianne Hackborn <hackbod@google.com> am 9380d78c: Add new resources trace.

* commit '9380d78c98d8b8fbce9ade5881fab7134fadc015':
Add new resources trace.
9380d78c98d8b8fbce9ade5881fab7134fadc015 12-Apr-2013 Dianne Hackborn <hackbod@google.com> Add new resources trace.

Change-Id: Iab8c1ef51f491e818fb4bab0ba7a042f0d9bec9a
trace/atrace.cpp
46f19772ae5659c1659a0ac8f1f72389e94a85d4 10-Apr-2013 Ying Wang <wangying@google.com> resolved conflicts for merge of c76e8a20 to jb-mr2-dev-plus-aosp

Change-Id: I895a8ad8c936a80c70aaac739c6441d3c7c55834
8a0cb4ee0b6c351de82987efb472fa38dfaf608a 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: I2ca4fa00dde0b574df3619134836bcb9315bd506
umpstate/Android.mk
umpsys/Android.mk
nstalld/Android.mk
p-up-vpn/Android.mk
creenshot/Android.mk
e167d889e4917e6b4f569026a1492b9e9818b08e 05-Apr-2013 Geremy Condra <gcondra@google.com> am a3d3e137: Merge "dumpstate: Add SELinux restorecon call."

* commit 'a3d3e137f473a965fefced9670e3b0c6b5f7f791':
dumpstate: Add SELinux restorecon call.
957983787d7a753d34b582ae0165160f4ebf815c 04-Apr-2013 Robert Craig <rpcraig@tycho.ncsc.mil> dumpstate: Add SELinux restorecon call.

Set the security context on the directory used
to dump Dalvik and native stack traces.

Change-Id: Iba13783f10e850485ce1a8d4aa5792d55085eb22
Signed-off-by: Robert Craig <rpcraig@tycho.ncsc.mil>
umpstate/Android.mk
umpstate/utils.c
f7f29c8f9d56dc908e501ae789e418a9974b6bce 27-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: add support for app tracing

This change adds support for the -a command line argument to atrace. This
argument sets the comma separated list of application names (i.e.
/proc/self/cmdline values) for which to enable application-level tracing.

Change-Id: I812d57c4cdc581943247229413f09b7e1adc10d0
trace/atrace.cpp
9794f90368550dba8693a30c61c4bea5c4fb2993 28-Mar-2013 Jamie Gennis <jgennis@google.com> Merge "atrace: fix tracing on user builds" into jb-mr2-dev
6f6f3f710b4dec2952298ae65d5f1674535c63f0 27-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: fix tracing on user builds

Change-Id: Idef15d514f0bd1e117362c6a06a2ea24314feb7f
trace/atrace.cpp
437bdbbaec76099b8b4582aa9f965e60b3f3cdb6 26-Mar-2013 Geremy Condra <gcondra@google.com> Merge "Add seinfo parsing to PackageManagerService." into jb-mr2-dev
4d3fd4e9988c0eb284dd5104c4dea757f723c716 25-Mar-2013 Robert Craig <rpcraig@tycho.ncsc.mil> Add seinfo parsing to PackageManagerService.

This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory. Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
aaaa57bf8904ef383a9e766ace09725bc392aceb 26-Mar-2013 Jeff Sharkey <jsharkey@android.com> Bugreport broadcasts are only useful to owners.

Bug: 8415156
Change-Id: Ia73969262abe9f715f038dad934651d7e5d65c87
umpstate/dumpstate.c
43122e7e672eb170334a4467dd41cf4bd545bae5 21-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: use creat instead of truncate

Change-Id: Ie25c704f33c419c0c542249ae2841393862df0ab
trace/atrace.cpp
a6c1ab52e30fc63c8822e1f0cc6c5aea6328a69b 20-Mar-2013 Jeff Sharkey <jsharkey@android.com> Merge "Move screenshots near beginning of dumpstate." into jb-mr2-dev
5a93003d3f0d1808b6dcd9928041ec62ea7f67ad 19-Mar-2013 Jeff Sharkey <jsharkey@android.com> Move screenshots near beginning of dumpstate.

Bug: 8420215
Change-Id: I6adffd1182ed8f99b8d11d43785a4eb4a388ceb5
umpstate/dumpstate.c
79fb99d0dea4d301d1bf25273c6af4907ca124bc 18-Mar-2013 Jamie Gennis <jgennis@google.com> Merge "atrace: add support for tracing kernel functions" into jb-mr2-dev
e9b8cfb63297b14253c5b464190fc5752457a38e 13-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: add support for tracing kernel functions

This change adds support for tracing specific kernel function calls using the
function_graph tracer. It adds a '-k' option to atrace that accepts a comma
separated list of kernel function names for which tracing will be enabled.

Change-Id: I872b2f1d474b8ebb904053853fc8cf8c0a98089c
trace/atrace.cpp
7560443061846fe0be5b658a7904786892007034 14-Mar-2013 Jeff Sharkey <jsharkey@android.com> Increase screenshot timeout.

Devices with large displays take longer than 5 seconds to write.

Change-Id: If74bc4a3cec366ae28eca549bce28ef212e47d8f
umpstate/dumpstate.c
d77d4e0edcb0d0f99dce2acea5278875be0b02a0 14-Mar-2013 Jeff Sharkey <jsharkey@android.com> Merge "Support broadcast when dumpstate finishes." into jb-mr2-dev
27f9e6d849fce956c9b8f1ad5c3d9a954501a76b 13-Mar-2013 Jeff Sharkey <jsharkey@android.com> Support broadcast when dumpstate finishes.

Add flag that sends BUGREPORT_FINISHED broadcast when dumpstate
is finished, including the resulting filesystem paths. Also reduces
directory creation to 0770.

Bug: 7005318
Change-Id: Id4c6b699a56f8acd859b7ab73368500e1a8f3c67
umpstate/dumpstate.c
umpstate/utils.c
b2a89e3155969e5bc9653966069d6dbabdd3f623 12-Mar-2013 Jamie Gennis <jgennis@google.com> atrace: add the webview category

Change-Id: Iefb552cd275bb5784903e8bf328890ecd233e45b
trace/atrace.cpp
574d6902b7e30a1e9c2375481549c8e8a712d6e6 11-Mar-2013 jp abgrall <jpa@google.com> am ba8abb51: Merge "Ensure dumpstate children die"

* commit 'ba8abb517d1eddebeda62bf907fa446e3c3b81f6':
Ensure dumpstate children die
e7b6cf13f94f66ea446c95ab34040b0a577e43dc 07-Mar-2013 John Michelau <w14107@motorola.com> Ensure dumpstate children die

Use prctl(PR_SET_PDEATHSIG, SIGKILL) in each forked child to ensure
it dies when dumpstate dies.

This is important for two cases:
- dumpstate runs a timer for each child process. On expiration, it
sends SIGTERM to kill the process. Sometimes SIGTERM isn't enough
to kill a hung process, so the child lives on.
- When dumpstate is killed by the user before completing, outstanding
children continue to run and generate output.

Change-Id: I96e0dc918c26d56c9fee53611980ba2edd238712
umpstate/utils.c
649b976a00c1295e4c1bd2f8c317376f31e9858a 08-Mar-2013 Mathias Agopian <mathias@google.com> limit number of extra binder threads in SF to 4

it should be enough and it makes debugging easier.

Bug: 6609290
Change-Id: I2341e20cfcfde184fe1ed9b925215f8fa3481ced
urfaceflinger/main_surfaceflinger.cpp
98ca63e6d15e47a9b62971f0db6424c13c226019 01-Mar-2013 Nick Kralevich <nnk@google.com> am 22641851: Merge "dumpstate: use correct header file."

* commit '22641851c48fee6e79d01adcfab01c0b625cfb3c':
dumpstate: use correct header file.
d747129e1e8876f5a50f47156ec50b6969a638e4 01-Mar-2013 Nick Kralevich <nnk@google.com> installd: use correct header file.

This is a port of https://android-review.googlesource.com/52540 ,
which doesn't apply cleanly to master.

Change-Id: I2824bb7afd4e343b5dc8bed9f24002ec1dcbf07f
nstalld/commands.c
nstalld/installd.c
e96b2d0037857646dbf50968fbf4b2973a07f1c9 01-Mar-2013 Nick Kralevich <nnk@google.com> dumpstate: use correct header file.

Change-Id: I006d7a219ce6309259f271beff6011cc266f1a61
umpstate/dumpstate.c
5b8176471c0704651ceb22608c74d03877513ec0 22-Feb-2013 Dmitry Shmidt <dimitrysh@google.com> Remove obsolte 'su' from 'ping' call (to work on user build)

Change-Id: I2d391bbd39fc591eef33b9c9e4b4cdbda29e41e7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
umpstate/dumpstate.c
b7daa0dadebdb043d63e585975a128c5fc087168 15-Feb-2013 Mathias Agopian <mathias@google.com> fix build: SurfaceTextureClient to Surface rename

Change-Id: Ibcf98337940f9195bcff7b5e8bddb6e912e65163
latland/GLHelper.h
latland/Main.cpp
e3c697fb929c856b59fa56a8e05a2a7eba187c3d 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
36ebf51a1b4e8a12092ea7b1dd7857bc7a173891 14-Feb-2013 Alex Ray <aray@google.com> atrace: add HAL tag

Change-Id: Idfd4f2075e8cd82833ef06d4487423c62b59fe11
trace/atrace.cpp
c52e16cbf9798b95188c82465dfd84b914ff5199 09-Jan-2013 Jamie Gennis <jgennis@google.com> flatland: remove an unneeded #include

Change-Id: I50831d4efd543664ff7df7aaef35d842aebf1bd6
latland/GLHelper.cpp
8f75fa7bcfec553eddb59b919b44d7a93c9846a1 09-Feb-2013 Ken Sumrall <ksumrall@android.com> Do not use su to run the df command in bugreports

User builds do not have su, so when the bugreport attempts to report
disk free space, the command fails and nothing is reported. However,
the df command does not need to be run as root to report free space,
so just run the command directly.

Change-Id: Ic7deb696f293e772ddf28eacfe16e4250af9a9f3
umpstate/dumpstate.c
64c8be07878a6a110e5386c5f789fa9db51c5746 16-Jan-2013 Glenn Kasten <gkasten@google.com> Add media.log service

Change-Id: Ic17752fff30676fe692c80260ff68284543385dd
ervicemanager/service_manager.c
a2d838a542c34d2887a0ec1fafa5f47566d595e9 10-Jan-2013 Nick Kralevich <nnk@google.com> Revert "App home directories are now 0700 for targetSdkVersion > 17"

This reverts commit 7f5c84a0b25706746a92ad1233cbbb8923eda54d.

Bug: 7966399
Bug: 7208882
Change-Id: I9fb13cf06c0f6605f3d992525346b14fe3259c66
nstalld/Android.mk
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
9c183f2493222000fa512d927cfde3f4c748eda0 04-Dec-2012 Jamie Gennis <jgennis@google.com> flatland: add a GPU hardware benchmark

This change adds a GPU benchmark named 'flatland' that is intended to measure
GPU performance of UI rendering and compositing scenarios at a fixed a clock
frequency. This initial version includes only window compositing scenarios.

Change-Id: I5577863aa3be5c6da8b49cb5d53cc49dec2f7081
latland/Android.mk
latland/Composers.cpp
latland/Flatland.h
latland/GLHelper.cpp
latland/GLHelper.h
latland/Main.cpp
latland/README.txt
latland/Renderers.cpp
7f5c84a0b25706746a92ad1233cbbb8923eda54d 13-Dec-2012 Nick Kralevich <nnk@google.com> App home directories are now 0700 for targetSdkVersion > 17

Have installd set an app's home directory permissions to
0700 if the app has targetSdkVersion > 17.

Bug: 7208882
Change-Id: Iaa4fc42fec69bc1abdfae53704d6264dd6fa965f
nstalld/Android.mk
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
603b6c197582508a66ddebd303cf0b8c3ed937b4 12-Dec-2012 Nick Kralevich <nnk@google.com> Merge "remove unused code."
f62d2851a83f6976e22932e09c35013a6bb0c3f3 12-Dec-2012 Nick Kralevich <nnk@google.com> remove unused code.

Change-Id: Iacc8b2664a0e404dfa554f223a44126c41581ae4
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
92573f1ba0d5360d7bfa8ab8935118db7a251f62 08-Dec-2012 Jamie Gennis <jgennis@google.com> atrace: fix the help string

Change-Id: I19f0093d65d64e669ad71c600c103f4080bfa2c2
trace/atrace.cpp
6eea6fb259a6d0b1c585d3267b8df7ca29a1206d 07-Dec-2012 Jamie Gennis <jgennis@google.com> atrace: clean up tracing option enabling

This change switches atrace to use a table-driven approach to enabling and
disabling options. It unifies how framework and kernel tracing are enabled,
and causes userland tracing options to be picked up by currently running
processes.

Change-Id: Iba2a3012ca0a67c4defdd076bce597db26e9f539
trace/Android.mk
trace/atrace.c
trace/atrace.cpp
9a57c5c69b273f444543e78e06ec0bf0b8afda56 29-Nov-2012 Chad Jones <chadj@google.com> Merge atrace/ from platform/system/extras to cmds/atrace/
9284fddfc6329d5ea5ae183d4cb0646ffb470561 15-Nov-2012 Glenn Kasten <gkasten@google.com> Fix build

Change-Id: Ibb398f36a7569af3480e24145da4317bf5b86998
trace/atrace.c
4edbd078cddcc1cbe59156a0e7ece01de75156e0 15-Nov-2012 Erik Gilling <konkers@android.com> add asynchronous tracing

Change-Id: I5b8660cd4d2af2ad7c6b2548c9572d3527882d6d
trace/atrace.c
244408786cf1f374eeacbf6d16dd5a6f7b5e3c59 15-Nov-2012 Kenny Root <kroot@google.com> Switch keystore to binder

Change-Id: Ie15781de079e8ecc9616cab9a5e392f5c814d9d8
ervicemanager/service_manager.c
f1c3ffe5f0cbf33041cfa9c3d6333ee08fbf2802 14-Nov-2012 rpcraig <rpcraig@tycho.ncsc.mil> Bug fix on installd with SELinux enabled kernel.

setfilecon is not required on libsymlinks when target
doesn't exist. A bootloop is caused without this
change.

Change-Id: Ia895d9063f42885a3db6e8ca30cee5dceb8c1bac
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
nstalld/commands.c
258fe7eac91689866fc5f6420bea56432799743e 09-Nov-2012 Dmitry Shmidt <dimitrysh@google.com> am 77622879: am 4bacaec4: am 0b2c9268: bugreport: Add /proc/interrupts dump

* commit '77622879a6a12c6cb916df46c919dde87656e6df':
bugreport: Add /proc/interrupts dump
03d0600ea7aa31dc1be245f787084bb151403cf4 09-Nov-2012 Dmitry Shmidt <dimitrysh@google.com> am af9e8a59: am 61db92e7: am c11f56e5: bugreport: Add wlan FW counters dump for bcmdhd

* commit 'af9e8a59619ec6050739dd68ea108cc7e182d059':
bugreport: Add wlan FW counters dump for bcmdhd
1493a3974a725d6873f317b774be333ca035a64c 07-Nov-2012 Colin Cross <ccross@android.com> dumpstate: fix incorrectly zeroed array

Change-Id: I55a916568baf66629b02a6d80fce34b84ffb3a34
umpstate/utils.c
0b2c9268265e9a165551eaa66cb461d3fab8b564 07-Nov-2012 Dmitry Shmidt <dimitrysh@google.com> bugreport: Add /proc/interrupts dump

Bug: 7301178

Change-Id: Ifad3b981ac904d4637d69dfc223d5bb2c9d80bda
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
umpstate/dumpstate.c
c11f56e5615c5d388c072705322df5bcf22c2012 07-Nov-2012 Dmitry Shmidt <dimitrysh@google.com> bugreport: Add wlan FW counters dump for bcmdhd

Bug: 7494877

Change-Id: I4d24dbcf7596777ec02ab1312c2ab996ba7688f1
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
umpstate/dumpstate.c
0c22e8b31651caf12a2b4d4acef5bc65d486e570 02-Nov-2012 Colin Cross <ccross@android.com> dumpstate: dump all threads in show_wchan

for_each_pid only finds processes and not their threads. Add
for_each_tid and call it for show_wchan so we can see where all
threads are blocked in the kernel.

Change-Id: Iffb59f7c2933cecf51cdd358a36e19932c2f24c7
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
13990bb4ca3940daef5500bfcb08e584cd2acb13 30-Oct-2012 Colin Cross <ccross@android.com> am 5b47c5c5: am 742801c6: am 2281af96: dumpstate: add kernel memory fragmentation unusable index

* commit '5b47c5c574d8d3bf8e73ea4fd7a08e0d881d461c':
dumpstate: add kernel memory fragmentation unusable index
2281af967dd840aade7bc55b19ea7df0e6da36f2 29-Oct-2012 Colin Cross <ccross@android.com> dumpstate: add kernel memory fragmentation unusable index

Dump /d/extfrag/unusable_index in bugreports. It shows the
percentage of memory in each zone that is not available for
allocations for each order.

Change-Id: I2af6680cb609887ea7b3d6107d1aa88bd0206b52
umpstate/dumpstate.c
126d215667ea6e17226ef3020ef10973bcf5d59c 24-Oct-2012 Mike Lockwood <lockwood@google.com> More changes to fix PDK build:

move screencap back to frameworks/base
move libdiskusage over from frameworks/base

Change-Id: I8415716634a4cb5b0fae15ef15ff21ee0a08906a
creencap/Android.mk
creencap/screencap.cpp
133ea73de09442bed3bf9bd42b5ddb135cf87605 24-Oct-2012 Mike Lockwood <lockwood@google.com> Move app_process and system_server back to frameworks/base

due to dependency on libandroid_runtime

Change-Id: Ie30a76ebb57a07ab29dc1b553c0e2dc9ab8d271a
Signed-off-by: Mike Lockwood <lockwood@google.com>
pp_process/Android.mk
pp_process/MODULE_LICENSE_APACHE2
pp_process/NOTICE
pp_process/app_main.cpp
ystem_server/Android.mk
ystem_server/MODULE_LICENSE_APACHE2
ystem_server/NOTICE
ystem_server/library/Android.mk
ystem_server/library/system_init.cpp
ystem_server/system_main.cpp
94afecf4b6f437b3ee9a076242402e421c6c07a6 24-Oct-2012 Mike Lockwood <lockwood@google.com> Move non-Java commands over from frameworks/base

Change-Id: I0571813c1cfcf66abd36eb9f178fc49b618e88a6
Signed-off-by: Mike Lockwood <lockwood@google.com>
pp_process/Android.mk
pp_process/MODULE_LICENSE_APACHE2
pp_process/NOTICE
pp_process/app_main.cpp
ugreport/Android.mk
ugreport/bugreport.c
nstalld/Android.mk
nstalld/commands.c
nstalld/installd.c
nstalld/installd.h
nstalld/tests/Android.mk
nstalld/tests/installd_utils_test.cpp
nstalld/utils.c
p-up-vpn/Android.mk
p-up-vpn/ip-up-vpn.c
awbu/Android.mk
awbu/NOTICE
awbu/backup.cpp
creencap/Android.mk
creencap/screencap.cpp
creenshot/Android.mk
creenshot/screenshot.c
ervice/Android.mk
ervice/MODULE_LICENSE_APACHE2
ervice/NOTICE
ervice/service.cpp
ervicemanager/Android.mk
ervicemanager/bctest.c
ervicemanager/binder.c
ervicemanager/binder.h
ervicemanager/service_manager.c
ystem_server/Android.mk
ystem_server/MODULE_LICENSE_APACHE2
ystem_server/NOTICE
ystem_server/library/Android.mk
ystem_server/library/system_init.cpp
ystem_server/system_main.cpp
9ba4baf178bb9dad3912403bfd9aee07c14da33a 17-Oct-2012 Erik Gilling <konkers@android.com> atrace: add sync trace support

Change-Id: I2cd2f1a1e51f6e3d1ebbde4d5442be68a218b33d
trace/atrace.c
31be80f02cddda55e75614884038fa4645b694cd 06-Jun-2012 Glenn Kasten <gkasten@google.com> Add -n and -S options for 'nohup', offline traces

Change-Id: Ieef12b36b8519ff689ab5a81447b1b9bf4806171
trace/atrace.c
e8744fd4dce2881c83d69c084b6937d0397ace05 06-Oct-2012 Jamie Gennis <jgennis@google.com> atrace: make clock & bus bw tracing optional

This change makes enabling clock tracing and bus bandwidth tracing depend on
whether the device's kernel supports these features. If it's not supported it
will be skipped.

Change-Id: I51d57299693635b0ecebb75de5dccd5b62d47be3
trace/atrace.c
99be77cf00d69a07ad5698b31c56a39f4add0bdf 21-Sep-2012 Erik Gilling <konkers@android.com> atrace: add clock rate and bus utilization

Change-Id: I4e1764b51225436fc2b3d61454ee822f511a1a7d
trace/atrace.c
719b8aa1c5c2c2e5675f92442f3da8509b297775 01-Oct-2012 Jeff Sharkey <jsharkey@android.com> Include Global table in bugreports.

Bug: 7257648
Change-Id: I84c7230fd115cf9d7269bc5367026b52cbcc86ac
umpstate/dumpstate.c
c8cff90d49b6eeaf0290c16517ff49df185dbdcd 17-Sep-2012 Elliott Hughes <enh@google.com> Merge "Use a named constant rather than a magic number." into jb-mr1-dev
5f87b31d8076dff08b2363961b07fc052364fe95 17-Sep-2012 Elliott Hughes <enh@google.com> Use a named constant rather than a magic number.

Change-Id: I86e8c91c6f5628df3eec38faf28598cc8cef2ea3
umpstate/utils.c
86ca50d860fa256f5553ac7b313ba5ff0f120ef0 17-Sep-2012 jp abgrall <jpa@google.com> am e917bfbd: am 09a22fc2: Merge "Allow disable of dumpstate vibrate"

* commit 'e917bfbd19c265ef09c90f93f5dc175fc62259f5':
Allow disable of dumpstate vibrate
1f794c442cc63f7962c21e8e712adeca338af63e 17-Sep-2012 John Michelau <w14107@motorola.com> Allow disable of dumpstate vibrate

Change-Id: I747b757f4b5e2d6a472b7b2a19f8c1ca8a4b7fdd
umpstate/dumpstate.c
1fc4f80fc38f782f128102795481924a97a2d3c5 11-Sep-2012 James Dong <jdong@google.com> Add stack dump from drmserver process to bugreports

This would be helpful tracking down ANR issues in drmserver

o related-to-bug: 7132419

Change-Id: I7eceaa0c29af26bd0092110be6bddf8f4c063545
umpstate/utils.c
85aea748861b5665e68b786b55f1c798f56fc0da 09-Aug-2012 Mathias Agopian <mathias@google.com> add /d/sync to dumpstate

Change-Id: I24f8f3e0420c2198ae3981fc067fb660898655e8
umpstate/dumpstate.c
852db07d69352ec5f75e16a6e5059f05faabdaf5 28-Jun-2012 Mathias Agopian <mathias@google.com> move sensorservice from frameworks/base to frameworks/native

this commit also imports all of sensorservice history.

Change-Id: Iadffcc92be600c48175b8afadcb15b6648532b3f
04d7eaf138678ef591076ff02b896f93394bcfaf 09-Jun-2012 Jeff Brown <jeffbrown@google.com> am 4f0dfaa7: am 9be7caf3: Merge "Include stack traces for certain native processes in bugreport." into jb-dev

* commit '4f0dfaa7c338870eb58d96fe40234505734db728':
Include stack traces for certain native processes in bugreport.
bf7f49238d0af497d4300f7e611cf831854d6434 08-Jun-2012 Jeff Brown <jeffbrown@google.com> Include stack traces for certain native processes in bugreport.

Bug: 6615693
Change-Id: I64c3b3ce0bba62d9c332a795f7d979fb753dc27b
umpstate/Android.mk
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
4b23eefd72501b358c61fb1a7096a2a94e5ea351 08-Jun-2012 Jamie Gennis <jgennis@google.com> atrace: enable running on user builds

This change allows atrace to be run on a user build, where it is not run as
root. Some command line options still require root, and atrace will refuse to
run if those options are specified when run as non-root.

Bug: 6513400
Change-Id: I29984cb8a7c3ad80ba5fa6b031ed8ff81acabacf
trace/Android.mk
trace/atrace.c
1e339878c128ef47271278779c2685a8dfa49cd1 25-Apr-2012 Nick Kralevich <nnk@google.com> dumpstate: handle old style "adb bugreport"

When "adb bugreport" was run on previous adb releases, it
called "adb shell dumpstate". In later versions of Android,
this was changed to "adb shell bugreport", which starts
the dumpstate service.

Modify the dumpstate command so that it calls bugreport
when it's not running as root. This allows both
"adb shell dumpstate" and "adb shell bugreport" to have
the exact same output.

Bug: 6391938
Change-Id: Ia32bb9ebc579db3bee7caa0fe66dc3f124d60a12
umpstate/dumpstate.c
ac9453d82e9077a8b02afa4e26ef9ff1f47b4ee9 23-May-2012 Jeff Brown <jeffbrown@google.com> Add disk I/O tracing.

Bug: 6488845
Change-Id: I93acb726f35b114fb1ea7297da4456826f805b7b
trace/Android.mk
trace/atrace.c
29e27a84c144fe3b941648094cad2a3f1e61e8b3 23-May-2012 Todd Poynor <toddpoynor@google.com> dumpstate: Add kernel wakeup sources info

Change-Id: I0f95afd6815c1403d8400a18ef3cd19d936d4601
umpstate/dumpstate.c
13461c2ffe1c77a0c11a922ba41b0922791a7874 17-May-2012 Jeff Sharkey <jsharkey@android.com> Dump packages.xml as root.

Bug: 6501151
Change-Id: Ied638bdbe9ed6fbf749a44de8ac1f9d4167829c1
umpstate/dumpstate.c
012c2ea5651a56218a4359c78db26dd700d9930b 17-May-2012 JP Abgrall <jpa@google.com> dumpstate: collect xtables based iface stats, update iptables info.

The newer kernels now have /proc/net/xt_qtaguid/iface_stat_fmt.
Add the extra iptables output and remove ip6tables for nat which doesn't
exist.

Change-Id: I819c707b337a707ca0acd87d9ab38cd68ca0f36c
umpstate/dumpstate.c
3e03d3fb6a4cb93f5f978f9d2eed7b7cc62a06a6 11-May-2012 JP Abgrall <jpa@google.com> Ignore SIGPIPE is some of the tools used via bugreport

adb bugreport > b & sleep 5; kill $?
will show that a bunch of tools will SIGPIPE when trying to output data
which is normal.
We don't have a way on linux (bsd yes), to set NOSIGPIPE on the file desc
passed down via fork/exec.

Bug: 6447319
Change-Id: I25b30a823addcff89d252f162d0a07035d4fdd3f
umpstate/dumpstate.c
umpsys/dumpsys.cpp
3169533f1d11c4a7aa0cd6fa2aa04fc810db0de6 08-May-2012 Jamie Gennis <jgennis@google.com> atrace: add support for tracing CPU idle events

This change adds the -i command line flag to atrace to enable tracing CPU idle
kernel events.

Change-Id: I4a2c8619224c0f50c7fd7c61c7b24fa2211f656c
trace/atrace.c
7b5170b249c1d312cfe3b5658b6c140b2a48226f 29-Apr-2012 Jamie Gennis <jgennis@google.com> atrace: add support for zlib compression

This change adds the -z command line flag to atrace to enable support for
compressing the trace with zlib as it's printed to stdout.

Change-Id: I45301c63a4d1d388152244fec3c9e05e554598e8
trace/Android.mk
trace/atrace.c
64a1e08b86d72cb375f9dfdf4eb6307f71817350 20-Apr-2012 Mathias Agopian <mathias@google.com> SF doesn't need more than a few binder threads

Change-Id: Ic4659fb81f9990cc7caf84a496a8ae659a1d16a9
urfaceflinger/main_surfaceflinger.cpp
4287cb4595d72066bc2d3cd1e2ac59cde254c707 11-Apr-2012 Jeff Sharkey <jsharkey@android.com> Add sdcard_r group to dumpstate.

Bug: 6321962
Change-Id: I318cd88493396f3d8adb5d4d0fc7a12ee40ba737
umpstate/dumpstate.c
fe312b98f747d7818ce865fb5b12b805f2ce9a9b 10-Apr-2012 Jamie Gennis <jgennis@google.com> atrace: make cpu freq governor tracing optional

This change allows atrace to run on kernels that do not have CPU frequency
interactive governor tracing enabled in the kernel.

Change-Id: Ibfde751da7b6cc9a55794355093a37feb28f5e52
trace/atrace.c
d51820e8dea4f5bd9d06ff22335bead7409864b2 06-Apr-2012 Nick Kralevich <nnk@google.com> dumpstate: don't follow symlinks when creating /data/anr/traces.txt

Make Android more robust against symlink attacks when /data/anr
is world-writable.

Bug: 5614000
Change-Id: I9a7e4c4ec9aa4300ac30a968db0dcd276f364ab6
umpstate/utils.c
c7f1fe26804ab986b90f3ba007db94f71e94932a 06-Apr-2012 Nick Kralevich <nnk@google.com> Ensure that /data/anr/traces.txt is world-writable

The umask changed for init. We have to force /data/anr to be world
readble and /data/anr/traces.txt to be world writable so dalvik
processes can write to it.

Hopefully this is a short term change while we investigate tightening
up these permissions.

Bug: 6300296
Change-Id: Iacb4c9f1bc69d2ac679697f9cf9a52694f888489
umpstate/utils.c
f45fa6b2853cc32385375a0b63ee39ad6a968869 26-Mar-2012 Colin Cross <ccross@android.com> move dumpstate and dumpsys from frameworks/base to frameworks/native

Change-Id: I8a5318022ce5cd3e7c8055f21fe5da74639aa6c0
umpstate/Android.mk
umpstate/dumpstate.c
umpstate/dumpstate.h
umpstate/utils.c
umpsys/Android.mk
umpsys/MODULE_LICENSE_APACHE2
umpsys/NOTICE
umpsys/dumpsys.cpp
cc24c8e6b48c2eb204bf3d7f974dbff6dc0cc862 06-Mar-2012 Jamie Gennis <jgennis@google.com> atrace: add some more command line options

This change adds two command line optiosn:
-b for setting the trace buffer size
-f for enabling tracing of the CPU frequency
-l for enabling tracing of the CPU load

Change-Id: Id99851a4c4eba5cfed218f29081e072bbe492133
trace/atrace.c
dd1ddbbdd7dc965d906129a4cda04dc86ecb2553 27-Feb-2012 Jamie Gennis <jgennis@google.com> atrace: include the binary in debug builds

This change makes the atrace module tag 'debug' so that the binary is
included in all debug builds.

Change-Id: I1fdb87be0461daf686e52ded04b37b9a122edea3
trace/Android.mk
fb31ba69282e34df62005ec63afda2b8ec69533e 23-Feb-2012 Jamie Gennis <jgennis@google.com> Add the atrace utility.

This change adds a new system binary to help with capturing and dumping
kernel traces.

Change-Id: If2fc074480f822588a4c171312dc4c04fd305356
trace/Android.mk
trace/MODULE_LICENSE_APACHE2
trace/NOTICE
trace/atrace.c
a87de87dcd36d9c7696587365aa3d1545e33c01b 16-Feb-2012 Kenny Root <kroot@google.com> Move keystore to system/security repo

Move keystore to system/security at revision
a91203b08350b2fc7efda5b1eab39e7541476b3a

Change-Id: I7dbd625b864e9c63489b08e9fd28dfb22da81072
eystore/Android.mk
eystore/keystore.cpp
eystore/keystore.h
eystore/keystore_cli.cpp
eystore/keystore_get.h
eystore/test-keystore
4a9730ff86e2cf52c33220467e3eebc30b254616 14-Feb-2012 Glenn Kasten <gkasten@google.com> Merge "Fix build warnings"
a94f129a7bbaa8ea45c50e49ba3e6127ca2a15ec 10-Feb-2012 Dianne Hackborn <hackbod@google.com> Some hardening of isolated processes by restricting access to services.

Services now must explicitly opt in to being accessed by isolated
processes. Currently only the activity manager and surface flinger
allow this. Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration. The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.

The activity manager now protects most of its entry points against
isolated processes.

Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
urfaceflinger/main_surfaceflinger.cpp
6c7609549631b816c53b452ddbc76770483a8976 11-Jan-2012 Glenn Kasten <gkasten@google.com> Fix build warnings

Change-Id: Ia5b8da2cfed7ae02c9e8e03e8bae22b2a68684a0
eystore/keystore.cpp
e6f43ddce78d6846af12550ff9193c5c6fe5844b 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
eystore/keystore.cpp
32397c1cd3327905173b36baa6fd1c579bc328ff 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
eystore/keystore.cpp
a19954ab377b46dbcb9cbe8a6ab6d458f2e32bca 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
eystore/keystore.cpp
baa44b89ec159fd65230cbb8ebab62d63a513b0b 12-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
eystore/Android.mk
a816cc4e68cbbe70d0fb1178abef7ace4e517731 11-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove more simulator support code.
Bug: 5010576

Change-Id: Ie6c8665306bf4e822693b76f25c3a0f05c12d42d
untime/Android.mk
untime/MODULE_LICENSE_APACHE2
untime/NOTICE
untime/ServiceManager.cpp
untime/ServiceManager.h
untime/SignalHandler.cpp
untime/SignalHandler.h
untime/main_runtime.cpp
e16986cae281f118ecd563c384b7f6e5a4b937b5 09-Jul-2011 Jeff Brown <jeffbrown@google.com> Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
untime/main_runtime.cpp
e0cd5dc3dcf7d73a7dcb54c3ae4d3ab4dc4cf680 01-Jul-2011 Brian Carlstrom <bdc@google.com> Revert "Add keychain user with special keystore access permissions"

This reverts commit 8c2a1a90a81f04573bfa578eab32f5fd4a30eafb.

Conflicts:

cmds/keystore/keystore.c

Bug:4970237
Change-Id: I626023d695becfada47e5f319b18e0889b766563
eystore/keystore.cpp
6904f14b89377d0671ca80a6c577f39f45863299 27-Jun-2011 Chia-chi Yeh <chiachi@android.com> KeyStore: fix test-keystore

Change-Id: I1dcbd5c3cc7569c397d2480cda76288a9e28cd5c
eystore/test-keystore
91a465b73a5bfa55df7ce0e56e35b1b1e018a7ca 27-Jun-2011 Chia-chi Yeh <chiachi@android.com> KeyStore: allow system user to get secrets from keystore.

Change-Id: I9cb41344c17fb33e6614a45d46368a9c43e3dce7
eystore/keystore.cpp
ce4b51d3bdaff4f52c4c93c13d8d9dfb6c7bc781 23-Jun-2011 Brian Carlstrom <bdc@google.com> Reinitialize KeyStore::mMasterKey after unlock (and add test-keystore)

Bug: 4599735

Change-Id: Iee38a2e2929c45b6405214c9012819da09b273af
eystore/keystore.cpp
eystore/test-keystore
804f499fda954080f69c0ae93512f129bb0cfaab 03-Jun-2011 Brian Carlstrom <bdc@google.com> KeyStore.reset changes

restore keystore reset behavior of removing master key.
otherwise after reboot keystore has is LOCKED and not UNINITIALIZED
cmds/keystore/keystore.cpp

when removing password, reset the keystore, so it doesn't remain
locked with a now bogus password.

core/java/com/android/internal/widget/LockPatternUtils.java

Change-Id: If5e0bb50b42599e9ca27a8b91d6cec12528419a1
eystore/keystore.cpp
01373772896c42301db9596a91ce9518a046ef9f 31-May-2011 Brian Carlstrom <bdc@google.com> Integrating keystore with keyguard (Part 1 of 4)

Summary:

frameworks/base
keystore rewrite
keyguard integration with keystore on keyguard entry or keyguard change
KeyStore API simplification

packages/apps/Settings
Removed com.android.credentials.SET_PASSWORD intent support
Added keyguard requirement for keystore use

packages/apps/CertInstaller
Tracking KeyStore API changes
Fix for NPE in CertInstaller when certificate lacks basic constraints

packages/apps/KeyChain
Tracking KeyStore API changes

Details:

frameworks/base

Move keystore from C to C++ while rewriting password
implementation. Removed global variables. Added many comments.

cmds/keystore/Android.mk
cmds/keystore/keystore.h
cmds/keystore/keystore.c => cmds/keystore/keystore.cpp
cmds/keystore/keystore_cli.c => cmds/keystore/keystore_cli.cpp

Changed saveLockPattern and saveLockPassword to notify the keystore
on changes so that the keystore master key can be reencrypted when
the keyguard changes.

core/java/com/android/internal/widget/LockPatternUtils.java

Changed unlock screens to pass values for keystore unlock or initialization

policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java

KeyStore API changes
- renamed test() to state(), which now return a State enum
- made APIs with byte[] key arguments private
- added new KeyStore.isEmpty used to determine if a keyguard is required

keystore/java/android/security/KeyStore.java

In addition to tracking KeyStore API changes, added new testIsEmpty
and improved some existing tests to validate expect values.

keystore/tests/src/android/security/KeyStoreTest.java

packages/apps/Settings

Removing com.android.credentials.SET_PASSWORD intent with the
removal of the ability to set an explicit keystore password now
that the keyguard value is used. Changed to ensure keyguard is
enabled for keystore install or unlock. Cleaned up interwoven
dialog handing into discrete dialog helper classes.

AndroidManifest.xml
src/com/android/settings/CredentialStorage.java

Remove layout for entering new password

res/layout/credentials_dialog.xml

Remove enable credentials checkbox

res/xml/security_settings_misc.xml
src/com/android/settings/SecuritySettings.java

Added ability to specify minimum quality key to ChooseLockGeneric
Activity. Used by CredentialStorage, but could also be used by
CryptKeeperSettings. Changed ChooseLockGeneric to understand
minimum quality for keystore in addition to DPM and device
encryption.

src/com/android/settings/ChooseLockGeneric.java

Changed to use getActivePasswordQuality from
getKeyguardStoredPasswordQuality based on experience in
CredentialStorage. Removed bogus class javadoc.

src/com/android/settings/CryptKeeperSettings.java

Tracking KeyStore API changes

src/com/android/settings/vpn/VpnSettings.java
src/com/android/settings/wifi/WifiSettings.java

Removing now unused string resources

res/values-af/strings.xml
res/values-am/strings.xml
res/values-ar/strings.xml
res/values-bg/strings.xml
res/values-ca/strings.xml
res/values-cs/strings.xml
res/values-da/strings.xml
res/values-de/strings.xml
res/values-el/strings.xml
res/values-en-rGB/strings.xml
res/values-es-rUS/strings.xml
res/values-es/strings.xml
res/values-fa/strings.xml
res/values-fi/strings.xml
res/values-fr/strings.xml
res/values-hr/strings.xml
res/values-hu/strings.xml
res/values-in/strings.xml
res/values-it/strings.xml
res/values-iw/strings.xml
res/values-ja/strings.xml
res/values-ko/strings.xml
res/values-lt/strings.xml
res/values-lv/strings.xml
res/values-ms/strings.xml
res/values-nb/strings.xml
res/values-nl/strings.xml
res/values-pl/strings.xml
res/values-pt-rPT/strings.xml
res/values-pt/strings.xml
res/values-rm/strings.xml
res/values-ro/strings.xml
res/values-ru/strings.xml
res/values-sk/strings.xml
res/values-sl/strings.xml
res/values-sr/strings.xml
res/values-sv/strings.xml
res/values-sw/strings.xml
res/values-th/strings.xml
res/values-tl/strings.xml
res/values-tr/strings.xml
res/values-uk/strings.xml
res/values-vi/strings.xml
res/values-zh-rCN/strings.xml
res/values-zh-rTW/strings.xml
res/values-zu/strings.xml
res/values/strings.xml

packages/apps/CertInstaller

Tracking KeyStore API changes
src/com/android/certinstaller/CertInstaller.java

Fix for NPE in CertInstaller when certificate lacks basic constraints
src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

Tracking KeyStore API changes
src/com/android/keychain/KeyChainActivity.java
src/com/android/keychain/KeyChainService.java
support/src/com/android/keychain/tests/support/IKeyChainServiceTestSupport.aidl
support/src/com/android/keychain/tests/support/KeyChainServiceTestSupport.java
tests/src/com/android/keychain/tests/KeyChainServiceTest.java

Change-Id: Ic141fb5d4b43d12fe62cb1e29c7cbd891b4be35d
eystore/Android.mk
eystore/keystore.c
eystore/keystore.cpp
eystore/keystore.h
eystore/keystore_cli.c
eystore/keystore_cli.cpp
95e24e04e002c1e3d1aea0161df1cee2b33bc47c 17-May-2011 Jeff Brown <jeffbrown@google.com> Support wrapping app processes to inject debug instrumentation.
Bug: 4437846

Change-Id: I4552501c693716b14714afb5c5248edaca9547ab
untime/main_runtime.cpp
ca1feb405e1342efd3de2e573f7abd4931dcc56e 14-Apr-2011 Elliott Hughes <enh@google.com> Replace a custom AndroidRuntime::findClass with a more targeted fix.

This seems simpler and more contained, and I think the comment explaining
why hoop-jumping is necessary is a bit clearer now.

Change-Id: Ief4afd7cbb42188ed835fce23e497520bdb753a8
untime/main_runtime.cpp
4d51522f5f16580a95691cc604a663a07786127d 08-Apr-2011 Brian Carlstrom <bdc@google.com> Add keychain user with special keystore access permissions

Change-Id: I02fe5171add62c5cd9f57b01bc137f3bc1cb3a69
eystore/keystore.c
ae17a37d2d99f1ddc383893be33be38e1fa0b53e 30-Sep-2010 Chia-chi Yeh <chiachi@android.com> KeyStore: Update the parameters of generating master keys.

To improve the security, the parameters to generate the master key has
been changed. Special cares has been taken to prevent from permanent
damages of the existing data during the transition process.

Change-Id: I0c93f3de28a9fcd314932675ccfb65a7f11fa3ff
eystore/keystore.c
857edec1a25fb112938ff1b012dbe78844db0320 30-Sep-2010 Chia-chi Yeh <chiachi@android.com> KeyStore: Initialize IV correctly.

Change-Id: Idbf207dfcc11b92e606cbf4fd3732ed7a8aa3416
eystore/keystore.c
1c2eccfac3c10a0ec8f3ffc5e22b9294da0a9b67 30-Sep-2010 Chia-chi Yeh <chiachi@android.com> KeyStore: Fix the return value when send() or recv() has an error.

Change-Id: I20a63c76bd29b1a9f8959a6c4fe5a5b8a9a971b4
eystore/keystore_get.h
a1e6bc864fb821c1b470b7aad9b75c441f54eeb4 15-Jul-2010 Mathias Agopian <mathias@google.com> added BinderService<> template to help creating native binder services

Change-Id: Id980899d2647b56479f8a27c89eaa949f9209dfe
urfaceflinger/main_surfaceflinger.cpp
81bac09fa6b01dd1495644d9c825c3666762fced 15-Jul-2010 Mathias Agopian <mathias@google.com> move native services under services/

moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
urfaceflinger/Android.mk
6efed6c20ea6028c972acc3936d421fef646f815 17-Mar-2010 Chia-chi Yeh <chiachi@android.com> keystore: rephrase the comment to make the usage more clear.

Change-Id: I529ca7ed443060089c95fe96dd230288be4b6c96
eystore/keystore_get.h
5bf4691382de5bdb2a212fefda9d6c99086bb5ec 09-Mar-2010 Chia-chi Yeh <chiachi@android.com> Merge "keystore: add AID_ROOT into the user table."
e3bc02347197a49aa061084073bde9fbea90cb80 09-Mar-2010 Chia-chi Yeh <chiachi@android.com> keystore: add AID_ROOT into the user table.

Change-Id: I4b9cf24d75ca79583d7913bbb2c33745a2316cde
eystore/keystore.c
0755483539d97cbf4b78e3a756302994d81f09a9 08-Mar-2010 Chia-chi Yeh <chiachi@android.com> keystore: allow '\0's in keys and add guards for cplusplus.

Change-Id: I0af6ed7c5d51ce4ca39cb837e475942800cf6e2d
eystore/keystore_get.h
4cb8ae291ea00f0f0143818fe225be47444b8950 11-Feb-2010 Marco Nelissen <marcone@google.com> Fix simulator build.
untime/main_runtime.cpp
b78679e18db941fa0c104d728db128cf9ee21dc7 30-Dec-2009 Chia-chi Yeh <chiachi@android.com> keystore: compute the padding in an intuitive way.
eystore/keystore.c
ced66258e11cf87277aa2ceaa02903d1c1f132c9 22-Dec-2009 Chia-chi Yeh <chiachi@android.com> keystore: Add paddings before checksumming.

Also fix a file descriptor leak when file system is nearly full.

Bug: 2339184
eystore/keystore.c
4424dd7dd5d3a0aea9b1a3375db5d65bc8675bb8 24-Sep-2009 Chia-chi Yeh <chiachi@android.com> keystore: remove old implementation and test.

The new tests will be implemented in java.
eystore/certtool.h
eystore/common.h
eystore/keymgmt.c
eystore/keymgmt.h
eystore/netkeystore.c
eystore/netkeystore.h
eystore/netkeystore_main.c
eystore/tests/Android.mk
eystore/tests/netkeystore_test.c
1cdc2a4b810605ea20306102d99ebb5c9cabc6fb 21-Sep-2009 Chia-chi Yeh <chiachi@android.com> keystore: rename scan() to saw().
eystore/keystore.c
c5dbc5e98ab8342d04f85c051c545c0980f5d98b 21-Sep-2009 Chia-chi Yeh <chiachi@android.com> keystore: exclude builds for simulator.
eystore/Android.mk
dd2a71eebcc55de9fc6e21e2f1335c1c2fb68257 20-Sep-2009 Chia-chi Yeh <chiachi@android.com> keystore: enable delete(), scan(), exist() when keystore is locked.

Also check end-of-file explicitly.
eystore/keystore.c
2f3b2a5aa698c82313551d59f9237a6a7849c300 18-Sep-2009 Chia-chi Yeh <chiachi@android.com> keystore: switch to multi-user version.
eystore/Android.mk
eystore/keystore.c
eystore/keystore_cli.c
eystore/keystore_get.h
4cff21f21b583c9994b250154702370c84ea9c60 18-Sep-2009 Chia-chi Yeh <chiachi@android.com> keystore: add multi-user support.

Change-Id: I60268261110934a1d60efa341ff530f94415724f
eystore/keystore.c
eystore/keystore.h
eystore/keystore_cli.c
408c5f2c9846780f05c2a3b3c837fecd5f5c74a6 16-Sep-2009 Hung-ying Tyan <tyanh@google.com> Fix a minor bug in is_alnum_string()...

and remove some verbose logging
eystore/netkeystore.c
b2de5bd4dafa0c8a494a654210298d2be8bb04f8 11-Sep-2009 Hung-ying Tyan <tyanh@google.com> Add tests and misc fixes on keystore.

* Refactor netkeystore.c to make client and server code testable.
* Add a client test for setting new passwd and changing passwd.
* Exclude "." and ".." from reset_keystore().
* Change ServerCommand.executeCommand() to accept variable length of
arguments and add convert() to marshalling the args to bytes.
* Keystore.java is revised accordingly.
eystore/Android.mk
eystore/keymgmt.c
eystore/netkeystore.c
eystore/netkeystore.h
eystore/netkeystore_main.c
eystore/tests/Android.mk
eystore/tests/netkeystore_test.c
2a58b6dbf07677e9875ba2306bc118c3eb9aebc6 07-Sep-2009 Chung-yih Wang <cywang@google.com> Replace the delimiter whitespace with '\0'.

+ Use '\0' as the delimiter.
+ Allow whitespace character for keystore password.

In previous implementation, we use space as the delimiter. That
will stop user from using passphrase with whitespace character.
eystore/certtool.h
eystore/keymgmt.c
eystore/keymgmt.h
eystore/netkeystore.c
eystore/tests/netkeystore_test.c
74c332f18412bcc9516f85591900677c40b45475 05-Aug-2009 repo sync <cywang@google.com> Fix network order for marshalling in keystore interface.

This will fix the endian issue for heterogeneous architectures in keystore marshalling interface.
eystore/netkeystore.c
eystore/netkeystore.h
5e2ae8dca59cc5cad4c35b67bdf4d8bbfd240a53 01-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> am b86bad94: Merge change 9438 into donut

Merge commit 'b86bad9493a331a09dd765bc6e725c0aec969ff6'

* commit 'b86bad9493a331a09dd765bc6e725c0aec969ff6':
Change some log.i to log.d.
23c95b3b3277260d7ada14637d9da309695c6c40 01-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 9438 into donut

* changes:
Change some log.i to log.d.
6cdee5801063c9c332193a186d973a4993c1dd31 01-Aug-2009 Hung-ying Tyan <tyanh@google.com> Change some log.i to log.d.
eystore/netkeystore.c
c7ceaf245e570fd2a16dc31452543d443638e7ca 31-Jul-2009 Chung-yih Wang <cywang@google.com> am f4692640: Add unit tests for netkeystore.

Merge commit 'f4692640a8c40b8bbba1f00841c2f8fbe7b28d7a'

* commit 'f4692640a8c40b8bbba1f00841c2f8fbe7b28d7a':
Add unit tests for netkeystore.
ccf407f7acf7c12a59c9f053bcac0840371c9848 29-Jul-2009 Chung-yih Wang <cywang@google.com> Add unit tests for netkeystore.

+ some boundary checks.
eystore/keymgmt.c
eystore/tests/Android.mk
eystore/tests/netkeystore_test.c
9b29df2bc751700639079e1a0b53d825de1195d6 24-Jul-2009 Chung-yih Wang <cywang@google.com> am 75b68163: Add memcpy and strcpy boundary check.

Merge commit '75b681639d3945d22d4ab90856a65a05405d2538'

* commit '75b681639d3945d22d4ab90856a65a05405d2538':
Add memcpy and strcpy boundary check.
11e9f3dd260935cac33a9a6fa45aafa9d87d495a 23-Jul-2009 Chung-yih Wang <cywang@google.com> Add memcpy and strcpy boundary check.
eystore/keymgmt.c
795e8f42c96a654a96ecb9eab3e9036b08676249 17-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 0d039ba3: Merge change 7508 into donut

Merge commit '0d039ba328a59fc81280fbecf68aad2d2cba7234'

* commit '0d039ba328a59fc81280fbecf68aad2d2cba7234':
keystore: Fix a compile warning.
23c7adc5e9e27185ca0a69974a8268ec9e86b9b9 16-Jul-2009 Chia-chi Yeh <chiachi@android.com> keystore: Fix a compile warning.
eystore/keystore_get.h
29f5a900dbb7b973d25d4fa97cce032e709384bb 06-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 3383df38: Merge change 6198 into donut

Merge commit '3383df385e208807b1dc5f2956f82a7f75f65fd8'

* commit '3383df385e208807b1dc5f2956f82a7f75f65fd8':
keystore: Provide a generic getter for native components.
e439029f8a99217d030f859039e597468381af7f 06-Jul-2009 Chung-yih Wang <cywang@google.com> am 699ca3f2: Add password field for WiFi configuration.

Merge commit '699ca3f2518360ea3250ff5a0e5d39e122c64a91'

* commit '699ca3f2518360ea3250ff5a0e5d39e122c64a91':
Add password field for WiFi configuration.
2659e77bd2add71883bcf6909487d4cceebc8f9a 06-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 24ad29c6: Merge change 6177 into donut

Merge commit '24ad29c6dbbf62096bcb41ddb2fa3975720ee625'

* commit '24ad29c6dbbf62096bcb41ddb2fa3975720ee625':
Two small checks in keymgmt.
dea9f552741c86897ca5cd2ee23f48da8c49f4b1 06-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 6198 into donut

* changes:
keystore: Provide a generic getter for native components.
5d0ca76229bffd0d3d2e2234033a78cb57e7739c 06-Jul-2009 Chia-chi Yeh <chiachi@android.com> keystore: Provide a generic getter for native components.
eystore/keystore_get.h
6ac03019e68e6cd8732c5c1670eb71f4840010e2 04-Jul-2009 Chung-yih Wang <cywang@google.com> Add password field for WiFi configuration.

1. the certtool.h is modified for avoiding the side effect,
for saving the configuration with wpa_supplicant.
2. put the loadLibrary back in CertTool.java
3. Fix incorrect JNI declarations.
eystore/certtool.h
4c6ee740ad3046bb67f3f24a728e48dff86b85b8 03-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am 7de4bd9b: Merge change 6045 into donut

Merge commit '7de4bd9b40d80fd68fc746efd645e3df7442acea'

* commit '7de4bd9b40d80fd68fc746efd645e3df7442acea':
Remove the null-termination for Java string compatibility.
b35262e025997f80f5a34e52a248e1aa9f450521 03-Jul-2009 Android (Google) Code Review <android-gerrit@google.com> am d45dcbec: Merge change 5615 into donut

Merge commit 'd45dcbec856710f9478ffc5689e7cdf95d757ab8'

* commit 'd45dcbec856710f9478ffc5689e7cdf95d757ab8':
Implement the generic mini-keystore for security.
37b49519cc2bd8c3b907f7bf3f8f5c21f5692103 02-Jul-2009 Chung-yih Wang <cywang@google.com> Two small checks in keymgmt.

1. Enforce the state check in listkey().
2. Enforce the password length check.
eystore/keymgmt.c
eystore/keymgmt.h
eystore/netkeystore.c
7bd460b1208dcd41969e5928ad3c3680962bedce 02-Jul-2009 Chung-yih Wang <cywang@google.com> Remove the null-termination for Java string compatibility.

1. Also change the keyname delimiter in CertTool.java.
2. Return NOTFOUND if the result.len==0 in the listKeys().
3. Define the keystore states in the class Keystore.
eystore/netkeystore.c
c186c66a297ec036b3c3dc2ba43553096a753f3f 28-Jun-2009 Chung-yih Wang <cywang@google.com> Implement the generic mini-keystore for security.

1. We will progressively migrate to this implementation.
2. For richc to have a quick review on the keymgmt part.
3. Add remove_key and make sure all functions are working.
4. Add permission check for get operation.
5. Return the retry count if unlock failed.
6. Add the reset operation for keystore reset.
7. Add the putfile shell command for putting the key value from file.
8. Fix the boundary issue during parsing command.
9. Use the ' ' as delimiter and reset the reply structure for each request.
10. Add change password retry count check.
11. Extract the read_marshal/write_marshal for certtool.h.
12. Remove the old implementation.
eystore/Android.mk
eystore/certtool.h
eystore/commands.c
eystore/common.h
eystore/keymgmt.c
eystore/keymgmt.h
eystore/keystore.c
eystore/keystore.h
eystore/netkeystore.c
eystore/netkeystore.h
b08e0936d730430e1ff016b79226d9d5c3b84752 18-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 9fbeb7da: Merge change 4337 into donut

Merge commit '9fbeb7da1318bf5b65588a759332d74540306c06'

* commit '9fbeb7da1318bf5b65588a759332d74540306c06':
Change the keystore APIs.
4c40420cd231b42a38b84577d6731ce8b0fa1269 16-Jun-2009 Chung-yih Wang <cywang@google.com> Change the keystore APIs.

1. simplify the keypair selection in UI.
2. add the user certificate and key into the keystore for keygen feature.
eystore/commands.c
eystore/keystore.c
eystore/keystore.h
1c6ad980173bc2d061cb0c5f15ac814f4ca4c4b5 11-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am db8a6ae6: Merge change 3709 into donut

Merge commit 'db8a6ae6bbd8cbb17fb79085ffb9d3fc539fe5c2'

* commit 'db8a6ae6bbd8cbb17fb79085ffb9d3fc539fe5c2':
Provide the Keystore feature in the framework.
8fcbada742d8ada3ec14e1625e8e345128e38c20 10-Jun-2009 Chung-yih Wang <cywang@google.com> Provide the Keystore feature in the framework.

-- added the keystore library for Java application.
-- changed the marshalling of the keystore function return.
eystore/commands.c
eystore/keystore.c
a0cfd25b4328eb2dbb43561dfca4a166a90e6a04 10-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> am 54d63246: Merge change 3427 into donut

Merge commit '54d632468c0cd53087d17420d9d383bc29553d36'

* commit '54d632468c0cd53087d17420d9d383bc29553d36':
First version of the keystore service.
a92d5dc0f6d3aadbc64a029ecfacca2f19a661e7 08-Jun-2009 Chung-yih Wang <cywang@google.com> First version of the keystore service.

The keystore service is protected by the user 'keystore'. Only keystore
user/group can access the key content. All users are able to do the
following commands from shell as well:
listcerts
listuserkeys
installcert
removecert
installuserkey
removeuserkey
eystore/Android.mk
eystore/commands.c
eystore/keystore.c
eystore/keystore.h
e0c322049ab2be291c1fc40f79702543d4e77934 01-Jun-2009 Mathias Agopian <mathias@google.com> get rid of utils.h
untime/main_runtime.cpp
19deced119360320779375aaa8046dcbcbea3c02 26-May-2009 Andy McFadden <fadden@android.com> Fix sim-eng build.
untime/ServiceManager.h
3a253bd4e4f9989c43e840b391a2597fba6cce3d 22-May-2009 Android (Google) Code Review <android-gerrit@google.com> am 9681a5e0: Merge change 2230 into donut

Merge commit '9681a5e06badbd817342e8f6be4ffbe9102c1e98'

* commit '9681a5e06badbd817342e8f6be4ffbe9102c1e98':
runtime: Add CAP_SYS_NICE to the system server capabilities list so it
a00a0851c31e0ab3ea63fb34cf0f532eb511a1e2 22-May-2009 San Mehat <san@google.com> runtime: Add CAP_SYS_NICE to the system server capabilities list so it
can (eventually) move arbitrary threads into different cgroups

Signed-off-by: San Mehat <san@google.com>
untime/main_runtime.cpp
c5b2c0bf8007562536b822eb060fc54a01f8e08b 20-May-2009 Mathias Agopian <mathias@google.com> move libbinder's header files under includes/binder
untime/ServiceManager.cpp
untime/main_runtime.cpp
urfaceflinger/main_surfaceflinger.cpp
208059f67ed2dd9fa025e07fcb6954d3cb61c79e 19-May-2009 Mathias Agopian <mathias@google.com> checkpoint: split libutils into libutils + libbinder
untime/Android.mk
urfaceflinger/Android.mk
edbf3b6af777b721cd2a1ef461947e51e88241e1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
untime/Android.mk
untime/MODULE_LICENSE_APACHE2
untime/NOTICE
untime/ServiceManager.cpp
untime/ServiceManager.h
untime/SignalHandler.cpp
untime/SignalHandler.h
untime/main_runtime.cpp
urfaceflinger/Android.mk
urfaceflinger/main_surfaceflinger.cpp
d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
untime/Android.mk
untime/MODULE_LICENSE_APACHE2
untime/NOTICE
untime/ServiceManager.cpp
untime/ServiceManager.h
untime/SignalHandler.cpp
untime/SignalHandler.h
untime/main_runtime.cpp
urfaceflinger/Android.mk
urfaceflinger/main_surfaceflinger.cpp
8a7a67538a9977c892389bfcde76a8372aa0b56c 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
untime/Android.mk
7c1b96a165f970a09ed239bb4fb3f1b0d8f2a407 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
untime/Android.mk
untime/MODULE_LICENSE_APACHE2
untime/NOTICE
untime/ServiceManager.cpp
untime/ServiceManager.h
untime/SignalHandler.cpp
untime/SignalHandler.h
untime/main_runtime.cpp
urfaceflinger/Android.mk
urfaceflinger/main_surfaceflinger.cpp