Commit graph

58336 commits

Author SHA1 Message Date
Treehugger Robot
a3238e04f7 Merge "init: fix README.md about perform_apex_configs" am: 389d8885a8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1325691

Change-Id: I320bfbf4a74c0da6f6c3e166ac85d7a68e4b2db4
2020-06-09 15:18:49 +00:00
Treehugger Robot
389d8885a8 Merge "init: fix README.md about perform_apex_configs" 2020-06-09 15:06:54 +00:00
Alistair Delva
59f6b8ed50 Merge changes from topic "default-fstab-swapon_all" am: a3ed46533c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326173

Change-Id: I8288152cdbacde9a58eff8df7e3835da5499804e
2020-06-08 23:54:38 +00:00
Alistair Delva
886bb952b4 Add documentation for umount_all am: 6c6a36fb31
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326172

Change-Id: I06f57b3c1957ea589a2e9d33f06844bbcef2817c
2020-06-08 23:54:36 +00:00
Alistair Delva
a3ed46533c Merge changes from topic "default-fstab-swapon_all"
* changes:
  Respect ro.boot.fstab_suffix in swapon_all
  Add documentation for umount_all
2020-06-08 23:41:51 +00:00
Alistair Delva
de28a8651f Respect ro.boot.fstab_suffix in swapon_all
While mount_all and umount_all were updated to use ro.boot.fstab_suffix,
I neglected to update swapon_all. Trivially copied from umount_all.

Bug: 142424832
Change-Id: Icd706fe7a1fe16c687cd2811b0a3158d7d2e224e
Merged-In: Icd706fe7a1fe16c687cd2811b0a3158d7d2e224e
2020-06-08 23:41:40 +00:00
Treehugger Robot
63d66709c4 Merge "Stop using varargs in libkeyutils." am: ad3874e025
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1326171

Change-Id: I309fa2101804f0d7eed4109ff20f19eb14b13730
2020-06-08 21:31:28 +00:00
Treehugger Robot
ad3874e025 Merge "Stop using varargs in libkeyutils." 2020-06-08 21:24:18 +00:00
Josh Gao
c10af3984c Merge "Move libadbd_auth, libadbd_fs to adbd_system_binaries." am: b99f194d05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322057

Change-Id: Icb7cd0eabf954f998213142fd3ad319379ae418d
2020-06-08 21:16:40 +00:00
Josh Gao
b99f194d05 Merge "Move libadbd_auth, libadbd_fs to adbd_system_binaries." 2020-06-08 21:00:19 +00:00
Treehugger Robot
99d1b562c0 Merge "Logtags for input flinger" am: cbe630dbc6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324644

Change-Id: I302eb3efaba19b870d6be9fe60f1561e9d5ea31d
2020-06-08 18:12:16 +00:00
Alistair Delva
6c6a36fb31 Add documentation for umount_all
The mount_all and swapon_all commands are documented, but umount_all
is not. Add some documentation.

Bug: 142424832
Change-Id: I7e4dcb4d222b787350a79c9e312062cac9eeb4d8
2020-06-08 10:51:40 -07:00
Treehugger Robot
cbe630dbc6 Merge "Logtags for input flinger" 2020-06-08 17:47:31 +00:00
Paul Lawrence
2ecb203992 Merge "Set block size in dm-bow" am: 2709331f90
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322011

Change-Id: I2824629e96ba28d2248cf82180f11935dcac269c
2020-06-08 17:25:25 +00:00
Paul Lawrence
2709331f90 Merge "Set block size in dm-bow" 2020-06-08 17:07:36 +00:00
Elliott Hughes
44a5f0ed7f Stop using varargs in libkeyutils.
It's error-prone, and our specific usage of it here upsets ubsan.

Bug: https://issuetracker.google.com/158428513
Test: treehugger
Change-Id: I3a6b68865e6b4c37ac005f5f24c3d6e1de7c5bac
2020-06-08 09:27:17 -07:00
Tom Cherry
051f89acea Merge "logcat: filter based on UID" am: 71de690f60
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324632

Change-Id: Ibe1ad260c4f9684854c56af839a689d11d61711a
2020-06-08 16:11:27 +00:00
Tom Cherry
71de690f60 Merge "logcat: filter based on UID" 2020-06-08 15:58:39 +00:00
Jooyung Han
ea138c8695 init: fix README.md about perform_apex_configs
parse_apex_configs was renamed with
13e51e7f0b.

Bug: n/a
Test: n/a
Change-Id: I6e60d64f915fa9ed47c5ec1195a9b371f68f1134
2020-06-08 18:22:15 +09:00
Jooyung Han
59a906419d Merge "Make libsync a stubs library" am: cba44a3c56
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324314

Change-Id: I0be630c81a5026352a3c54b0977ce60fab4cf93a
2020-06-08 07:23:25 +00:00
Jooyung Han
cba44a3c56 Merge "Make libsync a stubs library" 2020-06-08 07:11:10 +00:00
Treehugger Robot
5ada180bf1 Merge "Fix fastboot flash-all on Nexus 7." am: a552265ec9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324873

