Commit Graph

19166 Commits

Author SHA1 Message Date
Elliott Hughes 79abeb68f2 Merge "Improve "adb install"\'s error message slightly."
am: d361582dc0

* commit 'd361582dc04063ca93d9939d0315373b10b9200f':
  Improve "adb install"'s error message slightly.
2015-12-17 22:22:33 +00: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
Jorge Lucangeli Obes f733d6acad Merge "adb: Use Minijail for privilege dropping."
am: 297a8381b5

* commit '297a8381b585ffe2a843581bb1cddd94327f9a2d':
  adb: Use Minijail for privilege dropping.
2015-12-17 19:47:05 +00: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 4692984e92 Merge "Use selinux_android_setcon() instead of setcon()"
am: 64cc0825a6

* commit '64cc0825a639bf022b052cf4fa6aa3e8d13f61b1':
  Use selinux_android_setcon() instead of setcon()
2015-12-17 10:06:03 -08:00
Tom Cherry 64cc0825a6 Merge "Use selinux_android_setcon() instead of setcon()" 2015-12-17 17:54:05 +00: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 9526f21b56 Merge "fastboot: implement UDP networking interface."
am: b6dfab03b6

* commit 'b6dfab03b6b248bf0528d5ea5d91353bf8487bc6':
  fastboot: implement UDP networking interface.
2015-12-17 00:36:53 +00: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
Jeff Sharkey 8fd865fb48 Re-derive permissions after package changes. am: f7aad11c1c
am: c22e31435d  -s ours

* commit 'c22e31435d8ae6a2bcfec44733297ea4dc1141e5':
  Re-derive permissions after package changes.
2015-12-16 22:16:08 +00:00
Jeff Sharkey c22e31435d Re-derive permissions after package changes.
am: f7aad11c1c

* commit 'f7aad11c1cc133e352333f83e3abbf323cd41ead':
  Re-derive permissions after package changes.
2015-12-16 14:02:43 -08:00
Nick Kralevich 2dda6ac98d Merge "trace-dev.c: more O_CLOEXEC"
am: a8d3fdf4c6

* commit 'a8d3fdf4c62b485073b439ed46b4814f1608f77a':
  trace-dev.c: more O_CLOEXEC
2015-12-16 21:50:01 +00:00
Nick Kralevich a8d3fdf4c6 Merge "trace-dev.c: more O_CLOEXEC" 2015-12-16 21:40:32 +00:00
Josh Gao bf2c482b56 Merge "adb: split up reads longer than 16k."
am: 56d7d4e85f

* commit '56d7d4e85f41ddeea5ca256e5a9c05f73b2f40f0':
  adb: split up reads longer than 16k.
2015-12-16 21:02:50 +00:00
Alex Vakulenko 6170653ce5 Merge "Fix metricsd to conform to the lastest server schema"
am: 2fcf449886

* commit '2fcf449886a52d47a4b57279993e59b13d3be1cb':
  Fix metricsd to conform to the lastest server schema
2015-12-16 20:59:44 +00: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
Jeff Sharkey e0e5922ec5 Merge "Re-derive permissions after package changes."
am: db72fe1772

* commit 'db72fe1772bb8e9ef72b737f231266a49a1ec042':
  Re-derive permissions after package changes.
2015-12-16 20:37:05 +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 f7aad11c1c 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:20:53 -07: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
Elliott Hughes 84ca63eef2 Merge "libpixelflinger: MIPS64 assembler test bug fix"
am: f8d892c84a

* commit 'f8d892c84a2cec5f6ac24748d966873e69227041':
  libpixelflinger: MIPS64 assembler test bug fix
2015-12-16 18:40:10 +00:00
Elliott Hughes 6ed33e5ada Merge "Make host ashmem_create_region more robust."
am: ec2f506e74

* commit 'ec2f506e741bbc9252d25f0f2ba1c24b1aa0ab7d':
  Make host ashmem_create_region more robust.
2015-12-16 18:40:04 +00:00
Elliott Hughes 14f74dae87 Merge "More idiomatic cleanup of 9f75a035713d216469f1cabfe4a65f7864e2145a."
am: a48dc55f32

* commit 'a48dc55f326937d29a791e4016f980c589612333':
  More idiomatic cleanup of 9f75a03571.
2015-12-16 18:39:58 +00: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 85ac05f480 Merge "adbd: make a PR_CAPBSET_DROP error fatal."
am: 57134adecb

* commit '57134adecbcbc988922295c466e174c04251b53a':
  adbd: make a PR_CAPBSET_DROP error fatal.
2015-12-16 01:57:14 +00: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 c895270ef2 Merge "logd: simpleperf inspired optimizations"
am: 7c20ab3e73

* commit '7c20ab3e73421e4a36c8b3a0fc0d1c49653ab51b':
  logd: simpleperf inspired optimizations
2015-12-15 23:10:22 +00: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
Alain Vongsouvanh c5d342b997 logcatd: up size from 16MB to 256MB am: 2f18b54502 am: 85c3bbed4c
am: 332291e9f1  -s ours

* commit '332291e9f1262827840cf61cfca2f9d7929d9187':
  logcatd: up size from 16MB to 256MB
2015-12-15 18:23:55 +00:00
Alain Vongsouvanh 332291e9f1 logcatd: up size from 16MB to 256MB am: 2f18b54502
am: 85c3bbed4c

* commit '85c3bbed4cb66a7829a6f9f402c89cfe15f11625':
  logcatd: up size from 16MB to 256MB
2015-12-15 17:51:47 +00:00
Alain Vongsouvanh 85c3bbed4c logcatd: up size from 16MB to 256MB
am: 2f18b54502

* commit '2f18b5450293c2360f688cd059989e36ba5a988c':
  logcatd: up size from 16MB to 256MB
2015-12-15 09:47:57 -08:00
Ljubomir Papuga e0c9f2bc5a libpixelflinger: MIPS64 assembler test bug fix
Change-Id: I47f77790baabea85ee318976a2c44ab1c0c0b9cb
2015-12-15 15:23:01 +01:00
Greg Hackmann d57d863e2e Merge "cutils: trace: add DATABASE tag"
am: 461a29540c

* commit '461a29540c01b44f07fc26ccb0d5bc7d0d92a974':
  cutils: trace: add DATABASE tag
2015-12-14 13:20:35 -08:00
Greg Hackmann 461a29540c Merge "cutils: trace: add DATABASE tag" 2015-12-14 21:12:52 +00:00
Elliott Hughes 40f80e25d3 Merge "Share the new adb USB diagnostic code with fastboot."
am: efd8c3289e

* commit 'efd8c3289ed80dbae0813b06fb283b29273bbc66':
  Share the new adb USB diagnostic code with fastboot.
2015-12-14 12:43:52 -08: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