Commit graph

12710 commits

Author SHA1 Message Date
Mark Salyzyn
f24e49ad26 Merge "logd: reduce chance of dropped 1 messages" 2015-04-30 20:22:04 +00:00
Mark Salyzyn
35173a9ac5 logd: reduce chance of dropped 1 messages
- do not time out at 1 second if drop has count of less than 4

Bug: 20334069
Bug: 20370119
Change-Id: I787cb553dfab5ed71abd6ed72b63de675f834e0c
2015-04-30 13:14:51 -07:00
Elliott Hughes
dc999df939 Merge "More fixed-length buffer removal." 2015-04-30 18:26:28 +00:00
Elliott Hughes
6452a89aa8 More fixed-length buffer removal.
Bug: http://b/20666660
Change-Id: I0c738e9fed2defed48a9cf2d0a4f7b99c08dcf3d
2015-04-30 11:25:05 -07:00
Colin Cross
03d3c5f9c0 Merge "libsparse: fix crc chunk parsing in simg_dump.py" 2015-04-30 17:25:00 +00:00
Eric Miao
4cc3978276 libsparse: fix crc chunk parsing in simg_dump.py
Change-Id: Ia5b7cedd88809b0e421a056704d25afa190470b8
2015-04-30 16:36:17 +00:00
Elliott Hughes
4f021538a6 Merge "Add missing 'else' to fix all devices showing up as "host"." 2015-04-30 05:42:45 +00:00
Elliott Hughes
3ce9575af7 Add missing 'else' to fix all devices showing up as "host".
Bug: http://b/20705355
Change-Id: I4f7830278f0c2bc87d95d148d85455b8da894645
2015-04-29 22:37:25 -07:00
Dan Albert
9616e82988 Merge "Support base::logging on Windows." 2015-04-30 01:02:31 +00:00
Dan Albert
5c19040b06 Support base::logging on Windows.
libc++ doesn't support std::mutex and friends for Windows yet, so we
just use a compatibility wrapper for now.

Change-Id: I2413d4c089e7d0fb232444043c6b772153035dab
2015-04-29 18:01:53 -07:00
Dan Albert
8076616c66 Merge "Fix gettid() on Windows." 2015-04-30 00:56:09 +00:00
Dan Albert
abdf69877b Merge "Get libbase tests working on Windows." 2015-04-30 00:51:35 +00:00
Dan Albert
c9e38959cd Merge "Print strerror instead of errno in tests." 2015-04-30 00:29:51 +00:00
Dan Albert
b3a36ca5ee Fix gettid() on Windows.
Accidentally had this all hidden by an #ifndef _WIN32 when I wrote it.

Change-Id: I3a6afefe23b799ea7aa0f9a380f5a743673096d0
2015-04-29 17:13:32 -07:00
Dan Albert
0c4b3a319d Get libbase tests working on Windows.
Tests using files from /proc still fail on Windows (obviously), but
all tests are passing when run in Wine.

Change-Id: Ie4c3ba65b642202f8fcaec73332a53bee6115fba
2015-04-29 17:11:28 -07:00
Dan Albert
850188fc04 Print strerror instead of errno in tests.
Change-Id: Ibfab1b7cd439fdb5ae19855cc700613c00d4aff8
2015-04-29 17:10:49 -07:00
Elliott Hughes
ffa0d24d09 Merge "Fix Win32 build." 2015-04-29 19:36:33 +00:00
Elliott Hughes
1b600a902c Fix Win32 build.
Change-Id: Icf2c8df99b4b88bbf85a4097731733c5795fba44
2015-04-29 12:36:06 -07:00
Elliott Hughes
4546520c81 Merge "Move __adb_error to std::string, and improve various errors." 2015-04-29 18:32:53 +00:00
Elliott Hughes
078f0fcf4c Move __adb_error to std::string, and improve various errors.
Also remove an sprintf. Also fix various bits of code that were
reporting stale adb_error values when they meant strerror.

Bug: http://b/20666660
Change-Id: Ibeb48b7bc21bb0ec30ba47889d1d671ee480e1b7
2015-04-29 11:28:37 -07:00
Dan Stoza
5d67a2c9c2 Merge "ANativeWindow: Add NATIVE_WINDOW_BUFFER_AGE query" 2015-04-29 17:21:57 +00:00
Paul Lawrence
5feefcbede Merge "Securely encrypt the master key" 2015-04-29 16:25:14 +00:00
Narayan Kamath
63177cbf7c Merge "Use base::WriteFully in zip_archive." 2015-04-29 14:44:04 +00:00
Narayan Kamath
e97e66ea7c Use base::WriteFully in zip_archive.
We're already linking against libbase but we'll have to add
a libbase dependency to every target that includes libziparchive
as a STATIC_LIBRARY dependency, given that there's no way to
express that what we want (except by adding a LOCAL_WHOLE_STATIC_LIBRARY
dependency on libbase to libziparchive but that seems bad too)

Change-Id: I294ad389a9c61a1134a7bc323da25b0004a8f1e0
2015-04-29 14:31:45 +00:00
Jeff Brown
07e07aa475 Merge "Add float support to binary event log." 2015-04-29 01:42:47 +00:00
Jeff Brown
44193d9eae Add float support to binary event log.
Bug: 20664753
Change-Id: Ib4752bd785496dab5bb4d4979d5d80f662adbdfa
2015-04-28 18:20:48 -07:00
Paul Lawrence
806d10be23 Securely encrypt the master key
Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.

Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.

This is one of four changes to enable this functionality:
  https://android-review.googlesource.com/#/c/148586/
  https://android-review.googlesource.com/#/c/148604/
  https://android-review.googlesource.com/#/c/148606/
  https://android-review.googlesource.com/#/c/148607/

