Commit graph

6392 commits

Author SHA1 Message Date
Todd Poynor
c7464c9150 healthd: move Android communication code to separate source
* add ops for different "modes" of healthd operation: android vs. recovery
* recovery mode selected by runstring options -r
* binder/Android communication moved to android mode
* recovery mode ops avoiding binder service registration
* "no service manager" flag removed; now handled by android vs. other modes

Change-Id: I3d8c89bf96a18a6a00cc85306f9a07d3f408f2a0
2013-09-17 14:41:07 -07:00
Todd Poynor
98c23d82f0 healthd: add register event interface
Facilitates registering events from external source files.

Add epoll events param to callbacks.

Change-Id: Icf8fb0c62af11453cbcc92877ff2c3bc03b9bb1b
2013-09-17 14:41:07 -07:00
jp abgrall
9256bd4670 am e6e5daac: am edeed28b: am 4a280e3d: Merge "Don\'t use control requests to read device serial numbers."
* commit 'e6e5daace55672b1ec8fb6c5c17a85ee1531f7ad':
  Don't use control requests to read device serial numbers.
2013-09-17 14:20:31 -07:00
jp abgrall
e6e5daace5 am edeed28b: am 4a280e3d: Merge "Don\'t use control requests to read device serial numbers."
* commit 'edeed28bd397f863686ba3e5bb7479f881efc657':
  Don't use control requests to read device serial numbers.
2013-09-17 14:17:44 -07:00
jp abgrall
edeed28bd3 am 4a280e3d: Merge "Don\'t use control requests to read device serial numbers."
* commit '4a280e3dbe002bb5419ec010f89cdc158244e435':
  Don't use control requests to read device serial numbers.
2013-09-17 14:16:42 -07:00
jp abgrall
4a280e3dbe Merge "Don't use control requests to read device serial numbers." 2013-09-17 21:15:12 +00:00
Todd Poynor
7b27f27d3d healthd: break link between BatteryMonitor and BatteryPropertiesRegistrar
Make it easier to later separate out binder-related code.

Add helper functions healthd_battery_update(), healthd_get_property() to
allow these operations without needing references to the BatteryMonitor
object.

Change-Id: Ie584bf53e5178ce0a098d0d940d6c311fdff62d4
2013-09-17 11:18:36 -07:00
Mark Wachsler
bd446c76f3 Don't use control requests to read device serial numbers.
Instead of sending control requests to all devices to read their serial
numbers, read the cached strings from sysfs. This fixes two problems:
1) The control requests sometimes timed out, causing devices to show up
as "????????????????", and 2) a control request could mess up devices
which were in the middle of being flashed.

Also enumerate by walking sysfs rather than devs so that we can avoid
opening host controller devices, which can be slow. On a system with 10
EHCI controllers, fastboot devices now takes 7 msec instead of 700 msec.

Change-Id: I2ad2d58b48268d7950bd279fd6a6753dc2f79514
2013-09-16 18:08:07 -04:00
Nick Kralevich
c2c5a2410a property_service: address comments from previous review.
Address post-submit comments from
6946361421

Bug: 10733330
Change-Id: I7c652f7ef0379536df48b9478a2362f1bfd252fe
2013-09-16 11:32:37 -07:00
Nick Kralevich
db3f6ef829 am b453a9aa: am 3a0d4b34: Merge "property_service: better validate property names" into klp-dev
* commit 'b453a9aa1d6f0b2ac624583938202983ad25673b':
  property_service: better validate property names
2013-09-16 10:34:21 -07:00
Nick Kralevich
b453a9aa1d am 3a0d4b34: Merge "property_service: better validate property names" into klp-dev
* commit '3a0d4b34816d65e21951f44e4d98a954c5c855ae':
  property_service: better validate property names
2013-09-16 10:31:12 -07:00
Nick Kralevich
3a0d4b3481 Merge "property_service: better validate property names" into klp-dev 2013-09-16 17:27:43 +00:00
Nick Kralevich
6946361421 property_service: better validate property names
Don't allow unexpected characters in property names.
Don't allow double dots in property names.

Bug: 10733330
Change-Id: I8d69740d697efb791f2f201f90989576e13bac81
2013-09-16 09:05:29 -07:00
Rom Lemarchand
f94c6be721 am 5c0e6410: am c0ce002a: Merge "Initial libmemtrack" into klp-dev
* commit '5c0e6410d04c60fba043a68ffc9ae58c302a32bd':
  Initial libmemtrack
2013-09-13 16:10:51 -07:00
Rom Lemarchand
5c0e6410d0 am c0ce002a: Merge "Initial libmemtrack" into klp-dev
* commit 'c0ce002ae53613f622c3bb2cae258a779e22770c':
  Initial libmemtrack
