Commit graph

30304 commits

Author SHA1 Message Date
Bowgo Tsai
fec0b13902 Merge "first stage mount: removing the requirement of by-name prefix for AVB" am: cdad92fdad
am: c82235ebbd

Change-Id: I333b3437621ee611cb9033a8e0d1fbd78fcef8d0
2017-05-10 01:56:03 +00:00
Bowgo Tsai
c82235ebbd Merge "first stage mount: removing the requirement of by-name prefix for AVB"
am: cdad92fdad

Change-Id: Id15d51e8e7e6e4767bf965e22a109aa49cbc8d6e
2017-05-10 01:51:07 +00:00
Treehugger Robot
cdad92fdad Merge "first stage mount: removing the requirement of by-name prefix for AVB" 2017-05-10 01:37:28 +00:00
Steven Moreland
16e19d9aef Merge "trusty*: Android.mk -> Android.bp" am: e732d15337
am: 1e0a523d68

Change-Id: I37655976bb5daa06df4d0896119415a72bc3419d
2017-05-09 22:49:25 +00:00
Elliott Hughes
42996de2dc Merge "Make fastboot command-line parsing a bit more like adb." am: 0a253390d1
am: f22da9a1ba

Change-Id: I64411bd986c4f729840d7099291ff08a83429320
2017-05-09 22:49:02 +00:00
Steven Moreland
1e0a523d68 Merge "trusty*: Android.mk -> Android.bp"
am: e732d15337

Change-Id: Ie1e78fe387312f16aeee17d818999e9cc12d9ef9
2017-05-09 22:43:47 +00:00
Elliott Hughes
f22da9a1ba Merge "Make fastboot command-line parsing a bit more like adb."
am: 0a253390d1

Change-Id: Ic9543862b6a6fd0d4ae70e5370890f6cc2e68b4c
2017-05-09 22:43:17 +00:00
Treehugger Robot
e732d15337 Merge "trusty*: Android.mk -> Android.bp" 2017-05-09 22:32:49 +00:00
Elliott Hughes
0a253390d1 Merge "Make fastboot command-line parsing a bit more like adb." 2017-05-09 22:15:24 +00:00
Tom Cherry
7c0f21074e Merge changes I172acf0f,I97b6e17a am: 4963b42d7b
am: 09b0da7b10

Change-Id: I8edeebf3761089176b64cee64c1b74b29756d7e2
2017-05-09 18:39:34 +00:00
Tom Cherry
09b0da7b10 Merge changes I172acf0f,I97b6e17a
am: 4963b42d7b

Change-Id: I74baaa084cc8a72894eaf9bb7fcdf0e20af45be1
2017-05-09 18:20:16 +00:00
Tom Cherry
4963b42d7b Merge changes I172acf0f,I97b6e17a
* changes:
  init: change kill order and fix error reporting in KillProcessGroup()
  Better logging in libprocessgroup and make resources clean up themselves
2017-05-09 17:45:48 +00:00
Tom Cherry
6ac577230b Merge "init: remove restorecon() from util.cpp" am: 035b0c26e6
am: c2a9136c51

Change-Id: I93f8eabdba8002d3d864ac4337826adf9db8890d
2017-05-09 16:49:42 +00:00
Tom Cherry
c2a9136c51 Merge "init: remove restorecon() from util.cpp"
am: 035b0c26e6

Change-Id: I2a25e0ee3ef3049fc0f821f9aee21b1411dfa6d3
2017-05-09 16:45:04 +00:00
Treehugger Robot
035b0c26e6 Merge "init: remove restorecon() from util.cpp" 2017-05-09 16:35:41 +00:00
Elliott Hughes
d6365a7052 Make fastboot command-line parsing a bit more like adb.
Only show all the help if asked to, and have a few more descriptive
syntax errors.

Also show the help on stdout rather than stderr.

Bug: N/A
Test: manually ran "fastboot flash"/"fastboot update"/"fastboot flashall"
Change-Id: I59abd60e58a56fe7e44da5116a702087c36e14ce
2017-05-09 08:16:23 -07:00
Chenjie Luo
31c3b4ac85 Merge "Remove not-used dependency in crash_dump" am: 6f3f7dc838
am: 95af7d300c

Change-Id: I6d0a529f76a48b7089dc65a430e75b3322da7f43
2017-05-09 04:40:50 +00:00
Chenjie Luo
95af7d300c Merge "Remove not-used dependency in crash_dump"
am: 6f3f7dc838

Change-Id: I89048381c4af9edd508415efcf9aba52d9a76f19
2017-05-09 04:38:21 +00:00
Chenjie Luo
6f3f7dc838 Merge "Remove not-used dependency in crash_dump" 2017-05-09 04:33:45 +00:00
Bowgo Tsai
20651f62d0 first stage mount: removing the requirement of by-name prefix for AVB
Current first stage mount for AVB requires specifying a common prefix of
by-name symlink for all AVB partitions. It limits all AVB partitions to be on
the same block device.

