Commit graph

59955 commits

Author SHA1 Message Date
Jaegeuk Kim
4076dc971b fstab: support f2fs compression
Bug: 134580167
Change-Id: I9b1360cceb7b603c0596f3680d20dda4171b3836
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-04-03 14:03:24 -07:00
Josh Gao
68e279641f Merge "adb: add implementation of mempcpy for deficient platforms." am: d956dd78d0 am: 1264028fc7
Change-Id: I278f6cdca366c5c1c4189751dff2e86b3ef29558
2020-04-03 19:51:06 +00:00
Josh Gao
0bd7d43f8b Merge "adb: add implementation of mempcpy for deficient platforms." am: d956dd78d0 am: 1264028fc7
Change-Id: Ia66bca6d22a6f573b48b319c1e00cf23f404f818
2020-04-03 19:50:28 +00:00
Tianjie
85c5d23100 Allow parsing zip entries larger than 4GiB
This cl supports the parsing and extraction of the zip entry who
has a large size than UINT32_MAX. Also add a few checks in the
entry writers to make sure callers have enough space for extraction.

As many users of the library assume the entry size to be 32 bits long,
we keep the 32 bit ZipEntry. We also keep the functions that expect
the 32 bit ZipEntry in the public header file. These 32 bit wrappers
could be removed later once all users recognize the 64 bit ZipEntry.

Bug: 150900468
Test: unit tests pass
Change-Id: Ia6760638ccf51e97dbef6bd55dff352f1e7ce816
2020-04-03 12:46:20 -07:00
Josh Gao
1264028fc7 Merge "adb: add implementation of mempcpy for deficient platforms." am: d956dd78d0
Change-Id: I0a75898349052c4d1a99e3ef856893bbfd419c20
2020-04-03 19:28:15 +00:00
Josh Gao
fbf30e4155 adb: add implementation of mempcpy for deficient platforms.
Bug: http://b/150827486
Test: none
Change-Id: Ic2f4e1c85c9f02e804d849c6cb60b22e15e981d6
(cherry picked from commit 0aafa0f714)
2020-04-03 12:18:29 -07:00
Josh Gao
d956dd78d0 Merge "adb: add implementation of mempcpy for deficient platforms." 2020-04-03 19:11:48 +00:00
Bill Peckham
59f0acc146 Ignore functionfs mounts.
Vendors may add additional functionfs mounts. Since these
will never be remounted, we can safely filter these out.

Bug: 153008210
Test: Test device with previously unfiltered entries.
Change-Id: I7f384b8a0ce93dd6701fe3c4d9dd2557370b31e1
Merged-In: I7f384b8a0ce93dd6701fe3c4d9dd2557370b31e1
2020-04-03 12:10:46 -07:00
Yifan Hong
405da5a9a6 libsnapshot: Add VTS10 VtsLibsnapshotTest
Add VTS10 variant of vts_libsnapshot_test so that
it can be added to vts-kernel test.

Bug: 142513589

Test: vts10-tradefed run vts-kernel -m VtsLibnsapshotTest
Change-Id: I4e2516b94d84acb16f595aab87dd3c0cadad6166
2020-04-03 12:04:32 -07:00
TreeHugger Robot
277e3f76a1 [automerger skipped] Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" into rvc-dev am: f7e5fb6f40 -s ours
am skip reason: Change-Id I811c75e9a4739db149f502b9a43c99a8ed883341 with SHA-1 a806a7153f is in history

Change-Id: I2ab04b34b593a94e355c93a4f503cca19fb3f50b
2020-04-03 18:19:26 +00:00
TreeHugger Robot
f7e5fb6f40 Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" into rvc-dev 2020-04-03 18:02:04 +00:00
Paul Duffin
427a60e592 Revert "Add "com.android.os.statsd" to libprocessgroup apex_available"
This reverts commit 2b859925ea.

Reason for revert: Not needed

