Commit graph

44134 commits

Author SHA1 Message Date
Tom Cherry
d6c2feb9fa init: delete code that sets ro.recovery_id
It looks like this code is dead currently.  From history, this was
meant to be used as a way to check that the recovery image is what was
expected during runtime, but that effort never completed, and we have
full verification of the recovery image when booting into recovery
anyway.

The code is functionally dead as is too, since /recovery doesn't
actually exist in any fstab, since recovery is either mounted as a
ramdisk during recovery or not mounted during normal boot.

Test: boot
Change-Id: I48cd324ef0d5a163db2df2648f6042174b83f10e
2019-01-29 21:17:53 +00:00
Tom Cherry
561498e357 Merge changes Ibdecf0c9,I41bd92a7,I5669ed10
* changes:
  fs_mgr: test parsing all mount and fs mgr options
  fs_mgr: convert parse_flags over to C++
  fs_mgr: store file_contents_mode and file_names_mode directly
2019-01-28 16:52:25 +00:00
Treehugger Robot
2d3ef2a22f Merge "Linker namespace configuration for the Resolv APEX." 2019-01-28 15:21:52 +00:00
Nicolas Geoffray
3ea7785ee9 Merge "Make runtime namespace visible." 2019-01-28 09:16:21 +00:00
chenbruce
aa87fd5f7d Linker namespace configuration for the Resolv APEX.
Support netd to load resolv Apex.
Switch namespaces when switching library paths between
/system and the APEX, so that internal library dependencies in both
locations are loaded from their own directory.

Bug: 119527674
Test: make; flash; lsof -p $(pidof netd)
Test: 1. manual test datacall/wifi work
      2. manual test tethering work
      3. system/netd/tests/runtests.sh
Change-Id: I3f69e85f2f529636f0ef29a2d9d71ad582c46dfb
2019-01-28 16:42:58 +08:00
Treehugger Robot
b44996bfa9 Merge "Make 'fastboot boot' command support boot header version 2" 2019-01-28 05:34:52 +00:00
Christopher Ferris
49047d711b Merge "Add GetPrintableBuildID()." 2019-01-26 07:03:35 +00:00
Christopher Ferris
ed7ca8bb14 Merge "Add a few leak check tests." 2019-01-26 06:45:39 +00:00
Treehugger Robot
ce17f19bc8 Merge "Remove permitted path for non-isolated namespace" 2019-01-26 06:01:48 +00:00
Treehugger Robot
d290bb7ed8 Merge "Add native vsock support to ADB." 2019-01-26 05:25:28 +00:00
Treehugger Robot
3c2c9d8d43 Merge "Fix path for default prop" 2019-01-26 04:22:37 +00:00
Treehugger Robot
33cff00c1c Merge "fs_mgr: ReadDefaultFstab suppress ReadFstabFromDt logging" 2019-01-26 03:47:49 +00:00
Jiyong Park
c84bbb0079 Remove permitted path for non-isolated namespace
No reason to have permitted path for non-isolated namespace.

Bug: 123303398
Test: N/A
Change-Id: Iaddb358efab7a2017c17f74ee53a9d711646b57c
2019-01-26 11:34:40 +09:00
Cody Schuffelen
a05b64d432 Add native vsock support to ADB.
vsock is a socket address family for communicating into and out of
virtual machines. Addresses have a port and CID. The CID is unique to
each virtual machine on the computer. The VM host always has CID 2.
http://man7.org/linux/man-pages/man7/vsock.7.html

Inside the android guest, the adb daemon hosts a vsock server with
VMADDR_CID_ANY, automatically using the guest CID. The adb server
can now connect to addresses of the form vsock:cid:port, where the CID
must be specified and the port defaults to 5555.

This is a significant speed improvement for ADB connections in
Cuttlefish, with 150-200 MB/s for `adb push` and 100-150 MB/s for
`adb pull`. It also allows removing some proxying steps from Cuttlefish,
simplifying the full connection path, and removes a dependency on the
unstable ivshmem protocol.

