Commit Graph

68492 Commits

Author SHA1 Message Date
Akilesh Kailash ef8d3c39b5 Merge "libsnapshot:snapuserd: Fix memory leak" 2021-04-02 05:13:11 +00:00
Akilesh Kailash e722a1b169 libsnapshot:snapuserd: Fix memory leak
When worker threads were created, snapuserd was converted to a
shared_pointer. Earlier, memory was forcefully released
by setting snapuserd to nullptr which worked as it
was a unique pointer. Now, every worker thread holds
a reference. Clear the vector once all the worker
threads are terminated.

Test: Apply OTA and verify memory is released after OTA is applied
Bug: 183652708
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I256d26d98b02ad599aff49b92192226546c59b17
2021-04-02 00:49:18 +00:00
Treehugger Robot 6463f60a56 Merge "Populate all other emulator properties as `ro.boot.qemu.*`" 2021-04-01 22:39:55 +00:00
Treehugger Robot 71a220901a Merge changes I5989f49c,I394b5aa9
* changes:
  Update owners for modprobe.c
  libmodprobe: refactor blocklist functionality
2021-04-01 22:34:27 +00:00
Will McVicker ff825b29b1 Update owners for modprobe.c
Test: treehugger
Change-Id: I5989f49c284b4f06a24b6350a531902832e2eef5
2021-04-01 12:42:21 -07:00
Roman Kiryanov bcc7946ef0 Populate all other emulator properties as `ro.boot.qemu.*`
Bug: 182291166
Test: getprop | grep "ro\.boot\.qemu\."
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I0d2a4a9edd87999b35fac8496e9cda93fc7d0cf1
2021-04-01 11:39:30 -07:00
Nikita Ioffe 89e50ee521 Merge "Revert "libdexfile_external is being replaced by libdexfile."" 2021-04-01 14:22:53 +00:00
Nikita Ioffe 698370e933 Revert "libdexfile_external is being replaced by libdexfile."
Revert "Merge libdexfile_external into libdexfile."

Revert "libdexfile_external is replaced by libdexfile."

Revert "Rename libdexfile_external_static to libdexfile_static."

Revert "Rename libdexfile_external_static to libdexfile_static."

Revert "Allow dependencies from platform variants to APEX modules."

Revert submission 1658000

Reason for revert: Breaks full-eng build: b/184239856
Reverted Changes:
I4f8ead785:Avoid internal APEX stubs for libsigchain and clea...
I68affdf69:Allow dependencies from platform variants to APEX ...
I54b33784e:Rename libdexfile_external_static to libdexfile_st...
Id68ae9438:libdexfile_external is being replaced by libdexfil...
I12ac84eb4:libdexfile_external is replaced by libdexfile.
If05dbffc8:Rename libdexfile_external_static to libdexfile_st...
Ia011fa3a8:Merge libdexfile_external into libdexfile.

Change-Id: I2448810c9a863cde32b6ed98d9ed0a99cf260d34
2021-04-01 10:58:24 +00:00
Martin Stjernholm 3080a06431 Merge "libdexfile_external is being replaced by libdexfile." 2021-04-01 06:53:13 +00:00
Treehugger Robot 817f8971ac Merge "trusty: apploader: Log errors to logcat" 2021-04-01 05:30:25 +00:00
Tri Vo 413ab28953 trusty: apploader: Log errors to logcat
Otherwise, these error logs don't end up in bugreports, making it very
difficult to debug.

When using locally, users will have to check logcat instead of stderr.

Bug: 183919392
Bug: 115420908
Test: m
Change-Id: I3b829347971d05968b851e11ce784829d12ef098
2021-03-31 13:27:57 -07:00
Will McVicker 87b2ef0edf libmodprobe: refactor blocklist functionality
Remove the function EnableBlocklist() and add a constructor argument to
enable/disable the use of modules.blocklist. In all cases, the
enabling/disabling of the blocklist happens immediately after creating
the Modprobe object. So this simplies libmodprobe.

Additionally, the use of the blocklist by libmodprobe should be enabled
by default unless explicitly disabled during creation of the Modprobe
object. Currently, only modprobe(8) defaults to not using the blocklist
and includes the argument -b BLOCKLIST for enabling it. That
functionality remains.

This refactor allows us to use the blocklist during first stage init.
However, additional logic is needed to not return an error for the
blocked non-aliased modules during first stage init; otherwise, the
error would result in an init crash leading to a device reboot. So fixup
LoadListedModules() to allow blocking modules without returning an
error.

