Commit Graph

1961 Commits

Author SHA1 Message Date
Chien-Yu Chen cd2ef4ef1c Restart cameraserver
Bug: 24511454
Change-Id: Ia27f4ef0eb71f891c789f637a21b04afe0b1c4e9
2016-01-25 11:52:40 -08:00
Marco Nelissen 0b17e3a362 Merge "uid for codec process" am: c7096b5e42
am: e40b58328f

* commit 'e40b58328f13c19d4954c760f7c7f7f86a8f2aa1':
  uid for codec process
2016-01-25 16:57:18 +00:00
Marco Nelissen 003c07238a uid for codec process
Change-Id: Iadf8012e6c177bcf487048e1b5a9b4fc51a0aeba
2016-01-25 07:49:39 -08:00
David Pursell f6012df68d Merge "fastboot: use cutils socket functions." am: bbedd9523f
am: f0bfaf9503

* commit 'f0bfaf95038241c3f8ed65099c7d532a6c112e86':
  fastboot: use cutils socket functions.
2016-01-22 18:46:54 +00:00
David Pursell 572bce2908 fastboot: use cutils socket functions.
Now that cutils has cross-platform socket functionality, we can
restructure fastboot to remove platform-dependent networking code.

This CL adds socket_set_receive_timeout() to libcutils and combines the
fastboot socket code into a single implementation. It also adds TCP
functionality to fastboot sockets, but nothing uses it yet except for
the unit tests. A future CL will add the TCP protocol which will use
this TCP socket implementation.

Bug: http://b/26558551

Change-Id: If613fb348f9332b31fa2c88d67fb1e839923768a
2016-01-21 09:53:11 -08:00
David Pursell cb56fb4b15 Merge "libcutils: share Windows networking code." am: 1906de1e0f
am: 7a568dbdd6

* commit '7a568dbdd6c1a39a90c01ab89092cb67a9a86198':
  libcutils: share Windows networking code.
2016-01-21 17:03:45 +00:00
David Pursell 1906de1e0f Merge "libcutils: share Windows networking code." 2016-01-21 16:40:00 +00:00
Christopher Ferris df69064892 Merge "Allow setting an arbitrary alignment for an entry." am: ad12df20e9
am: 5633ccf042

* commit '5633ccf042f76a894fa31fe1579846ac516fa60c':
  Allow setting an arbitrary alignment for an entry.
2016-01-19 22:35:06 +00:00
Christopher Ferris ad12df20e9 Merge "Allow setting an arbitrary alignment for an entry." 2016-01-19 22:28:02 +00:00
Christopher Ferris 5e9f3d44a3 Allow setting an arbitrary alignment for an entry.
The current code only allows the creation of an entry that is 32 bit
aligned.

Bug: 25446938

Change-Id: I6c924df12ef2bc067b3de7789257af7e3db7e904
2016-01-19 13:55:53 -08:00
Rubin Xu c43b47a31c Merge "Add logd security buffer tag types and string write API." am: 95d1bd2421
am: 7fa35356a8

* commit '7fa35356a845ee301c442e51e35c5690c35e54d5':
  Add logd security buffer tag types and string write API.
2016-01-19 20:55:00 +00:00
Rubin Xu 95d1bd2421 Merge "Add logd security buffer tag types and string write API." 2016-01-19 20:40:16 +00:00
Elliott Hughes 7c452f80f6 Merge "Remove unused cruft from <log/log.h>." am: 6acf7663c2
am: b22c169f20

* commit 'b22c169f20d8887f214f1b99a8e4b54215ff5558':
  Remove unused cruft from <log/log.h>.
2016-01-19 17:33:06 +00:00
Rubin Xu d545d2930e Add logd security buffer tag types and string write API.
Bug: 22860162
Change-Id: I1cceed3462eaebdd8208abf101b127f27f0023a7
2016-01-19 17:13:28 +00:00
Elliott Hughes 3a84b685e9 Remove unused cruft from <log/log.h>.
The callers are, in fact, already gone.

