Commit graph

81992 commits

Author SHA1 Message Date
Thiébaud Weksteen
50f03fd58e Revert "Use Apex sepolicy if it's available"
This reverts commit baeece6d0c.

Test: boot aosp_cf_x86_64_phone-userdebug
Bug: 297794885
Change-Id: I0515bc30eba42589c407deb587684b4da011aead
2023-09-06 10:52:49 +10:00
Chun-Wei Wang
62051237a2 Merge "Add a fastboot command to show GSI status" into main 2023-09-05 22:18:40 +00:00
Chun-Wei Wang
671a2a551a Add a fastboot command to show GSI status
The command will be used by RMA tool to skip
device wiping when it is already in GSI mode.

This change also makes it easier to add more
gsi commands in the future without needing to
update the host side tool (fastboot).

Bug: 298130522
Bug: 298138572
Test: 1. reboot into fastboot mode
      2. fastboot gsi status
Change-Id: Ic81f89a93b854f9ec70aebe2d209bfd1f98e3645
2023-09-05 23:31:01 +08:00
Dmitrii Merkurev
f667b6d8ba Merge "fastboot: get rid of manual transport memory management" into main 2023-09-05 14:04:54 +00:00
Thiébaud Weksteen
9fb6b49131 Merge "Remove SeamendcHostTest from TEST_MAPPING" into main 2023-09-05 05:10:01 +00:00
Dmitrii Merkurev
0b627d92c4 fastboot: get rid of manual transport memory management
Existing code has transport memory leaks. Use smart pointers
for transport to get rid of those cases and manual memory
management

Test: atest fastboot_test
Test: manually checked transport isn't leaking anymore
Bug: 296629925
Change-Id: Ifdf162d5084f61ae5c1d2b56a897464af58100da
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-09-03 17:30:46 +01:00
Treehugger Robot
a5c51c9cee Merge "Ignore 16K kernel modules when running on 4K kernel" into main 2023-09-01 21:27:25 +00:00
Kelvin Zhang
dba385edda Ignore 16K kernel modules when running on 4K kernel
Test: th
Bug: 293313353
Change-Id: I02ea01c8e67b9ded164c7492eea3be0aead75de1
2023-09-01 09:55:35 -07:00
Thiébaud Weksteen
18ff56d8d7 Remove SeamendcHostTest from TEST_MAPPING
Bug: 297794885
Test: TH
Change-Id: I49c6caa575ccd570085de15ddf51ea9a71abe90f
2023-08-31 14:22:48 +10:00
Daniel Zheng
09a61fad87 Merge "Fixing optimization logic" into main 2023-08-30 17:46:44 +00:00
Daniel Zheng
1ef66b70ff Fixing optimization logic
Adding a hard pattern check for optimized task formation. To keep
behavior consistent, we will remove the old initialization path and add
resize tasks after attempting optimization.

Test: fastboot_test
Bug: 297085098
Change-Id: Ie0e656af9be7abdd130290fe547ffbf385ce75d6
2023-08-30 09:39:30 -07:00
David Anderson
5b91ae9f4e Merge "snapuserd: Add snapuserd_test to presubmit and VTS." into main 2023-08-29 22:10:27 +00:00
Treehugger Robot
5aa25bf3ae Merge "Make simg2img host-only" into main 2023-08-28 17:44:24 +00:00
Cole Faust
81c4e225bf Make simg2img host-only
This is supposed to be a host tool, but was being installed on
cuttlefish devices.

Bug: 205632228
Test: Presubmits
Change-Id: I9eb1ae1a5c171253617fa12283e2ec651afb5539
2023-08-28 09:53:30 -07:00
Treehugger Robot
18560efc30 Merge "Migrate from android::String isEmpty to empty" into main 2023-08-25 17:07:42 +00:00
David Anderson
c718295a58 Merge "snapuserd: Fix race condition in MergeWorker::WaitForMergeBegin." into main 2023-08-25 16:09:35 +00:00
Snehal Koukuntla
c174f14617 Merge "Add UUIDs to profraw filenames" into main 2023-08-25 14:21:23 +00:00
Treehugger Robot
89b4f96d50 Merge "Increase the number of service supplementary group" into main 2023-08-25 09:37:25 +00:00
Yinchu Chen
3343ca2380 Increase the number of service supplementary group
OEM can add self-owned groups, but the system init cannot support if the group numbers are over than 12, relax some restrictions as appropriate.