Commands tested against a Cuttlefish VM with CID 3:
adb connect vsock:3:5555
adb -s vsock:3:5555 shell
adb disconnect vsock:3:5555

Supporting "adb disconnect" and "adb -s" required modifying some of the
parts that parse addresses / serials.

push/pull trials with native adb vsock support in cuttlefish:

100m: 1 file pushed. 297.6 MB/s (104857600 bytes in 0.336s)
100m: 1 file pushed. 270.3 MB/s (104857600 bytes in 0.370s)
100m: 1 file pushed. 271.7 MB/s (104857600 bytes in 0.368s)
100m: 1 file pushed. 250.5 MB/s (104857600 bytes in 0.399s)
100m: 1 file pushed. 277.1 MB/s (104857600 bytes in 0.361s)
100m: 1 file pushed. 263.5 MB/s (104857600 bytes in 0.379s)
100m: 1 file pushed. 242.6 MB/s (104857600 bytes in 0.412s)
100m: 1 file pushed. 271.8 MB/s (104857600 bytes in 0.368s)
100m: 1 file pushed. 267.1 MB/s (104857600 bytes in 0.374s)

/data/local/tmp/100m: 1 file pulled. 212.8 MB/s (104857600 bytes in 0.470s)
/data/local/tmp/100m: 1 file pulled. 236.7 MB/s (104857600 bytes in 0.423s)
/data/local/tmp/100m: 1 file pulled. 201.2 MB/s (104857600 bytes in 0.497s)
/data/local/tmp/100m: 1 file pulled. 255.6 MB/s (104857600 bytes in 0.391s)
/data/local/tmp/100m: 1 file pulled. 199.6 MB/s (104857600 bytes in 0.501s)
/data/local/tmp/100m: 1 file pulled. 214.6 MB/s (104857600 bytes in 0.466s)
/data/local/tmp/100m: 1 file pulled. 254.2 MB/s (104857600 bytes in 0.393s)
/data/local/tmp/100m: 1 file pulled. 212.5 MB/s (104857600 bytes in 0.471s)
/data/local/tmp/100m: 1 file pulled. 218.9 MB/s (104857600 bytes in 0.457s)
/data/local/tmp/100m: 1 file pulled. 223.6 MB/s (104857600 bytes in 0.447s)

Bug: 121166534
Change-Id: I50f21fb5c9acafb8daa789df4e28c9e1bbbbf2ef
Test: adb connect/shell/disconnect
2019-01-25 17:55:06 -08:00
Nicolas Geoffray
a9b4f2b66b Make runtime namespace visible.
So that ART can look it up by name.

Test: m && boots
Change-Id: Ib747a92e7decad2f9effe976a771a4eb0becc440
2019-01-26 01:06:43 +00:00
Tom Cherry
eb6da459a0 fs_mgr: test parsing all mount and fs mgr options
Test: these new unit tests
Change-Id: Ibdecf0c97b313dc157b982340ca022b617757383
2019-01-25 16:03:52 -08:00
Tom Cherry
151a17f015 fs_mgr: convert parse_flags over to C++
Fixes a bug where verify= and a path is not respected.
Keeps the default value of -1 for swap_prio, zram_size, and the vold
managed partition number in the case of not being able to parse their
values.

Test: fs_mgr unit tests, boot
Change-Id: I41bd92a7a2f9165d62134704cb7a1209d76a2071
2019-01-25 16:03:39 -08:00
Christopher Ferris
b1c9c20eb2 Add GetPrintableBuildID().
The GetBuildID() function returns the raw build id data, so add a function
to get the printable hex version of the data.

Bug: 120606663