firmware {
    android {
        compatible = "android,firmware";
        vbmeta {
            compatible = "android,vbmeta";
            parts = "vbmeta,boot,system,vendor";
            by_name_prefix="/dev/block/platform/soc.0/f9824900.sdhci/by-name"  <-- *removing this*
        };
        fstab {
            compatible = "android,fstab";
            vendor {
                compatible = "android,vendor";
                dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor";
                type = "ext4";
                mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
                fsmgr_flags = "wait,avb";
            };
        };
    };
};

For normal mount with AVB, it extracts the by-name prefix of /misc
partition and use it as the prefix for all other partitions:
    - /dev/block/platform/soc.0/f9824900.sdhci/by-name/misc ->
    - /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor_a

Fix this by adding an internal map in FsManagerAvbOps to record the mapping
from partition name to its by-name symlink:

    ByNameSymlinkMap["vendor_a"] = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor_a"

Two overloaded factory methods are then provided for FsManagerAvbUniquePtr:
    - FsManagerAvbUniquePtr Open(ByNameSymlinkMap&& by_name_symlink_map):
      for first stage mount, where the by-name symlink map will be
      constructed externally, from the uevents processed by init, before
      invoking this factory method.

    - FsManagerAvbUniquePtr Open(const fstab& fstab): for normal mount,
      where the by-name symlink map will be constructed from the input fstab
      internally.

Bug: 37552224
Test: first stage mount /vendor with vboot 1.0
Test: first stage mount /vendor with vboot 2.0 (AVB)
Test: normal mount /vendor with vboot 2.0 (AVB)
Change-Id: Id17e8566da87ea22b8923fcd6e47db8d45bc7d6a
2017-05-09 11:03:49 +08:00
Tom Cherry
482f36cf74 init: remove restorecon() from util.cpp
restorecon() has become nothing more than a small wrapper around
selinux_android_restore().  This itself isn't super problematic, but
it is an obstacle for compiling util.cpp on the host as that function
is not available on the host.

Bug: 36970783
Test: Boot bullhead
Merged-In: I7e209ece6898f9a0d5eb9e5d5d8155c2f1ba9faf
Change-Id: I7e209ece6898f9a0d5eb9e5d5d8155c2f1ba9faf
2017-05-09 02:25:32 +00:00
Mark Salyzyn
ff04ade5e4 Merge "logd: add "+passcred" for logdw socket" am: cc22a8e5a2
am: 518f054bfd

Change-Id: I720ff1aa0bc6726220d2f6db9bfa287e3be18c0e
2017-05-09 01:09:06 +00:00
Mark Salyzyn
518f054bfd Merge "logd: add "+passcred" for logdw socket"
am: cc22a8e5a2

Change-Id: I3dd68cbd2614c6900a0fd4f31c1f6ba2aa128a87
2017-05-09 01:07:04 +00:00
Treehugger Robot
cc22a8e5a2 Merge "logd: add "+passcred" for logdw socket" 2017-05-09 00:59:07 +00:00
Tomasz Wasilczyk
3286188539 Merge "Convert libnativebridge[23]?-dummy to soong." am: 84606f8686
am: 15bdbbc5fc

Change-Id: Ic47b2761f009095c412130ffe5232d92c380d554
2017-05-09 00:04:30 +00:00
Tomasz Wasilczyk
15bdbbc5fc Merge "Convert libnativebridge[23]?-dummy to soong."
am: 84606f8686

Change-Id: I2c470447f199b2ae0221d310c9283cfd213747cc
2017-05-09 00:01:30 +00:00
Treehugger Robot
84606f8686 Merge "Convert libnativebridge[23]?-dummy to soong." 2017-05-08 23:53:54 +00:00
Mark Salyzyn
a650c328f1 Merge "init: add "+passcred" for socket to set SO_PASSCRED" am: 9811cd33ac
am: 00d97b2327

Change-Id: Ifcf163361dac257634e7dea60950792dbb054f2e
2017-05-08 23:25:56 +00:00
Mark Salyzyn
00d97b2327 Merge "init: add "+passcred" for socket to set SO_PASSCRED"
am: 9811cd33ac

Change-Id: I9b7c6e54ff7ea3b996fc62aa2d3d3c489fb8b9e3
2017-05-08 23:23:59 +00:00
Mark Salyzyn
54d8ff1121 logd: add "+passcred" for logdw socket
Tell init to set SO_PASSCRED on the socket before bind() and handoff.

Test: gtest logd-unit-test --gtest_filter=logd.statistics right after boot
Bug: 37985222
Change-Id: I318969ee3241834e5326233aabd97e52ef505969
2017-05-08 16:19:48 -07:00
Mark Salyzyn
9811cd33ac Merge "init: add "+passcred" for socket to set SO_PASSCRED" 2017-05-08 23:19:33 +00:00
Josh Gao
9886b1aa4a Merge "adb: properly handle libusb_clear_halt failure." am: 761ae04777
am: b44385f6b3