Change-Id: Ie1a0ca4e8d28e752d872e9738b9d2242c53ef2db
2020-06-06 00:30:06 +00:00
Rick Yiu
30ec7c391c Merge "Fine tune blkio setting to improve boot time" am: cb63bed8b5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322741

Change-Id: I8579ae84c15695e8a2302cf79303bf050ad4a06c
2020-06-06 00:29:55 +00:00
Treehugger Robot
a552265ec9 Merge "Fix fastboot flash-all on Nexus 7." 2020-06-06 00:26:19 +00:00
Rick Yiu
cb63bed8b5 Merge "Fine tune blkio setting to improve boot time" 2020-06-06 00:17:09 +00:00
Elliott Hughes
6a7ff5811d Fix fastboot flash-all on Nexus 7.
The Nexus 7 bootloader just returns the empty string for unknown
variables, which confused the new snapshot code.

Bug: https://issuetracker.google.com/158232468
Test: no Nexus 7 available during covid-19 :-(
Change-Id: I35ff8889b27944e8b7426eca4f513d9fa562c6d4
2020-06-05 14:09:21 -07:00
Siarhei Vishniakou
9243090395 Logtags for input flinger
Reserve logtags 62000 -> 62199 for inputflinger

Bug: 153092301
Test: build with ag/10998853
Change-Id: If87f8e8e39bd445dfa7c96a542482c9ff3bf3fd3
2020-06-05 12:37:43 -07:00
Tom Cherry
9291f0f566 logcat: filter based on UID
Bug: 153761317
Test: logging works normally without --uid
Test: logging filters based on uid with --uid
Change-Id: I6843fa635831c727c0236ac5534862e11447484b
2020-06-05 10:02:44 -07:00
Tom Cherry
bf6fcb6051 Merge changes I957c519b,Iaf4e389e,I92f8056b am: a1f1775172
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1323609

Change-Id: I59e16606760feeb8ab9b90ea1ef05e722d20fdc1
2020-06-05 15:32:40 +00:00
Tom Cherry
a1f1775172 Merge changes I957c519b,Iaf4e389e,I92f8056b
* changes:
  logd: remove faulty optimization
  logd: don't store the map key in its value
  logd: use libbase logging
2020-06-05 15:21:13 +00:00
Paul Lawrence
2f0c6cb0f7 Set block size in dm-bow
Fix block-level checkpointing to work correctly when used in combination with
512 byte hardware sectors and metadata encryption with dm-default-key v2.

Bug: 153512828
Test: Parameter is passed to dm-bow based on first_api_level
Change-Id: Ic0a071221559271db20b06b2f17459b5b041e02d
2020-06-05 07:47:45 -07:00
Jooyung Han
78fc553d68 Make libsync a stubs library
libsync is an NDK/LLNDK library but it's missing "stubs" key. So, when
it is referenced by an APEX, it is bundled in APEX package.

By adding "stubs" property, we can make it a stubs library and APEXes
use it from the system instead of bundling it.

Note that the symbol(sync_wait) is exposed to APEX because it is used
by libui which is used by media APEXes again.

Bug: 158270824
Test: lunch mini_armv7a_neon   # no VNDK
      m com.andorid.media.swcodec
      // see if libsync is not in the APEX
Change-Id: I39e682328acb5cc363a4242601e5bf1470938dac
2020-06-05 17:13:57 +09:00
Tom Cherry
b0263af5a8 logd: remove faulty optimization
TagNameKey contains a pointer to a std::string and a std::string_view,
such it can both own a string or reference a different string.  This
is meant to be a memory optimization.

This, however, is actually a net pessimization.  Due to these three
below cases and typical usage pattern.

Cases:
1) In the case where TagNameKey owns the string, 3 words are wasted,
one for the pointer and two for the std::string_view.

2) In the case where TagNameKey references a short string, the same 3
words are wasted.  This is because std::string has a feature called
"Short String Optimization" that means std::string does not allocate
for strings of sizes <= 10 on 32bit devices and <= 22 on 64bit
devices.

3) In the case where TagNameKey references a longer string than the
"Short String Optimization" limits, then this saves the string's
length in bytes.

Usage pattern:
After boot on 32 bit cuttlefish, there were 679 entries for the first
case, and only 69 in the third case.  The 679 entries have an overhead
of 679 * 3 * sizeof(void*) = 679 * 12 = 8148 bytes.  The 69 strings in
the third case have a total length and therefore savings of 1352
bytes.  This is a net pessimization of 6796 bytes.

I expect this same ratio to be similar throughout the device's uptime.

This situation is worse on 64 bit devices.  If cuttlefish were 64 bit,
then there would have been only 18 items in the third case due to the
larger "Short String Optimization" capacity, and the cost for the
first case would have doubled.

Given the above and the cost of maintaining extra code, this
optimization is removed and a std::string is used as the hash table
key instead.

