Commit graph

80426 commits

Author SHA1 Message Date
Tri Vo
ee45e23798 Remove RemoteProvisioner
RemoteProvisioner is deprecated in favor of RKPD

Bug: 273325840
Test: m
Change-Id: I71abe9e0173ef399f9bca65814995aa7e66f1ebe
2023-03-13 13:55:32 -07:00
Daniel Zheng
915ea84dca Merge changes Ieb949243,I04f07c81
* changes:
  Fixed parameter styling and minor error in tasks
  Added support for Delete Task
2023-03-09 18:34:00 +00:00
Daniel Zheng
62ee449de1 Merge "Added support for Resize Task" 2023-03-09 16:59:07 +00:00
Daniel Zheng
db94b51c74 Merge "Added support for Update Super Task" 2023-03-09 16:58:55 +00:00
Daniel Zheng
769ea81c4c Merge "Added support for FlashSuperLayoutTask" 2023-03-09 16:58:39 +00:00
David Drysdale
79faee9035 Merge "Add more Gatekeeper OWNERS" 2023-03-09 06:30:37 +00:00
Treehugger Robot
b3bf57dbe9 Merge "Accept SEGV_MTESERR in CrasherTest.mte_async test." 2023-03-09 00:34:39 +00:00
Daniel Zheng
43987c948b Fixed parameter styling and minor error in tasks
Test: tested compilation
Change-Id: Ieb949243da1284dec3bad2caa895a59465858adc
2023-03-08 23:07:51 +00:00
Daniel Zheng
aa70f4c748 Added support for Delete Task
Test: tested delete-logical-partition {partition} and flashall on Raven

Change-Id: I04f07c8132159deda42434b9178e8c98d5ab768b
Bug: 194686221
2023-03-08 23:07:51 +00:00
Daniel Zheng
9f7bf7eff3 Added support for Resize Task
Test: tested flashall on raven
Bug: 194686221
Change-Id: I60586756b2d5f99848a664def8204c0bd47d7e67
2023-03-08 23:07:50 +00:00
Daniel Zheng
6bb8baa929 Added support for Update Super Task
Test: tested flashall on raven
Bug: 194686221
Change-Id: Ifc99af77f9235bf56a549f53e7d43575686fb42b
2023-03-08 23:07:50 +00:00
Daniel Zheng
47d70a5559 Added support for FlashSuperLayoutTask
Test: testing flashall code with this change
Bug: 194686221
Change-Id: Ibb96980402db51b48c9a296338f29195f68c65bf
2023-03-08 23:07:48 +00:00
Eric Biggers
9089ec6b0b Merge "Avoid odd behavior when clearing nonexistent SID" 2023-03-08 20:16:10 +00:00
David Drysdale
645a0d8e3d Add more Gatekeeper OWNERS
Test: none
Change-Id: Id27ab0fec14e9290820eabff5a5f0ccb3d8eada4
2023-03-08 16:47:13 +00:00
Peter Collingbourne
91e816aa0e Accept SEGV_MTESERR in CrasherTest.mte_async test.
This is possible when upgrading to sync mode.

Change-Id: I71c213cb9ddda87765a0dc2ff5455f0eb7b484fe
2023-03-07 21:27:09 -08:00
Zijun Zhao
e851f2d617 Merge "Suppress the error warning" 2023-03-08 05:16:57 +00:00
zijunzhao
f5e1533f2f Suppress the error warning
Bug: https://android-build.googleplex.com/builds/pending/P51300433/aosp_bramble-userdebug/latest/view/logs/build_error.log
Test: None
Change-Id: I2fbd3d8772c50ed9de1c2ba9eb2234966c7dcb84
2023-03-08 02:40:09 +00:00
Treehugger Robot
57feb3fbbd Merge "libsnapshot: Fix test failures on certain configurations." 2023-03-07 18:02:14 +00:00
David Anderson
4c17a07053 libsnapshot: Fix test failures on certain configurations.
Due to how CF is built and tested, VABC is enabled even when not
supported by the kernel. To work around this add some logic in
libsnapshot and the test harness to recognize this situation and
silently flip off the VABC flag.

This also fixes the -force_mode option to vts_libsnapshot_test, so that
it will skip tests that aren't supported by the device.

Bug: 264279496
Test: vts_libsnapshot_test on 11-5.4 with vabc enabled
Change-Id: I4c1e88fac54732c21c88169a7e0dd664e3858b89
2023-03-06 23:21:25 +00:00
Bart Van Assche
42908c45e5 Merge "init: Combine the CheckShutdown() and set_do_shutdown() methods" 2023-03-06 18:09:09 +00:00
Treehugger Robot
b28e508220 Merge changes Ia150604c,Id4b9565f
* changes:
  init: Remove the DebugRebootLogging() function
  init: Combine two if-statements
