Commit graph

10200 commits

Author SHA1 Message Date
Vince Harron
c75dac394e Merge "fix for adbd pinning CPU" into lmp-dev 2014-09-30 03:01:07 +00:00
Mark Salyzyn
7391575afd logd: in nonblocking read, sched_yield() synchronization
- sched_yield and lock synchronization in reader thread
  startup to give writer thread a chance to catch up

(cherry picked from commit f669acb018)

Bug: 17512203
Change-Id: I43cf0b4e2829b22b3ab4e537fa95ce13c76a869c
2014-09-29 11:09:22 -07:00
jgu21
b3facbfdec LibNativeBridge: Add early init & env setup
Add a method to set up /proc/cpuinfo with enough privileges. Set
up the environment for an app in InitializeNativeBridge().

Turn on -Wall for libnativebridge.

(cherry picked from commit 962eb40abb)
(cherry picked from commit ab0da5a9a6)
(cherry picked from commit 2f71cb24fa)
(cherry picked from commit 04054e28e2)
(cherry picked from commit 4390a63236)

Bug: 17671501
Change-Id: Id4f4127d82737b5e56a77175e1068ff5cea60f9d
2014-09-26 13:04:36 -07:00
Vince Harron
af436b1e10 fix for adbd pinning CPU
adbd was spinning between select & read (0 bytes) for an adb_auth
socket.  The read documentation states: "On success, the number of
bytes read is returned (zero indicates end of file)" so the code has
been modified to close the connection (like the read error case).

BUG=17419868

Change-Id: I1d8fb70c8e1876225ba8d47ea0a2b6265a7d182b
2014-09-25 21:51:15 -07:00
Andreas Gampe
8dd3ea58fd Merge "Revert "DO NOT MERGE Libnativebridge: Temporarily change back to late dlopen"" into lmp-dev 2014-09-25 21:55:34 +00:00
Andreas Gampe
25bacb3ab7 Revert "DO NOT MERGE Libnativebridge: Temporarily change back to late dlopen"
This reverts commit f00de413ed.

Bug: 17645833
Change-Id: Ie5480de9cf4da2c9167db2e6137679019a29f867
2014-09-25 21:46:56 +00:00
Jeff Sharkey
2b16bf88c7 Merge "Include reason when wiping data." into lmp-dev 2014-09-24 23:27:57 +00:00
Jeff Sharkey
d26135b34d Include reason when wiping data.
This will help us track down who requested a data wipe.

Bug: 17412160
Change-Id: I40f73d2d0f08123d2afc044a3dde485151b400d9
2014-09-24 11:46:36 -07:00
Ruchi Kandoi
301a907f28 Merge "healthd: charger: Run animation even if capacity is 0" into lmp-dev 2014-09-24 16:58:56 +00:00
Devin Kim
9b0d442385 healthd: charger: Run animation even if capacity is 0
If charger is connected and battery capacity is 0, charging animation should
run. The device would be booted up even if capacity is 0 in off-mode charging.
At that time, it would take some time to be 1 from 0 for capacity if you
use USB charger.

Bug: 17606689
Change-Id: I37e0f1b6ab0ee1f6d833882e169bf3ea06cf2399
2014-09-23 17:09:28 -07:00
Eric Laurent
f6cce347a7 audio: add HW hotword capture flag
Bug: 17575019.
Change-Id: I12c0a2e0200f3d839dfd74650724391e54ac3534
2014-09-19 17:45:18 -07:00
Paul Lawrence
40af09297f Fix charger mode on first boot of force encrypt devices
waitpid breaks whenever child status signals. Need to loop, continuing
on errno EINTR

Bug: 17515976
Change-Id: Ibb29056a38b3c90dc7904de8c6aedb5a362e511d
2014-09-16 22:14:46 +00:00
Daniel Rosenberg
81b857f3a2 Merge "fastboot: Remove tos from flashall" into lmp-dev 2014-09-16 20:08:01 +00:00
Esteban de la Canal
a5ab96eb50 74602: Fixes adb not seeing connected devices on Mac.
Every alternate time an adb server was started already connected devices were
not being seen. This was caused by opened usb connections being "stalled".
See this thread for more information: http://lists.apple.com/archives/usb/2011/Jun/msg00050.html

Change-Id: Ic35b7a66c3f14a837b960066557f44e105609dcb
Fixes: https://code.google.com/p/android/issues/detail?id=74602
2014-09-15 15:46:13 -07:00
Daniel Rosenberg
015d73ff4e fastboot: Remove tos from flashall
bug: 17498561
Change-Id: I0190c1a5ac635375404799c040e4be523fa29622
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2014-09-15 13:44:07 -07:00
Christopher Ferris
07dda6b57c Merge "Use the correct debuggerd given the tid." into lmp-dev 2014-09-13 22:31:55 +00:00
Christopher Ferris
a9fa7b87f1 Use the correct debuggerd given the tid.
On 64 bit systems, calling dump_backtrace_to_file will automatically
call debuggerd64. If the process to dump is actually 32 bit, this
creates an unrecognizable dump backtrace. Modify the code to check the
type of the process and connect to the appropriate debuggerd process.