Test: New unit tests pass.
Change-Id: Ia5aefc97457efb08bbd30ea96cbb2d47ae59f954
2019-01-25 14:31:37 -08:00
Josh Gao
79f60a9bab Merge "adb: convert more stuff to unique_fd." 2019-01-25 21:48:28 +00:00
Dongwon Kang
9819ade714 Merge "Add mediametrics to ld.config.legacy.txt" 2019-01-25 21:40:33 +00:00
Hridya Valsaraju
6c8fca6d59 Make 'fastboot boot' command support boot header version 2
New arguments 'dtb' and 'dtb-offset' have been added to
support boot image header version 2 for the 'fastboot boot'
and 'fastboot flash:raw boot' commands.

Test: fastboot boot Image.lz4 --dtb <dtb_path> --header-version 2
Test: fastboot flash:raw boot Image.lz4 --dtb <dtb_path>
--header-version 2
Bug: 111136242

Change-Id: Idf5c2eb138609dc7e915e80c4db64677c89f24b6
2019-01-25 12:52:27 -08:00
David Anderson
212693c7ae Merge "init: Format userdata_gsi if needed." 2019-01-25 20:39:49 +00:00
Christopher Ferris
e1f7a63a4d Add a few leak check tests.
These tests are meant to replace the leak check tests from libbacktrace.

Bug: 120606663

Test: Ran tests on host and target.
Change-Id: I928b199304afc36b4bac78e9a2cd688b6f2910b9
2019-01-25 12:35:19 -08:00
Tom Cherry
7e34f75075 fs_mgr: store file_contents_mode and file_names_mode directly
It doesn't really make sense to have extra logic to convert these
strings to enums then back again to strings for usage, especially
since with the C++ fstab, these strings are small enough to fall into
the small string optimization of std::string.

This will help make future changes cleaner as well.
Test: boot, fs_mgr_test

Change-Id: I5669ed10f2fc3eafdb137747446a2e93c24d55c4
2019-01-25 11:14:29 -08:00
Neil Fuller
e41489a9a1 Merge "Move APEX symlink creation to alternative module" 2019-01-25 18:42:12 +00:00
Wei Wang
0d78bfbc09 Fix path for default prop
Bug: 123407630
Test: boot
Change-Id: Ia10ac6ad141e980abb07d7b37487f9de9ef64796
2019-01-25 10:30:47 -08:00
Treehugger Robot
4830ba0fd1 Merge "Convert Android.mk file to Android.bp" 2019-01-25 18:17:54 +00:00
Tri Vo
6600f978a4 Merge "Read selinux_denial_metadata from /vendor" 2019-01-25 17:51:48 +00:00
Dongwon Kang
0095e35fdd Add mediametrics to ld.config.legacy.txt
Test: TH
Bug: 119675363
Change-Id: Ic2fa2cf1931b40f0f476e8be797aa0db9a2582b7
2019-01-25 09:26:17 -08:00
Tom Cherry
afa0d88eea Merge "Update fs_mgr tests for new fstab format and add to TEST_MAPPING" 2019-01-25 17:25:58 +00:00
Mark Salyzyn
f98d6c49e0 fs_mgr: ReadDefaultFstab suppress ReadFstabFromDt logging
Since we are moving the fstab from DT into the ramdisk fstab, the
logging from ReadFstabFromDt when reading the default fstab is
turning into logging noise.

Test: compile
Bug: 122602260
Change-Id: Icba0962c13d701afce2dc7c4f23712dd47ea0100
2019-01-25 09:22:39 -08:00
Suren Baghdasaryan
1bcb634958 Merge changes from topic "re-revert move sched_policy functions"
* changes:
  DO NOT MERGE: Revert "Revert "Add dependencies on libprocessgroup for sched_policy users""
  DO NOT MERGE: Revert "Revert "libcutils: Move sched_policy functions into libprocessgroup""
  DO NOT MERGE: Revert "Revert "Add libprocessgroup into VNDK""
