Commit graph

43645 commits

Author SHA1 Message Date
Treehugger Robot
001c6b9c01 Merge "fs_mgr: overlayfs: test issues with single super device" 2018-12-17 22:59:55 +00:00
Treehugger Robot
ece144857b Merge "Revert "Linker namespace configuration for the Runtime APEX."" 2018-12-17 22:55:15 +00:00
Tri Vo
80e191af8b Merge "Reland "Remove obsolete ueventd.rc rules."" 2018-12-17 22:16:36 +00:00
Mark Salyzyn
eb9b11c096 Merge "llkd: adbd is allowed to be a bad parent on userdebug" 2018-12-17 21:51:29 +00:00
Andreas Gampe
a0d9f2fd6c Revert "Linker namespace configuration for the Runtime APEX."
This reverts commit f1038896ad.

Reason for revert: Breaks CTS

Bug: 119867084
Bug: 113373927
Bug: 121149887
Change-Id: I44b3e708ff1c87520bcfb64f509bf3ae6871f7bc
2018-12-17 21:22:53 +00:00
Mark Salyzyn
38a17f0d76 fs_mgr: overlayfs: test issues with single super device
Cleanup test issues with single super device.  Indicate mount point
instead of partitions as that can lead to confusion when referencing
the partition when there is none.  For example root (/) partition
uses overlay on /system.  Resolve a script syntax error when there
are no devices.  Fix script logic surrounding detection of overlayfs
takeover and handling of reboot device request from
adb disable-verity.

In README.overlayfs.md discuss
BOARD_<partitiion>IMAGE_PARTITION_RESERVED_SIZE and its negative
impact on right sizing.

Soften README.overlayfs.md wording with respect to update_engine
to match changes in handling.

