Commit graph

22032 commits

Author SHA1 Message Date
Irina Patru
23ad7517d2 init.rc: Remove cpu weight set on the root cgroup
It isn't allowed to change the cpu.share value for the root cgroup.
See kernel commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ec7dc8ac73e4a56ed03b673f026f08c0d547f597

This fixes the following error seen in dmesg:
init: write_file: Unable to write to '/dev/cpuctl/cpu.shares': Invalid argument

BUG: 28735908

Change-Id: I5ef359fb275792f99d13d35c62499026d354f6af
Signed-off-by: Irina Patru <irina.patru@intel.com>
(cherry picked from commit c560c6310f)
2016-07-11 12:35:51 -07:00
Tim Murray
955694b657 Add support for top-app stune group.
bug 29512132

Change-Id: I41ec2dd80a469309f48dbb59fc27fbe43fcd67b3
2016-07-11 11:40:15 -07:00
Tim Murray
aa45cb85e3 Set stune groups from set_sched_policy.
bug 29512132

Change-Id: Ib4176b80787db9e7ace9468cbf670f05cc428786
2016-07-11 10:05:56 -07:00
Sergio Giro
1e61274532 system/core: using equivalent code to fix build break for win host
Error from x86_64-w64-mingw32-g++ was:
system/core/libutils/Unicode.cpp: In function ‘ssize_t utf16_to_utf8_length(const char16_t*, size_t)’:
system/core/libutils/Unicode.cpp:487:78: error: ‘std::basic_ostream<char>::__ostream_type’ has no member named ‘str’
     std::string logged_string = (std::ostringstream() << ret_difference).str();

Bug: 29250543

Test: make winsdk-tools, ran libutils_test, checked that safetynet logs appear using adb


Change-Id: I09fc1e3e0dcc4683bde987f9e23e3bb4bea8b367
2016-07-11 15:37:38 +00:00
Sergio Giro
7714abac6b Merge "libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8" into nyc-mr1-dev 2016-07-11 12:11:32 +00:00
Sergio Giro
c4966a363e libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length
is causing a heap overflow.

Correcting the length computation and adding bound checks to the
conversion functions.

Test: ran libutils_tests
Bug: 29250543
Change-Id: I6115e3357141ed245c63c6eb25fc0fd0a9a7a2bb
2016-07-11 09:46:32 +00:00
Erik Kline
3c2e2f4d5e Add UIDs for system DNS and tethering DNS
Bug: 29420831
Bug: 29881876
Change-Id: I7a48f980f0e52a3d322c4c02988d48fc6df643ca
(cherry picked from commit d63cf7d85a)
2016-07-08 17:49:40 +09:00
TreeHugger Robot
786f5def5b Merge "Switch fastboot to new A/B spec" into nyc-mr1-dev 2016-07-08 00:20:46 +00:00
Daniel Rosenberg
563fcf6f69 Switch fastboot to new A/B spec
Slots are now referred to as a and b instead
of _a and _b. For the moment, _a and _b will
still be supported. For old devices that
support A/B, they are assumed to have 2 slots.

Bug: 29643845
Change-Id: Ieab6bed7b4977d8386dcec0afa434371f54bd63f
2016-07-07 15:36:43 -07:00
Tim Murray
3a29e344b0 Update FIFO settings for new uses of FIFO.
Adjust FIFO timings as well as allow SurfaceFlinger to use FIFO.

bug 24503801

Change-Id: I2c21d4c1788777c2d0d77227bb872701b35c4ff6
2016-07-07 11:35:41 -07:00
Dan Stoza
94ededa387 NativeWindow: Add LAST_[DE]QUEUE_DURATION queries
Adds two new enums to enable querying the duration of the last
dequeue or queue operations to a Surface/ANativeWindow.