The original change was made in an attempt to close a perceived hole in
the apex availability checking. However, there is no such hole and so
this change is unnecessary. While there is a dependency path from the
apex to this module one of the dependencies in that path is from a
static library to a shared library. That dependency does not result in
the code that includes the static library being linked to the shared
library at either build time or runtime. Therefore, the shared library
is not part of the APEX and so does not need to be marked as such.

Bug: 152762638
Test: m droid
Change-Id: I77c3b23d28eca99fcb133cb38eb8863277ac7179
2020-04-03 18:51:46 +01:00
Josh Gao
0aafa0f714 adb: add implementation of mempcpy for deficient platforms.
Test: none
Change-Id: Ic2f4e1c85c9f02e804d849c6cb60b22e15e981d6
2020-04-03 10:13:53 -07:00
Tom Cherry
cb7ecd320c Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" am: 79f3d26b25 am: c336c565a9
Change-Id: I6ba0ea9ca7a97ccd1e9b1104f68a9c12c236668d
2020-04-03 15:17:26 +00:00
Tom Cherry
ae5d38b071 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" am: 79f3d26b25 am: c336c565a9
Change-Id: If58e8f42237c506fd638dea4329b81479c62659f
2020-04-03 15:16:31 +00:00
Tom Cherry
c336c565a9 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" am: 79f3d26b25
Change-Id: I8db461e5165c6f81e63e0289a263c90fa7238ef1
2020-04-03 14:49:35 +00:00
Tom Cherry
79f3d26b25 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" 2020-04-03 14:36:58 +00:00
Tom Cherry
2756f320fe [automerger skipped] Merge "init: don't sync() before shutting down services" into rvc-dev am: 27311fd844 -s ours
am skip reason: Change-Id I6fd7d3a25d3225081388e39a14c9fdab21b592ba with SHA-1 10615eb397 is in history

Change-Id: I05faca41a3d6ba5a64e7fe0d8d3e9131c91c14a4
2020-04-03 02:57:05 +00:00
Tom Cherry
27311fd844 Merge "init: don't sync() before shutting down services" into rvc-dev 2020-04-03 02:40:17 +00:00
Maciej Żenczykowski
1aa0274299 NetlinkEvent - ignore captive portal and pref64 nd user opts
These are provided to userspace by newer kernels.

Test: builds
Bug: 150648313
Change-Id: I811c75e9a4739db149f502b9a43c99a8ed883341
Merged-In: I811c75e9a4739db149f502b9a43c99a8ed883341
2020-04-03 01:01:15 +00:00
Josh Gao
5949fccc42 adb: add dry-run option to push/sync.
Make it easier to benchmark file sync performance by ignoring the file
system.

Bug: https://issuetracker.google.com/150827486
Test: test_device.py
Change-Id: Icfa4b28eb5206f1914c0c163833d070a3748c3ea
2020-04-02 17:11:08 -07:00
Josh Gao
ec44d35fde adb: implement LZ4 compression.
Add support for LZ4 compression, which compresses and decompresses far
more quickly than brotli, at the cost of worse compression ratio.

`adb sync -d system` speeds (in MB/s) on aosp_blueline-eng:

           none    brotli    lz4
USB 3.0     120       110    190
USB 2.0      38        75     63

Bug: https://issuetracker.google.com/150827486
Test: python3 -m unittest test_device.FileOperationsTest{Uncompressed,Brotli,LZ4}
Change-Id: Ibef6ac15a76b4e5dcd02d7fb9433cbb1c02b8382
2020-04-02 17:11:07 -07:00
Josh Gao
2165717875 adb: fix use of wrong union variant.
Also, prepare to add more compression flags.

Bug: https://issuetracker.google.com/150827486
Test: none
Change-Id: I5044e5d5944aff5c18241fd7439baa48e2e09980
2020-04-02 17:11:07 -07:00
Josh Gao
4da40a9a5b adb: fix front_size, front_data.
Bug: https://issuetracker.google.com/150827486
Test: adb_test
Change-Id: I3d2c73a20a703d793efb56e592cf33149815f89b
2020-04-02 17:11:07 -07:00
Josh Gao
49ba558aa8 adb: add interfaces for Encoder/Decoder.
More groundwork to support more compression algorithms.