Test: adb-remount-test.sh
Bug: 120536582
Bug: 109821005
Change-Id: Iad7e19a436322ff9c3bdc597f4545028be112ff5
2018-12-17 11:26:03 -08:00
Treehugger Robot
17d41711c6 Merge "Change --fastdeploy behaviour" 2018-12-17 11:10:18 +00:00
Treehugger Robot
567c45e10e Merge "Fix sign-compare warnings" 2018-12-17 00:51:13 +00:00
Neil Fuller
7eabef54ee Merge "Track movement of tz files into the runtime module" 2018-12-15 11:25:52 +00:00
Treehugger Robot
8fe0eb46c0 Merge "Allow init to skip mounting /product and /product_services" 2018-12-15 01:13:38 +00:00
Josh Gao
ac64da1637 Merge "libdebuggerd: add timestamp to tombstones." 2018-12-15 00:12:24 +00:00
Yi Kong
e93040c618 Fix sign-compare warnings
system/core/fs_mgr/fs_mgr_fstab.cpp:161:18: error: comparison of integers of different signs: 'int' and 'const uint64_t' (aka 'const unsigned long') [-Werror,-Wsign-compare]
        if (flag == j->flag) {
            ~~~~ ^  ~~~~~~~

system/core/fs_mgr/fs_mgr.cpp:674:11: error: comparison of integers of different signs: 'int' and 'std::__1::vector<FstabEntry, std::__1::allocator<FstabEntry> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
    if (i < fstab.size()) --i;
        ~ ^ ~~~~~~~~~~~~

Test: m checkbuild
Change-Id: I056add222a92f99134a49ac141bd143ddd54179b
2018-12-14 16:02:38 -08:00
Tri Vo
16cdffe8cb Reland "Remove obsolete ueventd.rc rules."
/dev/* nodes referenced in the removed rules are not present on Pixel
devices, i.e. android platform doesn't depend on these nodes. If a
device relies on one of these rules, the rule should be added to the
device-specific ueventd.rc.

v1->v2:
Added back usb-specific rules
/dev/bus/usb/*            0660   root       usb
/dev/mtp_usb              0660   root       mtp

Bug: 110962171
Test: boot walleye
Test: init_tests
Test: wired headset plays audio
Test: USB PTP works between 2 devices
Change-Id: Ic2d77806a01c8918b2485fb5f0bd9b670b01d1df
2018-12-14 14:57:54 -08:00
Treehugger Robot
010a85afe5 Merge "fs_mgr: overlayfs: test w/o sepolicy in enforced mode" 2018-12-14 22:27:17 +00:00
Josh Gao
6f4644d15b libdebuggerd: add timestamp to tombstones.
Bug: http://b/120099273
Test: debuggerd_test
Change-Id: I457506f8d9920d969e1eba0265f85693b484f1a9
2018-12-14 13:29:52 -08:00
Mark Salyzyn
00289c9c79 Merge "llkd: make 100% sure process that triggers panic still exists" 2018-12-14 20:35:08 +00:00
Treehugger Robot
9a7a50aea0 Merge "fstab: allow mounting other slot" 2018-12-14 17:53:33 +00:00
Mark Salyzyn
599958d114 llkd: adbd is allowed to be a bad parent on userdebug
If an errant process is identified, and the parent is adbd,
on userdebug builds bypass monitoring the process.

Test: unit tests
Bug: 120983740
Change-Id: I2af0797504326b0e95aa4377918b35d17716a6a2
2018-12-14 08:44:33 -08:00
Neil Fuller
c71a48ba55 Track movement of tz files into the runtime module
The main "base" copy of time zone data is now found in
the runtime module. The system files will likely be deleted.

Test: CTS: run cts -m CtsHostTzDataTests
Test: PTS (cp'd to internal master): run pts -m PtsTimeZoneTestCases
Bug: 116191025
Bug: 119293618
Bug: 113373927
Test: build / boot with logcat inspection
Change-Id: I8dc8ff0d17aac124262d9c7c54abce61d97397e5
2018-12-14 15:32:39 +00:00
Henry Daitx
ee01c80afe Change --fastdeploy behaviour
--fastdeploy does not require -r anymore, and reverts to a normal install
if the application is not already on the device.

Bug: 120828611

Test: mm -j72
Test: adb install --fastdeploy --force-agent --local-agent /mnt/raid/boat-attack-apk/boat-attack-swappy.apk
Change-Id: Ice2a71493a34ee7d0debabcce6a9aebb0af79e62
2018-12-14 15:25:15 +00:00
Martin Stjernholm
1d6969ccb9 Merge "Use libdexfile external API in libunwindstack." 2018-12-14 13:36:30 +00:00
Bowgo Tsai
1f4b4f99ca Allow init to skip mounting /product and /product_services
mainline-core is still in the progress of defining interfaces between
/system, /product, /product_services. Before that was completely done,
just updating /system to GSI usually couldn't boot a device.

Therefore, this CL allows GSI to specify a config file, telling init
not to mount /product and /product_services. And fallback to
/system/product and /system/product_services in the GSI.

Bug: 120208657
Test: boots a device with /system/etc/init/config/skip_mount.cfg and
      checks both /product and /product_services are not mounted.

Change-Id: Ibe2abad30b178a6e552fb21e4b30207fc3ef5523
2018-12-14 21:35:25 +08:00
Bowgo Tsai
4c80edf9cd fstab: allow mounting other slot
Adding a new fs_mgr flag 'slotselect_other' to mount _b when _a is
active, or vice versa.

Bug: 113182233
Bug: 112103720
Test: `mount_all fstab.test` with one line using `slotselect_other`.

Change-Id: I96c63141df7722dc30ca9817b0b154e493b9eef9
2018-12-14 05:50:21 +00:00
Treehugger Robot
42c9e7e393 Merge "fs_mgr: overlayfs: test inAdb and inFastboot" 2018-12-14 04:12:12 +00:00
Mark Salyzyn
436464ab71 fs_mgr: overlayfs: test w/o sepolicy in enforced mode
Skip sepolicy test if device is not in enforcing mode.

Test: adb-remount-test.sh
Change-Id: I1558674819bda0c9f575d5202f693fec55c9d84f
2018-12-13 16:48:41 -08:00
Mark Salyzyn
f7572ec8ff fs_mgr: overlayfs: test inAdb and inFastboot
If no serial number is supplied, then check if there is 0 devices

Test: adb-remount-test.sh
Change-Id: Ie78c379078d3d99d67594a5be1a22795bfcc6d36
2018-12-13 16:19:35 -08:00
Treehugger Robot
8f1fcd5b94 Merge "fs_mgr: allow boot_devices to be supplies on the kernel commandline" 2018-12-13 22:28:34 +00:00
Christopher Ferris
0d7c0f78c4 Merge "Do not remove speculative frames in all cases." 2018-12-13 21:04:44 +00:00
Treehugger Robot
b5ab83903c Merge "relax /system/bin directory permissions" 2018-12-13 20:54:25 +00:00
Tom Cherry
6bbe9477f3 fs_mgr: allow boot_devices to be supplies on the kernel commandline
boot_devices in device tree is our last remaining device tree entry
for specifying the kernel commandline.  Since this doesn't make sense
to be included in the fstab, especially as there is no way to
differentiate between different boot devices within a single device
tree as some devices do, it is moved to the kernel commandline.

Bug: 117933812
Test: boot blueline without boot_devices in DT
Change-Id: If498836ae2ef14e68ff761338ef352c20c4a7b3d
2018-12-13 11:13:28 -08:00
Nick Kralevich
53842f8a90 relax /system/bin directory permissions
In commit f4fc922f0b, we tightened the
permissions on various bin directories. Please see
https://android-review.googlesource.com/c/platform/system/core/+/822955
for details.

This change causes the Chase banking app to crash. This is because
the Chase app is using inotify_add_watch() on the /system/bin directory
and not checking the return value.

The Android Security model guarantees the immutability of files in
/system/bin, so the inotify watch is unnecessary.

Until the Chase app fixes their bug, we need to relax the permissions on
the /system/bin directory. Conceptually, this is a partial revert of
f4fc922f0b.

Bug: 119605322
Test: compiles
Change-Id: Ic72dd24cb27cff677093963bdfd0ae09bf132e08
2018-12-13 10:56:33 -08:00
Christopher Ferris
065f156195 Do not remove speculative frames in all cases.
If the first frame of an unwind is a totally invalid pc that's not in
any map, a speculative frame is added. Rather than deleting this frame
if no more unwinding is possible, leave it. This fixes a case where
the only frame you get is an invalid one, but the speculative frame
winds up in a shared library or somewhere else and gets removed.

Bug: 120505086

Test: New unit tests to catch this case pass.
Test: Verified original crashing program now emits two backtrace lines.
Change-Id: I088dff21c057386dcdaeb3fc2578b24322683bd0
2018-12-13 10:41:08 -08:00
Tom Cherry
41216e591b Merge "Allow specifying vbmeta/parts via fstab" 2018-12-13 18:24:34 +00:00
Martin Stjernholm
444e23d2fc Use libdexfile external API in libunwindstack.
Test: mmma system/core/{libunwindstack,libbacktrace}, run host gtests
Test: Make image, flash, and reboot device.
Bug: 119632407
Change-Id: I370f089a1b20ba432e136818b4325d46f99df708
2018-12-13 17:58:23 +00:00
Treehugger Robot
8f3ed62422 Merge changes Ic9957cb3,If7ae257c
* changes:
  fs_mgr: adb-remount-test in non overlayfs world
  fs_mgr: errno handling in fs_mgr_overlayfs_setup()
2018-12-13 15:32:14 +00:00
Treehugger Robot
72335650ef Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master" 2018-12-13 05:45:20 +00:00
Christopher Ferris
583ce2deff Merge "Fix handling of ro segments for embedded libs." 2018-12-13 03:18:58 +00:00
Josh Gao
78f94a39f2 Merge changes I042f25f8,I973f42c5,Icb4acea5
* changes:
  adbd: add source/sink services.
  adb: make `adb raw` bidirectional.
  adb: remove incorrect use of RTTI.
2018-12-13 01:26:49 +00:00
Treehugger Robot
fc216d664a Merge "fs_mgr: remove -Wno-unused-variable from cflags" 2018-12-12 22:27:46 +00:00
Mark Salyzyn
da27fa0b53 fs_mgr: adb-remount-test in non overlayfs world
Extend test script to check non overlayfs case too.  Establish
whether overlayfs is supported, or needed, and adjust expectations.
For the flash vendor code, make sure it is the _right_ vendor,
skip instead of fail.

Improve quality of the testing and handle more cases.

Test: adb-remount-test.sh
Bug: 109821005
Change-Id: Ic9957cb378d8e7737ffc4ba04078c1cb6bbd1bbd
2018-12-12 14:21:42 -08:00
Mark Salyzyn
d202c55453 fs_mgr: errno handling in fs_mgr_overlayfs_setup()
Do not report errno if ENOENT or ENXIO as it is expected when verity
is in fact disabled or not setup on platform.

Reading the default fstab can also result in ENOENT if fstab or dt
are missing on purpose, but if we get an fstab then restore the
errno as we move on.

fs_mgr_has_shared_blocks sets errno, when all we care about is yes
or no answer (EPERM notwithstanding, which indicates do not know).

If no candidates are found to override, and not caused by EPERM,
then suppress errno.

Test: adb-remount-test.sh
Bug: 109821005
Change-Id: If7ae257cb6b738a64ba43d32805760cc292b2fae
2018-12-12 14:21:10 -08:00
Tom Cherry
de545a4bb3 Allow specifying vbmeta/parts via fstab
We want to move all information required for first stage mount into
the first stage ramdisk instead of using device tree.  A previous
change allowed reading the fstab from the first stage ramdisk, but
'vbmeta/parts' was still in device tree.  This change allows
specifying the required vbmeta/parts information in the fstab.

The new syntax is that instead of simply specifying 'avb' as an fs_mgr
option, a partition may specify 'avb=<vbmeta partition name>' and that
vbmeta partition will also be initialized by first stage init before
attempting to mount any devices.

Bug: 117933812
Test: boot crosshatch without device tree fstab
Change-Id: Ida1a6da988c10d364b3ccdaa6c5d63e5264d1b27
2018-12-12 13:58:44 -08:00
Josh Gao
6eb788298b adbd: add source/sink services.
Add some services that skip the service fd to see how much of a benefit
it'll be to eliminate it.

Test: adb raw source:$((300 * 1024 * 1024)) | pv > /dev/null
Test: dd if=/dev/zero bs=1M count=100 | pv | adb raw sink:$((100 * 1024 * 1024))
Change-Id: I042f25f85b16ae9869cb1f1e306d8671b024ed97
2018-12-12 12:54:28 -08:00
Josh Gao
e89a55dd41 adb: make adb raw bidirectional.
Test: adb raw shell:
Change-Id: I973f42c55c71ffd125e58f76d29100a2d5b0c308
2018-12-12 12:54:28 -08:00
Josh Gao
ce5ce87a66 adb: remove incorrect use of RTTI.
We were dynamic_casting to UsbConnection to check for USB connections,
but the actual type was a BlockingConnectionAdapter wrapping a
UsbConnection, with the result that unplugging an inaccessible (due to
permissions) device on Linux wouldn't make the device go away.

Test: manual
Change-Id: Icb4acea5fd3c3baa9691698686213e122e898e4a
2018-12-12 12:54:03 -08:00
Tom Cherry
898b642d8a fs_mgr: remove -Wno-unused-variable from cflags
Don't know why this was ever specified, but seems reasonable to remove
it now that we're so close.

Test: build
Change-Id: Ia8d056cd1c9660b3c22531317098ace78e661d6a
2018-12-12 10:30:10 -08:00
Treehugger Robot
25a83f0176 Merge "Ignore null-pointer-arithmetic warning from dlmalloc include" 2018-12-12 18:08:01 +00:00
Treehugger Robot
fe3becb56b Merge "Fix performance-for-range-copy warnings" 2018-12-12 17:46:46 +00:00
Tom Cherry
07eea062d5 Merge "Start using new C++ Fstab class widely" 2018-12-12 17:42:45 +00:00
Tom Cherry
23319ebebf Start using new C++ Fstab class widely
Bug: 62292478
Test: boot
Test: adb-remount-test.sh

Change-Id: Id4715af4c1f03e2cfc67de92d3ea58e933685e51
2018-12-12 17:08:09 +00:00