Commit graph

8107 commits

Author SHA1 Message Date
Patrick Tjin
aac89db8a5 Scan all descriptors when checking for fastboot
For Linux, the USB code was only looking at the first
descriptor when searching for the fastboot interface
which caused some devices to not be found.

Also clarify some code by using the actual USB structures
instead of void or char pointers.

Change-Id: I9e4871c4d477ac10ba75bb17a955f176809af289
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-07-11 14:15:30 -07:00
Christopher Ferris
56cbd19b1b Merge "Fix build." 2014-07-10 20:43:44 +00:00
Christopher Ferris
3cbea9f056 Fix build.
Change-Id: Ied4adacde94ee10deb30647156f07d46a38fbe1f
2014-07-10 23:12:49 -07:00
Elliott Hughes
8098114c90 Merge "Sync with upstream grep." 2014-07-10 21:39:36 +00:00
Elliott Hughes
04650ef7f6 Sync with upstream grep.
Change-Id: Ie1da2e95ee7e3513afb87f357be983dc80cd1515
2014-07-10 19:38:01 -07:00
Elliott Hughes
7a8420ec4a Merge "fix duplicated grep usage printing" 2014-07-10 21:14:09 +00:00
Rocky Zhang
b34b1fcb2b fix duplicated grep usage printing
Change-Id: I579d2046f96ba8ae9fd0bf8f36e2e2f64da622ea
Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
2014-07-11 09:49:35 +08:00
Mark Salyzyn
755df2956f Merge "logd: test: disable kernel LOGGER" 2014-07-10 20:49:23 +00:00
Mark Salyzyn
89472df4cd logd: test: disable kernel LOGGER
Bug: 15384806
Change-Id: I3072d6dd0618fa9ebe151c78a85eb121327f9df3
2014-07-10 13:31:57 -07:00
Elliott Hughes
796fccb80d Merge "Fix environment variable assignment in init" 2014-07-10 16:05:36 +00:00
James Morrissey
381341f5f7 Fix environment variable assignment in init
The init process allows environment variables to be specified in
the rc script globally, via 'export', and for a specific process,
via the 'setenv' option.

However, the mechanism for assembling the environment simply
appended the new variable without checking whether it was already
defined, so it was not possible to overwrite an existing entry.
This patch fixes that behaviour.

Limitations and concerns:

The limit of a maximum number of 31 variables is unchanged.

Currently, most callers of "add_environment" do not check the return
value, but the function now logs the failure rather than failing
silently.

Change-Id: Ie9a68c37a0f55c5b40e904e695cd35514f67f480
2014-07-10 11:22:46 -07:00
Badhri Jagan Sridharan
77a2c22dcb Merge "adbd: adb root should terminate adbd only if it's debuggable" 2014-07-09 21:40:17 +00:00
Elliott Hughes
660ba37298 Merge "Fix arm emulator "D register out of range for selected VFP version" build failure." 2014-07-09 14:45:53 +00:00
Elliott Hughes
cb7aae167e Fix arm emulator "D register out of range for selected VFP version" build failure.
Change-Id: Ia37cb3f8ecb00a927fa3fc8b4131c158413646e7
2014-07-09 16:41:04 -07:00
Elliott Hughes
b518659848 Merge "Integrate vfp-crasher with crasher." 2014-07-09 14:45:53 +00:00
Elliott Hughes
328c3ef6e0 Merge "Fix typo in fs.h" 2014-07-09 22:27:32 +00:00
Markus Mayer
c335a3500c Fix typo in fs.h
fs.h defined _FH_H_ rather than _FS_H_

Change-Id: I710ef53e88d3601e486fde9957f6d022871d9602
Signed-off-by: Markus Mayer <code@mmayer.net>
2014-07-09 15:27:53 -07:00
Elliott Hughes
e7f18e14a9 Integrate vfp-crasher with crasher.
There's no good reason to separate "fill the integer registers with
recognizable patterns and crash" from "fill the FP registers with recognizable
patterns and crash".

Also remove the incorrect use of ARCH_ARM_HAVE_VFP_D32 rather than try to fix
it.