Bug: https://issuetracker.google.com/150827486
Test: python3 -m unittest test_device.FileOperationsTest{Uncompressed,Brotli}
Change-Id: I638493083b83e3f6c6854b631471e9d6b50bd79f
2020-04-02 17:11:07 -07:00
Bill Peckham
a4a95c8406 Merge "Ignore functionfs mounts." am: 362a41a4f6 am: 300333e210
Change-Id: Ia7ec12b44f436f37d2c3b9336e0c510a100ac278
2020-04-02 23:28:36 +00:00
Bill Peckham
36c627da2a Merge "Ignore functionfs mounts." am: 362a41a4f6 am: 300333e210
Change-Id: I37611b55ba27a5cf7fa07102882c8017bf2274df
2020-04-02 23:27:40 +00:00
Bill Peckham
300333e210 Merge "Ignore functionfs mounts." am: 362a41a4f6
Change-Id: I11933d177368f9255c11a9f3cd5dfb2a541b0a9d
2020-04-02 23:07:53 +00:00
Nikita Ioffe
b86c50d4c3 [automerger skipped] Properly fail userspace reboot if it's not supported am: 6bd3bc8d01 -s ours
am skip reason: Change-Id I1264078f53ed3ff54638c7f3b6846b7437f98ee5 with SHA-1 92116e4129 is in history

Change-Id: I072de643588f5d9c915ff9d6fea498c0c80f875b
2020-04-02 22:57:50 +00:00
Bill Peckham
362a41a4f6 Merge "Ignore functionfs mounts." 2020-04-02 22:46:28 +00:00
David Anderson
46f888176f Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb am: e64cc297b6
Change-Id: Id18c6ebb4b2856d270b1a1652d589864e69a1935
2020-04-02 21:48:27 +00:00
David Anderson
99223931a3 Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb am: e64cc297b6
Change-Id: I62b37c4aca11ce28864a5b5a55ed3937fff659d7
2020-04-02 21:47:45 +00:00
David Anderson
e64cc297b6 Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb
Change-Id: Id16a67880e85e5dea4ca1c889614911730cc3b8e
2020-04-02 21:27:16 +00:00
David Anderson
f9459a45eb Merge "fs_mgr: Allow commas in boot device paths." 2020-04-02 21:11:44 +00:00
Tom Cherry
6288212ac3 init: don't sync() before shutting down services
Devices in the lab are hitting an issue where they're getting stuck
likely in the sync() call in DoReboot() before we start the reboot
monitor thread and before we shut down services.

It's possible that concurrent writing to RW file systems is causing
this sync() call to take essentially forever.  To protect against
this, we need to remove this sync().  Note that we will still call
sync() after shutting down services.

Note that the service shutdown code has a timeout and there is a
reboot monitor thread that will shutdown the device if more than 30
seconds pass above that timeout.  This change increases that timeout
to 300 seconds to give the final sync() calls explicitly more time to
finish.

Bug: 150863651
Test: reboot functions normally
Test: put an infinite loop in DoReboot and the the reboot monitor thread
      triggers and shuts down the device appropriately
Merged-In: I6fd7d3a25d3225081388e39a14c9fdab21b592ba
Change-Id: I6fd7d3a25d3225081388e39a14c9fdab21b592ba
(cherry picked from commit 10615eb397)
2020-04-02 12:51:36 -07:00
Nikita Ioffe
1a17a36546 Improve logging in bootstat.
This should help in debugging issues related to the mismatch between
actual last reboot reason property and the expected one (see attached
bug).

