Commit graph

30037 commits

Author SHA1 Message Date
Treehugger Robot
01e7990a10 Merge "fix static-analyzer logging/CHECK macros" 2017-05-10 03:05:40 +00:00
Treehugger Robot
2f2cd76d4d Merge "Explicitly enable greylist for classloader-namespaces" 2017-05-10 02:53:32 +00:00
Elliott Hughes
3602f6141a Merge "Show the "platform tools" version in adb/fastboot --version."
am: 6f4d47438d

Change-Id: I5ff109186b29b9770f61506eb4cfb99ce71db4e9
2017-05-10 01:51:38 +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
6f4d47438d Merge "Show the "platform tools" version in adb/fastboot --version." 2017-05-10 01:41:41 +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
Dimitry Ivanov
9e253ce6b7 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
(cherry picked from commit 058b2ea8c5)
2017-05-09 18:00:38 -07: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
Josh Gao
01b7bc43e9 adb: move all cleanup to a function with defined ordering.
We want to explicitly define the order in which we teardown adb, so
move all of the at_quick_exits sprinkled throughout into one function
containing all of the cleanup functions.

Bug: http://b/37104408
Test: adb kill-server; adb start-server
Change-Id: I394f5782eb147e394d4b87df1ba364c061de4b90
2017-05-09 14:32:47 -07:00
Josh Gao
b3c14ec693 adb: make adb kill-server wait for the server to die.
Make the host:kill service shutdown its socket on process exit, instead
of immediately. Also, unify the two 'kill-server' implementations and
hide _adb_connect.

Bug: http://b/37104408
Test: adb kill-server; adb start-server
Change-Id: I9475f5d084d5fb91d33e393f2fd4e34056613384
2017-05-09 14:31:15 -07:00
Josh Gao
707a6e469f adb: libusb: replace sleep with timed CV wait.
Instead of sleeping for 500ms at the end of every device poll loop, use
a timed condition variable wait so that we can tell the device poll
thread to immediately commit suicide.

Bug: http://b/37869663
Test: adb kill-server; adb start-server
Change-Id: I597071866f7d9ef91900411727345d32c1a97556
2017-05-09 14:30:13 -07: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
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
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
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
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
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
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
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
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
Josh Gao
62f5977d4a libdebuggerd: print the build fingerprint in fallback.
Bug: http://b/37798209
Test: killall -ABRT media.codec on internal
Change-Id: I0ff1fc5ca1e0bcec2c1b2553d6af7099deebfeda
2017-05-08 13:15:19 -07:00
Josh Gao
77b00ed429 libdebuggerd: implement fallback register dumping on arm/aarch64.
Bug: http://b/35439781
Test: killall -ABRT media.codec on internal
Change-Id: I7a23d3bfcf07ad584e677b2ef5fff28436ef0972
2017-05-08 13:15:19 -07: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
18b23afa4b Merge changes I46690d1c,I84c11aa5
am: 0dda322d4a

Change-Id: I69cc4f5432da891ffa052ad6f56ef21a3bc0e46e
2017-05-08 16:16:23 +00:00
Tom Cherry
0dda322d4a Merge changes I46690d1c,I84c11aa5
* changes:
  init: do not log directly from read_file() and write_file()
  init: Check DecodeUid() result and use error string
2017-05-08 16:11:38 +00:00
Tom Cherry
982e0693ce Revert "Make /data/data a symlink to /data/user/0"
This reverts commit d147cb5887.

Original change breaks AVD
Original changes breaks SF/AF
Bug: 38026755
Bug: 38030346
Bug: 38114264

Change-Id: Iab56244f0dc0f6b0df2916c691277a882fc7d184
2017-05-08 16:06:38 +00:00
Bowgo Tsai
4dd17998ed Merge "fs_mgr_verity: fix androidboot.veritymode=enforcing doesn't work"
am: 6019991c6e

Change-Id: Id35e60c6f00414d4e71cdc8e670d73c5daa74fbf
2017-05-08 15:31:42 +00:00