Change-Id: I665183ce595b542b1e47df79bc8990e069571b97
2016-01-16 11:11:19 -08:00
Christopher Ferris 469bf483b1 Merge "Add a ZipArchiveStreamEntry class." am: 9162c1496d
am: 64686bcd9e

* commit '64686bcd9edffdd29c4b7b19ddcbf5b8ab56ae73':
  Add a ZipArchiveStreamEntry class.
2016-01-15 23:58:02 +00:00
David Pursell 0eb8e1b706 libcutils: share Windows networking code.
This CL moves Windows networking code from fastboot to libcutils so
that it can be shared with other host programs such as adb.

Not all libcutils networking functions have been implemented for
Windows, just those necessary for fastboot. In the next CL I will do
the same for adb, adding any additional required functions.

Unit tests have also been added to test the functions using a loopback
connection.

Bug: http://b/26236380.
Change-Id: Ibc51a67030fe69a04c23512eefa9d19b055c7c12
2016-01-15 15:57:35 -08:00
Christopher Ferris e6884ce56f Add a ZipArchiveStreamEntry class.
This allows someone to stream the data out of a zip archive
instead of extracting to a file or to memory.

Included in this change is a small cleanup of the makefile.

Change-Id: I8b679a679c3502ff4ea0bc4f9e918303657fa424
2016-01-14 12:30:20 -08:00
Jeff Sharkey 814640315a Be strict, but not that strict.
Certain apps decide that they want to chmod() their private data
directories to gain more security.  We still want to carefully
enforce owner UID/GID, but relax the mode check for now.

Bug: 26549892
Change-Id: I362d530ba0b20fb23f427ac082ee003864adc57d
2016-01-14 12:02:53 -07:00
Keun-young Park 27f961f93d Merge "libusbhost: add usb_device_reset" 2016-01-14 17:28:47 +00:00
Keun-young Park f6411fa1ec libusbhost: add usb_device_reset
bug: 26404209
Change-Id: I8f307d6683afe70fe334746f5be2856b79782493
2016-01-13 16:01:42 -08:00
Jeff Sharkey cf94fe152e Offer a stricter way to prepare directories.
Some callers, such as installd, have stricter requirements around
directory preparation, where they want to assert ownership and mode
without quietly fixing the values.

Bug: 26466827
Change-Id: Id44db5f29a3326cfe178b443fb450ad2edeaefd8
2016-01-12 13:07:52 -07:00
Josh Gao d49815e42b Merge "debuggerd: fork and drop privileges when dumping." am: b8e9ebf8b4
am: 8a43d6ae06

* commit '8a43d6ae0641102965175aba25c514dae5ccd45c':
  debuggerd: fork and drop privileges when dumping.
2016-01-06 00:07:19 +00:00
Josh Gao e7a9e52740 debuggerd: fork and drop privileges when dumping.
Bug: http://b/25195825
Change-Id: I913d8425232e79df3f7a051a8cc63de9c60f4780
2016-01-05 15:59:01 -08:00
Jorge Lucangeli Obes e7598b9c53 Merge "android_filesystem_config.h: Add Brillo users." am: 8688dba547
am: a08f35c9fd

* commit 'a08f35c9fdb5863a5a9a4a70cee3efa466def178':
  android_filesystem_config.h: Add Brillo users.
2016-01-05 23:05:29 +00:00
Jorge Lucangeli Obes 4ae18025f7 android_filesystem_config.h: Add Brillo users.
-metrics_collector and metricsd gather and upload device metrics.
-webservd is part of the Weave (Brillo remote setup and management) stack.

Bug: 26337609
Change-Id: Icf6ce75e64293adbe773f2ee65e80629f2eeb737
2016-01-05 14:43:40 -08:00
Alex Vakulenko 78d0871950 Merge "libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()" am: 946d8152b2
am: 1a0a184a54

* commit '1a0a184a541bfbbbdc4351ad2df8d0181f4263d6':
  libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()