2019-01-25 17:09:02 +00:00
Elliott Hughes
cdd0aaa3ae Merge "Remove dead code." 2019-01-25 17:01:27 +00:00
Suren Baghdasaryan
9491078300 DO NOT MERGE: Revert "Revert "Add dependencies on libprocessgroup for sched_policy users""
This reverts commit 1bef8c550c.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ib341ac80e2f88c13a7815a490ea2d9422ebdf55f
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:49:18 +00:00
Suren Baghdasaryan
1bd127b72e DO NOT MERGE: Revert "Revert "libcutils: Move sched_policy functions into libprocessgroup""
This reverts commit b5394db682.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ie1a2e0200600214a65f4fe2250c903c8e8ce0a29
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:49:09 +00:00
Suren Baghdasaryan
7bf4381a82 DO NOT MERGE: Revert "Revert "Add libprocessgroup into VNDK""
This reverts commit c4a02d25a9.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ifc1c4d51aa1b168ef62cf58275b908d98b9a04bf
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 16:48:58 +00:00
Treehugger Robot
1420c1371f Merge "Populate header size for boot image header version 2 correctly" 2019-01-25 16:24:58 +00:00
Treehugger Robot
c6792c3643 Merge "vndk: workaround for building ld.config.<ver>.txt" 2019-01-25 15:41:49 +00:00
Justin Yun
5579bf14f6 vndk: workaround for building ld.config.<ver>.txt
ld.config.27.txt requires additional search paths for vendor
processes. Substitute '#VNDK27#' when building ld.config.<ver>.txt.
If <ver> equals 27, remove '#VNDK27#'. Otherwise, remove whole line
that starts with '#VNDK27#'.

Bug: 123209911
Bug: 123390078
Test: build ld.config.27.txt
Change-Id: Ie3a284ab39f17fa2f9a3285e080b2ba0da3663dc
2019-01-25 19:49:19 +09:00
Nicolas Geoffray
0e964ad1e8 Merge "Add APEX namespaces in ld.config.legacy.txt." 2019-01-25 09:44:20 +00:00
Treehugger Robot
6a92b5c9c3 Merge "give media apex access to libmediametrics" 2019-01-25 08:22:19 +00:00
Sasha Smundak
3a62fc44e8 Convert Android.mk file to Android.bp
See build/soong/README.md for more information.

Bug: 122332380
Test: treehugger
Change-Id: I39a69c722922cfb19059d10ff37132442f0337ba
2019-01-24 21:16:39 -08:00
Treehugger Robot
8306597e8f Merge "Fix crash in libunwindstack." 2019-01-25 04:29:30 +00:00
Ray Essick
baa0ce3785 give media apex access to libmediametrics
Bug: 112555455
Test: build, ctsmedia
Change-Id: I5455449533a6647fb2b4f617728ae693b2156fb9
2019-01-24 19:45:00 -08:00
Hridya Valsaraju
a057a33e68 Populate header size for boot image header version 2 correctly
Bootimage header size for header version 2 was being populated
incorrectly. Also, throw an error when an unsupported boot header
version is passed in as an argument.

Test: can see correct header size using unpack_bootimg.py
Bug: 111136242
Change-Id: Ia4ed7b2469a5296546627c91f441c496d67f5ce3
2019-01-24 16:48:51 -08:00
Florian Mayer
c479e4e789 Fix crash in libunwindstack.
Bug: 122657596

Test: New unit test that crashes without this change.
Change-Id: I5d978530a833345def94a58805d7ee93b23382bb
2019-01-24 16:29:36 -08:00
Tri Vo
9ffdf5945d Merge "selinux: account for /product hash" 2019-01-25 00:04:34 +00:00
Treehugger Robot
4c1798b6c1 Merge "libunwindstack: Move DwarfOp callback table to rodata section" 2019-01-24 23:44:29 +00:00
David Anderson
10b0a155ee Merge "Don't error on block size mismatches." 2019-01-24 22:20:18 +00:00
Josh Gao
b42946a6d3 Merge "adbd: compile for host." 2019-01-24 21:53:26 +00:00