Bug: 29413700
Change-Id: Ifa16755911c4a3c013a7128dd4038d328109c32d
2016-07-01 16:07:00 -07:00
TreeHugger Robot
7f871b4249 Merge "Fix missing newline in Fastboot help." into nyc-mr1-dev 2016-07-01 04:09:14 +00:00
Srinath Sridharan
08d097adb4 Merge "Not dynamically add system-background tasks to bg_schedboost_fd." into nyc-mr1-dev 2016-06-30 21:46:22 +00:00
Srinath Sridharan
70a415f8b8 Not dynamically add system-background tasks to bg_schedboost_fd.
System-background tasks can be either in bg_schedboost_fd or fg_schedboost_fd.
It is better to set the right cgroup via init.rc and not dynamically in
set_cpuset_policy.

BUG: 29533997
BUG: 29512132
Change-Id: If5dab78eafbe2d0d03fd7fd3f36d794cb4a7645f
2016-06-30 14:38:07 -07:00
Yabin Cui
ca4cf4e4af Merge "init: use libbootloader_message." into nyc-mr1-dev 2016-06-30 21:08:30 +00:00
Yabin Cui
0b1252cca0 init: use libbootloader_message.
Bug: 29582118
Change-Id: I6285b29774a11d6dda8496c7c73e4c1d17a672bd
2016-06-29 16:44:02 -07:00
Daniel Rosenberg
3f8cacc857 Fix missing newline in Fastboot help.
Change-Id: Ib5cfa562f7655f7905002f7874dccc39aaa41837
2016-06-29 12:17:13 -07:00
Alex Light
68ab20febd Add umount call to init to unmount a filesystem
Bug: 29278988
Change-Id: Ia14ab1bcad9513688df97f7b4d9162a9ab282480
2016-06-29 17:36:13 +00:00
Alex Light
89eb689d5c Revert "Revert "Add Fastboot support for flashing secondary images""
This reverts commit 520573f2bb.

Bug: 29278988
Change-Id: I5bd2de1c1e0e6224a195b566f7dcbe383555a80a
2016-06-29 10:33:09 -07:00
Ed Heyl
d28edb60cd Merge "Revert "Add Fastboot support for flashing secondary images"" into nyc-mr1-dev 2016-06-29 12:50:46 +00:00
Ed Heyl
520573f2bb Revert "Add Fastboot support for flashing secondary images"
This reverts commit 6c98509c34.

This seems to break flashing of devices without a/b slots (most devices).

Change-Id: I235cfb29a8898920dedf7a5dbb22e2c6dc590244
2016-06-29 12:50:16 +00:00
TreeHugger Robot
df9d1770d1 Merge "Add Fastboot support for flashing secondary images" into nyc-mr1-dev 2016-06-29 03:06:26 +00:00
TreeHugger Robot
3fdcf8c3ab Merge changes I939b1e01,I8b723dda,I4acab4b5,Ibc16e93c into nyc-mr1-dev
* changes:
  Handle invalid suffix lists
  Call set_active after flashall and update
  Revert "Make fastboot flash 'B' partitions automatically."
  Revert "Fix issue where non-AB-ota devices will cause flashall to fail."
2016-06-29 01:34:09 +00:00
Daniel Rosenberg
6c98509c34 Add Fastboot support for flashing secondary images
Fastboot update and flashall will now flash secondary
images if provided, and if the --slot flag is not set
to 'all'. Also added flash-primary to preserve the
previous behavior, and flash-secondary to just flash
the secondary images.

Bug: 29278988
Change-Id: Ia870e4be55617c0eefa4e1381287f8cd14affe7e
2016-06-28 17:41:46 -07:00
Daniel Rosenberg
190d968414 Handle invalid suffix lists
Some devices will report an error string as a value
when unknown variables are queried. This can lead to
unexpected behavior, so we attempt to detect this case
by seeing if the suffix list doesn't make sense.

Change-Id: I939b1e01c40ddc05d881fd54423406db250cc8e5
2016-06-28 16:01:00 -07:00
Daniel Rosenberg
9c9a6c62e5 Call set_active after flashall and update
If the device has previously failed to boot, and the current slot is
marked as unbootable, we must call set_active to reenable the slot.