2013-09-13 13:20:54 -07:00
Rom Lemarchand
c0ce002ae5 Merge "Initial libmemtrack" into klp-dev 2013-09-13 18:24:42 +00:00
Dima Zavin
3e9d7c726f am 96957080: am 56b93693: am 6ed51b8a: Merge "mkbootimg: support longer kernel command lines"
* commit '969570804cdf7636bd405de9142c2d487e71384c':
  mkbootimg: support longer kernel command lines
2013-09-13 09:48:17 -07:00
Dima Zavin
969570804c am 56b93693: am 6ed51b8a: Merge "mkbootimg: support longer kernel command lines"
* commit '56b93693fa6e3c470ba48047839555ba23d6a947':
  mkbootimg: support longer kernel command lines
2013-09-13 09:45:35 -07:00
Dima Zavin
cfea27aeb1 am e4e7fef1: am 5951a369: am b4819e4a: Merge "init: support longer command lines"
* commit 'e4e7fef1bc19ce83a6076eca65fa1a2f6eac862e':
  init: support longer command lines
2013-09-13 09:44:57 -07:00
Dima Zavin
e4e7fef1bc am 5951a369: am b4819e4a: Merge "init: support longer command lines"
* commit '5951a3691eb0378ec65ea2e6a2e2fe77d24c5e55':
  init: support longer command lines
2013-09-13 09:42:10 -07:00
Dima Zavin
56b93693fa am 6ed51b8a: Merge "mkbootimg: support longer kernel command lines"
* commit '6ed51b8a2d6c64a44b58230a0b53a109169edd1a':
  mkbootimg: support longer kernel command lines
2013-09-13 09:42:09 -07:00
Dima Zavin
5951a3691e am b4819e4a: Merge "init: support longer command lines"
* commit 'b4819e4adaee86884725754d4966c7b78a61fb11':
  init: support longer command lines
2013-09-13 09:38:47 -07:00
Dima Zavin
6ed51b8a2d Merge "mkbootimg: support longer kernel command lines" 2013-09-13 16:37:47 +00:00
Dima Zavin
b4819e4ada Merge "init: support longer command lines" 2013-09-13 16:36:24 +00:00
Kenny Root
0ddfe115b5 Use canonical UniquePtr.h file
Change-Id: I88b51b76120a83d2165d44421f29bcb5fd6d62a2
2013-09-11 23:41:23 -07:00
Eric Laurent
d28cd13371 am d9c0642c: am 53dc297d: Merge "Add HOTWORD audio source to audio.h" into klp-dev
* commit 'd9c0642c6e3430c90492a1b0c9be435e9cc7b5a9':
  Add HOTWORD audio source to audio.h
2013-09-11 17:25:01 -07:00
Eric Laurent
d9c0642c6e am 53dc297d: Merge "Add HOTWORD audio source to audio.h" into klp-dev
* commit '53dc297dd685aa7498203fddb3f85e60f2cbc7df':
  Add HOTWORD audio source to audio.h
2013-09-11 17:17:46 -07:00
Eric Laurent
53dc297dd6 Merge "Add HOTWORD audio source to audio.h" into klp-dev 2013-09-12 00:14:37 +00:00
Rom Lemarchand
8d0a92ddc5 am 342077e7: am 67b00d8b: init.rc: change mem cgroups permissions
* commit '342077e78da9411c252232313bc40fb4ce5f6137':
  init.rc: change mem cgroups permissions
2013-09-10 17:54:57 -07:00
Rom Lemarchand
342077e78d am 67b00d8b: init.rc: change mem cgroups permissions
* commit '67b00d8b2d96e8133c249bcbc0fb63c49e10e022':
  init.rc: change mem cgroups permissions
2013-09-10 17:51:44 -07:00
Rom Lemarchand
67b00d8b2d init.rc: change mem cgroups permissions
Changing mem cgroups permissions to only be accessible by root and system.

Bug: 10210529
Bug: 10210900
Change-Id: Ib4fff6f49b33013b3629d40ae98a5e2464571b2d
2013-09-10 17:41:21 -07:00
Todd Poynor
47f284af49 am ee549d25: am ff9ec2d9: healthd: perform periodic chores when awake and on battery power
* commit 'ee549d256f50ca3078a8537fa5b32a3f86295ea5':
  healthd: perform periodic chores when awake and on battery power
2013-09-09 16:54:49 -07:00
Todd Poynor
ee549d256f am ff9ec2d9: healthd: perform periodic chores when awake and on battery power
* commit 'ff9ec2d9990fbf9a707df063f3d43e9169bdde16':
  healthd: perform periodic chores when awake and on battery power
2013-09-09 16:53:13 -07:00
Eric Laurent
04c12ca061 Add HOTWORD audio source to audio.h
- This is a complimentary change to the one adding this new source to
  MediaRecorder.java

Bug: 10640877.

