Commit graph

13045 commits

Author SHA1 Message Date
Daniel Rosenberg
bbe796d231 libcutils: fs_config: Add folders normally created in init.rc
When the ramdisk is built into the system image, we need to create
those folders during the build.

Change-Id: I40881940c75e379d7599dc1f743b35fbc7cc66e8
2015-07-08 16:37:13 -07:00
Daniel Rosenberg
58458b66d4 rootdir: Create folders in Android.mk
system.img may contain the root directory as well. In that case, we
need to create some folders init.rc would during the build.

Change-Id: I157ccbebf36bee9916f3f584551704ec481ae1d1
2015-07-08 16:37:13 -07:00
Daniel Rosenberg
dc4fa7f68a Merge "Fix "adb remount" for when the root directory is in system.img" 2015-07-08 20:15:15 +00:00
Daniel Rosenberg
d6eba89f83 Fix "adb remount" for when the root directory is in system.img
When the root directory has been built into system.img, it is
mounted at /.

Change-Id: If01d12efeaa53b4ae59e801a6e9b802a9ae5882d
2015-07-08 19:36:19 +00:00
Christopher Ferris
41a0654e2a Merge "Replace all _LOG error calls with ALOGE." 2015-07-08 19:16:03 +00:00
Elliott Hughes
c9aeae2740 Merge "Fix debuggerd's gdbclient instructions." 2015-07-07 21:42:24 +00:00
Elliott Hughes
39a28c2526 Fix debuggerd's gdbclient instructions.
We improved gdbclient to make the process simpler, but didn't update
debuggerd to match.

Bug: http://b/22233857
Change-Id: If4137943f567a9e566a3ac7f485c9b1eab2c68e9
2015-07-07 14:34:39 -07:00
Elliott Hughes
913ef1ca5a Merge "Fixed a documentation error in protocol.txt" 2015-07-06 17:51:12 +00:00
Derrick Bonafilia
36da715f2f Fixed a documentation error in protocol.txt
Prior to the documentation told users to pass 0 in as
the first argument to write messages, when they should
be outting in their local-id. It is now corrected.

Change-Id: Ia2c6c84f95383baa5ca471493a29a39e5173b604
Signed-off-by: Derrick Bonafilia <dbonafilia@google.com>
2015-07-06 10:19:28 -07:00
Calin Juravle
f9fd0d5af9 Merge "Add static versions for libbacktrace and libnativebridge. Bug fixes." 2015-07-02 10:29:33 +00:00
Calin Juravle
28042b5627 Add static versions for libbacktrace and libnativebridge. Bug fixes.
Change-Id: Ic68ac15b2676e4f475330c8e7bb34e0d48783686
2015-07-02 02:09:20 +01:00
Christopher Ferris
b36b592338 Replace all _LOG error calls with ALOGE.
The debuggerd code sometimes calls _LOG(..., logtype::ERROR, ...)
and sometimes ALOGE(). Standardize on ALOGE since the _LOG message
will wind up in the tombstone in weird places, but using ALOGE
will wind up in the logcat portion of the tombstone.

Bug: 21467089
Change-Id: Ie893f5e91d45b48ef3f5864c3a714e60ac848fb3
2015-07-01 13:23:19 -07:00
Evgenii Stepanov
8c0478309e Merge "Fix ODR issues in ART." 2015-06-30 22:19:22 +00:00
Elliott Hughes
6d1e6ec36f Merge "Consistently use strerror in libutils." 2015-06-30 21:47:21 +00:00
Elliott Hughes
6ed68cc412 Consistently use strerror in libutils.
It's easier for people to debug, and side-steps the problem that errno
values differ between architectures.

Bug: http://b/17458391
Change-Id: I1db9b2cbb653839d3936b91e37e5cff02671318a
2015-06-30 10:41:15 -07:00
Evgenii Stepanov
953314fc21 Fix ODR issues in ART.
Linking against both libziparchive-host and libz-host results in
libz loaded twice (because it is also linked statically in
libziparchive).