Bug: 182582036
Test: boot test on pixel 5 with a module in modules.blocklist
Change-Id: I394b5aa98fa98821011982cfe693749010c381f7
2021-03-31 09:34:47 -07:00
Josh Gao 007d7941c8 Merge "debuggerd: store commandline instead of process name." 2021-03-31 08:29:54 +00:00
Treehugger Robot 911850ecc3 Merge "Copy vendor.sys.usb.adb.enabled to sys.usb.adb.enabled." 2021-03-31 00:06:44 +00:00
Josh Gao 31348a74e0 debuggerd: store commandline instead of process name.
Bug: http://b/180605583
Test: debuggerd_test
Change-Id: I018d399a5460f357766dc1b429f645f78fe88565
2021-03-30 12:15:56 -07:00
David Anderson 7ab8f2eeba Merge "libsnapshot: Ensure we can remove bad snapshots when beginning an update." 2021-03-30 18:48:28 +00:00
satayev f6b2b201fd Merge "Delay running derive_classpath." 2021-03-30 13:57:30 +00:00
satayev 39a151114a Merge "Attempt to fix labels on /data/system/environ/." 2021-03-30 13:57:10 +00:00
Martin Stjernholm 3ecc22fd20 libdexfile_external is being replaced by libdexfile.
Test: atest CtsSimpleperfTestCases
Bug: 143978909
Change-Id: Id68ae9438e8e7a902ee00e00f53018aa90e92c7b
2021-03-30 12:19:49 +01:00
Artur Satayev 7df79970ad Delay running derive_classpath.
It must run before odsign; and now runs after restorecon on /data as well.

Bug: 183861600
Bug: 180105615
Test: presubmit && cuttlefish boots
Change-Id: Iefe59d94a7a40ed1e526c189cbc2baf69156f334
2021-03-30 11:57:38 +01:00
Artur Satayev 441e6b91e1 Attempt to fix labels on /data/system/environ/.
Bug: 183861600
Bug: 180105615
Test: presubmit && cuttlefish boots
Change-Id: Ic5206eb28e8028ec3c9c4b5a756c46ddb6e68b58
2021-03-30 11:49:05 +01:00
David Anderson 527cdd4617 Merge "fastboot: Don't fail when unable to get boot partition size" 2021-03-29 18:56:28 +00:00
Jeffrey Vander Stoep 0b99f553ae Merge "Add UID for virtmanager" 2021-03-29 07:26:44 +00:00
Oleg Matcovschi b16ef309d6 Merge "fastboot: derive device locked state from Android property" 2021-03-26 01:26:57 +00:00
Oleg Matcovschi d0a16c20fc fastboot: derive device locked state from Android property
We shall rely on Android property instead of parsing kernel
command line directly: parameters could be originated from
kernel command line or bootconfig.

Bug: 183237066
Bug: 183719613
Signed-off-by: Oleg Matcovschi <omatcovschi@google.com>
Change-Id: Ia70d286646a83a95967ca4293168a6550ffff7f0
2021-03-25 14:45:54 -07:00
Jeff Vander Stoep 3502c2be94 Add UID for virtmanager
Bug: 183583115
Test: ps -AZ | grep virtmanager
u: r:virtmanager:s0             virtmanager   2453     1 10930880  4544 0                   0 S virtmanager
Change-Id: Iddf8e21cb1039a5f50aa0619a708b59bec004cfc
2021-03-25 22:17:52 +01:00
Julien Desprez 4e94784b14 Merge "libfs_avb_internal_test & libfs_avb_test already run in presubmit" 2021-03-25 16:15:40 +00:00
Yo Chiang f55950618c Merge changes I51439e27,I5c2737ce
* changes:
  fastboot: Refactor bootimg_utils.cpp:mkbootimg()
  fastboot: [boot] and [flash:raw] command support boot v4
2021-03-25 04:23:17 +00:00
Yi-Yo Chiang ac4a136e59 fastboot: Refactor bootimg_utils.cpp:mkbootimg()
Change mkbootimg() to return void, as we already have a |out| parameter.

Bug: 183455415
Test: Presubmit
Change-Id: I51439e273752ab9e21f8d7138e900ea55bdfdfc0
2021-03-25 04:23:08 +00:00
Yi-Yo Chiang c0c9e3059c fastboot: [boot] and [flash:raw] command support boot v4
Boot v4 is mostly compatible with boot v3, so these minimal changes
should be sufficient.
The newly introduced field of v4, signature_size, is left zero because
this field is only meant to be read by VTS testcases, so the value
doesn't matter for the debugging purposes of boot and flash:raw.

