Commit graph

12612 commits

Author SHA1 Message Date
Mark Salyzyn
24693597cd am 3cc18a2c: am b6f38def: Merge "run-as: bracket capability"
* commit '3cc18a2cf93e00786f7cb7af19cab653937a22a9':
  run-as: bracket capability
2015-03-31 17:53:25 +00:00
Mark Salyzyn
3cc18a2cf9 am b6f38def: Merge "run-as: bracket capability"
* commit 'b6f38def22add4b5d6878185d238f91659239161':
  run-as: bracket capability
2015-03-31 17:46:42 +00:00
Mark Salyzyn
b6f38def22 Merge "run-as: bracket capability" 2015-03-31 17:41:14 +00:00
Mark Salyzyn
db5334ad03 run-as: bracket capability
- do not assume that caller has granted effective bits in capabilities
- only elevate capabilities when needed
- suppress capabilities before exec when called as shell,shell,shell
- some Android coding standard cleanup

Bug: 19908228
Change-Id: Ibe3d1c1a0fdcb54c41d7a72395e50ad749df98ce
2015-03-31 09:44:48 -07:00
Tao Bao
b17b9921c7 am e9c2a4a0: am cd153076: Merge "adb: Add option to reboot into sideload mode in recovery"
* commit 'e9c2a4a0a4ba2059f313da5c686217cbbd62278f':
  adb: Add option to reboot into sideload mode in recovery
2015-03-31 01:10:42 +00:00
Tao Bao
e9c2a4a0a4 am cd153076: Merge "adb: Add option to reboot into sideload mode in recovery"
* commit 'cd153076dc27b9a53fddec35eb050f44239d5af3':
  adb: Add option to reboot into sideload mode in recovery
2015-03-31 01:03:31 +00:00
Tao Bao
cd153076dc Merge "adb: Add option to reboot into sideload mode in recovery" 2015-03-31 00:57:33 +00:00
Elliott Hughes
4bd43889c9 am 656957e8: am a58c0b5f: Merge "Build init with clang."
* commit '656957e814a157538d748972573a9100b4261b81':
  Build init with clang.
2015-03-31 00:48:34 +00:00
Elliott Hughes
656957e814 am a58c0b5f: Merge "Build init with clang."
* commit 'a58c0b5f12d60a3ae62cca57192cd0c3d9416f49':
  Build init with clang.
2015-03-31 00:41:54 +00:00
Elliott Hughes
a58c0b5f12 Merge "Build init with clang." 2015-03-31 00:35:20 +00:00
Tao Bao
175b7bbfb4 adb: Add option to reboot into sideload mode in recovery
Currently it requires manual key press to enter the sideload mode. This
CL adds 'adb reboot sideload' to reboot the device into sideload mode
directly with text display on. With 'adb reboot sideload-auto-reboot',
it will reboot after the sideload regardless of the installation result,
unless interrupted by user.

Since it needs to write to /cache/recovery/command file, 'adb root' is
required before calling 'adb reboot sideload' and the one with
'-auto-reboot'.

Also it requires the matching CL in bootable/recovery.

Change-Id: Ib7bd4e216a1efc01e64460659c97c6005bbaec1b
2015-03-31 00:19:52 +00:00
Elliott Hughes
9efd95b029 Build init with clang.
Change-Id: I14d95b3fe0505dd7d7632e2eedc537f97553c715
2015-03-30 14:37:11 -07:00
Elliott Hughes
7f9bc9310f am 1f9a2288: am ffa85da6: Merge "Lose route to toybox."
* commit '1f9a22882f4fa0a0714b51904c264279bf1a5dbd':
  Lose route to toybox.
2015-03-30 21:10:47 +00:00
Elliott Hughes
1f9a22882f am ffa85da6: Merge "Lose route to toybox."
* commit 'ffa85da6125c4b820fdecfd2b49acfb2631fb07a':
  Lose route to toybox.
2015-03-30 21:04:02 +00:00
Elliott Hughes
ffa85da612 Merge "Lose route to toybox." 2015-03-30 20:57:56 +00:00
Elliott Hughes
958af99e0e am 42997bfe: am eb809351: Merge "Always unlink /dev/__kmsg__."
* commit '42997bfebcd3e93265feae74e2194793549fedc5':
  Always unlink /dev/__kmsg__.
