Commit graph

13762 commits

Author SHA1 Message Date
Lee Campbell
f13b1b3139 init: Adding support to import directories
Support added so init scripts can now import directories.

BUG: 22721249
Change-Id: I02b566bfb50ea84469f1ea0c6ad205435a1df286
TEST: Tested importing a folder on arm64 emulator
2015-07-27 14:56:03 -07:00
Andreas Gampe
d75564f9b8 Logd: Handle unused variable and fields
For build-system CFLAGS clean-up.

Bug: 18632512
Change-Id: If81d6705b44e9a29f64c44c56ea633c031e831b7
2015-07-27 14:17:33 -07:00
Nick Kralevich
5f3b05ad14 Merge "init.rc: mkdir /data/anr 0775 system system" 2015-07-26 04:25:44 +00:00
Nick Kralevich
c2ea70ae6e init.rc: mkdir /data/anr 0775 system system
Ensure that /data/anr always exists. This allows us to eliminate
some code in system_server and dumpstate. In addition, this change
solves a common problem where people would create the directory
manually but fail to set the SELinux label, which would cause
subsequent failures when they used the directory for ANRs.

Bug: 22385254
Change-Id: I29eb3deb21a0504aed07570fee3c2f87e41f53a0
2015-07-25 21:06:20 -07:00
Elliott Hughes
ed21796754 Merge "Fix socket_network_client_timeout error check." 2015-07-25 01:58:57 +00:00
Elliott Hughes
bb4370f833 Merge "Turn on warnings for libcutils, fix a bug." 2015-07-25 01:56:24 +00:00
Elliott Hughes
eabe8af7e3 Fix socket_network_client_timeout error check.
Change-Id: Ia30ffc1a7815c63d247d9ba298c2fe9d7a780af2
2015-07-24 18:54:02 -07:00
Yabin Cui
8a502000d1 Merge "init: expand_props for onrestart commands." 2015-07-25 01:49:01 +00:00
Elliott Hughes
8fea1ede67 Turn on warnings for libcutils, fix a bug.
This doesn't actually spot the bug I'm about to fix, but maybe one day...

Change-Id: Ib8a2016ecd8a426f38960a05d439646255ea6cd8
2015-07-24 18:48:31 -07:00
Yabin Cui
ee53006564 init: expand_props for onrestart commands.
It is only a temporary fix. I hope the code can be moved into a member
function of class Command.

Bug: 22654233
Change-Id: I38c24fb624e54986a953f44d398b3b80c3795d24
2015-07-24 18:17:16 -07:00
Yabin Cui
699be5f669 Merge "init: do expand_props before calling the builtins." 2015-07-25 00:54:21 +00:00
Elliott Hughes
3fe6de1c39 Merge "Add a simple test for using non-ASCII paths with adb." 2015-07-24 23:07:56 +00:00
Elliott Hughes
614e0a47d3 Add a simple test for using non-ASCII paths with adb.
Bug: https://code.google.com/p/android/issues/detail?id=8185
Change-Id: If28a0ff345f44b60d6651bb36afb0bf72fe55e16
2015-07-24 15:26:46 -07:00
Yabin Cui
00ede7d262 init: do expand_props before calling the builtins.
Also switch expand_props to std::string.

Bug: 22654233

Change-Id: I62910d4f74e2b1a5bd2b14aea440767a2a8462b7
2015-07-24 15:02:19 -07:00
Elliott Hughes
239f6ac8e7 Merge "Fix Win32 adb build (for the second time today)." 2015-07-24 21:34:17 +00:00
Elliott Hughes
4f1d7b55d7 Fix Win32 adb build (for the second time today).
Change-Id: I83cb407660cd8b5ed65a80574875fe261e8a8926
2015-07-24 14:32:46 -07:00
Elliott Hughes
9dad4ec440 Merge "Clean up the locking in usb_linux.cpp." 2015-07-24 20:21:53 +00:00
Elliott Hughes
812f030477 Clean up the locking in usb_linux.cpp.
tsan complained that usb_bulk_write accesses usb_handle members outside
a lock. Fix that, but by moving everything over to C++11 locking.

Note that the old code was checking whether pthread_cond_timedwait returned
a negative value, which it will never do --- it will signal timeout (or
any other error) by returning a positive errno value. The rewrite does
what they appeared to intend to do (break out on timeout), rather than
what they actually did (keep trying forever).