2016-01-04 21:08:21 +00:00
Alex Vakulenko 08c9891c9c libbinderwrapper: Add BinderWrapper::GetOrCreateInstance()
In libraries relying on binder it is useful to be able to obtain an
existing copy of BinderWrapper or create one if it doesn't exist.

This allows to abstract the actual RPC (binder) from clients who have
no other dependencies on this RPC.

BUG: 23782171
Change-Id: Ie775d3d8ab83d75e38abc7e1385eb39a363555ef
2016-01-04 12:56:27 -08:00
Pavlin Radoslavov 17d80c84e1 Use GID "wakelock" to control access to kernel wakelock
* Added new kernel GID named "wakelock" (AID_WAKELOCK = 3010)
* Changed the group access for /sys/power/wake_lock and
  /sys/power/wake_unlock from "system" to "wakelock"
* Added "wakelock" to the list of groups for the healthd process/service

Bug: 25864142
Change-Id: Ieabee9964cccec3107971a361a43aa9805164aa9
2015-12-28 14:57:28 -08:00
Pavlin Radoslavov 0eca107512 Use GID "wakelock" to control access to kernel wakelock
* Added new kernel GID named "wakelock" (AID_WAKELOCK = 3010)
* Changed the group access for /sys/power/wake_lock and
  /sys/power/wake_unlock from "system" to "wakelock"
* Added "wakelock" to the list of groups for the healthd process/service