Change-Id: I3a4a3aca1575de5489314027ae52168997404d79
2014-07-09 12:19:32 -07:00
Nick Kralevich
c87237f5af Merge "restorecon_recursive /cache" 2014-07-08 18:09:01 +00:00
Nick Kralevich
e1695914d5 restorecon_recursive /cache
Make sure all files / directories within /cache are properly
labeled, not just the directory itself.

Addresses the following denial:

  type=1400 audit(0.0:26): avc: denied { getattr } for comm="Thread-85" path="/cache/lost+found" dev="mmcblk0p27" ino=11 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:unlabeled:s0 tclass=dir

Change-Id: I5937b30043efeb696ffaa77258b7294d20d1494e
2014-07-09 12:40:13 -07:00
Nick Kralevich
8022ce1e87 Merge "ueventd fixup_sys_perms: fixup SELinux labels unconditionally" 2014-07-07 18:07:41 +00:00
Nick Kralevich
3b4c0bda07 ueventd fixup_sys_perms: fixup SELinux labels unconditionally
Currently, the fixup code in fixup_sys_perms() scans through all
entries in uevent*.rc. If it finds a match, then it performs a fixup.
If there's no match in that file, no fixup is performed.

SELinux file labels are independently stored in /file_contexts,
with no relationship to the files in /ueventd.rc. Even when no
entries exist in ueventd.rc, we still want to fixup the SELinux
file label in /sys when a uevent message occurs.

Change-Id: I0ccb5395ec0be9282095b844a5022e8c0d8903ac
2014-07-07 11:14:59 -07:00
Mark Salyzyn
f6ef1f53ac Merge "logcat: parse failure for -n <KBsize> and -r <rotate limit>" 2014-07-07 17:50:18 +00:00
Mark Salyzyn
0b2dac4f3f logcat: parse failure for -n <KBsize> and -r <rotate limit>
Bug: https://code.google.com/p/android/issues/detail?id=72867
Change-Id: Id0c988543ecfccc5054d15d4195ef578468d50af
2014-07-07 18:04:32 +00:00
Elliott Hughes
6e141aea18 Merge "Fix sdcard's FUSE_FSYNCDIR handling." 2014-07-05 03:01:43 +00:00
Elliott Hughes
f6d6737529 Fix sdcard's FUSE_FSYNCDIR handling.
For a file the FUSE fh is a struct handle containing an int fd;
for a directory it's a struct dirhandle containing a DIR*. Fix
handle_fsync to extract the file descriptor appropriately in
both cases.

Bug: 14613980
Change-Id: I45515cff6638e27a99b849e6fc639d355dbb4d27
2014-07-08 14:38:26 -07:00
Elliott Hughes
75b7171fcb Merge "Make sdcard log to the log rather than stderr." 2014-07-08 18:09:01 +00:00
Elliott Hughes
300d564980 Make sdcard log to the log rather than stderr.
Change-Id: I9c78941184c5e364055bfac766e1e542d3c23c87
2014-07-08 13:53:26 -07:00
Elliott Hughes
dda635455f Merge "Improving maps output." 2014-07-07 18:07:41 +00:00
Brigid Smith
8606eaa770 Improving maps output.
Maps output now displays fault address location more intelligently.  If
the fault is not in a mapped region, it now shows where that address is
with respect to the other maps.

In addition, the size of the map is now printed as part of the output.

Also, crasher now supports an "mmap" option which mmaps/munmaps a region
of memory and then attempts to access it, causing a fault address in
between mapped regions that can be used to test that new part of the
maps output.

Change-Id: Ia5e1926802bdfcbbdb7857e3631ddf395ae0c5b8
2014-07-08 10:53:49 -07:00
dcashman
3fa71b8e83 Merge "Remove sshd." 2014-07-07 18:07:41 +00:00
dcashman
b4cbff47ad Remove sshd.
This may require changes to other code, such as fastbootd, which relies on this
service.  sshd is not currently, used, however, so this change will force any
such code to be changed.