Change-Id: Iab2804f11c8052eeb4bf4f6aaa04ea7d35dcc0e0
2017-05-08 22:52:26 +00:00
Josh Gao
b44385f6b3 Merge "adb: properly handle libusb_clear_halt failure."
am: 761ae04777

Change-Id: Ie45ec4c1786d851aa8c50de44d80bda13a27c099
2017-05-08 22:50:55 +00:00
Treehugger Robot
761ae04777 Merge "adb: properly handle libusb_clear_halt failure." 2017-05-08 22:44:34 +00:00
Tomasz Wasilczyk
e38d3a60bc Convert libnativebridge[23]?-dummy to soong.
Bug: 37512442
Test: mmm system/core/libnativebridge/tests
Change-Id: Ib1ca9ef830f58041095226c2ba18d1302c7833b4
2017-05-08 15:29:10 -07:00
Chenjie Luo
68c24eff77 Remove not-used dependency in crash_dump
Test: Build crash_dump.
Change-Id: I053cf53196b3e438545138ca8401a0ad01006a8c
2017-05-08 15:18:40 -07:00
Mark Salyzyn
b066fccc5c init: add "+passcred" for socket to set SO_PASSCRED
In the init scripts for socket, the type can have a suffix of
"+passcred" to request that the socket be bound to report SO_PASSCRED
credentials as part of socket transactions.

Test: gTest logd-unit-tests --gtest_filter=logd.statistics right after boot
      (fails without logd.rc change)
Bug: 37985222
Change-Id: Ie5b50e99fb92fa9bec9a32463a0e6df26a968bfd
2017-05-08 14:04:13 -07:00
Tom Cherry
e4f35b111e Merge "Revert "Make /data/data a symlink to /data/user/0"" am: 823816ee9f
am: 20a74298a5

Change-Id: I0673663db7b20b44867801f146e49235d15baf8a
2017-05-08 20:56:05 +00:00
Tom Cherry
20a74298a5 Merge "Revert "Make /data/data a symlink to /data/user/0""
am: 823816ee9f

Change-Id: I116babbd8ff696bfd131f3ba4c81055d8339e0eb
2017-05-08 20:53:05 +00:00
Josh Gao
8bf37d7a4d adb: properly handle libusb_clear_halt failure.
The original code used continue to attempt to try to skip the current
device, but there was an loop between the outside one and the continue.
Move the device handling logic into a function and replace continue
with return.

Test: mma
Change-Id: Iaa7f4b5ddc26d2ce03f1172d37d6307190b44412
2017-05-08 13:50:58 -07:00
Treehugger Robot
823816ee9f Merge "Revert "Make /data/data a symlink to /data/user/0"" 2017-05-08 20:46:41 +00:00
Josh Gao
7182f06223 Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id." am: 2bc6196faa
am: fde3c3542a

Change-Id: Iae20409ca85ecb0fe18e67005505214cd7e342cc
2017-05-08 20:26:03 +00:00
Josh Gao
fde3c3542a Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id."
am: 2bc6196faa

Change-Id: Ie8d68d563dcb1f1756e83bd8ce1770197ef02275
2017-05-08 20:23:01 +00:00
Josh Gao
2bc6196faa Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id." 2017-05-08 20:18:34 +00:00
Dan Willemsen
8652dd2a45 Merge changes Ie0b30417,I8b6e802e am: ee9e5d0981
am: ae587a8f19

Change-Id: Ide8c7b917179474a4060c2360f21bc5c52eee05f
2017-05-08 18:11:25 +00:00
Dan Willemsen
ae587a8f19 Merge changes Ie0b30417,I8b6e802e
am: ee9e5d0981

Change-Id: Ic24a4699bb8dc0590897f4c22df90a2af5a3c693
2017-05-08 18:07:59 +00:00
Dan Willemsen
ee9e5d0981 Merge changes Ie0b30417,I8b6e802e
* changes:
  Turn off debuggerd for host bionic
  Remove old simulator support from liblog
2017-05-08 18:01:27 +00:00
Steven Moreland
8bb85bd07c trusty*: Android.mk -> Android.bp
Test: links
Bug: 37512442
Merged-In: I86bcdcfffbbd81dedb921612bd2d21ea4aabaeb1
Change-Id: I86bcdcfffbbd81dedb921612bd2d21ea4aabaeb1
2017-05-08 16:54:04 +00:00
Tom Cherry
3f9ba91d8f Merge changes I46690d1c,I84c11aa5 am: 0dda322d4a
am: 18b23afa4b

Change-Id: I4f46e0285af613f12c533f1235d75887aca19e3b
2017-05-08 16:18:14 +00:00
Tom Cherry
18b23afa4b Merge changes I46690d1c,I84c11aa5
am: 0dda322d4a

Change-Id: I69cc4f5432da891ffa052ad6f56ef21a3bc0e46e
2017-05-08 16:16:23 +00:00