Bug: 25864142
Change-Id: Ieabee9964cccec3107971a361a43aa9805164aa9
2015-12-28 19:33:30 +00:00
Rob Carr d94ad78f7b Merge "Add comment to keep enum in sync." 2015-12-22 21:07:46 +00:00
Dimitry Ivanov d2a6220001 Add parameter for shared namespaces
Shared namespaces are used for bundled app classloaders.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I163033f70c50ef9ddb4164676c033ab30748964e
(cherry picked from commit ef4639c1a5)
2015-12-19 23:38:28 -08:00
Jorge Lucangeli Obes 37211e1f3d Add audioserver UID.
(Originally in
https://googleplex-android-review.git.corp.google.com/#/c/804752).

Change-Id: I31951cad1bbcec58b21559be0d86581ba9187a92
2015-12-18 13:06:34 -08:00
Marco Nelissen 51544cc778 New uid for extractor process
Change-Id: I462d4736e772da0a08b4793fc1b971ff261667ea
2015-12-18 11:11:17 -08:00
Dan Stoza 48cd34080c Name the pixel format and transform enums
Adds an actual enum name for the HAL_PIXEL_FORMAT_* and
HAL_TRANSFORM_* enums.

Change-Id: I8d03c3695e8956b3b525559edcb37213ade6a0de
2015-12-17 13:58:19 -08:00
Robert Carr f3954fba2d Add comment to keep enum in sync.
Now that we expose SCALING_MODE_* constants
out to Java add a comment to keep the bindings
in sync.

Bug: 26010823
Change-Id: I35473c673b79223ea3bebc118d3a31fc82f37381
2015-12-17 11:38:39 -08:00
Dimitry Ivanov ef4639c1a5 Add parameter for shared namespaces
Shared namespaces are used for bundled app classloaders.

Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I163033f70c50ef9ddb4164676c033ab30748964e
2015-12-15 15:10:35 -08:00
Greg Hackmann 346db8a2c2 Merge "cutils: trace: add DATABASE tag" am: 461a29540c
am: d57d863e2e

* commit 'd57d863e2efd2c8a2e8246ed7f928a2c1b834e9e':
  cutils: trace: add DATABASE tag
2015-12-14 13:23:32 -08:00
Greg Hackmann 461a29540c Merge "cutils: trace: add DATABASE tag" 2015-12-14 21:12:52 +00:00
Andy Hung c7ae5210a7 Merge "Add audioserver uid and restart service when needed" 2015-12-11 20:08:51 +00:00
Mark Salyzyn 829be0202a Merge "logd: liblog: logcat: Add LOG_ID_SECURITY" am: 86052a5d4f
am: 72398c0515

* commit '72398c051567d735df677a7527533f2f1dc5a882':
  logd: liblog: logcat: Add LOG_ID_SECURITY
2015-12-11 10:58:32 -08:00
Mark Salyzyn d4ac73bd6a Merge changes I598c8c5c,I672b0f4d,Id882978b,Idff5e080,Ib124eca1, ... am: 30edbdce9b
am: 5afb3f5f67

* commit '5afb3f5f678627d42ceae617069ff38d9773a005':
  logger.h: reduce maximum payload so sum is page size
  liblog: test for maximum payload can not survive change
  liblog: logprint use uid name if length less then 5
  liblog: logprint add uid format modifier
  liblog: readlog apps get logger_entry_v4 for pstore
  logd: readlog apps get logger_entry_v4
  logger.h: Add definition for logger_entry_v4
2015-12-11 10:57:51 -08:00
Mark Salyzyn 86052a5d4f Merge "logd: liblog: logcat: Add LOG_ID_SECURITY" 2015-12-11 17:33:33 +00:00
Mark Salyzyn 30edbdce9b Merge changes I598c8c5c,I672b0f4d,Id882978b,Idff5e080,Ib124eca1, ...
* changes:
  logger.h: reduce maximum payload so sum is page size
  liblog: test for maximum payload can not survive change
  liblog: logprint use uid name if length less then 5
  liblog: logprint add uid format modifier
  liblog: readlog apps get logger_entry_v4 for pstore
  logd: readlog apps get logger_entry_v4
  logger.h: Add definition for logger_entry_v4
2015-12-11 16:42:28 +00:00
Dimitry Ivanov fe029254e9 Merge "Apply permitted path to the classloader-namespace" am: 028aa205af
am: 584c26f872

* commit '584c26f872d9adfba9f5d2f200a53f837836b7bc':
  Apply permitted path to the classloader-namespace
2015-12-10 04:41:34 +00:00
Dimitry Ivanov 0d6e59407d Apply permitted path to the classloader-namespace
Bug: http://b/25853516
Bug: http://b/22548808
Change-Id: I283e6ee8d743bc3ab41aab9f36af0abbe729943f
2015-12-09 15:39:36 -08:00
Mark Salyzyn b6a8d41e2a logger.h: reduce maximum payload so sum is page size
Reduce maximum log payload so that the sum with the maximum
length header logger_entry_v4 is a page size. This is a
performance measure.

Expect side effects, truncates messages 8 bytes earlier. The
length has a long history (2008) so there may be non-C code
somewhere that has it hard-coded rather than reflecting this
header. CTS tests may need to be adjusted.

Bug: 25996918
Change-Id: I598c8c5cc78f6b0afc2c1f30cc6f3c18eb8c4c9d
2015-12-09 08:12:07 -08:00
Mark Salyzyn 90e7af30a5 liblog: logprint add uid format modifier
Bug: 25996918
Change-Id: Idff5e080fc5c7b69e0c45d3f596eb9d632451cbd
2015-12-09 08:12:07 -08:00
Mark Salyzyn 9b292f563e logger.h: Add definition for logger_entry_v4
Extends logger_entry_v3 to add an uid field and moves some fields to
unsigned (easier to have zero'd bit-field for future adjustments).

Still no version field, not crossing that bridge, historical reasons.

Bug: 25996918
Change-Id: I18b7291666c3a5b170d6771a012363a41f2c5847
2015-12-09 08:12:07 -08:00
Mark Salyzyn 083b037c07 logd: liblog: logcat: Add LOG_ID_SECURITY
- Largish commit, buffer and access controls done together
- Add LOG_ID_SECURITY binary content log
- Add "default" meta buffer
- allow LOG_ID_SECURITY only from AID_SYSTEM and AID_ROOT UID & GID
- Use __android_log_security() to gate logging
- Add __android_log_security_bwrite() native access to security
  logging.
- Add liblog.__security_buffer end-to-end gTest

Bug: 26029733
Change-Id: Ibcf5b4660c17c1aa6902c0d93f8ffd29c93d9a93
2015-12-08 16:46:29 -08:00
Mark Salyzyn ee6b51f210 Merge "liblog: Add __android_log_security()" am: 1631d36d95
am: e52a6d60cd

* commit 'e52a6d60cdb2233bd3d03723c73ce8f9bf33c929':
  liblog: Add __android_log_security()
2015-12-08 14:04:42 -08:00
Mark Salyzyn ffbd86ff25 liblog: Add __android_log_security()
Return non-zero if ro.device_owner is set and not false
and persist.logd.security is true.

Bug: 26029733
Change-Id: Ie82ae11ae35e9c79017b6e873fefb39d79a1d4fe
2015-12-08 11:28:27 -08:00
Dimitry Ivanov d686fb3474 Merge "Native loader as a separate library" am: beceb6ef53 am: 17f119eade
am: d6c9995d99

* commit 'd6c9995d992b4fdffe176acff207f1f066e2a920':
  Native loader as a separate library
2015-12-08 04:53:45 +00:00
Mark Salyzyn 9d216130ad Merge changes Ib441cecf,Ieb1bbe3d,I3e63e430,I531b4317,I8dd60545, ... am: d1379a8aed am: 154e1c15ae
am: 850045ca27

* commit '850045ca27b2a71d6b1fee873dc7246edfd0b8f2':
  logcat: Add --wrap timeout
  logcat: Add low hanging fruit long arguments
  logcat: Add long arguments to logcat, support for pid filter
  liblog: Support for ANDROID_LOG_WRAP mode flag on reader
  logd: test wakeup on wrap timeout
  logd: wakeup on wrap or timeout
2015-12-08 00:04:01 +00:00
Mark Salyzyn e7b77665e3 Merge "logd: liblog: logcat: switch to android_log_clockid() (2)" am: 69504d646d am: d2fb3e10ee
am: 42901fb07d

* commit '42901fb07d69b699fa07bdd25aca4957c3dd0c10':
  logd: liblog: logcat: switch to android_log_clockid() (2)
2015-12-08 00:01:50 +00:00
Mark Salyzyn e18f028637 Merge "Revert "logd: liblog: logcat: switch to android_log_clockid()"" am: b566435b02 am: a64dd2d0b4
am: b97aaca6b2

* commit 'b97aaca6b283573e5dd035d4cfd92fd5450ac96f':
  Revert "logd: liblog: logcat: switch to android_log_clockid()"
2015-12-08 00:00:04 +00:00
Mark Salyzyn 48946e48e5 Merge "logd: liblog: logcat: switch to android_log_clockid()" am: 9eca0e775b am: 8acc9bc1cb
am: 945bde67f3

* commit '945bde67f39f119d5c3b3136de4b7757f1adc7b6':
  logd: liblog: logcat: switch to android_log_clockid()
2015-12-07 23:59:51 +00:00
Elliott Hughes ef119a14b8 Merge "Track rename of base/ to android-base/." am: 912ed3d8ca am: e2a9563be1
am: 3608ee5e90

* commit '3608ee5e903689ea7c433587be664649689816e1':
  Track rename of base/ to android-base/.
2015-12-07 23:59:44 +00:00
Dimitry Ivanov beceb6ef53 Merge "Native loader as a separate library" 2015-12-07 23:45:50 +00:00
Mark Salyzyn f8e546e609 liblog: Support for ANDROID_LOG_WRAP mode flag on reader
If ANDROID_LOG_WRAP is specified, add timeout=3600 to the reader
request. logd will comply by going to sleep with the socket open.
If the start time is about to wrap or get pruned in the specified log
buffers, then wakeup and dump the logs; or wakeup on timeout,
whichever comes first.

Bug: 25929746
Change-Id: I531b4317a20abcf3ba87d78c68fa2f268a4488ab
2015-12-07 14:24:02 -08:00
Dimitry Ivanov ac1b1919f8 Native loader as a separate library
Extracted native loader to separate library in order to
be able to reuse it for NativeActivities related native code
in libandroid_runtime.so

Bug: http://b/22548808
Change-Id: Ibcf5ddcdc5aba22e32e4b72887840e9c171c1986
2015-12-07 12:59:02 -08:00
Mark Salyzyn ba7a9a016b logd: liblog: logcat: switch to android_log_clockid() (2)
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I38dee773bf3844177826b03a26b03215c79a5359
2015-12-07 18:45:31 +00:00
Mark Salyzyn b566435b02 Merge "Revert "logd: liblog: logcat: switch to android_log_clockid()"" 2015-12-07 18:31:44 +00:00
Mark Salyzyn 9e18cdcebd Revert "logd: liblog: logcat: switch to android_log_clockid()"
This reverts commit 77b5696b1d.

Change-Id: I7711bf1a7e3f72ed29a2498d7287b725a0e624bd
2015-12-07 18:30:58 +00:00
Mark Salyzyn 9eca0e775b Merge "logd: liblog: logcat: switch to android_log_clockid()" 2015-12-07 18:16:29 +00:00
Elliott Hughes 4f71319df0 Track rename of base/ to android-base/.
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
2015-12-04 22:00:26 -08:00
Mark Salyzyn 77b5696b1d logd: liblog: logcat: switch to android_log_clockid()
android_log_timestamp returns the property leading letter,
it is better to return a clockid_t with android_log_clockid()

Bug: 23668800
Change-Id: I3c4e3e6b87f6676950797f1f0e203b44c542ed43
2015-12-04 14:49:19 -08:00
Greg Hackmann c314b2b911 cutils: trace: add DATABASE tag
Change-Id: I00113b845cd8bef2e5c8efc0f0c3f4d61c3e7696
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-11-23 12:39:24 -08:00
Sergio Giro 43f13d0d68 Merge "libutils: fix cache removal when callback invalidates the key" am: b0df9dca7c am: e483305e47
am: a96cd36afb

* commit 'a96cd36afbff682e24365092dd85bbe9c9165afc':
  libutils: fix cache removal when callback invalidates the key
2015-11-20 17:17:38 +00:00
Sergio Giro b0df9dca7c Merge "libutils: fix cache removal when callback invalidates the key" 2015-11-20 17:09:10 +00:00
Sergio Giro b7170fe3fe libutils: fix cache removal when callback invalidates the key
Bug: 24785286
Change-Id: I9d17d2247258a56ef7776b3a701389e825a9c533
2015-11-20 14:54:51 +00:00
Mark Salyzyn 3e83beff9d Merge "liblog: resolve deadlocks" am: 8f8a88cad3 am: 247e22090a
am: f8dc0c9907

* commit 'f8dc0c990708039271c69ec1a75e7f3275bca3f0':
  liblog: resolve deadlocks
2015-11-19 22:58:14 +00:00
Mark Salyzyn 2d2e0a5c5e liblog: resolve deadlocks
Although ever present, an increased regression introduced with
commit b6bee33182 (liblog: logd:
support logd.timestamp = monotonic).

A signal handler can interrupt in locked context, if log is written
in the signal handler, we are in deadlock. To reduce the contention
and chances for this problem separate out timestamp lock from is
loggable lock to reduce contention situations. Provide a best-guess
response if lock would fail in timestamp path.

Use a common lock() inline within each module, with a comment speaking
to the issues surrounding calling a function that has a mutex within
a signal handler.

ToDo: Hold off signals temporarily in mainline, restart when unblock.
      Can not use pthread_sigmask(SIG_BLOCK,,) as it breaks AtCmd.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 25563384
Change-Id: I47e2c87c988c3e359eb9eef129c6a3a08e9eedef
2015-11-19 13:14:16 -08:00
Mark Salyzyn 2a3024f9ad Revert "liblog: resolve deadlocks"
(cherry pick from c2e7d4965f)

This reverts commit 7a2a307192.

Bug: 25693940
Change-Id: I9a7c926289e972f80c03c92e33535e1dedaa7381
2015-11-16 11:03:09 -08:00
Mark Salyzyn c2e7d4965f Revert "liblog: resolve deadlocks"
This reverts commit 7a2a307192.

Bug: 25693940
Change-Id: I9a7c926289e972f80c03c92e33535e1dedaa7381
2015-11-16 19:00:41 +00:00
Mark Salyzyn 9c68c0b831 Merge "liblog: resolve deadlocks" am: 5559f1d6e8 am: 650a06e01b
am: 9ed07e3eee

* commit '9ed07e3eee75a850f16e2cff7352c062f72f06b8':
  liblog: resolve deadlocks
2015-11-13 15:37:00 +00:00
Mark Salyzyn 7a2a307192 liblog: resolve deadlocks
Although ever present, an increased regression introduced with
commit b6bee33182 (liblog: logd:
support logd.timestamp = monotonic).

A signal handler can interrupt in locked context, if log is written
in the signal handler, we are in deadlock. Block signals while we
are locked. Separate out timestamp lock from is loggable lock to
reduce contention situations. Provide a best-guess response if
lock would fail in timestamp path.

Bug: 25563384
Change-Id: I6dccd6b99ebace1c473c03a785a35c63ed5c6a8a
2015-11-12 15:39:04 -08:00
Christopher Wiley 7f84d9aa9f Merge "libutils: Add UNEXPECTED_NULL status_t" am: 2f33e0cb17 am: 3a380b4843
am: 8831e30b5c

* commit '8831e30b5cdbdf20ccf95897e0e4dade37aa3134':
  libutils: Add UNEXPECTED_NULL status_t
2015-11-10 22:33:25 +00:00
Christopher Wiley 2f33e0cb17 Merge "libutils: Add UNEXPECTED_NULL status_t" 2015-11-10 22:20:54 +00:00
Christopher Wiley c3441e69c0 libutils: Add UNEXPECTED_NULL status_t
We use this specifically in situations where we expect to read
an object from a Parcel, but fail because the object is null.

Bug: 25617251

Change-Id: Id0b6118b19a932998b5028e30dc15d70e4d7f9c3
2015-11-10 11:12:43 -08:00
Nick Kralevich bdf20142b9 Merge "Enable hidepid=2 on /proc" am: 2d8f1d4c47 am: ea8452cc72
am: 7dafe5b818

* commit '7dafe5b818f7771cb00c4a0ea3ab1dbf74593185':
  Enable hidepid=2 on /proc
2015-11-09 20:41:19 +00:00
Nick Kralevich c39ba5ae32 Enable hidepid=2 on /proc
Add the following mount options to the /proc filesystem:

  hidepid=2,gid=3009

This change blocks /proc access unless you're in group 3009
(aka AID_READPROC).

Please see
  https://github.com/torvalds/linux/blob/master/Documentation/filesystems/proc.txt
for documentation on the hidepid option.

hidepid=2 is preferred over hidepid=1 since it leaks less information
and doesn't generate SELinux ptrace denials when trying to access
/proc without being in the proper group.

Add AID_READPROC to processes which need to access /proc entries for
other UIDs.

Bug: 23310674
Change-Id: I22bb55ff7b80ff722945e224845215196f09dafa
2015-11-09 09:08:46 -08:00
Sanket Agarwal ce86a59aa0 Merge "Add emergency announcement to definitions." 2015-11-05 21:14:45 +00:00
Dan Albert 8f3ef3fd09 Merge "Use std::unique_ptr instead of UniquePtr." am: 0f61f86870 am: 0c69e9f271
am: 40f76c2fed

* commit '40f76c2fedb18664adab73e40b8b64227601d4e6':
  Use std::unique_ptr instead of UniquePtr.
2015-11-05 21:11:03 +00:00
Sanket Agarwal 2ccc52c3bb Add emergency announcement to definitions.
Change-Id: I57b1d6d5a0f8142efba27a17e6015429eba04f5c
(cherry picked from commit 2d0a4c10b6601e5f16a336d44f8536a7277d52d3)
2015-11-05 19:23:01 +00:00
Pablo Ceballos 15a54a97fe Merge "Expose setSingleBufferMode in ANativeWindow" 2015-11-05 18:14:08 +00:00
Dan Albert f2d2509690 Use std::unique_ptr instead of UniquePtr.
Bug: http://b/22403888
Change-Id: I398fa43b8f33c9281d7ff238521d75f1dcb8a5e7
2015-11-05 01:09:22 -08:00
Pablo Ceballos 923d27f20d Expose setSingleBufferMode in ANativeWindow
Bug 24940410

Change-Id: Ied57f1bef1988bdd0bf4dd95572f0985c9d43c2d
2015-11-03 10:56:25 -08:00
John Reck dc7694eac5 Merge "Teach sp<> how to std::move" am: 518d043c86 am: bb12b91ae1
am: a573d6b186

* commit 'a573d6b18686266667c8efd9d7291ecd28efa67c':
  Teach sp<> how to std::move
2015-11-03 00:14:15 +00:00
John Reck 518d043c86 Merge "Teach sp<> how to std::move" 2015-11-02 21:34:50 +00:00
Andy Hung fec47527b4 Add audioserver uid and restart service when needed
Bug: 24511453
Change-Id: I6987a82149d23ad671478cf21488c62cb1ecfc93
2015-10-30 16:58:59 -07:00
Adam Lesinski eb6eb3756c Merge "Add deflate compression to ZipWriter" am: ac60abdd70 am: 42f8538df5
am: 6c873088e7

* commit '6c873088e7171edd89977a530ed8025855049732':
  Add deflate compression to ZipWriter
2015-10-30 17:07:18 +00:00
Adam Lesinski ac60abdd70 Merge "Add deflate compression to ZipWriter" 2015-10-30 16:55:55 +00:00
Mark Salyzyn ce5335702b Merge changes Iefbea3b1,Ieb924b6d am: bb51fbc4d4 am: 9d4203aae1
am: 91a7685e65

* commit '91a7685e653234ae99547ca9cfeac3ea7de17307':
  liblog: add android_log_timestamp() private function
  liblog: logcat: add epoch and monotonic format modifiers
2015-10-29 23:16:42 +00:00
Mark Salyzyn 500afc7532 liblog: add android_log_timestamp() private function
Change-Id: Iefbea3b1be2f97cfdeb35e5330e5495e0337215b
2015-10-29 14:23:42 -07:00
Mark Salyzyn 4cbed02e44 liblog: logcat: add epoch and monotonic format modifiers
- '-v epoch' prints seconds since Jan 1 1970
- '-v monotonic' print cpu seconds since start of device
- '-T sssss.mmm...' as alternate tail time format

NB: monotonic is a best estimate and may be out by a few ms
    given the synchronization source clue accuracy.

Bug: 23668800
Change-Id: Ieb924b6d3817669c7e53beb9c970fb626eaad460
2015-10-29 14:23:42 -07:00
John Reck d69089a742 Teach sp<> how to std::move
Arguably we should migrate to std::shared_ptr
but for now make std::vector<sp<>> a bit less
horrible

Change-Id: Ia458a2daff0b656b2f3310b3ea100565ec844c69
2015-10-29 07:17:40 -07:00
Marco Nelissen 05ac6c2dd5 New uid for extractor process
Change-Id: I462d4736e772da0a08b4793fc1b971ff261667ea
2015-10-28 10:14:05 -07:00
Adam Lesinski 591fd3953d Add deflate compression to ZipWriter
Use zlib to deflate compress data into the zip file.

Change-Id: If094b926a67e199be976c3190781cd0101dd66e1
2015-10-20 12:40:33 -07:00
Daniel Erat fb371d6a6b Merge "libbinderwrapper: Add GetCallingUid() and GetCallingPid()." 2015-10-16 21:43:36 +00:00