Change-Id: Ib34eef60200a702c2d7fbca3589b324992e78eab
2015-06-29 16:27:44 -07:00
Elliott Hughes
b80ed90696 Merge "adb server: don't close stale fd when TCP transport is closed" 2015-06-29 22:32:19 +00:00
Yusuke Sato
692dc75d9f Merge "Rename ZipEntryName to ZipString" 2015-06-29 17:49:39 +00:00
Yusuke Sato
f5a59f929e Merge "Add |optional_suffix| to StartIteration()" 2015-06-29 17:04:34 +00:00
Yusuke Sato
07447544ad Rename ZipEntryName to ZipString
since the struct is now used for other purposes. Also add some
comparator functions to the struct to simplify zip_archive.cc.

This is a follow-up CL for f1d3d3b247.

Bug: 21957428
Change-Id: I60d4171eeacc561d59226d946e9eb5f9c96d80cf
2015-06-26 10:34:01 -07:00
Yusuke Sato
f1d3d3b247 Add |optional_suffix| to StartIteration()
so that PackageManagerService can iterate over files with a
specific file extension like ".so".

(cherry picked from commit a4a80693d9)

Bug: 21957428
Change-Id: I36ba3c33a8b366a65f67cb6d156067c5caca1151
2015-06-25 14:10:05 -07:00
Mark Salyzyn
3c233b36c2 Merge "logd: serialize accesses to stats helpers" 2015-06-25 15:32:29 +00:00
Mark Salyzyn
ed777e9eec logd: serialize accesses to stats helpers
Quick low-risk to resolve possible hash table corruption.
Resolved an unlikely path memory leak.

ToDo: replace lock with nested lock so no lock
      helpers are required.

Bug: 22068332
Change-Id: I303ab06608502c7d61d42f111a9c43366f184d0c
2015-06-25 07:39:24 -07:00
Elliott Hughes
1a3334f229 Merge "Fix Mac fastboot build." 2015-06-24 20:28:49 +00:00
Elliott Hughes
fbcb93abe2 Fix Mac fastboot build.
Change-Id: I516c07cee39845caaa47608604eeb30ce15f06cb
2015-06-24 13:28:24 -07:00
Elliott Hughes
9137d65e9b Merge "Improve the "device '(null)' not found" error." 2015-06-24 19:31:20 +00:00
Elliott Hughes
75d47421d0 Merge "Move fastboot's Windows code to C++." 2015-06-24 19:30:58 +00:00
Elliott Hughes
feddd582e7 Merge "Move fastboot's Mac OS code to C++." 2015-06-24 19:29:20 +00:00
Elliott Hughes
20750ad823 Move fastboot's Mac OS code to C++.
Change-Id: I4f452860a401a115b6e8349237923949f2f476d1
2015-06-24 11:17:28 -07:00
Evgenii Stepanov
2e8d31f6a1 Merge "SANITIZE_TARGET: set global ASAN_OPTIONS" 2015-06-24 17:48:54 +00:00
Elliott Hughes
c636b64e31 Move fastboot's Windows code to C++.
Change-Id: I92414594cbdbc1896402c6d950d890042f8df6cf
2015-06-24 10:48:43 -07:00
Elliott Hughes
e2d3677cc2 Improve the "device '(null)' not found" error.
Now we'll say "no devices found" if you haven't set ANDROID_SERIAL and
there's no device connected to default to.

Also clean up the relevant code a little.

Change-Id: Id254929629ce0888628d5ba8e67cd996ffbf9c8a
2015-06-24 10:36:41 -07:00
Elliott Hughes
dc80d03eab Merge "Move fastboot to C++." 2015-06-24 04:23:29 +00:00
Elliott Hughes
b3748de33f Move fastboot to C++.
Minimal conversion.

Change-Id: I32cbf125be481a8757720d10fa303c38a7fd5e38
2015-06-23 20:56:01 -07:00
Elliott Hughes
21ba889ade Merge "Ignore ro.adb.secure in user builds." 2015-06-19 20:24:19 +00:00
Evgenii Stepanov
1cbe3d944a SANITIZE_TARGET: set global ASAN_OPTIONS
allow_user_segv_handler=1 is required to run ART under ASan
detect_odr_violation=0 and alloc_dealloc_mismatch=0 suppress some of
the existing bug reports during boot.

