Commit graph

22017 commits

Author SHA1 Message Date
Tom Cherry
b79e076e5e init: expand arguments of services when they start
Arguments of commands are expanded based on properties if they contain
${property.name}, however this is not currently done for arguments of
services.

This patch makes it that arguments of services are expanded each time
that the service starts at the point immediately before execve().

Bug: 28788401
Change-Id: Iba581a8377e25a6478d4d2ec2e8b29e181d8640c
2016-07-13 23:54:42 +00:00
Mark Salyzyn
515f091f5e logpersist: incorporate size and buffer tunables
- Add hidden -n and -b flags that propagate to the underlying
  logcat command. Publish aliases in help as --size and --buffer.
- Add --clear for start command so it clears before starting
- shell script bloating up to deal with option validation and
  provide ERROR: and WARNING: advice.

ToDo:

- Deprecate shell script and replace with Eng and Userdebug
  only Developer Options, before it becomes too powerful
  or bloated to force us to rewrite an expendable like this
  into C++.

Bug: 28120456
Bug: 28788401
Change-Id: I0dff8acaa1e5c929454760cfa2801924956bc25d
2016-07-13 23:53:54 +00:00
Thierry Strudel
aa3a56539d Revert "logd: logcat -L takes longer causing vold to timeout."
This reverts commit c1b26acae2.

Bug: 28788401
Change-Id: I415530deb7587d1068f42971762b418b0524663c
2016-07-13 23:53:10 +00:00
Sergio Giro
83df11fe0d Revert \\\\\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325 am: 85d694cd0d am: 9b169f8baf am: fd900142f5 -s ours
am: 01799f4381

Change-Id: I083677a4d84985dc671f7f35544aa5d2dbceb59c
2016-07-13 13:27:26 +00:00
Sergio Giro
01799f4381 Revert \\\\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325 am: 85d694cd0d am: 9b169f8baf
am: fd900142f5  -s ours

Change-Id: Ib057bbfd06a34eaad78dfca4cb30847db2443353
2016-07-13 13:23:54 +00:00
Sergio Giro
fd900142f5 Revert \\\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325 am: 85d694cd0d
am: 9b169f8baf

Change-Id: Iad77367b59a282acfb5649dfe2ef561515709d0e
2016-07-13 13:16:47 +00:00
Sergio Giro
9b169f8baf Revert \\\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7 am: e059f5e325
am: 85d694cd0d

Change-Id: I83a0ee22957bd7f003196e138905264d6606c07e
2016-07-13 13:13:01 +00:00
Sergio Giro
85d694cd0d Revert \\\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33 am: c06d338ad7
am: e059f5e325

Change-Id: I5682a9b927fb31cb3d888b7f430d8ad62fcaeef3
2016-07-13 13:05:57 +00:00
Sergio Giro
e059f5e325 Revert \\\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613 am: 80473d5d33
am: c06d338ad7

Change-Id: I4ee28f7eb936464eeee476b9fedb19aa7fb96ac0
2016-07-13 13:01:47 +00:00
Sergio Giro
c06d338ad7 Revert \\\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373 am: 37826f5613
am: 80473d5d33

Change-Id: Ia5cb6e89924e69df568d633472656dd4b0c12a76
2016-07-13 12:58:09 +00:00
Sergio Giro
80473d5d33 Revert \\\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d am: 605de74373
am: 37826f5613

Change-Id: I3bc2854586879b2a7d7678516a99b7f767a3d4cb
2016-07-13 12:54:32 +00:00
Sergio Giro
37826f5613 Revert \\\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\\" am: 311002936e am: ddd0051968 am: b218b2d34d
am: 605de74373

Change-Id: Ib58bd045e59fcfcf449b346861b5427d07fba9c6
2016-07-13 12:51:06 +00:00
Sergio Giro
605de74373 Revert \\\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\\" am: 311002936e am: ddd0051968
am: b218b2d34d

Change-Id: Iced8e47993a39103aed3deafb5deb974995ecdba
2016-07-13 12:47:25 +00:00
Sergio Giro
b218b2d34d Revert \\"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\\" am: 311002936e
am: ddd0051968

Change-Id: Ia2a422c170a0d700a1d4d55ea920361689a9be8b
2016-07-13 12:44:00 +00:00
Sergio Giro
ddd0051968 Revert \"libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8\"
am: 311002936e

Change-Id: Ic21d2414fb13c14feee56403324d31b0198e10e7
2016-07-13 12:40:29 +00:00
Sergio Giro
311002936e Revert "libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8"
This reverts commit 53473c1607.

Change-Id: I27379317e08ecbd5e3b95b7ece58194838ab6c21
2016-07-13 11:47:53 +00:00
Sergio Giro
462dde07ce libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5 am: 5e4ebd02d4 am: d837e74381 am: 6025b216e4 am: a73f7e5e81 am: 79a3c84cfe am: 17cd63d00a -s ours
am: b4c163b7b1