2023-03-06 15:20:25 +00:00
Eric Biggers
b4738b9e5d Avoid odd behavior when clearing nonexistent SID
It's expected that clearSecureUserId is sometimes called with a userId
that doesn't currently have a Gatekeeper enrollment.  For example, this
happens whenever a user with no LSKF is removed.  gatekeeperd currently
has two odd behaviors when it's asked to do this.  First, it logs the
following message at ERROR level, which is not appropriate:

    E gatekeeperd: clear_sid: could not remove file [No such file or directory], attempting 0 write

Second, it writes 0 to the file /data/misc/gatekeeper/$userId.  This
makes this file exist even after the user has been removed, which
doesn't cause a real problem but is unexpected.

Fix both of these issues by making clear_sid() check for ENOENT.

Bug: 188702845
Bug: 268526331
Change-Id: Ib1b110f2502267004f5c945c28c98ae926b2a794
2023-03-03 23:18:15 +00:00
Bart Van Assche
071dbc1729 init: Combine the CheckShutdown() and set_do_shutdown() methods
Let the CheckShutdown() method clear the do_shutdown_ member instead of
clearing that member separately from calling CheckShutdown().

Bug: 266255006
Change-Id: Ifc1cff2be92a45db7f91be2fdb812930d2fd1ad5
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-03-03 13:27:17 -08:00
Bart Van Assche
b4b1b75a35 init: Remove the DebugRebootLogging() function
The DebugRebootLogging() function was introduced to help with
root-causing b/150863651. Remove this function since this logging
functionality is no longer needed. Also remove the functions and methods
that are only used by DebugRebootLogging().

Change-Id: Ia150604c6cd70f42b13d655ba43b95445a55b6e2
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-03-03 13:26:58 -08:00
Bart Van Assche
1fdbf8d0f8 init: Combine two if-statements
Combine two if-statements. This change is fine because:
* The code between the two if-statements does not queue actions.
* If an action is queued from another thread then WakeMainInitThread()
  is called after the action has been queued.

Bug: 266255006
Change-Id: Id4b9565ff4fdb3ee2a2bbca316c8c78e0f2d38dd
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-03-03 13:26:58 -08:00
Dmitrii Merkurev
48b39ba01e Merge "fastboot: Introduce ParseNetworkSerial unit tests" 2023-03-03 18:52:33 +00:00
Daniel Zheng
78a0f7f1b2 Merge "Changed FlashTask and RebootTask to take in FlashingPlan" 2023-03-03 07:43:03 +00:00
Daniel Zheng
f8da682c84 Merge "Added Flashing Plan" 2023-03-03 07:42:55 +00:00
Daniel Zheng
bc01da5c0d Changed FlashTask and RebootTask to take in FlashingPlan
Test: tested flash {partition} on raven and reboot {target} on raven
Change-Id: I26f4723474c3a142b086c1ac361578f8487ec3b9
Bug: 194686221
2023-03-03 06:49:34 +00:00
Daniel Zheng
7df2ab9c87 Added Flashing Plan
Fastboot has a lot of flags that are used by many different functions
including the Flashall Class and newly added FlashSuperTask. Passing all
of these flags as paramaters is cumbersome, so adding a Flashing Plan
that contains these flags simplifies the code.

Test: tested Flashall and update img.zip on raven
Change-Id: I9c842f25389a20b852d55f684e1b86040af1d86a
Bug: 194686221
2023-03-03 06:49:32 +00:00
Inseob Kim
e89ee18b9b Merge "libprocessgroup: fix boot time performance regression" 2023-03-03 05:02:29 +00:00
Suren Baghdasaryan
4f7cc8c345 libprocessgroup: fix boot time performance regression
The way processes are accounted in DoKillProcessGroupOnce has been
changed recently, which affects retries in KillProcessGroup. More specifically, initialPid was not counted before and would not
cause a retry with 5ms sleep.
Restore previous behavior to avoid boot time regressions.

