Commit graph

12403 commits

Author SHA1 Message Date
Elliott Hughes
a492f3797a Move mips/mips64 android_memset16/android_memset32 into libcutils.
Change-Id: Ia826dd872f64cc80635f50525a0c393f43ae5204
2015-04-02 11:59:22 -07:00
Elliott Hughes
27a158befa Merge "toolbox: ioctl: fix signedness on ioctl_nr" 2015-04-02 17:22:23 +00:00
Brian Carlstrom
c7cddffa14 Merge "Fix shared version of libcutils on the host to include strlcpy" 2015-04-02 07:51:10 +00:00
Brian Carlstrom
60a347fc87 Fix shared version of libcutils on the host to include strlcpy
Change-Id: Ic727508d9cfadea0050d1ccc491ee61aac1ef55a
2015-04-02 00:43:45 -07:00
Elliott Hughes
fad9b3ebb8 Merge "sdcard: Turn on noatime for fuse mounted sdcard" 2015-04-02 02:05:42 +00:00
Christopher Ferris
88628e2baf Merge "Discards frames for code within library." 2015-04-02 01:24:22 +00:00
Dan Albert
7ab2c78ee9 Merge "Revert "Disable the static libcutils tests."" 2015-04-01 23:48:06 +00:00
Dan Albert
43db1c347b Revert "Disable the static libcutils tests."
Also move them to libc++ since stlport is dead.

Bug: 18389856

This reverts commit bb28776db0.

Change-Id: Icdf9be3bc5cc40433727ff71a121b145002dda72
2015-04-01 16:45:28 -07:00
Christopher Ferris
ca09ce902c Discards frames for code within library.
When doing a local unwind, do not include the frames that come
from either libunwind or libbacktrace.

Bug: 11518609
Change-Id: I0ec8d823aebbfa0903e61b16b7e5663f3fd65e78
2015-04-01 15:58:20 -07:00
Chris Fries
4868b07931 toolbox: ioctl: fix signedness on ioctl_nr
ioctl_nr is passed signed to the kernel, but many users refer
to ioctl's in unsigned 32 bit notation.

Let's use stroll to set it, to let people specify either
negative numbers or large positive numbers.

Also improve error reporting.

Reported-By: Alex Piliev <ktnr74@motorola.com>
Change-Id: I789434895b70b051d4d5c1a5db566a1925478ef0
2015-04-01 15:46:20 -07:00
Dan Albert
3891cfef5e Merge "Link libc++_static into fs_mgr." 2015-04-01 20:27:57 +00:00
Dan Albert
bbbc634e09 Link libc++_static into fs_mgr.
Change-Id: Ic2461d3a30dbd8a22f9800a33fac27c658340b21
2015-04-01 13:26:04 -07:00
Mark Salyzyn
2215547493 Merge "logd: missing include for string.h" 2015-04-01 19:27:09 +00:00
Mark Salyzyn
4f6e51a032 Merge "package missing include for string.h" 2015-04-01 19:26:50 +00:00
Elliott Hughes
a57fb596f3 Merge "Remove no-op "capabilities"." 2015-04-01 18:37:06 +00:00
Mark Salyzyn
801bcecbb5 logd: missing include for string.h
LogCommand.cpp gets string.h inherited from
private/android_filesystem_config.h it should
not rely on this in the future. The intent is
to move fs_config function into libcutils and
thus deprecate any need for string.h in this
include file.

Bug: 19908228
Change-Id: Iaf3a77298b56efd8004300b17e9a1faafad5b08b
2015-04-01 11:18:42 -07:00
Mark Salyzyn
68ffc74e32 package missing include for string.h
package.c gets string.h inherited from
private/android_filesystem_config.h it should
not rely on this in the future. The intent is
to move fs_config function into libcutils and
thus deprecate any need for string.h in this
include file.

Bug: 19908228
Change-Id: I5db6d0a88c5b1eb9f582284e9bdd220c096ea69a
2015-04-01 11:15:37 -07:00
Paul Lawrence
27cda9a535 Merge "Revert "Revert "Adding e4crypt support""" 2015-04-01 17:40:38 +00:00
Mohamad Ayyash
6900d34ed8 Merge "Add verbose param to sparse_file_import_auto" 2015-04-01 17:34:58 +00:00
Richard Uhler
0c266ef2d7 Merge "Define atrace_* functions for both target and host." 2015-04-01 17:29:34 +00:00
Elliott Hughes
b022b8428c Remove no-op "capabilities".
This never worked, and implementing it would just be an attempt to cling to
the pre-SELinux past.

Change-Id: Iecba2affa50ee49ccf62677a607bfae95cb0aaf7
2015-04-01 10:20:52 -07:00
Christopher Ferris
9dc41d5d34 Merge "Refactor the code." 2015-03-31 21:11:36 +00:00
Stephen Hines
9c01c44bd6 Merge "Add -Wno-inline-asm to Clang flags." 2015-03-31 20:56:06 +00:00
Paul Lawrence
b8c9d273a0 Revert "Revert "Adding e4crypt support""
Fix build break caused by original change

This reverts commit 84b0bab58f.

Change-Id: I99fbd7c3d1ed92db1f546033c8493bb71a327924
2015-03-31 13:02:13 -07:00
Mohamad Ayyash
80cc1f6864 Add verbose param to sparse_file_import_auto
Change-Id: I0c5607f7aa5e964abc2031bbe71ff5c6e6ef56cc
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
2015-03-31 12:09:37 -07:00
Christopher Ferris
2c43cff01d Refactor the code.
The object hierarchy was confusing and convoluted. This removes
a lot of unnecessary code, and consolidates the BacktraceCurrent
and BacktraceThread code into BacktraceCurrent.

