Commit Graph

59224 Commits

Author SHA1 Message Date
android-build-team Robot b757109435 Snap for 6502385 from 74e9e3c27a to rvc-release
Change-Id: I257353e96a4ae342fec9409ab36c290161f5f9e4
2020-05-16 23:02:58 +00:00
Alex Buynytskyy 74e9e3c27a Passing additional flags to incremental installation.
Bug: 150803885
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: Ifa9b9e570259d35eb0121817bbb791044c6efcfd
Merged-In: Ifa9b9e570259d35eb0121817bbb791044c6efcfd
2020-05-14 21:00:10 +00:00
Mark Salyzyn 6fca594fc2 init: failed to set sys.usb.controller
With GKI we find in certain situations the timing of the drivers
loading is delayed as compared to a monolithic kernel.  This
introduces a race where during second stage init, the attributes
inside /sys/class/udc/ might not be set by the time
SetUsbController() is called.

To address this, we also call SetUsbController() until the property
sys.usb.controller is set at the bottom of the event loop.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: make sure user space fastbootd comes up reliably for a GKI kernel
Change-Id: Iececd8ffa3e6641554d215d622d8dab72d85d34d
2020-05-14 13:05:42 -07:00
android-build-team Robot 13de1c3d1f Snap for 6492800 from 7937f29be8 to rvc-release
Change-Id: Ibab7e0bee349ac8e219427bb9186baed883c33d6
2020-05-14 01:11:58 +00:00
Jooyung Han 7937f29be8 Set min_sdk_version to be part of mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: Ida890adfe6dfac79267fc0e18b63d2330266438c
Change-Id: Ida890adfe6dfac79267fc0e18b63d2330266438c
(cherry picked from commit 7ea0d74bc8)
2020-05-13 12:10:36 +09:00
android-build-team Robot 4065746788 Snap for 6488384 from 310b46c1ca to rvc-release
Change-Id: I2e1ca2a817b347538dbdb1de24c57d55305ef921
2020-05-13 01:02:41 +00:00
Christopher Ferris 310b46c1ca Merge "Fix mac build." into rvc-dev 2020-05-12 17:17:25 +00:00
Christopher Ferris 99dfe5ebba Merge "Change call to mmap64." into rvc-dev 2020-05-12 17:17:25 +00:00
TreeHugger Robot 7499783fd9 Merge changes Idaa27ce2,I06644a72,I453c63fe into rvc-dev
* changes:
  processgroup: Set min_sdk_version
  gralloc: Set min_sdk_version
  libcutils: Set min_sdk_version
2020-05-12 09:00:50 +00:00
Maciej Zenczykowski ce7d0ba607 Merge changes I57cb2003,I569d2b81,I01a10e36 into rvc-dev
* changes:
  libnetutils/packet.c - create socket with close-on-exec
  libnetutils/packet.c - fix a raw socket reception race
  libnetutils/packet.c - fix a socket leak on bind error
2020-05-12 01:57:56 +00:00
android-build-team Robot 07c7eed181 Snap for 6484097 from f2caf7de6c to rvc-release
Change-Id: I1f2c53dafd5776bf6272ff069b5b7e3b4da4ff00
2020-05-12 01:02:22 +00:00
TreeHugger Robot 8601d37213 Merge "libsnapshot: fix incorrect assumption of cow images" into rvc-dev 2020-05-12 00:32:22 +00:00
TreeHugger Robot f2caf7de6c Merge "vts_processgroup_validate_test: make deps static" into rvc-dev 2020-05-11 23:33:28 +00:00
Christopher Ferris 1500d0e7a9 Fix mac build.
Add an inline for mmap64 to use on mac.

Bug: 155662887
Bug: 156053599

Test: Builds.
Change-Id: Id02e2c2f40acea2bdef604e9b80b70a85a941927
(cherry picked from commit 8a6dff22dc)
2020-05-11 23:07:53 +00:00
Maciej Żenczykowski ecfb05d4ce libnetutils/packet.c - create socket with close-on-exec
This prevents fork/exec leaking sockets to child processes.

Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I57cb2003dd75b0bc5528978fd131730273e37a43
Merged-In: I57cb2003dd75b0bc5528978fd131730273e37a43
2020-05-11 15:58:02 -07:00
Maciej Żenczykowski 74346aac9c libnetutils/packet.c - fix a raw socket reception race
A socket created bound to a specific protocol can receive packets before
it's bound to a specific interface/mac.