Change-Id: Icb412f7b1881ff64fb3282b14f00e2fd5ace7e9b
2016-07-13 11:02:06 +00:00
Sergio Giro
b4c163b7b1 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5 am: 5e4ebd02d4 am: d837e74381 am: 6025b216e4 am: a73f7e5e81 am: 79a3c84cfe
am: 17cd63d00a  -s ours

Change-Id: I534bac8d62f0568471189cfc7b94afa37d00e560
2016-07-13 10:58:33 +00:00
Sergio Giro
17cd63d00a libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5 am: 5e4ebd02d4 am: d837e74381 am: 6025b216e4 am: a73f7e5e81
am: 79a3c84cfe

Change-Id: Iac2fca213ad042bdeb4812b35d7d3bb74044f71a
2016-07-13 10:06:42 +00:00
Sergio Giro
79a3c84cfe libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5 am: 5e4ebd02d4 am: d837e74381 am: 6025b216e4
am: a73f7e5e81

Change-Id: Ia2dcdfa5e373ba9bab53faf267650848370d4f93
2016-07-13 10:03:06 +00:00
Sergio Giro
a73f7e5e81 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5 am: 5e4ebd02d4 am: d837e74381
am: 6025b216e4

Change-Id: Ibf26d9f029f77f80623ac97633eb8cddbb77fe29
2016-07-13 09:59:32 +00:00
Sergio Giro
6025b216e4 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5 am: 5e4ebd02d4
am: d837e74381

Change-Id: Ie620548a78c92d2160db4395f00c6ec9f281e937
2016-07-13 09:55:54 +00:00
Sergio Giro
d837e74381 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef am: 498ffa62c5
am: 5e4ebd02d4

Change-Id: Ib2eb019edba21cd3ba3e22d745818d30c912ce62
2016-07-13 09:52:14 +00:00
Sergio Giro
5e4ebd02d4 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0 am: fd7bd2dfef
am: 498ffa62c5

Change-Id: I470fe3b20bf5b1231146c488edc98336a7d60049
2016-07-13 09:48:32 +00:00
Sergio Giro
498ffa62c5 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c am: 29ccafe5f0
am: fd7bd2dfef

Change-Id: I24df8d8b13987ea0f99be6d4e9f49d52a1c4f58b
2016-07-13 09:44:52 +00:00
Sergio Giro
fd7bd2dfef libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607 am: 41e6690d0c
am: 29ccafe5f0

Change-Id: If7c24750afcae3a4b73885b2c4fb9b99ffca5c45
2016-07-13 09:41:12 +00:00
Sergio Giro
29ccafe5f0 libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 53473c1607
am: 41e6690d0c

Change-Id: I0f7707c88684f9cc24fff878d3d3751b6025227f
2016-07-13 09:37:36 +00:00
Sergio Giro
41e6690d0c libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 53473c1607

Change-Id: I04d6546b426dfbab278491d831f8b47ec077839f
2016-07-13 09:33:58 +00:00
Sergio Giro
53473c1607 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.

(cherry picked from commit c4966a363e)
(changed code for safetynet logging due to lack of sstream and string in klp)

Change-Id: If50d59a91a13fddbff9a8fff0d3eebe57c711e93
Bug: 29250543
2016-07-12 18:39:11 +01:00
TreeHugger Robot
3f947d1c58 Merge "Remove attempt to write sched_compat_yield" into nyc-mr1-dev 2016-07-12 00:09:03 +00:00
Tim Murray
531bdd5a2c Merge "Add support for background stune group." into nyc-mr1-dev 2016-07-11 23:21:12 +00:00
Tim Kryger
f3e1f13d81 Remove attempt to write sched_compat_yield
The sched_compat_yield option was eliminated in Linux 2.6.38 by commit
ac53db596cc0 ("sched: Use a buddy to implement yield_task_fair()") and
as a result, the following error is printed to the log during boot up.

init: write_file: Unable to open '/proc/sys/kernel/sched_compat_yield':
No such file or directory"

Bug: 30034121
Change-Id: Idbdb68de0cb3ab1f67d82a4d66af880bcfdfe261
(cherry picked from commit 724dfbac70)
2016-07-11 15:22:50 -07:00
TreeHugger Robot
ac957cbd72 Merge "init.rc: Remove cpu weight set on the root cgroup" into nyc-mr1-dev 2016-07-11 22:20:22 +00:00
Tim Murray
5dcff8f2b1 Add support for background stune group.
bug 29512132

Change-Id: If8144bfee0fb30cf11f2bb26494ca5e83c11d4d7
2016-07-11 13:57:31 -07:00
Tim Murray
4b75a86858 Merge changes from topic 'stune' into nyc-mr1-dev
* changes:
  Add support for top-app stune group.
  Set stune groups from set_sched_policy.
2016-07-11 20:29:41 +00:00
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