Bug: 29827625
Change-Id: I8b723dda80e246b48e5967aff4503c3d120bfb9b
2016-06-28 12:49:37 -07:00
Daniel Rosenberg
8c32da3943 Revert "Make fastboot flash 'B' partitions automatically."
This reverts commit 6c60ea8c45.
2016-06-27 16:46:50 -07:00
Daniel Rosenberg
9d6d096d0c Revert "Fix issue where non-AB-ota devices will cause flashall to fail."
This reverts commit d9ff210e63.
2016-06-27 16:46:29 -07:00
Daniel Micay
2ef8922c29 Merge \\\\\"add a property for controlling perf_event_paranoid\\\\\" into mnc-dev am: 050243df76 am: f11efb251d am: 2a311a9b38 am: 2d48c395cc
am: 34ae543dc3

Change-Id: If297c19eca6c9a1623ca157c02114e4d9302039d
2016-06-24 03:44:02 +00:00
Jeffrey Vander Stoep
34ae543dc3 Merge \\\\"add a property for controlling perf_event_paranoid\\\\" into mnc-dev am: 050243df76 am: f11efb251d am: 2a311a9b38
am: 2d48c395cc

Change-Id: I678c109987a60bfc97b44ef4a48a4d658283ca66
2016-06-24 03:41:19 +00:00
Andreas Gampe
8ccc1ad0f7 Rootdir: Add more asan.options support
Extend the asan.options file to read binary-specific configuration
from files out of /system. For early services, the system image
location is important as /data may not be available when they are
started.

Add a template that turns most sanitization off. At this point in
time, it is, however, impossible to get to a zero overhead state
after the fact. The template is meant to adapt a build after the
fact, and work around issues with LOCAL_SANITIZE := never.

Add a Make variable and rule copying the template to the path and
name expected by ASAN. Add SANITIZE_LITE to automatically add a
large set of options files.

Bug: 29498013
Change-Id: I8e9e6929a55cee3f3fa0acb377a886bfa7006c91
2016-06-23 14:45:35 -07:00
Daniel Micay
2d48c395cc Merge \\\"add a property for controlling perf_event_paranoid\\\" into mnc-dev am: 050243df76 am: f11efb251d
am: 2a311a9b38

Change-Id: I6ea7f744704405be67cf3cfa175b4142b5255e05
2016-06-23 21:10:41 +00:00
Jeffrey Vander Stoep
2a311a9b38 Merge \\"add a property for controlling perf_event_paranoid\\" into mnc-dev am: 050243df76
am: f11efb251d

Change-Id: I1c641d19b4badfc9fef73d1a11675777f6d653d5
2016-06-23 21:07:34 +00:00
Daniel Micay
f11efb251d Merge \"add a property for controlling perf_event_paranoid\" into mnc-dev
am: 050243df76

Change-Id: Ifc1f319c5d81ed9f5735468d14d7a795b836f373
2016-06-23 21:04:57 +00:00
Jeffrey Vander Stoep
050243df76 Merge "add a property for controlling perf_event_paranoid" into mnc-dev 2016-06-23 21:00:04 +00:00
Josh Gao
22cbf62602 adb: don\'t dup local socket fd.
am: 42afe2033f

Change-Id: I4499180c294a79a12d7bcacbc3d41466037570f0
2016-06-23 01:08:03 +00:00
Josh Gao
42afe2033f adb: don't dup local socket fd.
SIGHUP handling depends on the local socket fd being fully closed in
order to trigger an event on its counterpart. Release the local socket
fd inside of Subprocess when returning it to ensure this.

Bug: http://b/29565233
Change-Id: I13b17bcddf0b396a5f4880f9e410fbbf24d9370d
2016-06-22 15:57:12 -07:00
Josh Gao
a2884315f4 DO NOT MERGE: adb: use asocket\\\\\\\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411 am: dc6e14f219 am: fdf3112207 -s ours am: d389f5d186 am: 57f5c95376 am: 755ab3ed16 am: 46104a0d79 -s ours
am: 2dff6490fd

Change-Id: Ibae7110f3e755d504771227c23cd3615c3984b80
2016-06-22 18:36:36 +00:00
Josh Gao
2dff6490fd DO NOT MERGE: adb: use asocket\\\\\\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411 am: dc6e14f219 am: fdf3112207 -s ours am: d389f5d186 am: 57f5c95376 am: 755ab3ed16
am: 46104a0d79  -s ours