It's best to rely on the bind().

This replicates the way packet sockets are created in external/android-clat.
See: ring.c ring_create() and clatd.c configure_packet_socket()

Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I569d2b81a396f352ab5d1b71bd5ad0d96217aab1
Merged-In: I569d2b81a396f352ab5d1b71bd5ad0d96217aab1
2020-05-11 15:57:53 -07:00
Maciej Żenczykowski b9add4a315 libnetutils/packet.c - fix a socket leak on bind error
and clean up the code a little bit while at it.

Test: builds, atest
Bug: 155297277
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I01a10e36f852cde1b93a91f95b51294a434885ab
Merged-In: I01a10e36f852cde1b93a91f95b51294a434885ab
2020-05-11 15:57:44 -07:00
Yifan Hong 01840c53e8 vts_processgroup_validate_test: make deps static
Test: pass
Fixes: 155959743
Change-Id: I730526955a40ae00a97f487e423a00c743f75d53
(cherry picked from commit 2572f23af8)
Merged-In: I730526955a40ae00a97f487e423a00c743f75d53
2020-05-11 12:32:26 -07:00
Ruchir Rastogi b797431342 Merge "Use proper platform version checks (libstats)" into rvc-dev 2020-05-11 17:22:24 +00:00
Woody Lin 8fb6e3fdaf InitFatalReboot: Trigger panic explicitly for init_fatal_panic
The exit of init panics the system *after* process context (mm, stack,
...etc.) are recycled, according to Linux kernel's 'do_exit'
implementation. To preserve most init process context for debugging,
triggers the panic via proc-sysrq explicitly.

Note: after this change, there will be no "Attempt to kill init" panic
when androidboot.init_fatal_panic is set.

Test: Insert data abort fault in init, the full process context is
      preserved in memory dump captured after panic.
Bug: 155940351
Change-Id: I3393bd00f99b8cb432cfa19a105b7d636b411764
(cherry picked from commit be1cf9006a)
2020-05-11 14:50:27 +00:00
Jooyung Han d1d5fdfc2a processgroup: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: Idaa27ce24cc13d13145eaef85a08b9033922c7bc
Change-Id: Idaa27ce24cc13d13145eaef85a08b9033922c7bc
(cherry picked from commit 4f55f3efd3)
2020-05-11 17:45:27 +09:00
Jooyung Han 3c20c62cdd gralloc: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: I06644a725eb8f4ce0c7d8e1f09359b55e1b668d7
Change-Id: I06644a725eb8f4ce0c7d8e1f09359b55e1b668d7
(cherry picked from commit 72a6b3137e)
2020-05-11 17:44:29 +09:00
Jooyung Han 86455d7f87 libcutils: Set min_sdk_version
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 152655956
Test: m
Merged-In: I453c63fe29607ea0312da5465b03c741486fb670
Change-Id: I453c63fe29607ea0312da5465b03c741486fb670
(cherry picked from commit 88f00f2d43)
2020-05-11 17:43:04 +09:00
Lorenzo Colitti c00d57d353 Simplify code that parses ifa_flags.
When parsing an RTM_NEWADDR or RTM_DELADDR, ifaddr is always
present (unless the message is invalid). So ifaddr->ifa_flags is
always known before any attributes are parsed.

Bug: 155005831
Test: atest NetworkStackNextIntegrationTests:IpClientIntegrationTest continues to apss
Change-Id: Id1998faccca7d81c1b7f3e85e4912aa22919e94a
2020-05-11 11:37:17 +09:00
Lorenzo Colitti 3991ca5657 Parse IFA_F_* values above 0x80.
In RTM_NEWADDR messages, the first 8 flags are reported in the
ifa_flags field in struct ifaddrmsg, but flags above 0x80 are
reported in the IFA_FLAGS attribute. NetlinkEvent currently only
looks at ifa_flags, so it cannot see higher-value flags such as
IFA_F_STABLE_PRIVACY. Fix this by parsing the IFA_FLAGS
attribute.