Bug: 18151196

Change-Id: I6a8a18f43ae837e330e2785bd26c2c306ae1816b
2015-04-28 15:34:10 -07:00
Nick Kralevich
f0d2473735 Merge "init: remove support for disabled SELinux" 2015-04-28 20:13:56 +00:00
Nick Kralevich
d34e407aeb init: remove support for disabled SELinux
Remove support for androidboot.selinux=disabled. Running with SELinux
disabled is not a supported configuration anymore. SELinux must be
in enforcing in shipping devices, but we also support permissive for
userdebug/eng builds.

Don't try security_setenforce() if we're already in enforcing mode.
A kernel compiled without CONFIG_SECURITY_SELINUX_DEVELOP does
not have a permissive mode, so the kernel will already be enforcing
once the policy is loaded.

Bug: 19702273
Change-Id: I07525a017ddb682020ec0d42e56a2702c053bdeb
2015-04-28 13:11:07 -07:00
Paul Lawrence
2b3a493946 Merge "Revert "Securely encrypt the master key"" 2015-04-28 19:15:40 +00:00
Paul Lawrence
7ac2807546 Revert "Securely encrypt the master key"
This reverts commit 4bf1887c78.

Change-Id: Ie6d1f39de530b99b50a27ddc45bcc900a24e04b5
2015-04-28 19:15:01 +00:00
Paul Lawrence
6e8c8f542d Merge "Revert "Only run vold command when file encryption enabled"" 2015-04-28 19:14:45 +00:00
Paul Lawrence
34276a1534 Revert "Only run vold command when file encryption enabled"
This reverts commit efe190e023.

Change-Id: Ib15af9a85b0b885a388bda28511a6fc39a777264
2015-04-28 19:12:35 +00:00
Elliott Hughes
4b81659ed2 Merge "Remove strtok from adb." 2015-04-28 17:54:36 +00:00
Paul Lawrence
a71ef0d5b5 Merge "Only run vold command when file encryption enabled" 2015-04-28 15:24:10 +00:00
Elliott Hughes
8d5fa6da44 Remove strtok from adb.
Also fix android::base::Split to behave like Java, Python, and google3.

Change-Id: Ifbffd4e92950a79e7aea5d153c95fe0980648417
2015-04-27 19:42:20 -07:00
Elliott Hughes
06d2128f87 Merge "Support the full length of USB serial numbers." 2015-04-28 00:18:29 +00:00
Elliott Hughes
9309ecbcec Support the full length of USB serial numbers.
Two bugs: we couldn't report the serial number correctly if it was long
enough, and it wasn't possible to connect to a device whose serial number
was long enough to overflow a different fixed-length buffer.

Bug: http://b/20317730
Change-Id: Ic9cf3c847066449ac78069bd1718184935098ac7
2015-04-27 14:52:17 -07:00
Paul Lawrence
9234b169e6 Merge "Securely encrypt the master key" 2015-04-27 20:08:53 +00:00
Elliott Hughes
96b6415c56 Merge "Use WriteFully in debuggerd to talk to ActivityManager." 2015-04-27 19:47:30 +00:00
Greg Hackmann
ba5f10a565 Merge "libziparchive: fix clang build" 2015-04-27 17:16:25 +00:00
Greg Hackmann
d6eac24aac libziparchive: fix clang build
Change-Id: I69105a9cde05b182f65c7e574282bb4b48b66e95
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-04-27 10:14:32 -07:00
Narayan Kamath
246f8533bf Merge "Avoid mapping output to memory while writing to a file." 2015-04-27 15:16:38 +00:00
Narayan Kamath
f899bd534b Avoid mapping output to memory while writing to a file.
It's unnecessary, and causes issues when the uncompressed
output is large.

Change-Id: I99cfb3933b094c2826c7e6c6de9aab03478fcc53
2015-04-27 13:34:18 +01:00
Nick Kralevich
9c9280d863 Merge "init: get rid of the remaining double mounts" 2015-04-26 01:51:04 +00:00
Nick Kralevich
f667a3247a init: get rid of the remaining double mounts
Don't double mount /dev and its subdirectories anymore. Instead, the
first stage init is solely responsible for mounting it.

Don't have init prepare the property space. This is the responsibility
of the second stage init.

Don't have SELinux use the property space to determine how we should
be running. Instead, create a new function and extract the data we
need directly from /proc/cmdline. SELinux needs this information in
the first stage init process where the property service isn't available.

Change-Id: I5b4f3bec79463a7381a68f30bdda78b5cc122a96
2015-04-25 18:29:26 -07:00
Nick Kralevich
ccac2be8a6 Merge "init: use SELinux /dev/null if available" 2015-04-26 00:59:01 +00:00
Nick Kralevich
e34577ce1b init: use SELinux /dev/null if available
SELinux provides it's own /dev/null character device at
/sys/fs/selinux/null. This character device is exactly the same
as /dev/null, including the same major/minor numbers, and can
be used wherever /dev/null is used.

Use /sys/fs/selinux/null instead of trying to create our own
/dev/__null__ device. This moves us one step closer to eliminating
all uses of mknod() by init.

/sys/fs/selinux/null is only available once the /sys/fs/selinux filesystem
is mounted. It's not available to the first stage init, so we
still have to fall back to mknod then.

Change-Id: Ic733767ea6220a130537de33cc478ae79578ce20
2015-04-25 16:48:23 -07:00
Nick Kralevich
178299fd45 Merge "init: don't double mount /proc and /sys" 2015-04-25 23:11:27 +00:00
Nick Kralevich
f8b0743ef4 Merge "init: fix write_file checkreqprot logic error" 2015-04-25 23:09:08 +00:00