Commit Graph

2336 Commits

Author SHA1 Message Date
Ken Sumrall 7098710805 Merge "Try to unmount writable filesystems when rebooting" into honeycomb-mr1 2011-03-10 19:24:08 -08:00
Ken Sumrall c5c51033c8 Load the persistent properties after decrypting the /data partition
Fix for bug 3415286.  The persistent properties are normally read early
in the boot process after /data is mounted.  However, for an encrypted
system, at that point /data is a tmpfs ramdisk.  This change adds a new
command to init (load_persist_props) to read the persistent properties,
and adds an action to init.rc to load the persistent properties.  This
action is triggered by setting a property in vold, but that's in a
different CL.

Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
2011-03-10 18:12:19 -08:00
Ken Sumrall e3aeeb4de3 Try to unmount writable filesystems when rebooting
Ext4 filesystems like to be unmounted before rebooting.  The Android system
doesn't have a traditional Linux init setup, and shutting down the system
was not much more than calling sync(2) and reboot(2).  This adds a new
function to libcutils called android_reboot().  By default, it calls sync()
and then remounts all writable filesystems as read-only and marks them clean.
There is a flag parameter in which the caller can ask for sync() not to be
called, or to not remount the filesystems as read-only.  Then it will call
reboot(2) as directed by the other parameters.  This change also updates
adb, init and toolbox to call the new android_reboot() function.
Fixes bugs 3350709 and 3495575.

Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
2011-03-10 18:11:46 -08:00
Mathias Agopian dfa9f55700 am e7ee3b1d: (-s ours) am a40481b2: Run surfaceflinger in its own process. [DO NOT MERGE]
* commit 'e7ee3b1d9078c227378a06d88d848b6066bfec3f':
  Run surfaceflinger in its own process. [DO NOT MERGE]
2011-03-10 18:02:25 -08:00
Mathias Agopian e7ee3b1d90 am a40481b2: Run surfaceflinger in its own process. [DO NOT MERGE]
* commit 'a40481b2cc604b8b278d509f120cf496c4c318f2':
  Run surfaceflinger in its own process. [DO NOT MERGE]
2011-03-10 18:01:00 -08:00
Mathias Agopian a40481b2cc Run surfaceflinger in its own process. [DO NOT MERGE]
This is to allow OpenGL ES rendering from the system process,
and help with debugging.

Bug: 4086003
Change-Id: I732e95f4fcaa358f430cc195d8e63a69263bffdc
2011-03-10 17:30:08 -08:00
Brad Fitzpatrick eb1f0c6fd1 Fix a race in system properties.
This now passes:

$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
  com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner

(which tests setting and re-reading back system properties in a loop)

This patch depends on I110b653a which moves property setting
from libcutils into bionic.

Bug: 3511230
Change-Id: Iee1ca9b7defd6060510a01f40fbe63ba4c96eb8d
2011-03-10 16:00:48 -08:00
Dima Zavin 5a809b90e9 cutils: add popcount/popcountl/popcountll static inline definitions
Just pass them through to their specific GCC builtins. If we find
that the builtins are not performing well or have other issues, we can
pull in existing public implementations and/or write arch-specific
helpers if necessary.

Change-Id: I278e6b73d75fac88808ed4546070d288c06f79e0
Signed-off-by: Dima Zavin <dima@android.com>
2011-03-10 15:09:16 -08:00
TK MUN 91826623ee am 5ef46801: am 9badcf70: (-s ours) am 5b63884e: wimax : Fix for multiple dhcpcd service.
* commit '5ef4680140aa3eee148c86ef764b6f9d270c4997':
  wimax : Fix for multiple dhcpcd service.
2011-03-09 21:32:30 -08:00
TK MUN 5ef4680140 am 9badcf70: (-s ours) am 5b63884e: wimax : Fix for multiple dhcpcd service.
* commit '9badcf70addfbf28ee99da358f23dcbb8248812b':
  wimax : Fix for multiple dhcpcd service.
2011-03-09 21:29:53 -08:00
TK MUN 9badcf70ad am 5b63884e: wimax : Fix for multiple dhcpcd service.
* commit '5b63884e4ebf356fd6812f1253456e8447d3e3de':
  wimax : Fix for multiple dhcpcd service.
2011-03-09 19:47:47 -08:00
TK MUN 5b63884e4e wimax : Fix for multiple dhcpcd service.
- Seperate dhcp service for each interface(wifi and wimax).

Change-Id: Ib88436b0e468e93ce3199f3b6c00799fd168b666
Signed-off-by: TK MUN <tk.mun@samsung.com>
2011-03-09 19:16:22 -08:00
Brad Fitzpatrick 48a7c2f9b1 Merge "Restart surfaceflinger with stop/start too." 2011-03-07 10:43:49 -08:00
Brad Fitzpatrick d8ed091c6e Restart surfaceflinger with stop/start too.
Change-Id: Ide045fc3baced9e1bde95cb26d0b835511c21780
2011-03-07 10:39:17 -08:00
Raphael 4fc3706015 Merge "Revert "Define O_BINARY for non-Windows platforms."" 2011-03-04 15:30:02 -08:00
Mathias Agopian d0e29533d3 Run surfaceflinger in its own process.
This is to allow OpenGL ES rendering from the system process,
and help with debugging.

