Commit graph

5706 commits

Author SHA1 Message Date
Rom Lemarchand
fb3280886d Merge "toolbox: swap utils" 2013-07-02 02:07:10 +00:00
Rom Lemarchand
622810ceff fastboot: add support for sparse images in flashall and update
Change-Id: I66a73b16a988a65fc91fb22a26d11986025089de
Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-07-01 12:42:58 -07:00
Rom Lemarchand
c9cce4b981 fastboot: Remove legacy MINGW workarounds
The version of MINGW we compile with has more advanced POSIX support.
Removing legacy MINGW workarounds as those are not needed anymore.

Change-Id: Id5d67176b719db6c3667be6d63c41432e0ba9f30
Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-06-28 17:00:41 -07:00
Nick Kralevich
1d932e2bc6 Merge "init: allow disabling selinux via a kernel command line" 2013-06-28 20:02:00 +00:00
Nick Kralevich
4838aa1b7b init: allow disabling selinux via a kernel command line
Create a new "androidboot.selinux" option, to control how userspace
handles SELinux. This kernel command line can have three options:

* disabled
* permissive
* enforcing

"disabled" completely disables userspace support for SELinux. No
policy is ever loaded, nor is the SELinux filesystem /sys/fs/selinux
ever mounted.

"permissive" loads the SELinux policy, but puts SELinux into
permissive mode. SELinux policy violations are logged, but not rejected.

"enforcing", the default, loads the SELinux policy, and places
SELinux into enforcing mode. Policy violations are rejected.

This change addresses post review comments for change
b710ed21de .

Change-Id: I912583db8e6a0e9c63380de32ad8ffc47a8a440f
2013-06-28 12:05:07 -07:00
Eric Laurent
f519c04d28 Merge "Add defines for audio offload and non-blocking write" 2013-06-28 17:47:23 +00:00
Ken Sumrall
cf0b4d94fa Merge "Do not exit early on errors when -f is specified" 2013-06-28 02:47:01 +00:00
Ken Sumrall
3b2b2b5137 Merge "Update the touch command to take a human readable timestamp" 2013-06-28 02:46:09 +00:00
Richard Fitzgerald
05529a1a10 Add defines for audio offload and non-blocking write
- Defines audio output flags for offloaded playback of compressed
    streams, and non-blocking HAL write()/drain()
- Adds audio_offload_info_t to pass additional information about a
    compressed stream when offloading

Change-Id: I4592d0877edd39e68d0c1035d0652adbd397bf3a
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
2013-06-27 17:16:25 -07:00
Ken Sumrall
0354829763 Do not exit early on errors when -f is specified
When running with the -f option, do not stop recursion or proccessing
command line args if an error occurs.  Continue trying to remove all
the items specified on the command line.  However, still return an
error status if some files could not be removed.

Change-Id: I83d66babe833da8a68aad68248647ba0601c5d32
2013-06-26 17:42:38 -07:00
Ken Sumrall
13495a1cbb Update the touch command to take a human readable timestamp
Now the -t option to the toolbox touch command takes a timestamp
in the form of YYYYMMDD.hhmmss

Change-Id: I3812700edaa1a06590a07c15b050721b49e9b7e0
2013-06-26 17:42:25 -07:00
jp abgrall
eecf40fce8 Merge "Revert "fastboot: add preflash command to help with large downloads+flash"" 2013-06-26 03:54:57 +00:00
jp abgrall
88e8f61a9e Revert "fastboot: add preflash command to help with large downloads+flash"
This reverts commit 6f1cd0b2ad.

It causes some devices to fail (b/9581613). Revert for now.

Change-Id: I076158c704c2b4f0459322aa157c19ebd0c4615f
2013-06-26 03:51:29 +00:00
Colin Cross
2a25ca0a24 am b1e3bb27: am b1a9f8cf: resolved conflicts for merge of b6c60285 to stage-aosp-master
* commit 'b1e3bb2798bb6002b186081d9b0234bdfa432a14':
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-25 16:30:35 -07:00
JP Abgrall
95b8790717 Merge "fastboot: add preflash command to help with large downloads+flash" 2013-06-25 22:18:21 +00:00
Nick Kralevich
cbc76fcadb Merge "init: move SELinux into enforcing mode." 2013-06-25 21:08:56 +00:00
Rom Lemarchand
367297c3d7 toolbox: swap utils
Add swap utilities (mkswap, swapon, swapoff) to the toolbox

Change-Id: If5ed6981670a1cdda6b528b587dbc1be7ccdf832
Signed-off-by: Rom Lemarchand <romlem@google.com>
2013-06-25 13:21:53 -07:00
JP Abgrall
6f1cd0b2ad fastboot: add preflash command to help with large downloads+flash
Without the partition name, the bootloader would have to store all
of the data until the next flash command, which potentially wastes
time.
To help the bootloader deal with the data more efficiently, we now
issue a flashing hint ("preflash:%s", partname).
"preflash:" is used to indicate that the following download
should ignore any previous "preflash:%s".

