Commit graph

19158 commits

Author SHA1 Message Date
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
Mark Salyzyn
5d8742feb6 Merge "liblog: test: pmsg overhead measurement" 2015-12-18 20:34:55 +00:00
Marco Nelissen
51544cc778 New uid for extractor process
Change-Id: I462d4736e772da0a08b4793fc1b971ff261667ea
2015-12-18 11:11:17 -08:00
Mark Salyzyn
1d51753461 Merge "liblog: Remove paranoia regarding logd" 2015-12-18 18:51:24 +00:00
Colin Cross
9df73b007a Merge "Turn off CRC checking for append2simg" 2015-12-18 18:47:30 +00:00
Mark Salyzyn
55c636a29f Merge "logcat: test: rotated logs can exceed size during crash" 2015-12-18 18:37:33 +00:00
Mark Salyzyn
fb9ff0e8ad Merge "logd: test drop __unused" 2015-12-18 18:36:47 +00:00
Mark Salyzyn
8beb0d3ad7 logcat: test: rotated logs can exceed size during crash
Some crash messages can be as large as 4K, so allow
the rotated logs to have a larger size.

Change-Id: I20ef8d526ad2d5eca128d1f99f4ea2d2da426403
2015-12-18 10:35:20 -08:00
Mark Salyzyn
7b4a2049b0 logd: test drop __unused
Change-Id: I1ccf49809b8a0a125601bdb52834c463e2d94165
2015-12-18 10:35:00 -08:00
Colin Cross
b5619d9630 Turn off CRC checking for append2simg
make_ext4fs doesn't write out a CRC chunk, and append2simg doesn't
either, but append2simg was still performing a CRC on every input
block.  Cuts append2simg time in half.

Change-Id: I678f807abbb741042461ed68a0f61b406d3665fb
2015-12-17 17:28:44 -08:00
Mark Salyzyn
236fecd923 Merge "logd: ro.config.low_ram set buffer size to 64K" 2015-12-17 23:47:14 +00:00
Elliott Hughes
82509e7925 Merge "adb host: add device state in "adb wait-for-*"" 2015-12-17 22:44:15 +00:00
Josh Gao
1ff73936a7 Merge "adb: extract USB FFS read/write limit constants." 2015-12-17 22:29:12 +00:00
Josh Gao
ae72b5aa4b adb: extract USB FFS read/write limit constants.
Change-Id: I5e9fb7959a1c4744cb8d53ece4634138239d4e49
2015-12-17 14:28:24 -08:00
Elliott Hughes
d361582dc0 Merge "Improve "adb install"'s error message slightly." 2015-12-17 22:17:38 +00:00
Elliott Hughes
fe01885c9b Improve "adb install"'s error message slightly.
We still don't really have a clue what went wrong, but "Failed to write"
made it sound like we did.

Change-Id: Ic58b13202e2d8ea6b095f7046db9d0771d77ce65
2015-12-17 14:04:38 -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
Jorge Lucangeli Obes
297a8381b5 Merge "adb: Use Minijail for privilege dropping." 2015-12-17 19:39:47 +00:00
Jorge Lucangeli Obes
683dc4817f adb: Use Minijail for privilege dropping.
By using Minijail we avoid writing the same priv-dropping code over
and over again. This also enables future hardening opportunities.
We're already using Minijail for priv-dropping on Brillo.