Bug: 11594902
Change-Id: I07e52008290dab5825be2ad062cbe730fa7dff71
2014-07-07 23:42:15 +00:00
Nick Kralevich
5529de0fa3 Merge "logd_write: set SOCK_CLOEXEC on socket" 2014-07-03 01:32:01 +00:00
Nick Kralevich
118d1b3930 logd_write: set SOCK_CLOEXEC on socket
Socket file descriptors remain open across exec unless
SOCK_CLOEXEC is set. Enable this option, to avoid leaking
file descriptors.

See https://android-review.googlesource.com/53736 for a similar
problem with the old logging code.

Change-Id: I9e045d2291ae6680044ab86604f3ff2c55b5eaed
2014-07-02 22:30:39 -07:00
Colin Cross
09117c70f1 Merge "ueventd: allow matching symlink names when setting permissions" 2014-07-02 20:52:43 +00:00
Colin Cross
43d537e0de ueventd: allow matching symlink names when setting permissions
Change-Id: I5f6cc2a25f1236fbe2c7193b65363b7883b9ba2e
2014-07-02 13:56:55 -07:00
Sreeram Ramachandran
ab98d2e6a9 Merge "Create a data directory for netd and other network-related files." 2014-07-02 20:49:53 +00:00
Elliott Hughes
18e754eebd Merge "Fix LP64 tombstone.cpp build failure." 2014-07-08 17:33:52 +00:00
Elliott Hughes
7e775952e1 Fix LP64 tombstone.cpp build failure.
Change-Id: Id071417f56dd883e9d2e38a6f3296cb23a0352fb
2014-07-08 11:35:58 -07:00
Sreeram Ramachandran
b46efdb08e Create a data directory for netd and other network-related files.
Allows the 'shell' group (which is what dumpstate uses) to read the files in
this directory.

Change-Id: I69deb1a64d5d6647470823405bf0cc55b24b22de
2014-07-08 08:44:47 -07:00
Nick Kralevich
1aad06ddde Merge "implement LOG_EVENT_STRING" 2014-07-01 23:33:34 +00:00
Nick Kralevich
2a4d05a4e3 implement LOG_EVENT_STRING
Implement LOG_EVENT_STRING, so that native code can create new
event log entries. This is needed to support logging SELinux denials
to the event log.

Change-Id: I6a269a832bc2f5e5da6c9dbd169ed2f901b49166
2014-07-01 12:22:04 -07:00
Elliott Hughes
5a53ee0502 Merge "Remove an unused #include of <sys/_properties.h>." 2014-06-27 16:59:53 +00:00
Todd Poynor
d4d1b5045c Merge "Charger: Avoid animation while not charging DO NOT MERGE" 2014-06-30 17:43:31 +00:00
Jenny TC
9cc4ea329f Charger: Avoid animation while not charging DO NOT MERGE
At present, charging animation runs irrespective of whether charger
is connected or not. When the charger is disconnected, device not shutdown
for 10secs. Charging animation during this period should be avoided.

Change-Id: Idf8e6a11261aec2812f1ebbbdec1bd1ad769565e
Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com>
Signed-off-by: Jenny TC <jenny.tc@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
2014-06-30 18:20:34 +00:00
Elliott Hughes
11d783f1e7 Remove an unused #include of <sys/_properties.h>.
Bug: 15704351
Change-Id: I7841da7176d0638ae6737fe719cd187892bc38e6
2014-06-30 10:11:55 -07:00
Narayan Kamath
6e074c68e2 Merge "Build pixelflinger tests as native tests, not executables." 2014-06-26 21:17:59 +00:00
Ian Rogers
63a61e561d Merge "Rename __unused to __UNUSED for glibc support." 2014-06-28 00:06:36 +00:00
Ian Rogers
de8b983357 Rename __unused to __UNUSED for glibc support.
Glibc declares unused fields as __unused and so a #define for __unused causes
issues when we built against glibc on the host. Rename __unused to __UNUSED as
a workaround.
This fixed checkbuild for 64-bit host builds. Bug: 13751317

Change-Id: Ic2cd52518c16661497cc819cb3fd7f1fa5c6f0fb
2014-06-27 17:40:32 -07:00
Mark Salyzyn
0a350f4f08 Merge "debuggerd: synchronize cosmetics to internal" 2014-06-27 16:59:53 +00:00