Bug: b/296826987

Signed-off-by: Haichao Li <liuhc3@motorola.com>
Change-Id: I231d9f6c82e93c08bc97ca32df70e5b28760acbc
2023-08-25 04:24:48 +00:00
Tomasz Wasilczyk
9578c774a9 Merge "Implement String8|16::empty and String16::length" into main 2023-08-24 18:31:56 +00:00
Tomasz Wasilczyk
92ad0d32c0 Merge "Lose convertToResPath to aapt." into main 2023-08-24 16:46:49 +00:00
Treehugger Robot
c728c39121 Merge "Update bug component from Android Systems to OTA client" into main 2023-08-24 11:13:12 +00:00
Elliott Hughes
1d98fe0d39 Lose convertToResPath to aapt.
aapt (not aapt2) is the only user.

Test: treehugger
Change-Id: Ie69f84f4f805c69f838e345b44755a316b9f9b06
2023-08-24 04:33:05 +00:00
Treehugger Robot
47fc3df9a0 Merge "Drop String::empty()" into main 2023-08-24 03:58:55 +00:00
Daniel Zheng
f278b54731 Merge "Add unit test for cow compressor performance" into main 2023-08-23 19:45:55 +00:00
Daniel Zheng
beeeef7b34 Merge "Add documentation to README" into main 2023-08-23 19:45:27 +00:00
Treehugger Robot
b5f51166e7 Merge "Fix one liner" into main 2023-08-23 18:09:32 +00:00
Daniel Zheng
eb70926ad6 Add unit test for cow compressor performance
Adding test to measure performance differences between cow compression
algorithms + levels. This gives us an easy way to test performance
between the tunables without having to run an OTA every time. Ultimately we want this to be separate from
cow_api_test so it would be nice to have this be it's own binary. Can
add some tests for decompression + compressing from a part of an actual
img file too.

Test: m cow_benchmark
Change-Id: Iba92ae3c0b2ad4ff6f842556b701b223d7d37823
2023-08-23 10:20:15 -07:00
Daniel Zheng
b497e6f317 Fix one liner
Ensuring that the expression is evaluated before being outputed. In
response to comment from aosp/2708333

Test: th
Change-Id: I073c143f1c4e32af11e235ce782947b250117dc5
2023-08-22 14:45:15 -07:00
Daniel Zheng
2326e056bd Add documentation to README
adding documentation on how to use fastboot-info inside of fastboot
README

Test: na
Bug: 297084293
Change-Id: Ic2d17c92a776f1cae9ef80f6b615ddbc841afb74
2023-08-22 14:27:16 -07:00
Treehugger Robot
a2bac909ce Merge "Run boringssl tests according to ro.zygote" into main 2023-08-22 12:55:07 +00:00
Alessio Balsini
d35715c021 Update bug component from Android Systems to OTA client
It's been a while since the Android Systems bug component does not
access the creation of new bugs for triage, instead, new bugs must
be created in the subcomponents of the team.
This change updates the bug component originally associated to this
subsystem from the Android Systems' 30545 to OTA client's 1014951.

Test: none
Bug: 270571229
Change-Id: I5455086bf777dd20abb2e2f0360f76a003120126
Signed-off-by: Alessio Balsini <balsini@google.com>
2023-08-22 10:18:47 +01:00
Treehugger Robot
0508911496 Merge "init: reset errno in do_start" into main 2023-08-22 08:39:14 +00:00
Jooyung Han
d6b65fb307 init: reset errno in do_start
do_start() ignores ENOENT intentionally to avoid logspam. It's
implemented in ErrorIgnoreEnoent. However, without resetting errno,
ErrorIgnoreEnoent will ignore unrelated errors from Service::Start() due
to the sticking errono set from other commands.