Bug: http://b/22598587
Change-Id: Iab6869ffed4874143a7da97193d6b09e34cf2933
2015-07-24 12:35:50 -07:00
Elliott Hughes
2e942a4796 Merge "Fix Win32 adb build." 2015-07-24 18:36:56 +00:00
Elliott Hughes
d48dbd89c8 Fix Win32 adb build.
Change-Id: I0a07379c470b7fa7f9bdef68c17ccb7bd0bd2079
2015-07-24 11:35:40 -07:00
Yabin Cui
addf7a964b Merge "init: Let property_get return std::string." 2015-07-24 18:16:06 +00:00
Yabin Cui
74edcea90e init: Let property_get return std::string.
Bug: 22654233

Change-Id: Id6091f58432f75e966b9871256049fbe17766c10
2015-07-24 11:14:08 -07:00
Elliott Hughes
9727a6a019 Merge "Report getaddrinfo failures correctly." 2015-07-24 17:18:47 +00:00
Elliott Hughes
381cfa9a8b Report getaddrinfo failures correctly.
Also move us off the "convenience" function because you can't get useful
error reporting from it.

Change-Id: I5fcc6a6d762f5f60906980a7835f01a35045be65
2015-07-23 21:14:38 -07:00
Bertrand SIMONNET
c95440e9b6 metrics: Import protobufs from Chromium.
Instead of pulling the protobufs from chromium, copy them into
platform2/metrics/proto.
This enables us to add Chromium OS specific changes without polluting
Chromium's protobuf.

BUG=chrome-os-partner:42861
TEST=`FEATURES=test emerge-gizmo metrics` succeeds.

CQ-DEPEND=CL:286895

Change-Id: Ib919a21da6518199c29adb70c8bc27220e0dc031
Reviewed-on: https://chromium-review.googlesource.com/286943
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
2015-07-23 01:16:46 +00:00
Elliott Hughes
89cc750e9b Merge "Don't limit Windows USB reads." 2015-07-22 23:48:08 +00:00
Elliott Hughes
61ee830ec9 Don't limit Windows USB reads.
In 3d2904cdf2 we removed the code that broke
Linux USB reads into 4KiB chunks. This patch does the same for Windows. This
improves Windows "adb pull" speeds 6x in my VM. (There was no equivalent
problem with writes, so this change only affects pull speeds.)

Change-Id: If19013e5f51975f4824bf9147b7b76cebd305b96
2015-07-22 15:59:06 -07:00
Elliott Hughes
6b40d0aaa1 Merge "adb: win32: fix exec-in and exec-out to use binary mode" 2015-07-22 22:43:45 +00:00
Elliott Hughes
571c8d713c Merge "Increase size of the the adb packets sent over the wire" 2015-07-22 22:42:05 +00:00
Tamas Berghammer
3d2904cdf2 Increase size of the the adb packets sent over the wire
The reason behing this change is to increase the adb push/pull speed
with reduceing the number of packets sent between the host and the
device because the communication is heavily bound by packet latency.

The change maintains two way compatibility in the communication
protocol with negotiating a packet size between the target and the
host with the CONNECT packets.

After this change the push/pull speeds improved significantly
(measured from Linux-x86_64 with 100MB of data):

           | Old push | Old pull || New push  | New pull  |
-----------------------------------------------------------
Hammerhead | 4.6 MB/s | 3.9 MB/s || 13.1 MB/s | 16.5 MB/s |
-----------------------------------------------------------
Volantis   | 6.0 MB/s | 6.2 MS/s || 25.9 MB/s | 29.0 MB/s |
-----------------------------------------------------------
Fugu       | 6.0 MB/s | 5.1 MB/s || 27.9 MB/s | 33.2 MB/s |
-----------------------------------------------------------

Change-Id: Id9625de31266e43394289e325c7e7e473379c5d8
2015-07-22 13:06:06 -07:00
Elliott Hughes
f5b4607962 Merge "init: use init's property expansion code for mount_all" 2015-07-22 17:38:55 +00:00
Nan Liu
12df1e118a init: use init's property expansion code for mount_all
Change-Id: I3bd00c74cd126b66927eca7812943f8427009356
Signed-off-by: Nan Liu <nan.liu619@gmail.com>
2015-07-22 10:36:49 -07:00
Mark Salyzyn
3f1d7ebbc8 Merge "logd: refine is_prio" 2015-07-22 17:04:44 +00:00
Mark Salyzyn
618d0dec50 logd: refine is_prio
- Heuristics associated with translation of kernel messages to
  Android user space logs.