Change-Id: I01c8407d493712a48169df49dd3ff46db4a7c3ae
2015-03-31 10:51:44 -07:00
Mark Salyzyn
b6f38def22 Merge "run-as: bracket capability" 2015-03-31 17:41:14 +00:00
Mark Salyzyn
db5334ad03 run-as: bracket capability
- do not assume that caller has granted effective bits in capabilities
- only elevate capabilities when needed
- suppress capabilities before exec when called as shell,shell,shell
- some Android coding standard cleanup

Bug: 19908228
Change-Id: Ibe3d1c1a0fdcb54c41d7a72395e50ad749df98ce
2015-03-31 09:44:48 -07:00
Stephen Hines
035e9ba97e Add -Wno-inline-asm to Clang flags.
The latest clang (r230699) does not allow SP/PC to be declared in inline asm
lists. This is a problem for libraries that are attempting to save all
register state.

Change-Id: I1ce80530f8be85fd74e949d0c65b60080e0aaf2a
2015-03-31 09:41:24 -07:00
Tao Bao
cd153076dc Merge "adb: Add option to reboot into sideload mode in recovery" 2015-03-31 00:57:33 +00:00
Elliott Hughes
a58c0b5f12 Merge "Build init with clang." 2015-03-31 00:35:20 +00:00
Tao Bao
175b7bbfb4 adb: Add option to reboot into sideload mode in recovery
Currently it requires manual key press to enter the sideload mode. This
CL adds 'adb reboot sideload' to reboot the device into sideload mode
directly with text display on. With 'adb reboot sideload-auto-reboot',
it will reboot after the sideload regardless of the installation result,
unless interrupted by user.

Since it needs to write to /cache/recovery/command file, 'adb root' is
required before calling 'adb reboot sideload' and the one with
'-auto-reboot'.

Also it requires the matching CL in bootable/recovery.

Change-Id: Ib7bd4e216a1efc01e64460659c97c6005bbaec1b
2015-03-31 00:19:52 +00:00
Elliott Hughes
9efd95b029 Build init with clang.
Change-Id: I14d95b3fe0505dd7d7632e2eedc537f97553c715
2015-03-30 14:37:11 -07:00
Elliott Hughes
ffa85da612 Merge "Lose route to toybox." 2015-03-30 20:57:56 +00:00
Elliott Hughes
eb809351db Merge "Always unlink /dev/__kmsg__." 2015-03-30 19:12:47 +00:00
Elliott Hughes
798ec0c39d Lose route to toybox.
Change-Id: If68fa6a691478921452ebd785bd35e3ba5a8470a
2015-03-30 11:23:44 -07:00
Dan Albert
6d457fe1a8 Merge "Enable building libbase on Windows." 2015-03-30 17:47:03 +00:00
Dan Albert
b2326bd56c Enable building libbase on Windows.
We have to exclude the logging facilities for now (since we don't have
a std::mutex on Windows), but there's plenty else in here that is
worth having.

Change-Id: I6d1369e34e08ea2e88a0b1130c4462e5d35d99e2
2015-03-30 10:30:42 -07:00
Elliott Hughes
c2d9cc8576 Merge "toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)" 2015-03-30 17:18:51 +00:00
Johan Redestig
c06541912d toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)
ioctl(BLKGETSIZE) expects unsigned long
(8 bytes on 64 bit environment).

Change-Id: Ic0f1d48e1d4cb890dbf617b3eb6285425cdbf0d0
2015-03-30 10:17:29 -07:00
Elliott Hughes
934102baf8 Merge "Lose load_policy to toybox." 2015-03-28 20:35:05 +00:00
Elliott Hughes
f29940559a Lose load_policy to toybox.
Change-Id: I3ef3aab9eef8e07ee598e2559a316e2fccf7199b
2015-03-28 13:29:05 -07:00
Elliott Hughes
48402951cf Merge "Clarify a few things about bootcharts." 2015-03-28 20:22:01 +00:00
Elliott Hughes
59abac27cb Clarify a few things about bootcharts.
Make it clearer in dmesg when we're deliberately not doing
bootcharting, and explain in the documentation that the output
for init is quite misleading (and, as far as I can tell, not
within our power to fix).

Change-Id: I0b22a56f83521d64c6d176dc423c81f7ea86b23c
2015-03-28 12:12:51 -07:00
Dan Albert
8f03e3cb3d Merge "Revert "Remove the emulator special case from the "adb root" code."" 2015-03-28 19:04:40 +00:00
Dan Albert
868402e5bf Revert "Remove the emulator special case from the "adb root" code."
adb root doesn't work on the emulator, so this prevents root access
to a userdebug emulator.

Since the emulator has always been root even on userdebug builds, it
may be that adb root has never worked on the emulator.

Bug: 19974213

This reverts commit abd6773b41.
2015-03-28 19:04:15 +00:00
Elliott Hughes
6a62cac4c1 Merge "Further cleanup of the logic in device_init." 2015-03-28 18:45:45 +00:00
Elliott Hughes
56a0656ed9 Further cleanup of the logic in device_init.
Change-Id: I96e4b11894926b50792b9b7d7cfa0fe8392abef6
2015-03-28 11:26:15 -07:00
Elliott Hughes
6dbbcc57a0 Merge "Fix clang build by removing unused locals." 2015-03-28 17:57:46 +00:00
Elliott Hughes
747383649c Fix clang build by removing unused locals.
Also don't manually set FD_CLOEXEC on a socket that's always opened
with SOCK_CLOEXEC. (None of the other callers to the function do this.)

Also move locals to where they're first used to help prevent more of this
kind of breakage.

Change-Id: I1ba7cd9400f53508dffb51a2bbf9d491ae647f26
2015-03-28 10:51:23 -07:00