This change refactors both the tombstone and backtrace functionality to
allow both to work properly on 64 bit systems when dealing with mixed
processes.

Bug: 17487122
Change-Id: Icf123a6f4508b1aeec073663aa1a0ceae5380aa1
2014-09-12 20:12:11 -07:00
Paul Lawrence
cf234dc7e0 Preserve errno from fsmgr_do_mount
Bug: 17358530
Change-Id: I4cd7403c0b7c4f878d6afa5199f998e6f614adb9
2014-09-11 17:31:49 -07:00
Jeff Brown
c3e6eb21b5 Merge "Move ABI: line below header when dumping stacks." into lmp-dev 2014-09-11 22:30:23 +00:00
Jeff Brown
9b12d53b1a Move ABI: line below header when dumping stacks.
Bug: 17474152
Change-Id: I66b6e7e1cbb004f7a1915a2c1515df6555fe176f
2014-09-11 14:20:04 -07:00
Jon Eklund
fcfa86403e audio.h: Add "safe speaker" device for limited-loudness use cases
Bug: 17319721
Change-Id: Ie1af5b73258f8a0009c3bc3cecb3e0e8b2262ed7
2014-09-10 15:51:48 -07:00
Andreas Gampe
4d1365b4d3 Merge "DO NOT MERGE Libnativebridge: Temporarily change back to late dlopen" into lmp-dev 2014-09-10 05:09:59 +00:00
Andreas Gampe
f00de413ed DO NOT MERGE Libnativebridge: Temporarily change back to late dlopen
Bug: 17440362
Change-Id: Ifceeecd39d4ffd948f62212ebb5280ebec9bf6ff
2014-09-10 05:09:21 +00:00
Sreeram Ramachandran
69052994fd Merge "Support resetting connections tied to any nonexistent address." into lmp-dev 2014-09-09 23:24:45 +00:00
Jeff Sharkey
228f8261fd Merge "delete_file() should force removal." into lmp-dev 2014-09-09 20:29:57 +00:00
Jeff Sharkey
41b3cfa296 delete_file() should force removal.
It's a shell command with a pty, but it's not really interactive,
so force the removal to avoid giving users dead-end prompts.

Bug: 17339227
Change-Id: Iaf5d95c49f032066aa741a711a2c45557d93c598
2014-09-09 12:38:30 -07:00
Sreeram Ramachandran
17622d09d5 Support resetting connections tied to any nonexistent address.
Bug: 15414453
Change-Id: Ibf1f052e12b88838a328148e25817a96f10d50f5
2014-09-08 23:35:52 -07:00
Andreas Gampe
41df668c7b NativeBridge: Refactor for new initialization flow
Setup becomes Load, have explicit Initialize and Unload.

(cherry picked from commit 035bd7541e)

Change-Id: I5a20de1cb68dd1802937b369b14c50c9c1031c67
2014-09-08 11:12:13 -07:00
Badhri Jagan Sridharan
97b536f1fb init.usb.rc: Change product id to for add only config
Change product id from D002 to 4EE7 when adb is the
only supported function

Change-Id: I8f6bcb9a1dc5ea6da0493a2dd730f9ac1f0bed24
2014-09-05 12:33:46 -07:00
Arseniy Antonov
3c8e92cebe Fix for parenthesis error
Added parentheses as it was suggested by compiler.
error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]

(Cherry picked from commit c3ce224c62)

Signed-off-by: Arseniy Antonov <arseniy.antonov@intel.com>
Change-Id: Ic3746d9804488411d10d460ddfda11f1fad8efef
2014-09-04 11:17:40 -07:00
Hans Boehm
cad56b6ad3 Remove android_... store_barriers and 64-bit atomics.
These are no longer used, and we want to strongly discourage future use.
Keep the 32-bit variants while there are still uses.  All users should move
to C11 or C++11 atomics.

(Resolved conflicts in atomic-...64.h with uniprocessor support
removal as in AOSP.)

Bug:16880454

Change-Id: I122b541cfd29ef4a6c932647f85d0d6a9d802061
(cherry picked from commit 9959ed9530)
2014-09-02 17:08:38 -07:00
Mark Salyzyn
6a594683ec logcat: document help tail from time
Bug: 17323719
Change-Id: Id057dde60e699c946828f4aeabedf1728b3bc877
2014-09-01 10:42:49 -07:00
Mark Salyzyn
19e8de0742 logd: simplification, return NULL instead of threadexit NULL
Bug: 16822776
Change-Id: I12133226f1b48d8fdc378dea0aadd78a4aae3da8
2014-09-01 10:42:04 -07:00
Alex Light
c692410e16 Change /dalvik-cache to be owned by root.
Bug: 16875245