- Limit is_prio to 4 characters, we got false positives on hex
  values like <register contents> with no alpha chars.
- x11 and other register definitions are not valid tags, en0 is
- fix some Android coding standard issues

Change-Id: Idc3dcc53a2cb75ac38628c8ef7a5d5b53f12587a
2015-07-22 07:36:03 -07:00
Yusuke Sato
f93d42933b Stop calling fsck on shutdown by default
Instead, run the command only when sys.powerctl is set to
"shutdown,userrequested". This way, we can avoid running
fsck when shutdown is triggered due to a low power state.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Ie57c23cd25162cc2a8726f876a9ba212080105fb
2015-07-21 17:45:01 -07:00
Elliott Hughes
a5d0ca4f16 Merge "Show "(reverse)" in "adb reverse --list"." 2015-07-22 00:25:41 +00:00
Elliott Hughes
34c20bbdff Show "(reverse)" in "adb reverse --list".
Bug: http://b/17788586
Change-Id: I250a1459295ed38e8d962da8bea2a8d2f83c7ef0
2015-07-21 17:09:06 -07:00
Mark Salyzyn
93adb524bc Merge "init: Fix logging stutter" 2015-07-22 00:01:17 +00:00
Mark Salyzyn
6743dab51f Merge "init: Add additional logging levels" 2015-07-22 00:01:10 +00:00
Mark Salyzyn
636b1ebd38 init: Fix logging stutter
- Get rid of log stutter, tag (executable basename) is added by
  the logging routines

Bug: 17914575
Change-Id: If00eb1b915065fb52c9311648b7ada4c9e2696bd
2015-07-21 16:32:20 -07:00
Mark Salyzyn
692abc2b5f init: Add additional logging levels
- Add WARNING, DEBUG and VERBOSE levels

Bug: 17914575
Change-Id: Ia5ba03c164ea38fad4ab30356491741afc987116
2015-07-21 16:32:10 -07:00
Elliott Hughes
2e7c39ecf7 Merge ""adb tcpip" should require a numeric argument." 2015-07-21 23:28:39 +00:00
Elliott Hughes
19d80b878c "adb tcpip" should require a numeric argument.
Defaulting to port 0 just breaks stuff.

Bug: http://b/22636927
Change-Id: I6239900e0828e71b31171d0184c24824957c99c8
2015-07-21 16:27:46 -07:00
Elliott Hughes
3bcdaa2877 Merge "Recognize IPv6 addresses for "adb connect"." 2015-07-21 22:29:05 +00:00
Elliott Hughes
3d5f60dbba Recognize IPv6 addresses for "adb connect".
Bug: http://b/22559299
Change-Id: I32891d706b5010c38db84a056e76dd279b780f75
2015-07-21 15:25:14 -07:00
Elliott Hughes
5208d55129 Merge "adb: logging: newlines, thread ids, error code overwriting" 2015-07-21 16:45:46 +00:00
Yusuke Sato
0e3ce82b94 Merge "Use fsck.f2fs -a instead of -f for faster boot" 2015-07-21 16:06:40 +00:00
Spencer Low
8d8126a705 adb: logging: newlines, thread ids, error code overwriting
Add missing \n to uses of legacy D() macro. This should make the legacy
logging easier to read (and harder to miss important stuff).

On POSIX, use gettid() from libcutils instead of pthread_self() so that
the output shows a more reasonable number instead of a pointer value.
This should be ok since libbase's logging already uses gettid().

Win32:

Don't let the Win32 last error get overwritten by API calls after the
original error'ing API. When encountering an unknown error, log the
specific error code.

Change-Id: Ib8f72754efa7ba895d2f1cd914251fec2a1d894c
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-07-21 02:06:26 -07:00
Elliott Hughes
05418442ff Merge "Remove subproc events when ADB_HOST." 2015-07-20 22:50:25 +00:00
Daniel Rosenberg
8da23664e7 Merge "rootdir: Create cache folder in Android.mk" 2015-07-20 19:21:49 +00:00