Test: adb reboot
Test: adb logcat | grep bootstat
Bug: 152900920
Change-Id: I085cf1fb80a30389fd3ba821d40b6111a3294d95
Merged-In: I085cf1fb80a30389fd3ba821d40b6111a3294d95
(cherry picked from commit 49062f3b72)
2020-04-02 20:07:04 +01:00
Nikita Ioffe
2b5ac84d54 Merge "Improve logging in bootstat." am: 2884943687 am: 41b977a1fa
Change-Id: I9d71a07074e78742b6574b558f490b09bbdf8e76
2020-04-02 19:00:40 +00:00
Nikita Ioffe
3cc699e1fb Merge "Improve logging in bootstat." am: 2884943687 am: 41b977a1fa
Change-Id: I34cd2c0fef185c01c39ed970f98402efb421517b
2020-04-02 19:00:02 +00:00
Nikita Ioffe
41b977a1fa Merge "Improve logging in bootstat." am: 2884943687
Change-Id: Ie6d6012afd1df347303f4054eee1229d98a80be8
2020-04-02 18:37:37 +00:00
Nikita Ioffe
2884943687 Merge "Improve logging in bootstat." 2020-04-02 18:12:55 +00:00
Nikita Ioffe
6bd3bc8d01 Properly fail userspace reboot if it's not supported
Previously, after `adb reboot userspace` is called on a device that
doesn't suppor it, init would've logged an error and quietly exit the
shutdown sequence. This was leaving adb handing forever.

With this approach, init will fail setprop
"sys.powerctl=reboot,userspace" in case userspace reboot is not
supported.

Test: adb root
Test: adb setprop init.userspace_reboot.is_supported 0
Test: adb reboot userspace
Test: atest CtsInitTestCases
Bug: 146639622
Change-Id: I1264078f53ed3ff54638c7f3b6846b7437f98ee5
Merged-In: I1264078f53ed3ff54638c7f3b6846b7437f98ee5
(cherry picked from commit 92116e4129)
2020-04-02 17:25:48 +01:00
Nikita Ioffe
39dab62ff0 [automerger skipped] Make init.userspace_reboot.is_supported a rw property am: 9fd393f430 -s ours
am skip reason: Change-Id I7552d5ccc6e9b750a6081947eef8fcb027be13e1 with SHA-1 663cd35030 is in history

Change-Id: Iea491137db1f9dd047c3d82ecc6f97d83e860712
2020-04-02 15:37:30 +00:00
Nikita Ioffe
49062f3b72 Improve logging in bootstat.
This should help in debugging issues related to the mismatch between
actual last reboot reason property and the expected one (see attached
bug).

Test: adb reboot
Test: adb logcat | grep bootstat
Bug: 152900920
Change-Id: I085cf1fb80a30389fd3ba821d40b6111a3294d95
2020-04-02 13:03:21 +01:00
Nikita Ioffe
a4761a9775 Merge "Properly fail userspace reboot if it's not supported" am: 2af5bd00b0 am: 62a02cc826
Change-Id: I0fbc4b26b5b8ea30f46dcad0d4ebc772bda3c27e
2020-04-02 11:01:40 +00:00
Nikita Ioffe
d1f4e3ede2 Merge "Properly fail userspace reboot if it's not supported" am: 2af5bd00b0 am: 62a02cc826
Change-Id: Ia9250cd4a4818cd71c9408e38aefcef091416180
2020-04-02 11:00:59 +00:00
Nikita Ioffe
62a02cc826 Merge "Properly fail userspace reboot if it's not supported" am: 2af5bd00b0
Change-Id: I5bfed4253a2eddde7930c64a3aefa0b87902cfc9
2020-04-02 10:44:21 +00:00
Nikita Ioffe
2af5bd00b0 Merge "Properly fail userspace reboot if it's not supported" 2020-04-02 10:23:45 +00:00
Paul Duffin
6ccfc9ab88 Merge "Add "com.android.os.statsd" to libprocessgroup apex_available" into rvc-dev-plus-aosp 2020-04-02 09:42:56 +00:00
Maciej Żenczykowski
d1d22f15c6 Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" am: 23bfaae6dc am: cfe842456e
Change-Id: I4610d73436c4d6f6fde83e478d50071c63fb9ff5
2020-04-02 03:34:55 +00:00
Maciej Żenczykowski
16fa65dee3 Merge "NetlinkEvent - ignore captive portal and pref64 nd user opts" am: 23bfaae6dc am: cfe842456e
Change-Id: I55c5d7c06bd22610967d8ff2d73dadfd201197cf
2020-04-02 03:34:25 +00:00