Bug: 6045918
Change-Id: I4e9708f64f28a4781bde14eb3714d36b281ec5be
2013-06-25 11:52:05 -07:00
Nick Kralevich
b710ed21de init: move SELinux into enforcing mode.
When init starts up, immediately put SELinux into enforcing mode.

This is currently a no-op. We currently have everything in the
unconfined domain, so this should not break anything.
(if it does, I'll roll it back immediately)

If the kernel doesn't have SELinux support compiled in, then
don't try loading a policy and continue without SELinux protections.

Change-Id: Id0279cf82c545ea0f7090137b7566a5bc3ddd641
2013-06-25 11:23:29 -07:00
Colin Cross
25383a5da2 am 372d668a: am 39021a48: am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '372d668a279934ff3b2ec2f07a76fe2f351789d5':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-25 05:59:40 -07:00
Colin Cross
b1e3bb2798 am b1a9f8cf: resolved conflicts for merge of b6c60285 to stage-aosp-master
* commit 'b1a9f8cf4b15a861ab998a4c5f0c69068f22c62a':
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-24 17:22:56 -07:00
Colin Cross
b1a9f8cf4b resolved conflicts for merge of b6c60285 to stage-aosp-master
Change-Id: I5afba55b668065499fa28369cf217d4f5eafab4a
2013-06-24 17:19:43 -07:00
Colin Cross
b6c6028594 Merge changes Ieb94caab,I762da21e
* changes:
  init: move initial property area allocation into bionic
  property_service: make /dev/__properties__ readable
2013-06-25 00:07:54 +00:00
Colin Cross
372d668a27 am 39021a48: am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '39021a48a0e0687c654423acd5a4c99a1d79440d':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 15:27:43 -07:00
Colin Cross
39021a48a0 am 83ada447: Merge changes Ib54f39fd,I7e36edd8
* commit '83ada447aed69dfcd0a88e952eced8db1e4d6584':
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 15:24:57 -07:00
Colin Cross
83ada447ae Merge changes Ib54f39fd,I7e36edd8
* changes:
  init: Retain traditional restart behavior for critical and oneshot services.
  init: Safely restart services to avoid race conditions.
2013-06-24 22:23:32 +00:00
Greg Hackmann
2baad52520 init: move initial property area allocation into bionic
bionic's __system_property_add() now expands the property area as needed
by mapping in more pages.  Rather than duplicate the mapping code, move
it inside bionic and have bionic's __system_property_area_init() set up
the first page.

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit f14eef0c3c)

Change-Id: Ieb94caab1527c71f2155efe3795490b0ea215a29
2013-06-19 12:26:31 -07:00
Nick Kralevich
26f2d2f519 property_service: make /dev/__properties__ readable
Currently, system properties are passed via the environment
variable ANDROID_PROPERTY_WORKSPACE and a file descriptor passed
from parent to child. This is insecure for setuid executables,
as the environment variable can be changed by the caller.

Make the /dev/__properties__ file accessible, so an app can
get properties directly from the file, rather than relying on
environment variables.

Preserve the environment variable for compatibility with pre-existing
apps.

Bug: 8045561

(cherry picked from commit 7ece0a862c)

Change-Id: I762da21ef4075f288745efed0ec7d16c2b71303c
2013-06-19 12:26:28 -07:00
Greg Hackmann
62362e1a64 Merge "init: move initial property area allocation into bionic" 2013-06-19 18:25:46 +00:00
Colin Cross
856d1dcecd am 9270f125: am a44c31cc: am e755dfd4: Merge changes I1db3137b,I0f66144e
* commit '9270f12529fdcadaacd9d2bce3ceeeb07d037aa8':
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 10:37:30 -07:00
Colin Cross
9270f12529 am a44c31cc: am e755dfd4: Merge changes I1db3137b,I0f66144e
* commit 'a44c31cc91bce7124e896adb072a10f2740a96b4':
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 10:35:33 -07:00
Colin Cross
a44c31cc91 am e755dfd4: Merge changes I1db3137b,I0f66144e
* commit 'e755dfd43812ebd9a0d0d6a2106316f343ffb5a2':
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 10:33:42 -07:00
Colin Cross
e755dfd438 Merge changes I1db3137b,I0f66144e
* changes:
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 17:32:06 +00:00
Nick Kralevich
e3662ea706 Merge "debuggerd: Ignore SIGPIPE" 2013-06-19 15:35:36 +00:00
Greg Hackmann
68e9b6bc94 toolbox: reimplement watchprops using __system_property_foreach()
Internally, replace the watchlist array with a hashmap since the array
assumes properties are enumerated in a consistent order and foreach()
probably won't.  (find_nth() never guaranteed this either but it usually
worked in practice.)

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit 389e358017)

