Commit Graph

33071 Commits

Author SHA1 Message Date
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 4d4f64ff94 Show the "platform tools" version in adb/fastboot --version.
Annoyingly folks parse the "adb --version" output so we have the
less-interesting protocol version first. But at least now we'll
have the "real" version somewhere...

Bug: N/A
Test: "adb --version"/"fastboot --version"
Change-Id: Ia85b561bd8d84c6fd6995923730d36f53b2f800b
2017-05-09 08:21:54 -07: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
Dimitry Ivanov 058b2ea8c5 Explicitly enable greylist for classloader-namespaces
The linker no longer enables greylist by default, it
needs to be explicitly enabled by specifying corresponding
flag.

Bug: https://issuetracker.google.com/38146125
Test: builds
Change-Id: Ib593f2d9a35dbadffb436f5fbc9a2a7a8f64ada0
2017-05-08 22:44:07 -07:00
Chenjie Luo 2c84e2ae40 Merge "Remove not-used dependency in crash_dump" am: 6f3f7dc838 am: 95af7d300c
am: 31c3b4ac85

Change-Id: I23c9d09ceff126bcc834f98a74507eba416659bd
2017-05-09 04:42:51 +00: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
TreeHugger Robot 2813d87484 Merge "init: remove restorecon() from util.cpp" into oc-dev-plus-aosp 2017-05-09 01:15:56 +00:00
Mark Salyzyn fa992c039d Merge "logd: add "+passcred" for logdw socket" am: cc22a8e5a2 am: 518f054bfd
am: ff04ade5e4

Change-Id: I924893609e80661631c506a41459070823e40b74
2017-05-09 01:11:41 +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
Bowgo Tsai 87a5b1f992 fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work
Should set verity mode to VERITY_MODE_DEFAULT when
androidboot.veritymode=enforcing.

Bug: 38103331
Test: `adb shell getprop partition.system.verified` returns 2 when veritymode=enforcing
Test: `adb shell getprop partition.vendor.verified` returns 2 when veritymode=enforcing

(cherry picked from commit 77cbfd6341)

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

Change-Id: I065d0be5aa128c54f35189fd85baceabc234ec6f
2017-05-09 00:08:31 +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
Tom Cherry c2ef2f0d8d 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
Change-Id: I7e209ece6898f9a0d5eb9e5d5d8155c2f1ba9faf
2017-05-08 16:41:13 -07:00
Mark Salyzyn 1a830d5daa Merge "init: add "+passcred" for socket to set SO_PASSCRED" am: 9811cd33ac am: 00d97b2327
am: a650c328f1

Change-Id: Id14c1e3c3aa3fdbf6e927d08720d2524d2e9b800
2017-05-08 23:27:27 +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 59edd00124 Merge "adb: properly handle libusb_clear_halt failure." am: 761ae04777 am: b44385f6b3
am: 9886b1aa4a

Change-Id: I5ea3f6ec34392f9a18bc2288b870325b340da98e
2017-05-08 22:54:24 +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 2920471ffa Merge "Revert "Make /data/data a symlink to /data/user/0"" am: 823816ee9f am: 20a74298a5
am: e4f35b111e

Change-Id: I9fdb4b5d8e6b1dcf89b853a737f389553cc1a1df
2017-05-08 21:00:47 +00: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 d5a3c01660 Merge "debuggerd_handler: use syscall(__NR_get[pt]id) instead of get[pt]id." am: 2bc6196faa am: fde3c3542a
am: 7182f06223

Change-Id: I851cff4f3d8ae879251910fc207582f188e923b3
2017-05-08 20:34:31 +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 f11e56fb95 Merge changes Ie0b30417,I8b6e802e am: ee9e5d0981 am: ae587a8f19
am: 8652dd2a45

Change-Id: If2e0de6be32ff7bc64c0dbdfcdc4599c8b0a29d7
2017-05-08 18:14:22 +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 756ee8ded9 Merge changes I46690d1c,I84c11aa5 am: 0dda322d4a am: 18b23afa4b
am: 3f9ba91d8f

Change-Id: Ied40226f25303091aad079cf4e8ea1f9ca0379a7
2017-05-08 16:21:15 +00:00