Bug: 296821716
Test: launch_cvd
Change-Id: I71d3113bdb69bdca82e2ff4f3a793301749f6c08
2023-08-22 09:59:26 +09:00
Jooyung Han
fdbf5a5eac Merge "init: clean up DelayService()" into main 2023-08-21 22:52:01 +00:00
Treehugger Robot
d4e75d578b Merge "Load kernel modules from /lib/modules/uname -r_$(page_size) if present" into main 2023-08-21 20:23:01 +00:00
Treehugger Robot
30b1c4dd3b Merge "libfs_avb: Allow overriding the slot suffix." into main 2023-08-21 19:12:16 +00:00
Jooyung Han
646e001bb5 init: clean up DelayService()
ServiceList's services_update_finished flag was overlapped with the
global flag: is_default_mount_namespace_ready. Now DelayService() relies
on the is_default_mount_namespace_ready flag.

Add a service description with 'updatable' flag and invoke 'start
<name>' in 'on init' block (which comes before APEX activation).
See the log for "Cannot start an updatable service".

Bug: 293535323
Test: see the comment
Change-Id: I9341ba1a95d9b3b7c6081b530850d61f105f0a56
2023-08-21 18:37:23 +09:00
Kelvin Zhang
d479afa037 Load kernel modules from /lib/modules/uname -r_$(page_size) if present
To support booting from both 4k/16k kernels, init need to tell which
kernel we are currently booting and load the right modules. To resolve
this issue, we store 16K modules into /lib/modules/`uname -r`_16k
directory.

Test: th
Bug: 293313353
Change-Id: I4a8296384537a71e16cd20e76e6c5dfb9074f574
2023-08-18 17:04:39 -07:00
Tomasz Wasilczyk
f597129282 Migrate from android::String isEmpty to empty
This empty method is different from the old one - it aligns with
std::string definition.

Bug: 295394788
Test: make checkbuild
Change-Id: Id6baed8cde01a75a8839ad6b4475a31ba1f49c8a
2023-08-18 22:07:28 +00:00
Tomasz Wasilczyk
2676893dd8 Implement String8|16::empty and String16::length
This time following std::string::empty meaning.

String16::length is for parity with String8::length and to
follow std::string::length/size duo.

Bug: 295394788
Test: mma
Change-Id: I43df2cbb9ca6f980a4cf6d971064d594d661f884
2023-08-18 22:07:28 +00:00
Tomasz Wasilczyk
6d1b644930 Drop String::empty()
This method causes confuction and bugs by having the same name, but
different meaning versus std::string::empty().

Bug: 295394788
Test: make checkbuild
Change-Id: I15aadc023b20559930e4ec79f43f7032e8cd90d0
2023-08-18 22:07:28 +00:00
Snehal
6e074fc31e Add UUIDs to profraw filenames
Bug: 295866435

Change-Id: Ie9390f412c70202d1583e29ac83c30778ae02f70
2023-08-18 09:43:15 +00:00
Treehugger Robot
d1e04d2123 Merge "Fix uninitialized var compiler warnings" into main 2023-08-17 23:49:18 +00:00
Daniel Zheng
4215f1a9fc Merge changes I5032300e,Idec3e051,I09be447b into main
* changes:
  ZSTD read from wrong buf
  Fix warning
  Fix zstd optimization api usage
2023-08-17 22:32:35 +00:00
Kelvin Zhang
4b503b968c Fix uninitialized var compiler warnings
Test: th
Bug: 293313353
Change-Id: I87420a21a9c2ce1987179bf70767ea15b26cd5a5
2023-08-17 15:12:49 -07:00
Daniel Zheng
36882e98b4 ZSTD read from wrong buf
Fix zstd to read from ignore_buf rather than buf since that is where we
are first copying the date

Test: zstd ota
Change-Id: I5032300e4628ecd7e49f1fa9f76dc9a828fb58e6
2023-08-17 14:18:56 -07:00
Daniel Zheng
21aab6cb83 Fix warning
remove some unused headers and fix warning: Moving a temporary object prevents copy elision

Test: m libsnapshot
Change-Id: Idec3e051837dab5f1b95e677d1cdb09e9a57e73e
2023-08-17 14:18:56 -07:00
Daniel Zheng
96b78feec1 Fix zstd optimization api usage
ZSTD_c_windowLog should be set as log base 2 of max block size. Changing
hardcoded value to be determined by this variable.

Test: m libsnapshot
Change-Id: I09be447b7f1e95cb72a6a42eddb4035f61a43aad
2023-08-17 14:18:55 -07:00
Daniel Zheng
7bb24d3274 Merge "Removing extra string creation for log" into main 2023-08-17 18:19:10 +00:00