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
/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
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
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
--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
Pages in .data.rel.ro are always dirty. Move whatever we can to
.rodata so that we reduce memory pressure.
The size of rodata, text, and data.rel.ro sections of linker64 on
cuttlefish before/after this change:
rodata: 0x170e4 -> 0x17964 (+2176 bytes)
text: 0xec919 -> 0xec919 (no change)
data.rel.ro: 0x9cf0 -> 0x98f0 (-1024 bytes)
Test: Boot cuttlefish
Change-Id: Ib2fd2bb0afb50208d441731d8c31bc8f287272c3
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
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
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
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
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
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
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
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
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
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
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
Needs to support e.g. app_process in "default" -> libnativehelper in
"runtime" -> platform libs in "default" -> libc etc in "runtime".
Always make sure to 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. E.g. libc++ and libbase live
in both places, and their dependents must always load the version they were
compiled with.
Bug: 119867084,113373927
Test: Flash and reboot device
Test: Remount / read-write, then on device: rm -f system/lib{,64}/lib{c,m,dl}.so; system/bin/dex2oat -h; stop && start
Test: mmma bionic/tests/ && adb root && adb shell rm -rf /data/nativetest\* && adb push out/target/product/taimen/data/nativetest* /data/ && adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests && adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Test: cts-tradefed run commandAndExit cts -m CtsJniTestCases
Change-Id: I6c4fc2f1abea1fb8851546e258ffaaa4ef6fe7d0
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:4286:61: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
^~~~~~~~~~~~~
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2731:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:2218:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
system/core/libpixelflinger/codeflinger/../../../../external/dlmalloc/malloc.c:1622:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
Test: m checkbuild
Bug: 72331524
Change-Id: Iefc3b4ae6b36ba9f6cb908c03301cbe429ade320
When a shared library is loaded directly from an apk, the new way the
linker splits a shared library into a read-only and execute segment
broke unwinding. Modify the code to handle this case.
Other changes:
- Modify the algorithm for finding read-only map entries. Before, the code
would search the entire map for the closest offset. Now it simply looks
at the previous map. I did this because the old code was too lenient and
might still work even if the linker changes. I want this to break if the
linker behavior changes so that I can analyze the change.
- Update the tools to use PTRACE_SEIZE instead of PTRACE_ATTACH since
PTRACE_ATTACH doesn't work in all cases.
- Small refactor of the GetFileMemory function.
- Add new unit test cases and new offline unwind test cases.
Bug: 120618231
Test: Ran new unit tests, ran original failing test.
Change-Id: I4bade55cf33220d52f1d5e9b0cbbbcc8419669d4