Change-Id: If33739a6317a8ad6f008960a5726dc6e2ce7c18c
2016-06-22 18:33:53 +00:00
Josh Gao
46104a0d79 DO NOT MERGE: adb: use asocket\\\\\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411 am: dc6e14f219 am: fdf3112207 -s ours am: d389f5d186 am: 57f5c95376
am: 755ab3ed16

Change-Id: I43718396c291ac9cb261097f7a34cfa7c1fa3725
2016-06-22 18:31:11 +00:00
Josh Gao
755ab3ed16 DO NOT MERGE: adb: use asocket\\\\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411 am: dc6e14f219 am: fdf3112207 -s ours am: d389f5d186
am: 57f5c95376

Change-Id: Ib68980c2897ba668691c76989375a5382bc8af3f
2016-06-22 18:26:13 +00:00
Josh Gao
9d35b1e07e DO NOT MERGE: adb: use asocket\\\\\\\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f am: 05d5db2534 am: 8ec6f5b46f -s ours am: f5592e174e am: d99c745c31 am: 57b4b422e3 am: 96dea5690a -s ours
am: 2a9f4e1c50

Change-Id: Ib8bcf35186fd28c506bd3d269fd90dfb76556bf2
2016-06-22 18:26:12 +00:00
Josh Gao
2a9f4e1c50 DO NOT MERGE: adb: use asocket\\\\\\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f am: 05d5db2534 am: 8ec6f5b46f -s ours am: f5592e174e am: d99c745c31 am: 57b4b422e3
am: 96dea5690a  -s ours

Change-Id: Icef5dce2b992030b3cee1269e2e46992bd063537
2016-06-22 18:23:51 +00:00
Josh Gao
57f5c95376 DO NOT MERGE: adb: use asocket\\\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411 am: dc6e14f219 am: fdf3112207 -s ours
am: d389f5d186

Change-Id: I5c106da4673571bc24e17742ab62960333507f77
2016-06-22 18:23:41 +00:00
Josh Gao
d389f5d186 DO NOT MERGE: adb: use asocket\\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411 am: dc6e14f219
am: fdf3112207  -s ours

Change-Id: I42711a1a41b8099df1b769eb1c4e1fbbd2ee78bf
2016-06-22 18:21:33 +00:00
Josh Gao
96dea5690a DO NOT MERGE: adb: use asocket\\\\\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f am: 05d5db2534 am: 8ec6f5b46f -s ours am: f5592e174e am: d99c745c31
am: 57b4b422e3

Change-Id: I14d98d1df800f6197c5eb28a45bd9fe259c844bf
2016-06-22 18:21:11 +00:00
Josh Gao
fdf3112207 DO NOT MERGE: adb: use asocket\\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours am: fb9747c411
am: dc6e14f219

Change-Id: Iac5c5b2bb07505cde1638f42d5e1ae6566a88c0b
2016-06-22 18:19:09 +00:00
Josh Gao
57b4b422e3 DO NOT MERGE: adb: use asocket\\\\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f am: 05d5db2534 am: 8ec6f5b46f -s ours am: f5592e174e
am: d99c745c31

Change-Id: I1b615a3910580ae7f78b038b18b969c196fabe1e
2016-06-22 18:18:37 +00:00
Josh Gao
dc6e14f219 DO NOT MERGE: adb: use asocket\\\\\'s close function when closing. am: 5218ad36ad am: d7e24ec999 am: a3d96cfec9 -s ours am: 45a4bca09d -s ours
am: fb9747c411

Change-Id: Ife4804a27b044aebaaefda6626adb61c241812af
2016-06-22 18:16:21 +00:00
Josh Gao
d99c745c31 DO NOT MERGE: adb: use asocket\\\\\'s close function when closing. am: 83cb3032d2 -s ours am: 420aa30c9f am: 05d5db2534 am: 8ec6f5b46f -s ours
am: f5592e174e

Change-Id: Ib220d4a778ea4e7bda44aafbbaa4911c243d7db7
2016-06-22 18:15:59 +00:00