Change-Id: Ie213e82b5a60dad2a277cef367c2f5e4df70df06
2013-09-09 15:42:31 -07:00
Todd Poynor
ff9ec2d999 healthd: perform periodic chores when awake and on battery power
Monitor battery/charging status at normal awake rate when on battery
power.

Bug: 10650797
Change-Id: I914d24af4963ab9d52b03c0a2615ad653ced9b12
2013-09-09 14:49:53 -07:00
Elliott Hughes
5868e06192 Merge "Add new cert_pin_failure tag that can be used in user-consent filtering." 2013-09-09 21:27:24 +00:00
Andrew Boie
d35ce3563b mkbootimg: support longer kernel command lines
We can't simply increase the value of BOOT_ARGS_SIZE since that
would break past binary compatibility; the offset of 'id' would
change. This can cause serious problems with incremental OTA updates.

Instead, define a supplemental field which stores command line
information beyond the first 512 bytes. A value of 1024 was chosen
to keep the total size of struct boot_img_hdr under the smallest
page size of 2048 bytes.

Even if the extra_cmdline field is used, the original cmdline
field is still always NULL-terminated to avoid issues with older
bootloaders that haven't been updated.

Change-Id: I887e6f1db351a5b71a61e3a03363cf8856123d74
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-09 13:13:33 -07:00
Andrew Boie
2e63e71f31 init: support longer command lines
The Linux kernel supports command lines up to 2048 bytes on x86,
see COMMAND_LINE_SIZE in asm/setup.h.

If any androidboot.xxxx arguments were past the 1024 byte limit
here, they were lost.

Change-Id: I6247c511a7de04109490fffa0125801d274a5501
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-09 13:11:34 -07:00
William Luh
5249306ad0 Add new cert_pin_failure tag that can be used in user-consent filtering.
Change-Id: If8a2f9829b3aac4abc33a4623c5f5b4966fd6870
2013-09-09 11:18:33 -07:00
Colin Cross
fc600e49bf Initial libmemtrack
libmemtrack is an interface to a device-specific Memory Tracker HAL
to account for memory that may not show up in the normal memory
usage tools that walk /proc/pid/maps.

Bug: 10294768
Change-Id: I436f6799898df0bf8bf29747be3bc9dea5721185
2013-09-06 18:18:35 -07:00
Szymon Starzycki
585af584f7 Fastbootd: fixed missing file in Android.mk
Change-Id: I10927f488e35c688483f2d1d8c9f5b7ea1d7912d
2013-09-06 15:11:30 -07:00
Szymon Starzycki
e160f81713 fastbootd: erase, boot and partitioning commands
Change-Id: I49ba2ba2e002fd5b6bbd37cc3fd0caa106f42010
2013-09-06 14:31:08 -07:00
Colin Cross
783e6c471a am 8da6e9c7: am c9ff3714: am 596e9c63: Merge "fix valgrind ioctl warning."
* commit '8da6e9c717ec5c1076dfedc7a37e9cfbe100977e':
  fix valgrind ioctl warning.
2013-09-05 12:59:16 -07:00
Colin Cross
8da6e9c717 am c9ff3714: am 596e9c63: Merge "fix valgrind ioctl warning."
* commit 'c9ff37144a7943ee1bc247cef3620c8cce22049d':
  fix valgrind ioctl warning.
2013-09-05 12:57:15 -07:00
Colin Cross
c9ff37144a am 596e9c63: Merge "fix valgrind ioctl warning."
* commit '596e9c6314e4f2869499bcdbb816680ddb10c88f':
  fix valgrind ioctl warning.
2013-09-05 12:55:33 -07:00
Colin Cross
596e9c6314 Merge "fix valgrind ioctl warning." 2013-09-05 19:54:31 +00:00
Todd Poynor
bc10211184 healthd: Add average current property
Change-Id: Ibc901fe1b550c0d72095ef5590e2db8962d1a7b2
2013-09-04 17:41:57 -07:00
Ben Cheng
2d0c5d168f am 61e4b4d5: am 8fb85b37: am 2b2f1ae8: Merge "Add -Wno-unused-parameter to suppress the warning."
* commit '61e4b4d5a8a948c4241c26627cf8d6cb9d0544ca':
  Add -Wno-unused-parameter to suppress the warning.
2013-09-04 14:12:02 -07:00
Ben Cheng
61e4b4d5a8 am 8fb85b37: am 2b2f1ae8: Merge "Add -Wno-unused-parameter to suppress the warning."
* commit '8fb85b37af1753ce6bc5d88a04485a6c805bb3a3':
  Add -Wno-unused-parameter to suppress the warning.
2013-09-04 14:08:55 -07:00
Ben Cheng
8fb85b37af am 2b2f1ae8: Merge "Add -Wno-unused-parameter to suppress the warning."
* commit '2b2f1ae86fb791e9f2fff25f93e7f2c4db010bf6':
  Add -Wno-unused-parameter to suppress the warning.
2013-09-04 14:05:40 -07:00