Bug: 271198843
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ibc1bdd855898688a4a03806671e6ac31570aedf9
2023-03-03 00:11:13 +00:00
Treehugger Robot
8dab2ef586 Merge "Use ro.boot.serialconsole to disable console services" 2023-03-02 20:04:33 +00:00
Treehugger Robot
bb4c61aa34 Merge "Fix the missing std" 2023-03-02 01:50:18 +00:00
Elliott Hughes
799550dd1f Merge "Update shell_and_utilities docs for U." 2023-03-02 01:05:07 +00:00
Krzysztof Kosiński
0f90ba64bd Merge "Fix invalid uses of PLOG." 2023-03-02 00:52:20 +00:00
Dmitrii Merkurev
cdbfa7a3e8 fastboot: Introduce ParseNetworkSerial unit tests
Introduced positive and negative unit tests to cover
ParseNetworkSerial logic. Alongside with that move
result related stuff to the separate header.

Test: atest fastboot_test
Test: manually checked basic functionality works fine
Bug: 271155012
Change-Id: Icac6053c11b5a36daa64555209555826ea28cc61
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-03-02 00:03:49 +00:00
zijunzhao
6634c1741e Fix the missing std
Bug: b/239662094
Test: enable Wunqualified-std-cast-call locally and run m to build
Change-Id: I203af8dbbbf1d889b9fc5efd5b62fa165ee09dc2
2023-03-01 23:30:29 +00:00
Elliott Hughes
f603989156 Update shell_and_utilities docs for U.
Also add a few relevant links for anyone wanting more background.

Test: N/A
Change-Id: I31c98313f2237c93b89e7a5db44952f394604a1b
2023-03-01 22:05:37 +00:00
Treehugger Robot
18b6e9b819 Merge "fastboot: Fix fastboot_vendor_boot_img_utils_test mac os compilation" 2023-03-01 17:03:44 +00:00
Dmitrii Merkurev
95c90c6588 fastboot: Fix fastboot_vendor_boot_img_utils_test mac os compilation
Use more universal lseek instead of lseek64

Test: atest fastboot_vendor_boot_img_utils_test
Test: mm on mac os
Bug: 271152365
Change-Id: I4d094dd2c24e4ffec8ea7fe2f3b355122fd8cd19
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-03-01 15:49:56 +00:00
Krzysztof Kosiński
0310ec4b55 Fix invalid uses of PLOG.
PLOG reports the value of errno. These four PLOG statements are
after functions that are not syscalls, leading to confusing logs
such as "Failed to apply Foo task profile: Success".

Bug: 271196526
Test: N/A
Change-Id: Iede5274d1ceebabec8432527112291ba63dca090
2023-03-01 04:17:57 +00:00
Treehugger Robot
a010a27da9 Merge "crash_dump: suggest lldbclient.py rather than gdbclient.py." 2023-03-01 04:00:33 +00:00
Treehugger Robot
396b107a41 Merge "fastboot: Fix IPv6 connect and -s host parsing" 2023-02-28 22:46:02 +00:00
Elliott Hughes
5a4e62513f crash_dump: suggest lldbclient.py rather than gdbclient.py.
They're the same script right now, but gdbclient.py is a bit misleading,
even if we're not likely to ever actually remove it.

Test: treehugger
Change-Id: Ic514f98bf13b3e699be4dbad2bafef22d41d9ffd
2023-02-28 22:16:19 +00:00
Dmitrii Merkurev
4785554ca1 fastboot: Fix IPv6 connect and -s host parsing
During fastboot connect / disconnect introduction, we
completely broke the IPv6 support (it was considering
all IPv6 addresses as a USB serial).

Makeing sure this problem isn't reproducible anymore
alongside with fixing EXCPECT causing process crash
and improve network serial error detection.

Bug: 271152365
Change-Id: Ic52aa5fff1948a64ac3d2672f3cf4d2b022e5cea
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-02-28 21:02:48 +00:00
Steven Moreland
007769a0d7 Merge "init: add log w/ service PID" 2023-02-28 19:07:41 +00:00
Suren Baghdasaryan
763593e395 Merge "Kill its process group even if the given process is already dead" 2023-02-28 18:25:57 +00:00
Jing Ji
304c0f1c14 Kill its process group even if the given process is already dead
So the child processes in the process group won't be orphaned
when we decide to kill the process group of a given process but
find it's already dead.

Bug: 266633286
Test: atest MicrodroidDemoApp
Change-Id: Ib6f45b992566f0ab5cf152463c95294a306dd736
2023-02-27 22:01:34 -08:00
Steven Moreland
8e25d9c5b0 init: add log w/ service PID
We could combine this with the existing log, but I
wouldn't want to make that appear later.

Ironically, adding this log to try to reduce logs.

Bug: 36785118
Test: :) adb logcat -d | grep "started service" | wc -l
131

Change-Id: I38f4e9740871aa256eef0c62e897038eb46871a5
2023-02-28 01:42:24 +00:00