Minijail is unit- and integration-tested on the
Chrome OS CI infrastructure (pulling from the same repo, see
https://wmatrix.googleplex.com/security?tests=security_Minijail0).
Once CI comes to Android, it will be continuously tested there as well.

Both 'adb root' and 'adb unroot' still work.

Bug: 26099611
Change-Id: I52c456ea272d27bd6fbc71200f4fdd928a592158
2015-12-17 10:49:53 -08:00
Tom Cherry
64cc0825a6 Merge "Use selinux_android_setcon() instead of setcon()" 2015-12-17 17:54:05 +00:00
Leo Sartre
1fbc9dbd0f adb host: add device state in "adb wait-for-*"
The current implementation of the host commands "adb wait-for-*" allows
to specify only the transport layer (local, usb or any).
This patch allows the specification of the expected device state
(bootloader, recovery, device or sideload), this is usefull for
scripting purposes.

Use case:
$ adb reboot sideload-auto-reboot
$ adb wait-for-usb-sideload && adb sideload package.zip

Change-Id: I276a6be4d82f8b7901f74e1e5395b86d16548e8f
Signed-off-by: Leo Sartre <leox.sartre@intel.com>
2015-12-16 18:11:18 -08:00
Tom Cherry
38cd57a145 Use selinux_android_setcon() instead of setcon()
Bug 26114086

Change-Id: I02d20ee7a5f487fc73d7a33d50b0b8f1cd9ad3a4
2015-12-16 17:42:08 -08:00
David Pursell
b6dfab03b6 Merge "fastboot: implement UDP networking interface." 2015-12-17 00:27:06 +00:00
David Pursell
815c7beae7 fastboot: implement UDP networking interface.
This CL creates a UdpSocket class that provides a simple unified
interface to send and receive UDP packets for all platforms. Nothing
uses this interface yet except for tests.

The eventual goal is to implement a UDP protocol for fastboot, but it
makes the code much simpler and more modular if we handle the low-level
networking here independently of our custom fastboot protocol.

Some of the Windows code is similar to adb. I'd like to create a
library to hold the common functionality, but it is going to be a
little delicate to separate out the features unique to adb (e.g. the
custom file descriptor system), and I don't want to risk breaking
something in adb before the holiday break, so I'm hoping to get this in
for now and merge them early next year.

Tests are included in this CL to exercise this functionality using a
loopback connection.

Bug: http://b/26154763.
Tests: `fastboot_test` loopback tests on Linux, Mac, and Windows 7.
Change-Id: I81d1b7ace8d864246b99f6c80b8e29f64b8aa375
2015-12-16 16:16:08 -08:00
Nick Kralevich
a8d3fdf4c6 Merge "trace-dev.c: more O_CLOEXEC" 2015-12-16 21:40:32 +00:00
Mark Salyzyn
163ebdc7cd liblog: test: pmsg overhead measurement
This test tells us that scatter-gather (writev instead of write)
carries a small ~2% penalty. Unaligned buffer carry a similar
additional penalty. On N9 it takes 3us to 22us _just_ to write
the pmsg logs, depending on size. Some assumptions about the
socket read and write performance for the main logging can be made
from tracking these results and should improve design decisions.

Bug: 18771697
Bug: 23685592
Change-Id: Id4d64c449140e4f39078c62b0097e403df91fe0c
2015-12-16 13:12:56 -08:00
Josh Gao
56d7d4e85f Merge "adb: split up reads longer than 16k." 2015-12-16 20:47:32 +00:00
Alex Vakulenko
2fcf449886 Merge "Fix metricsd to conform to the lastest server schema" 2015-12-16 20:43:54 +00:00
Nick Kralevich
dee1ef48a9 trace-dev.c: more O_CLOEXEC
Stop the file descriptors from leaking.

Change-Id: Ib5ca1c2e5031fbec8751bde9e86b32e51e10fcbc
2015-12-16 12:32:26 -08:00
Jeff Sharkey
db72fe1772 Merge "Re-derive permissions after package changes." 2015-12-16 20:28:01 +00:00
Alex Vakulenko
33c5935852 Fix metricsd to conform to the lastest server schema
The new server push enabled component/trait validation rules. This
allows us to use the new schema that does not require vendor commands,
parameters and state to start with underscore ("_").

Also fixed a few minor errors in schema definition.

Change-Id: I184dd8e4c69c05e0dd1b0dddb1f9a7b0aef78841
2015-12-16 12:23:14 -08:00
Jeff Sharkey
22b912628e Re-derive permissions after package changes.
When packages change, existing package-specific directories may have
gained/lost a UID mapping, so we need to update the permissions for
any in-memory nodes.

This allows an app to deliver data for another package before that
package is installed, which is the typical pattern of how OBB files
are delivered.

Also fix bug by re-deriving permissions when files are moved.

Bug: 25399427
Change-Id: I06f38a24ad7dee5f5099ba81429aef03208e5683
2015-12-16 13:08:29 -07:00
Josh Gao
0b19540dee adb: split up reads longer than 16k.
Reads from functionfs allocate contiguous buffers in the kernel, causing
long ones to sometimes fail because of memory fragmentation.

Bug: http://b/26206622
Change-Id: Id40753d6f29b37b5ca97c3e2fa3921f52b4242de
2015-12-16 11:40:38 -08:00
Tao Bao
0db80236f3 healthd: Track the API change of res_create_multi_display_surface().
CL in [1] changes the minui API of res_create_multi_display_surface()
(bootable/recovery/minui/minui.h). Track the change accordingly.

[1] commit b723f4f38f53a38502abb1a63165ac0749bc9cd9

Change-Id: If9684019105ff91d5ade5b69e88849af766c2a19
2015-12-16 11:38:14 -08:00
Elliott Hughes
f8d892c84a Merge "libpixelflinger: MIPS64 assembler test bug fix" 2015-12-16 18:23:49 +00:00
Elliott Hughes
ec2f506e74 Merge "Make host ashmem_create_region more robust." 2015-12-16 18:22:57 +00:00
Elliott Hughes
a48dc55f32 Merge "More idiomatic cleanup of 9f75a035713d216469f1cabfe4a65f7864e2145a." 2015-12-16 18:12:39 +00:00
Elliott Hughes
9e7893bf86 More idiomatic cleanup of 9f75a03571.
Change-Id: Id936946375d2be56ba10bf3aa5804f52cdbecc2d
2015-12-16 08:45:05 -08:00
Elliott Hughes
3918090252 Make host ashmem_create_region more robust.
Don't clobber errno if mkstemp failed, always unlink, and only count
mkstemp/ftruncate failures as real failures --- if only the unlink
fails, there's no point not using what we have.

Change-Id: I6bc788682c88651a50a6316b9ca07ba07e9fefa2
2015-12-16 08:33:52 -08:00
Nick Kralevich
57134adecb Merge "adbd: make a PR_CAPBSET_DROP error fatal." 2015-12-16 01:46:56 +00:00
Nick Kralevich
9f75a03571 adbd: make a PR_CAPBSET_DROP error fatal.
Back in 080427e4e2, we said:

  If the kernel doesn't support file capabilities, we ignore
  a prctl(PR_CAPBSET_DROP) failure. In a future CL, this could
  become a fatal error.

Make it a fatal error. With SELinux support, all devices are
required to support file capabilities.

Change-Id: I0ce0c4cb9387c42e325cbf1a63c5d82e6aab530c
2015-12-15 16:54:53 -08:00
Mark Salyzyn
7c20ab3e73 Merge "logd: simpleperf inspired optimizations" 2015-12-15 23:03:46 +00:00
Mark Salyzyn
1d9c7e728f logd: simpleperf inspired optimizations
memset is hot on log writes with too much overhead, not required.

Bug: 24444530
Bug: 23685592
Change-Id: Ibe3c83abca6774fc79a3be461f2f1585f4a9b1ff
2015-12-15 14:24:04 -08:00
Ljubomir Papuga
e0c9f2bc5a libpixelflinger: MIPS64 assembler test bug fix
Change-Id: I47f77790baabea85ee318976a2c44ab1c0c0b9cb
2015-12-15 15:23:01 +01:00
Mark Salyzyn
cdda62b2c1 logd: ro.config.low_ram set buffer size to 64K
Bug: 25792367
Change-Id: Icae85a7de70b3a71f89b2bf8c80866649f727177
2015-12-14 14:37:07 -08:00
Greg Hackmann
461a29540c Merge "cutils: trace: add DATABASE tag" 2015-12-14 21:12:52 +00:00
Elliott Hughes
efd8c3289e Merge "Share the new adb USB diagnostic code with fastboot." 2015-12-14 20:29:46 +00:00
Elliott Hughes
1b708d368f Share the new adb USB diagnostic code with fastboot.
Bug: http://b/26134129
Change-Id: Ieaf0651c7b3f8a028760982091ec63a21a5484ba
2015-12-14 10:50:21 -08:00
Dimitry Ivanov
9fb5047549 Merge "Temporary disable linker-namespaces" 2015-12-12 06:16:23 +00:00
Elliott Hughes
796ea6a65d Merge "Remove fastboot/genkey.sh." 2015-12-12 02:25:13 +00:00