Bug: 155005831
Test: makes new test in aosp/1295495 pass
Original-Change: https://android-review.googlesource.com/1295670
Merged-In: I723f1106cbcea2186fc6452305942a0f8301fd2a
Change-Id: I723f1106cbcea2186fc6452305942a0f8301fd2a
2020-05-11 11:29:59 +09:00
android-build-team Robot 8ee859b3ac Snap for 6478919 from 8950624662 to rvc-release
Change-Id: Ic025d2ef27237677a2294fe22cecb28b4c9870dd
2020-05-09 23:14:45 +00:00
Chen Zhu 8950624662 Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev 2020-05-09 02:48:48 +00:00
Chen Zhu 5daea5a6a2 Add test config for adbd_test and apply MainlineTestModuleController to it
to only run the tests when com.google.android.adbd is

installed on device.

Bug: 154845935
Test: m mts && mts-tradefed run mts-adbd
Change-Id: I2f203d25288580a07391703e2b28df54479a69f0
2020-05-08 16:47:07 -07:00
android-build-team Robot 65e3d0a9a8 Snap for 6473661 from 1cf1238d4a to rvc-release
Change-Id: I7b14cc60e0bfdd15a55914c00a7fe1ecfc8c563c
2020-05-08 01:02:02 +00:00
Christopher Ferris de38b1a356 Change call to mmap64.
The code was using an off64_t but calling mmap. This caused the code
to abort on 32 bit.

Add a unit test that would abort on the previous version.

Bug: 155662887

Test: New unit test passes.
Change-Id: I7a6efbc0d4227403c3d08a08deea56f239382157
Merged-In: I7a6efbc0d4227403c3d08a08deea56f239382157
(cherry picked from commit 7b9f35c9de)
2020-05-07 17:45:30 -07:00
TreeHugger Robot 1cf1238d4a Merge "first_stage_init: add support to skip module load failures" into rvc-dev 2020-05-07 21:48:05 +00:00
Will McVicker f3483ec6a0 first_stage_init: add support to skip module load failures
Extend androidboot.first_stage_console cmdline property to enable
skipping module load failures without stopping at a serial console. This
is useful for GKI development.

Set androidboot.first_stage_console=2 for this behavior.

Bug: 155296582
Test: verify behavior for values 0, 1, and 2
Merged-In: I068c631a22c848e45a421b297b1acae1b3deb3c1
Change-Id: I068c631a22c848e45a421b297b1acae1b3deb3c1
(cherry picked from commit 6c5f82642b)
2020-05-07 21:47:17 +00:00
David Anderson 7d50e96978 Merge "libfiemap: Remove brittle tests." into rvc-dev 2020-05-07 19:34:04 +00:00
David Anderson 4adbeb470f Merge "fastboot: Fix snapshot-update merge behavior." into rvc-dev 2020-05-07 19:32:43 +00:00
Ruchir Rastogi 4ae167e829 Use proper platform version checks (libstats)
Test: bit libstatspush_compat_test
Bug: 146019024
Change-Id: If99a7067944ddfbe30bb0ddfe586a337a94d4c07
2020-05-07 12:31:39 -07:00
android-build-team Robot e86fd601b8 Snap for 6469672 from 67a2bebf74 to rvc-release
Change-Id: I16b81e93f6b940f6f94dd130ce20781b0ae3a24c
2020-05-07 01:12:46 +00:00
TreeHugger Robot 67a2bebf74 Merge "Using ABB for install-multi." into rvc-dev 2020-05-06 23:00:02 +00:00
Yifan Hong 82035d6b82 libsnapshot: fix incorrect assumption of cow images
libsnapshot used to assume CoW images are always mapped
with device mapper, and call GetDeviceString directly.
However, in tests, it is possible that it is mapped as loop
devices. Fix the incorrect assumption and calls
IImageManager::GetMappedImageDevice instead.