Change-Id: I1db3137b130474f4bb205f01f0bdcf37cf974764
2013-06-18 19:26:28 -07:00
Greg Hackmann
6967935eb3 libcutils: reimplement property_list() using __system_property_foreach()
Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit e7bb159d16)

Change-Id: I0f66144eb8a4a48e04e4fcd125ad37f19ad94b8e
2013-06-18 19:26:27 -07:00
Nick Kralevich
96bcd488c2 debuggerd: Ignore SIGPIPE
The system server may prematurely close the connection to
/data/system/ndebugsocket if it's not interested in the data
from debuggerd.  If it does so, we don't want to die due to a
SIGPIPE.

Change-Id: Iaef1f497bcd630144e6df6a06644a3293b85b6e0
2013-06-18 17:57:08 -07:00
Greg Hackmann
f14eef0c3c init: move initial property area allocation into bionic
bionic's __system_property_add() now expands the property area as needed
by mapping in more pages.  Rather than duplicate the mapping code, move
it inside bionic and have bionic's __system_property_area_init() set up
the first page.

Change-Id: If9917d5f775c1a82eb89be55b84635395145ca49
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-06-18 16:37:54 -07:00
Greg Hackmann
389e358017 toolbox: reimplement watchprops using __system_property_foreach()
Internally, replace the watchlist array with a hashmap since the array
assumes properties are enumerated in a consistent order and foreach()
probably won't.  (find_nth() never guaranteed this either but it usually
worked in practice.)

Change-Id: I83843facdd671edd09652edf472e88ec3d1edd3b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-06-18 16:37:54 -07:00
Greg Hackmann
e7bb159d16 libcutils: reimplement property_list() using __system_property_foreach()
Change-Id: I273fbf7151908ee57b9b951e7d8c5f4925bbc109
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2013-06-18 16:37:54 -07:00
Nick Kralevich
f5d79aa4bb Merge "Don't use __attribute__(__error__)" 2013-06-18 20:23:29 +00:00
Nick Kralevich
bda25e4ed5 Don't use __attribute__(__error__)
__attribute(__error__) isn't supported on clang, and generates
compiler warnings. Use __errordecl instead, which does the right thing
for different compilers.

Change-Id: Ifb0797a5de703cc5b3c39dcd97bcfaf404f1cafa
2013-06-18 12:14:47 -07:00
Elliott Hughes
228ee639be am 98c02528: am 19188955: am d92e35eb: Merge "Add Qisda usb config"
* commit '98c02528a2f8bdc0f31a78a8b0b086f4ae823310':
  Add Qisda usb config
2013-06-18 11:37:47 -07:00
Elliott Hughes
98c02528a2 am 19188955: am d92e35eb: Merge "Add Qisda usb config"
* commit '19188955b50ef6cb133780f66384e9fa055acfac':
  Add Qisda usb config
2013-06-18 11:35:46 -07:00
Elliott Hughes
19188955b5 am d92e35eb: Merge "Add Qisda usb config"
* commit 'd92e35eb7b97f349054390cfee1d40154dba6d66':
  Add Qisda usb config
2013-06-18 11:32:58 -07:00
Elliott Hughes
d92e35eb7b Merge "Add Qisda usb config" 2013-06-18 18:30:39 +00:00
esther
001fe87e02 Add Qisda usb config
add Qisda usb config
Signed-off-by: esther <esther530@gmail.com>

Change-Id: I5b8a0e5bd2218ecdf417de357c9a7d9307c91932

Conflicts:
	adb/usb_vendors.c
2013-06-18 11:28:08 -07:00
Stephen Hines
da4c1d141a Merge "Set ATRACE_ENABLE() to '0' if not availble" 2013-06-18 01:50:34 +00:00
Tobias Grosser
9ede33233f Set ATRACE_ENABLE() to '0' if not availble
Change-Id: Iec61d275cd7b2be65f828c282f97cc59adf4cc0b
2013-06-17 18:38:02 -07:00
Colin Cross
755ced8064 am 44d1f3c7: am 99c1a416: resolved conflicts for merge of 95a41f6b to stage-aosp-master
* commit '44d1f3c703015b065f009604907033aac8bedf32':
  init: fix copying boot properties
  toolbox: hide property implementation from watchprops
  init: verify size of property buffers passed to property_get
  init: move the system property writer implementation
  init: switch property_get to use __system_property_get
2013-06-17 18:26:18 -07:00