Test: logging unit tests
Change-Id: I957c519b19edca4f7fc531d96b7144cf68bf4e16
2020-06-04 10:33:07 -07:00
Rick Yiu
ad74d8dee0 Fine tune blkio setting to improve boot time
Bug: 133200996
Test: boot time test
Change-Id: I5262c28596adb7e849b202b8a163c190818f271a
2020-06-04 14:28:19 +08:00
Treehugger Robot
b2a05176fa Merge "libsparse: Limit block size to 64 MB" am: e10fb5f5c5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1310496

Change-Id: I01ffbd72a778721a73f7815934d56ab9ff4821c1
2020-06-04 03:46:25 +00:00
Treehugger Robot
e10fb5f5c5 Merge "libsparse: Limit block size to 64 MB" 2020-06-04 03:32:55 +00:00
Tom Cherry
4596b78d12 logd: don't store the map key in its value
The keys are already available when iterating through the maps, so
this only serves to waste memory.

Test: unit tests
Change-Id: Iaf4e389eb0f0990e7113cd78be1773e767a356d4
2020-06-03 16:30:58 -07:00
Tom Cherry
f93b4006e0 logd: use libbase logging
We can use libbase logging to output to the kernel log instead of the
'prdebug' function, so use that instead.

Bonus #1: we can now use CHECK().
Bonus #2: logging unit tests automatically output to stderr.
Bonus #3: We see dependent library's logs instead of losing them to
the void.

Test: logging unit tests
Test: logs show appropriately in dmesg / stderr
Test: CHECK() works
Change-Id: I92f8056b4820dc4998996cf46460568085299700
2020-06-03 16:29:48 -07:00
Treehugger Robot
f24a7e1f62 Merge "adb: treat non-successful inc-server runs as failures" am: ff502379b7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322109

Change-Id: I3b07d7f84a4c31ca559abbea12f7e497bf64a282
2020-06-03 21:40:22 +00:00
Treehugger Robot
ff502379b7 Merge "adb: treat non-successful inc-server runs as failures" 2020-06-03 21:28:53 +00:00
Treehugger Robot
f517b00dce Merge "first_stage_init: support kernel module directories" am: dc9acdd221
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1319048

Change-Id: Ifd078ee7b78fdbcfcd94573a658afa44edd05cb8
2020-06-03 19:21:17 +00:00
Treehugger Robot
1b3d01fb6d Merge "add libmodprobe api to query the number of modules loaded" am: a990f0760d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1319047

Change-Id: I0c0922efe3604f9f0bb2c2b144f66ca4199fa873
2020-06-03 19:21:04 +00:00
Treehugger Robot
dc9acdd221 Merge "first_stage_init: support kernel module directories" 2020-06-03 19:08:11 +00:00
Treehugger Robot
a990f0760d Merge "add libmodprobe api to query the number of modules loaded" 2020-06-03 19:06:13 +00:00
Steve Muckle
d6d38c326e first_stage_init: support kernel module directories
Kernel modules may be located within directories in /lib/modules.
Attempt to load kernel modules from each directory that has a name starting with
the major and minor version of the currently running kernel. If a single
kernel module is successfully loaded from a directory, that directory is
treated as the correct kernel module directory for the system. No other
kernel module directories are searched and any kernel module load errors
in that directory are fatal. If the attempt to load the first kernel
module from a directory fails, or if there are no kernel modules in a
directory, then the search proceeds to the next directory.

If no kernel module is successfully loaded from any directory as above,
an attempt is made to load kernel modules from the top level at
/lib/modules/.

Bug: 157645635
Change-Id: I92eadd8617f03a645da460ccb776bc04fa541f00
2020-06-03 10:51:51 -07:00
Steve Muckle
b0c4881ea9 add libmodprobe api to query the number of modules loaded
In the short term this will be used to help implement support for
multiple kernel module directories but it may be useful in other
contexts as well.

Bug: 157645635
Change-Id: I15a252b6e9394292c8f3557ed65112c935830441
2020-06-03 10:51:45 -07:00
Tom Cherry
430dbf32f8 Merge "logd: Drop the LogStatistics dependency on LogBufferElement" am: 671f39fdf2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322276

Change-Id: Icdf95edb626f7e2d0425e77894c2a1295cb46476
2020-06-03 15:28:25 +00:00
Tom Cherry
671f39fdf2 Merge "logd: Drop the LogStatistics dependency on LogBufferElement" 2020-06-03 15:15:00 +00:00
Yurii Zubrytskyi
924915bacd adb: treat non-successful inc-server runs as failures
This way if an unknown device returns anything but a clear
success report from an incremental installation adb would retry
non-incrementally

Bug: 158006039
Test: manual install on R and Q
Change-Id: I9950273bd60ba75fe12a3706d2ccbee136987d13
2020-06-02 23:38:51 -07:00
Woody Lin
a386482f1d libsparse: Limit block size to 64 MB
Limit the block size to 64 MB before fastboot executable binary for
windows 64-bit is released.

Bug: 156057250
Change-Id: Ic4edb963a3d99f718d7630aba3f351729a84e994
2020-06-03 11:45:17 +08:00