Change-Id: I2dccc015c5ce3f6730c8d559b51422fe571f83b6
2011-03-04 15:03:25 -08:00
Raphael 1e47832909 Revert "Define O_BINARY for non-Windows platforms."
This reverts commit bd70e4aca5.
2011-03-02 16:49:34 -08:00
Amol Bhatkar cf01597121 property_service: Give radio permission to set net.qmi*
Change-Id: I771ef22859799b863ab79de9d3248ef610af4dd8
2011-03-02 16:00:58 -08:00
David Turner f0900adeb2 am 663268ca: am fe111c83: am e6b638be: Merge "x86: Add vold.fstab to mount the SD card"
* commit '663268caac636e32b19173743594899e52df0830':
  x86: Add vold.fstab to mount the SD card
2011-03-02 15:33:14 -08:00
Raphael Moll 879dd27b2b am e24624da: am 733e4701: am fa5f2ad4: am bd8f4a85: Merge "Define O_BINARY for non-Windows platforms."
* commit 'e24624da7d29374ad59d20312ca0e0ea2ea5596b':
  Define O_BINARY for non-Windows platforms.
2011-03-02 15:33:12 -08:00
David Turner 663268caac am fe111c83: am e6b638be: Merge "x86: Add vold.fstab to mount the SD card"
* commit 'fe111c83708dd3c8746b3a05d4b2f53c7a9f4477':
  x86: Add vold.fstab to mount the SD card
2011-03-02 11:38:57 -08:00
Raphael Moll e24624da7d am 733e4701: am fa5f2ad4: am bd8f4a85: Merge "Define O_BINARY for non-Windows platforms."
* commit '733e47011023787cf996b1b4f232453b2324e303':
  Define O_BINARY for non-Windows platforms.
2011-03-02 11:38:35 -08:00
Brad Fitzpatrick 51c17a96b1 Merge "Make optional valgrind binaries +x." 2011-03-02 09:42:34 -08:00
David Turner fe111c8370 am e6b638be: Merge "x86: Add vold.fstab to mount the SD card"
* commit 'e6b638be199a5f16f3eaff69710d92ea248d60a3':
  x86: Add vold.fstab to mount the SD card
2011-03-02 07:58:39 -08:00
David Turner e6b638be19 Merge "x86: Add vold.fstab to mount the SD card" 2011-03-02 06:06:55 -08:00
JP Abgrall 2d13d1408b fastboot: fix arg handling causing no-op.
Change-Id: I89d4a6d14e542d8f2d7832d94b0a7cee6eb88305
2011-03-01 23:35:07 -08:00
Raphael Moll 733e470110 am fa5f2ad4: am bd8f4a85: Merge "Define O_BINARY for non-Windows platforms."
* commit 'fa5f2ad48b0a22d963b11b87cb94d5d1960c42ff':
  Define O_BINARY for non-Windows platforms.
2011-03-01 22:33:21 -08:00
Brad Fitzpatrick 8d1c6e7685 Make optional valgrind binaries +x.
Change-Id: If3417e0c8728c7c74badb12de734cf06e794619d
2011-03-01 15:12:11 -08:00
Tsu Chiang Chuang e05b9c75c2 Merge "Add explicit 'help' command to fastboot." 2011-03-01 14:37:14 -08:00
Raphael Moll fa5f2ad48b am bd8f4a85: Merge "Define O_BINARY for non-Windows platforms."
* commit 'bd8f4a85ce45649dc75fbef139f0deae12f834a7':
  Define O_BINARY for non-Windows platforms.
2011-03-01 12:41:32 -08:00
Mike Lockwood 87da548308 am e09c3fc7: (-s ours) am 0c8b18b9: (-s ours) am 126d4bc1: Give system server permission to enable and disable USB functions DO NOT MERGE
* commit 'e09c3fc7bdbbb05ff535852d6af3975ba5f23aee':
  Give system server permission to enable and disable USB functions DO NOT MERGE
2011-03-01 10:58:20 -08:00
Mike Lockwood 373e6276e3 am 9c6fe252: (-s ours) am 5ebe6fe6: (-s ours) am 642075b6: Set USB group for /dev/usb_accessory DO NOT MERGE
* commit '9c6fe252df8b148ddb2ca382b2d527189252d0b9':
  Set USB group for /dev/usb_accessory DO NOT MERGE
2011-03-01 10:58:18 -08:00
Mike Lockwood e09c3fc7bd am 0c8b18b9: (-s ours) am 126d4bc1: Give system server permission to enable and disable USB functions DO NOT MERGE
* commit '0c8b18b96038c1634735cdae2bd5f8cf25c7dbef':
  Give system server permission to enable and disable USB functions DO NOT MERGE