Test: libsnapshot_fuzzer with corpus
Bug: 154633114
Change-Id: I1ec39744480e514ae7a7902643ed863e0ca0a340
(cherry picked from commit e6c1a84276)
Merged-In: I1ec39744480e514ae7a7902643ed863e0ca0a340
2020-05-06 15:12:22 -07:00
Alex Buynytskyy 13e98eaf72 Using ABB for install-multi.
ABB uses single shared CMD for all operations which improves
reliability.

Bug: b/153486595
Fixes: 153486595
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I1e3da63882c980811ed2e9f5556732b24a041ce5
Merged-In: I1e3da63882c980811ed2e9f5556732b24a041ce5
2020-05-06 14:10:56 -07:00
David Anderson 3afca7c11e libfiemap: Remove brittle tests.
libfiemap functionality is extensively tested via libsnapshot, gsid, and
fiemap_writer_test. However those tests rely on the configuration of the
device, and libfiemap has fairly different behavior based on whether FBE
or metadata encryption is in use. (The former will use loop devices, the
latter uses dm-linear).

To expand coverage, we added tests with very complicated nesting,
creating fiemaps on a rw partition mounted off a device backed by a
fiemap. Unsurprisingly, this was brittle to begin with, and now
consistently fails due to the intermediate partition not having
sepolicy.

Given the preference toward metadata encryption, and the fact that the
FBE mode will still be properly tested via VTS, let's just remove these
tests.

Bug: 148874852
Test: fiemap_image_test
Change-Id: I7be7d44dea81508505c050ed995b3b78086ad35f
Merged-In: I7be7d44dea81508505c050ed995b3b78086ad35f
2020-05-05 19:16:21 -07:00
android-build-team Robot d500cb8697 Snap for 6465574 from 9842adf768 to rvc-release
Change-Id: I37434436c099871ada4c31ac3f629c9d5fd8d7a9
2020-05-06 01:03:57 +00:00
Tim Murray 9842adf768 Merge "mark atrace buffers as uninitialized" into rvc-dev 2020-05-05 22:33:04 +00:00
Tim Murray 0f85154117 mark atrace buffers as uninitialized
The atrace buffer does not need to be zero-initialized every time.

Test: memset calls from atrace_{begin,end}_body are gone
bug 155788214

Change-Id: I8082b6a9e6d6328f4aee3a22137977e9fae21933
2020-05-05 18:37:02 +00:00
android-build-team Robot f1e38b4316 Snap for 6461449 from 4cfdfef1bf to rvc-release
Change-Id: I26483a0ee17bb546ba1a1de800f7ba6498a91e15
2020-05-05 01:11:41 +00:00
TreeHugger Robot 4cfdfef1bf Merge "stats: Set min_sdk_version" into rvc-dev 2020-05-04 23:11:27 +00:00
David Anderson f2f5edd9d5 fastboot: Fix snapshot-update merge behavior.
When merging in recovery, the "imminent data wipe" code was used, which
made the assumption the /metadata and /data state would be zapped. This
caused future OTAs to error because the old snapshots were detected.

This CL allows OTAs to proceed even if unexpected snapshots are present.
It also forces the state to "MergeCompleted" after a merge in recovery,
so that the next normal boot can perform cleanup.

Bug: 155339165
Test: fastboot snapshot-update merge, then take another OTA
      vts_libsnapshot_test
Change-Id: Ief6dea3ba76323044e61307272dda320a4494aea
Merged-In: Ief6dea3ba76323044e61307272dda320a4494aea
2020-05-04 15:53:06 -07:00
android-build-team Robot 0f794a1ce5 Snap for 6456040 from 64021d834a to rvc-release
Change-Id: I1b5d829fa886ff37fa693ac93635e5dc1f4521b5
2020-05-02 23:02:58 +00:00
Christopher Ferris 64021d834a Merge "Fix dangling pointer issue in LocalUpdatbleMaps" into rvc-dev 2020-05-02 16:28:23 +00:00
Yifan Hong 5b182952de Merge "Handle zero snapshot size appropriately." into rvc-dev 2020-05-02 04:47:00 +00:00
android-build-team Robot 74210e8777 Snap for 6453963 from 0b4313fede to rvc-release
Change-Id: I81602a81755c269dc1b0a957154a76a92a96f70d
2020-05-02 01:13:16 +00:00