2015-03-30 19:25:05 +00:00
Elliott Hughes
42997bfebc am eb809351: Merge "Always unlink /dev/__kmsg__."
* commit 'eb809351db938f4e99aad36a9e791c4b87b0c951':
  Always unlink /dev/__kmsg__.
2015-03-30 19:18:50 +00:00
Elliott Hughes
eb809351db Merge "Always unlink /dev/__kmsg__." 2015-03-30 19:12:47 +00:00
Dan Albert
7ad8667042 am 20329fa4: am 6d457fe1: Merge "Enable building libbase on Windows."
* commit '20329fa4274128beadd1dde04edd26478673f116':
  Enable building libbase on Windows.
2015-03-30 18:36:36 +00:00
Elliott Hughes
3e46f4af4f am 9c39510e: am c2d9cc85: Merge "toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)"
* commit '9c39510e06f36b9c03b61f4eefae521991daead6':
  toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)
2015-03-30 18:32:30 +00:00
Elliott Hughes
798ec0c39d Lose route to toybox.
Change-Id: If68fa6a691478921452ebd785bd35e3ba5a8470a
2015-03-30 11:23:44 -07:00
Dan Albert
20329fa427 am 6d457fe1: Merge "Enable building libbase on Windows."
* commit '6d457fe1a8f35c50c84f523846f0f1aa04491423':
  Enable building libbase on Windows.
2015-03-30 17:51:34 +00:00
Dan Albert
6d457fe1a8 Merge "Enable building libbase on Windows." 2015-03-30 17:47:03 +00:00
Dan Albert
b2326bd56c Enable building libbase on Windows.
We have to exclude the logging facilities for now (since we don't have
a std::mutex on Windows), but there's plenty else in here that is
worth having.

Change-Id: I6d1369e34e08ea2e88a0b1130c4462e5d35d99e2
2015-03-30 10:30:42 -07:00
Elliott Hughes
9c39510e06 am c2d9cc85: Merge "toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)"
* commit 'c2d9cc85766bbec22980021af4eb4b01200c9a9f':
  toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)
2015-03-30 17:28:33 +00:00
Elliott Hughes
c2d9cc8576 Merge "toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)" 2015-03-30 17:18:51 +00:00
Johan Redestig
c06541912d toolbox: Fixed type mismatch for ioctl(BLKGETSIZE)
ioctl(BLKGETSIZE) expects unsigned long
(8 bytes on 64 bit environment).

Change-Id: Ic0f1d48e1d4cb890dbf617b3eb6285425cdbf0d0
2015-03-30 10:17:29 -07:00
Elliott Hughes
12137b3ef0 am 9e0edb77: am 934102ba: Merge "Lose load_policy to toybox."
* commit '9e0edb77b0c266cb964cd17858a4ccb92b7d47da':
  Lose load_policy to toybox.
2015-03-28 20:47:10 +00:00
Elliott Hughes
9e0edb77b0 am 934102ba: Merge "Lose load_policy to toybox."
* commit '934102baf8fca57abf63df7f134e977e696722db':
  Lose load_policy to toybox.
2015-03-28 20:40:13 +00:00
Elliott Hughes
934102baf8 Merge "Lose load_policy to toybox." 2015-03-28 20:35:05 +00:00
Elliott Hughes
2ca681c443 am 1108b42a: am 48402951: Merge "Clarify a few things about bootcharts."
* commit '1108b42aa513abfa1c301c150c573a5bb5667ac3':
  Clarify a few things about bootcharts.
2015-03-28 20:33:54 +00:00
Elliott Hughes
f29940559a Lose load_policy to toybox.
Change-Id: I3ef3aab9eef8e07ee598e2559a316e2fccf7199b
2015-03-28 13:29:05 -07:00
Elliott Hughes
1108b42aa5 am 48402951: Merge "Clarify a few things about bootcharts."
* commit '48402951cfd44217ba50dbce5cc742db95d915c6':
  Clarify a few things about bootcharts.
2015-03-28 20:27:14 +00:00
Elliott Hughes
48402951cf Merge "Clarify a few things about bootcharts." 2015-03-28 20:22:01 +00:00
Elliott Hughes
59abac27cb Clarify a few things about bootcharts.
Make it clearer in dmesg when we're deliberately not doing
bootcharting, and explain in the documentation that the output
for init is quite misleading (and, as far as I can tell, not
within our power to fix).