(cherry picked from commit 3878ebd724)

Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66
2014-08-28 16:56:36 -07:00
Narayan Kamath
f9e4d72782 Merge "Reject zip archives with entry names containing \0." into lmp-dev 2014-08-28 11:20:35 +00:00
Andres Morales
314313a991 Move bootanim and surfaceflinger to class core
They have no dependencies on /data so can be started early.
This permits us to unmount /data while bootanimation is running,
allowing an uninterrupted first boot encryption sequence.

Bug: 17260550
Change-Id: I323fe23e8cf488d8bc136387efdd9fcea96625eb
2014-08-26 20:09:10 +00:00
Piotr Jastrzebski
0c1b894b69 Reject zip archives with entry names containing \0.
There should never be a need of an entry name with \0 character.

Bug: 16162465

(cherry picked from commit 78271ba97b)

Change-Id: I68c72fb45e8ec70eb125cfc887488bc18ba5447d
2014-08-26 13:48:44 +01:00
Paul Lawrence
a005e7795e Merge "Enable not rebooting during default encryption" into lmp-dev 2014-08-25 20:28:36 +00:00
Paul Lawrence
c23074f386 Enable not rebooting during default encryption
Need to not set this property) during mount, since it can't
be changed later (ro property)

Also no reason to start class main on encryption cycle - we'll
show surfaceflinger, which is enough UI for this short cycle.

Bug: 17041092
Change-Id: Ica5339c54e45716d0fe20e23c0ab857f388d23ed
2014-08-25 19:24:10 +00:00
Andreas Gampe
4089cda0ae Merge "NativeBridge: Tighten security on libnativebridge" into lmp-dev 2014-08-22 04:56:44 +00:00
Andreas Gampe
cd2ef4c1af NativeBridge: Tighten security on libnativebridge
Do not allow arbitrary paths for the native bridge - only allow
simple names.

Do not allow re-setup of the native bridge.

Bug: 16404669
Change-Id: Ie22de356d2307fe2758f9094a85d44e61a4098a1
2014-08-21 14:33:44 -07:00
Colin Cross
0b12f0a7d6 Merge "processgroup: close directories opened by removeAllProcessGroups()" into lmp-dev 2014-08-20 20:15:45 +00:00
Colin Cross
c15dd04470 processgroup: close directories opened by removeAllProcessGroups()
removeAllProcessGroups and removeUidProcessGroups were calling
opendir, but never called closedir.  This would leave a leaked
file descriptor for every /acct/uid_* directory that existed
at boot.

Change-Id: Ia08eccd42d6ad7a6c1c78402519ac2e53b4fc83a
2014-08-20 14:11:13 -07:00
Igor Murashkin
6ba555f2ad Merge "libutils: Don't segfault ProcessCallStack when getting thread name fails" into lmp-dev 2014-08-19 22:53:25 +00:00
Igor Murashkin
63fbdb6440 libutils: Don't segfault ProcessCallStack when getting thread name fails
There's an inherent race in trying to read out the thread name from
the system and the thread closing out on its own (and thus being removed
from procfs).

Try to handle this by formatting the thread name unconditionally with
the tid when getting the thread name fails (instead of dereferencing
NULL and crashing).

Bug: 15406837
Change-Id: Ibf2208b8ce345589e7e9c57e6a307728d1121c5d
2014-08-19 11:48:52 -07:00
Todd Poynor
342a2264b9 healthd: charger: fix check for charger connected to enter suspend
Logic for this check was inadvertently reversed when porting this from
the charger daemon to healthd.  Request suspend if a charegr is connected,
else stay out of suspend waiting for a charger connect or power off if
none.

Bug: 17112463
Change-Id: Iffdb6dbcd0d0a2a614ff8f50bf5f2e22e1ad552f
2014-08-18 14:32:14 -07:00
Robert Greenwalt
82b76249fb Remove obsolete tcp buffer size system properties.
Change-Id: If6fb6fdcf8975e6102e84594ee3f64a5be6166f6
2014-08-17 15:17:00 -07:00
Dan Albert
3e3fbc4d73 Merge "Update for public android_set_abort_message()." into lmp-dev 2014-08-16 04:32:18 +00:00
Dan Albert
c68fedce06 Update for public android_set_abort_message().
Since android_set_abort_message() is quite helpful to the platform, it's
becoming promoted to a real header with a non-private name.

Bug: 17059126
Change-Id: I3ed12b66eb07f3a6a08366d5eee147809d9a3ce9
(cherry picked from commit 4047075da6)
2014-08-19 10:39:46 -07:00
Jeremy Compostella
a42adff905 fastboot: add the support of the second stage image [DO NOT MERGE]
The AOSP bootimage format allows the use of a second stage image
however the fastboot boot and flash:row commands do not allow the
"secondstage" optional argument.  This patch adds the support of this
argument for both commands.

Change-Id: I00403a95d7460a00233841ba0fe0e8a69d78c7b4
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2014-08-15 21:21:09 -07:00