2011-03-01 09:12:21 -08:00
Mike Lockwood 9c6fe252df am 5ebe6fe6: (-s ours) am 642075b6: Set USB group for /dev/usb_accessory DO NOT MERGE
* commit '5ebe6fe6779fcbd4961de22301a5ec5d83f5cdea':
  Set USB group for /dev/usb_accessory DO NOT MERGE
2011-03-01 09:12:19 -08:00
Mike Lockwood 0c8b18b960 am 126d4bc1: Give system server permission to enable and disable USB functions DO NOT MERGE
* commit '126d4bc18c93f06016998cf6d014c6055c2d3a40':
  Give system server permission to enable and disable USB functions DO NOT MERGE
2011-02-28 13:14:42 -08:00
Mike Lockwood 5ebe6fe677 am 642075b6: Set USB group for /dev/usb_accessory DO NOT MERGE
* commit '642075b6f74faeca53d9449ec9b74d7c66fe7cdd':
  Set USB group for /dev/usb_accessory DO NOT MERGE
2011-02-28 13:14:39 -08:00
Mike Lockwood 126d4bc18c Give system server permission to enable and disable USB functions DO NOT MERGE
Change-Id: Ie43b6679838436ac004d0b5fa59d3d98cb5b0c76
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-27 17:43:59 -08:00
Mike Lockwood 642075b6f7 Set USB group for /dev/usb_accessory DO NOT MERGE
Change-Id: I41264272ff6ce245cb2b8989ddee4a82059444a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-27 17:43:52 -08:00
Tsu Chiang Chuang ee52055ae5 Add explicit 'help' command to fastboot.
Change-Id: I350feab372e105755509c81604d57b2de1a69163
2011-02-25 18:38:53 -08:00
Ben Cheng dce4d06b5c Fix overflow prevention code in memory dump.
The delta between start and end pointers in memory dump has to be
multiples of 4 or 16.

Bug: 3486787
Change-Id: Ie34aa79ffb704ca647805dbc6a16f2c35adf849c
2011-02-24 16:37:52 -08:00
JP Abgrall 0e7c4274c6 Revert "Fix adb hang when subprocess dies early."
This is for http://b/3482112 "adb interactions with device causing test harness failures".

This reverts commit 69c5c4c45b.

Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
2011-02-23 18:49:00 -08:00
JP Abgrall 1e0582eba6 Merge "Fix adb hang when subprocess dies early." 2011-02-22 18:29:45 -08:00
Raphael Moll bd8f4a85ce Merge "Define O_BINARY for non-Windows platforms." 2011-02-22 14:36:28 -08:00
Ken Sumrall 012cf8f2de Merge "Fix for bug 3379244, non-eMMC devices don't start all services." 2011-02-22 12:15:10 -08:00
JP Abgrall 69c5c4c45b Fix adb hang when subprocess dies early.
* Handling of the subprocess and its FD.
  This fixes http://b/3400254 "Many bugreports getting hung at the end in monkey"
  -  Start up a service thread that waits on the subprocess to terminate,
then closes the FD associated with it.
  -  Have the event handler select() with a timeout so that it can
  detect the closed FD. Select() with no timeout does not return when an FD is closed.
  - Have the event handler force a read on the closed FD to trigger the close sequence.
  - Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections.
* Fix the race around OOM adjusting.
  - Do it in the child before exec() instead of the in the parent as the
   child could already have started or not (no /proc/pid/... yet).
* Allow for multi-threaded D() invocations to not clobber each other.
  - Allow locks across object files.
  - Add lock within D()
* Add some missing close(fd) calls
  - Match similar existing practices near dup2()
* Add extra D() invocations related to FD handling.
* Warn about using debugging as stderr/stdout is used for protocol.

Change-Id: Ie5c4a5e6bfbe3f22201adf5f9a205d32e069bf9d
Signed-off-by: JP Abgrall <jpa@google.com>
2011-02-18 14:16:59 -08:00
Ken Sumrall dd4d786cbf Fix for bug 3379244, non-eMMC devices don't start all services.
Fix for non-eMMC based devices to properly start the "on nonencrypted"
action.

Change-Id: I5d2966db352b02f1a1724fb105e1cefc46037e42
2011-02-17 18:09:47 -08:00
Mike Lockwood 53df0b6393 Merge "lsof: Add support for printing open files for a single process" 2011-02-17 11:39:12 -08:00
Raphael Moll bd70e4aca5 Define O_BINARY for non-Windows platforms.
All tools (aapt, aidl, dexdump, etc.) need this flag to open()
binary files, or they risk reading corrupted data on Windows.

A bunch of these tools just conditionaly define O_BINARY in
their C files. Seems it would just make sense to define it globally.

Change-Id: Ia5c0a59e9e77bbdcbce235233555f611207abed8
2011-02-16 13:36:42 -08:00
Robert Greenwalt 0569692b73 Merge "update netcfg to use prefixLength not netmask" 2011-02-15 13:27:36 -08:00
Robert Greenwalt 177ca7cd76 update netcfg to use prefixLength not netmask
Change-Id: I353906d220382a1f5d9aad689e3927fd3dbc91d2
2011-02-15 11:39:55 -08:00