Change-Id: I0b22a56f83521d64c6d176dc423c81f7ea86b23c
2015-03-28 12:12:51 -07:00
Dan Albert
c3ea08369b am 68d54808: am 8f03e3cb: Merge "Revert "Remove the emulator special case from the "adb root" code.""
* commit '68d54808dff7ef6f7ca95c23f51a7436e3b0188e':
  Revert "Remove the emulator special case from the "adb root" code."
2015-03-28 19:12:00 +00:00
Dan Albert
68d54808df am 8f03e3cb: Merge "Revert "Remove the emulator special case from the "adb root" code.""
* commit '8f03e3cb3db392127fd8dc0a2ce62aa15a755ffd':
  Revert "Remove the emulator special case from the "adb root" code."
2015-03-28 19:07:43 +00:00
Dan Albert
8f03e3cb3d Merge "Revert "Remove the emulator special case from the "adb root" code."" 2015-03-28 19:04:40 +00:00
Dan Albert
868402e5bf Revert "Remove the emulator special case from the "adb root" code."
adb root doesn't work on the emulator, so this prevents root access
to a userdebug emulator.

Since the emulator has always been root even on userdebug builds, it
may be that adb root has never worked on the emulator.

Bug: 19974213

This reverts commit abd6773b41.
2015-03-28 19:04:15 +00:00
Elliott Hughes
ec86729bc9 am 7c3749c2: am 6a62cac4: Merge "Further cleanup of the logic in device_init."
* commit '7c3749c24ad6dad7e5ddf5b0478731470761d99c':
  Further cleanup of the logic in device_init.
2015-03-28 18:58:27 +00:00
Elliott Hughes
7c3749c24a am 6a62cac4: Merge "Further cleanup of the logic in device_init."
* commit '6a62cac4c1d2f10aa0a535df8e9757ee2f0fe725':
  Further cleanup of the logic in device_init.
2015-03-28 18:52:16 +00:00
Elliott Hughes
6a62cac4c1 Merge "Further cleanup of the logic in device_init." 2015-03-28 18:45:45 +00:00
Elliott Hughes
56a0656ed9 Further cleanup of the logic in device_init.
Change-Id: I96e4b11894926b50792b9b7d7cfa0fe8392abef6
2015-03-28 11:26:15 -07:00
Elliott Hughes
e8b3539500 am 36dfe06f: am 6dbbcc57: Merge "Fix clang build by removing unused locals."
* commit '36dfe06f81fc7b5ce8d9478d30b4d49ac70d4525':
  Fix clang build by removing unused locals.
2015-03-28 18:06:35 +00:00
Elliott Hughes
36dfe06f81 am 6dbbcc57: Merge "Fix clang build by removing unused locals."
* commit '6dbbcc57a00e6b44488e595d128e27168a939a02':
  Fix clang build by removing unused locals.
2015-03-28 18:01:58 +00:00
Elliott Hughes
6dbbcc57a0 Merge "Fix clang build by removing unused locals." 2015-03-28 17:57:46 +00:00
Elliott Hughes
747383649c Fix clang build by removing unused locals.
Also don't manually set FD_CLOEXEC on a socket that's always opened
with SOCK_CLOEXEC. (None of the other callers to the function do this.)

Also move locals to where they're first used to help prevent more of this
kind of breakage.

Change-Id: I1ba7cd9400f53508dffb51a2bbf9d491ae647f26
2015-03-28 10:51:23 -07:00
Elliott Hughes
4ce3c8288b am 0cd316a4: am 5db3936d: Merge "Log more timing information from init."
* commit '0cd316a46b7903b7d014280cca1f4b67748bc517':
  Log more timing information from init.
2015-03-28 16:58:34 +00:00
Elliott Hughes
c02f81cccb Always unlink /dev/__kmsg__.
Whether the open succeeds or fails, we should unlink.

Change-Id: Ic2f1e10dc7b6d6e459c56049da00d165bd63ba8f
2015-03-28 09:51:54 -07:00
Elliott Hughes
0cd316a46b am 5db3936d: Merge "Log more timing information from init."
* commit '5db3936dbe6fa73d45ab0f02b7166f43680084d3':
  Log more timing information from init.
2015-03-28 16:50:35 +00:00