Bug: 21951850, 21785137
Change-Id: I4d36967c6d8d936dacbfdf1b94b87fa94766bd3e
2015-06-19 11:15:51 -07:00
Nick Kralevich
d2e7f0021d Merge "init/util.cpp: don't return a negative unsigned value" 2015-06-19 03:24:17 +00:00
Nick Kralevich
d2104df69b init/util.cpp: don't return a negative unsigned value
android_name_to_id() returns -1U on error, which causes a
crash when the following clang options are enabled:

  -fsanitize=signed-integer-overflow,unsigned-integer-overflow
  -ftrap-function=abort
  -fsanitize-undefined-trap-on-error

Rather than returning a negative unsigned value (which doesn't
make a lot of sense, IMHO), return a positive unsigned value.

While we're here, add logging on decode_uid failures.

Bug: 21880301
Change-Id: I652e4c1daa07c7494cceca2b4e1656b9158f2604
2015-06-18 20:11:06 -07:00
Elliott Hughes
5cba504215 Ignore ro.adb.secure in user builds.
Require authorization by default, and remove the ability to override
that in user builds. (userdebug and eng are still free to do whatever
they want.)

Bug: http://b/21862859
Change-Id: Ibf8af375be5bf1141c1ad481eee7a59fb10a7adb
2015-06-18 10:19:30 -07:00
Elliott Hughes
53d504f00d Merge "init support for cgroups." 2015-06-17 22:20:38 +00:00
Elliott Hughes
d62f0608d9 init support for cgroups.
This adds the "writepid" option that instructs init to write the child's
pid to the given filenames (such as /dev/cpuctl/bg_non_interactive/cgroup.procs
and/or /dev/cpuset/foreground/cgroup.procs).

Bug: http://b/21163745
Change-Id: I121bb22aa208bc99c4fb334eb552fdd5bcc47c1a
2015-06-17 14:42:40 -07:00
Nick Kralevich
106f92f5c8 Merge "Revert "init: Enable LOCAL_DETECT_INTEGER_OVERFLOWS"" 2015-06-16 23:47:39 +00:00
Nick Kralevich
21d605eff5 Revert "init: Enable LOCAL_DETECT_INTEGER_OVERFLOWS"
Shamu boots, but hammerhead doesn't. Likely cause is this change.

This reverts commit 18ae44bf3d.

Bug: 21880301
Change-Id: I490816060209c15aa07c783d05fe5b141c7c9023
2015-06-16 23:35:37 +00:00
Nick Kralevich
6b27b7d608 Merge "init: Enable LOCAL_DETECT_INTEGER_OVERFLOWS" 2015-06-16 20:36:49 +00:00
Nick Kralevich
18ae44bf3d init: Enable LOCAL_DETECT_INTEGER_OVERFLOWS
Call abort() if an integer overflow or underflow occurs.
See https://android-review.googlesource.com/154831

Change-Id: Icb6bdef55a5899144351b56d683f34f5da32a88d
2015-06-15 20:37:09 -07:00
Mark Salyzyn
3a7d4b4e2a Merge "logd: missing klogd content" 2015-06-15 21:20:47 +00:00
Mark Salyzyn
ee49c6a670 logd: missing klogd content
- regression in log_strtok_r (part deux) In commit
      'logd: fix kernel logline stutter'
  2c3b300fd8 we introduced log_strtok_r.
  as a replacement for strtok_r that dealt with a problem with
  some kernel log messages. Fix is to refine definition of
  is_timestamp to not match on patterns like [0], requiring
  a single period. Another fix is to refine definition of
  is_prio to properly escape non-digit content.
- Missing content because SYSLOG_ACTION_SIZE_BUFFER with added logging
  is too short for full read of SYSLOG_ACTION_READ_ALL dropping
  initial content. Add a margin for additional 1024 bytes.
- Absolute _first_ log entry has sequence number of 1, which is
  specifically dropped, start sequence count at 1 rather than 0.
- Remove trailing space for efficiency.
- If tag exists but no content, trick into kernel logging.

Bug: 21851884
Change-Id: I0867a555a3bca09bbf18d18e75e41dffffe57a23
2015-06-15 21:19:10 +00:00
Nick Kralevich
7015b3be53 Merge "TypeHelpers.h: Don't underflow unsigned int" 2015-06-15 17:30:38 +00:00
Mark Salyzyn
c36c63c645 Merge "logd: filter on __android_log_is_loggable" 2015-06-15 14:38:06 +00:00
Mark Salyzyn
87e16036ec Merge "liblog: __android_log_is_loggable support global properties" 2015-06-15 14:32:20 +00:00