Bug: 183455415
Test: Manual
Change-Id: I5c2737ce35dd25f318b19a429de805ea16c46607
2021-03-25 04:22:58 +00:00
Treehugger Robot 84bc09bf60 Merge "Add Rust bindings" 2021-03-25 01:21:22 +00:00
Treehugger Robot 66c5a3a316 Merge "Add legacy-align parameter to DmabufHeapAlloc()" 2021-03-24 21:14:36 +00:00
David Anderson bcd19ed73e libsnapshot: Ensure we can remove bad snapshots when beginning an update.
If somehow we wind up with snapshots with a source suffix, we could wind
up trying to unmap an in-use partition. Detect this case and allow the
snapshot to be deleted without the unmap.

Bug: 183567503
Test: vts_libsnapshot_test
Change-Id: I87dd5bb3a7b9be59dede624924374ccc47b563c2
2021-03-24 13:25:27 -07:00
Joel Galenson 0d38329999 Add Rust bindings
We currently only need these few symbols.

Test: Use them from Rust.
Fixes: 175619259
Change-Id: I0c2ca708c5a6ab550af7103754db775ffbca245b
2021-03-24 12:31:30 -07:00
Julien Desprez b0198cbca7 libfs_avb_internal_test & libfs_avb_test already run in presubmit
remove duplicate postsubmit setup, they already run in host-unit-tests presubmit

Change-Id: I4065d7a50729a14911ec64f10082987d3f9ddcfc
Test:presubmit
Bug: 183622274
2021-03-24 18:29:58 +00:00
Elliott Hughes 2686ce88a7 Merge "Update libmodprobe's OWNERS." 2021-03-24 16:08:41 +00:00
David Srbecky 3b217cb77c Merge "Adjust libunwindstack MapInfo API" 2021-03-24 14:56:06 +00:00
Treehugger Robot 47229793e5 Merge "fastboot driver: ftrucate64->ftruncate." 2021-03-24 08:34:51 +00:00
Michael Bestas a495be742c fastboot: Don't fail when unable to get boot partition size
* Some devices don't report boot partition size

Change-Id: If83f785e235569ee8ef0de2b37f11dbd2a9a71f4
2021-03-24 01:18:45 +00:00
Elliott Hughes 9369539a1e Update libmodprobe's OWNERS.
Test: treehugger
Change-Id: I714516a3a655facbe447b798f7de59ab899035ea
2021-03-23 17:53:08 -07:00
Treehugger Robot 4f898d4e33 Merge "fastboot driver: add virtual dtor to ImageSource." 2021-03-24 00:10:31 +00:00
Hridya Valsaraju b3ebe7cd10 Add legacy-align parameter to DmabufHeapAlloc()
The parameter is intended to make the API backwards compatible with
legacy ION devices. It will be ignored for devices that support DMA-BUF
heaps.

Test: build
Bug: 154310076
Change-Id: Ic5b49269283caa7d05d9468f8ed7f02e1b3c1f1e
Merged-In: Ic5b49269283caa7d05d9468f8ed7f02e1b3c1f1e
2021-03-23 16:51:40 -07:00
David Srbecky 847b2a371f Adjust libunwindstack MapInfo API
Test: m debuggerd_test
Change-Id: I63a2379bad3ace4755ae48bf0a83eaa0070f9077
2021-03-23 23:20:37 +00:00
Treehugger Robot 5d5e16db57 Merge "Populate more emulator properties to `ro.boot.`" 2021-03-23 19:09:29 +00:00
Yifan Hong c8715002ab fastboot driver: ftrucate64->ftruncate.
Also, -D_FILE_OFFSET_BITS=64 so that off_t is always
64 bits.

This fixes mac build.

Test: forrest

Change-Id: I584e136a5f3ca9874fd5364cc4c93f8b1e8feb19
2021-03-23 11:14:22 -07:00
Mathew Inwood 9a74174efe Merge "Set /system/xbin permissions to 750." 2021-03-23 11:25:21 +00:00
satayev baf2168da7 Merge "Revert^2 "Exec_start derive_classpath on post-fs-data."" 2021-03-23 10:10:00 +00:00
Treehugger Robot e37b6f4f67 Merge "Do not populate `ro.kernel.qemu` in `ProcessKernelCmdline`" 2021-03-23 09:08:33 +00:00
Treehugger Robot 2af0504896 Merge "fastboot device: Disallow implicit conversion from unique_fd to int." 2021-03-23 06:48:02 +00:00
Treehugger Robot 981f79be3c Merge "fastboot driver: Disallow implicit conversion from unique_fd to int." 2021-03-23 06:47:52 +00:00