Daniel Zheng
0d2d631d27
Added Mock function call tests
...
Checking flash partition is called correct number of times
Test: tested fastboot_test
Change-Id: I8a04fb0e30e794641f3e2fbe2ab666274be18b85
2023-04-20 14:31:16 -07:00
Daniel Zheng
77af6affd8
Removing {userspace} from reboot task'
...
Removing as we're no longer support reboot userspace in
fastboot-info.txt. Use reboot fastboot instead
Test: fastboot reboot fastboot
Change-Id: Ibd8bf597615dacde23ad446bde4f23837686710b
2023-04-20 14:30:28 -07:00
Daniel Zheng
207c0a3577
Updating Test Suite Names
...
updating task_test naming convention
Test: m fastboot_test
Change-Id: I56f93f47b3c15e2bc7bb6584b5b3dc12816eb681
2023-04-20 14:20:30 -07:00
Daniel Zheng
32dc6dd5de
Adding correct task formed test
...
Test: test passes
Change-Id: I07b591a2c72d207d794dd3eb044a5fdfc048eb70
2023-04-20 14:18:22 -07:00
Daniel Zheng
935ee1f971
Added test for parsing bad input
...
Test: fastboot_test
Change-Id: I04fc24741987bc88a490b2084189dfd8f3714582
2023-04-20 14:11:06 -07:00
Daniel Zheng
13af2f46a8
Merge "Added test for version check"
2023-04-20 17:47:46 +00:00
Daniel Zheng
0e25838886
Merge "Adding Test for Parsing Flash Task"
2023-04-19 21:13:42 +00:00
Daniel Zheng
233a5a162d
Merge "Added forward declaration for compilation"
2023-04-19 21:13:35 +00:00
Daniel Zheng
7d67d569f3
Merge "Pointed FlashingPlan to Interface"
2023-04-19 21:13:25 +00:00
Daniel Zheng
3ac1e55e1e
Merge "Adding fastboot_driver interface + mock"
2023-04-19 21:12:59 +00:00
Daniel Zheng
39b1de953f
Merge "Moving FlashallTool Definition"
2023-04-19 21:12:37 +00:00
Daniel Zheng
b7d14facd2
Merge "Changing flashall to parse fastboot-info.txt"
2023-04-19 21:12:29 +00:00
Daniel Zheng
68b84df994
Added test for version check
...
Test: fastboot_test
Bug: 194686221
Change-Id: I886c0a91be3b4f4bf7f2b8c76704aa30a352ee5b
2023-04-19 12:30:38 -07:00
Daniel Zheng
76aa257850
Adding Test for Parsing Flash Task
...
Test: fastboot_test
Bug: 194686221
Change-Id: Ie15b2d0423366fb9d1debb9be52de3b6d3a891af
2023-04-19 12:30:38 -07:00
Daniel Zheng
efca333730
Added forward declaration for compilation
...
Test: tested compilation
Change-Id: I7165e323574ef8f3f90d1540c4a2b6a991803b40
2023-04-19 12:30:38 -07:00
Daniel Zheng
bf09c61d95
Pointed FlashingPlan to Interface
...
Using interface for testing purposes
Bug: 194686221
Test: tested compilation
Change-Id: Ia9465c1f5673c249cdbc08a1a2432e8a603bd9cc
2023-04-19 12:30:38 -07:00
Daniel Zheng
c9e869bd9e
Adding fastboot_driver interface + mock
...
Adding mock fastboot_driver to be used for testing
Test: tested fastboot_test
Bug: 194686221
Change-Id: I6948310d44b75c0f389cbfd194747649aaccb0b8
2023-04-19 12:30:38 -07:00
Daniel Zheng
65eb246aa2
Moving FlashallTool Definition
...
moved flashalltool definition to header file
Test: flashall on raven
Bug: 194686221
Change-Id: I5f726492ee5b3ae42755214e3de0269257b62ba8
2023-04-19 12:30:38 -07:00
Daniel Zheng
29a211c194
Changing flashall to parse fastboot-info.txt
...
Test: tested on Raven
Change-Id: I9f26bf6025a0a6318f84be929091f4e82bd87556
2023-04-19 12:30:37 -07:00
Daniel Zheng
37673f0bf5
Merge "Fixing circular dependency"
2023-04-19 00:16:13 +00:00
Daniel Zheng
729c159744
Merge "Moving logging include"
2023-04-18 16:26:01 +00:00
Daniel Zheng
0897526557
Fixing circular dependency
...
Test: tested compilation
Change-Id: Iae25cade1efb2372e5fc219fa69cbb2381b4e05c
2023-04-17 11:34:00 -07:00
Daniel Zheng
7627b54910
Moving logging include
...
Header file shouldn't have include of logging
Test: tested compilation
Change-Id: I02cccb66b6ee5811e5d4f2b9b72508fee640e828
2023-04-17 09:42:39 -07:00
Daniel Zheng
0a785083bb
Merge "Cleaning up main code"
2023-04-13 20:44:31 +00:00
Daniel Zheng
83800601f6
Merge "Adding const to task constructors"
2023-04-10 19:44:31 +00:00
Daniel Zheng
23631b9be7
Merge "Cleaned up slot logic"
2023-04-10 18:02:05 +00:00
Daniel Zheng
dddb5fa80b
Merge "Correcting Reboot Task Functionality"
2023-04-10 17:46:03 +00:00
Daniel Zheng
e6dbd4f194
Adding const to task constructors
...
Adding const decorator to class constructor to ensure Flashing Plan
isn't modified during task construction
Bug: 194686221
Test: tested Flashall on raven
Change-Id: I99b71b2b756beaf871a31a1a035545d754d128e8
2023-04-10 09:53:08 -07:00
Daniel Zheng
1e6456b011
Cleaned up slot logic
...
Updating old clean up slot logic change. Some devices don't know current
slot so we can't always just call get_current_slot()
Test: tested flashall on raven
Change-Id: Id655f1c1ee0b1ff09331f0d91d77412836d0af8d
2023-04-10 09:35:48 -07:00
Treehugger Robot
b2fdbef489
Merge "Revert "Cleaned up some slot logic""
2023-04-03 21:49:25 +00:00
Kelvin Zhang
2a4a45f3e4
Revert "Cleaned up some slot logic"
...
This reverts commit bd85a18d0b .
Reason for revert: b/276759363
Change-Id: I3ba08cf4abeeb7769569512d50e7ff135438cf20
2023-04-03 20:44:05 +00:00
Daniel Zheng
b16aba889a
Merge "Cleaned up some slot logic"
2023-03-30 21:49:15 +00:00
Daniel Zheng
719caca725
Merge "Added some error logs to wipe"
2023-03-30 21:30:11 +00:00
Daniel Zheng
76c9343339
Cleaning up main code
...
cleaning up main() code in fastboot.cpp to run off one task vector. The
eventual goal is to just have all functionality run off this vector.
Test: tested commands on raven
Bug: 194686221
Change-Id: I98d0ba33091eff31ff1bc338766c3689ffb54746
2023-03-30 18:35:14 +00:00
Daniel Zheng
1418fb8ce0
Correcting Reboot Task Functionality
...
Modifying fastboot-info.txt to directly call reboot fastboot instead of
reboot userspace -> so no longer need "userspace" in reboot task. Also
moving skip_reboot check to task since in old code we can have
skip_reboot be true and still reboot to bootloader, fastboot, or
recovery
Test: tested reboot commands on Raven
Change-Id: I98ba51747bf7229a88ba737540c81d20b42e5981
2023-03-30 18:35:14 +00:00
Daniel Zheng
4aa47338f2
Merge "Added check to copy AVB footer"
2023-03-30 18:24:31 +00:00
Daniel Zheng
bd85a18d0b
Cleaned up some slot logic
...
Doesn't look like we actually need current_slot, since we can always
just call function get_current_slot
Test: tested flashall on raven
Change-Id: Icba64bc9fdd08f36d44965e32558a73d0beab0e1
2023-03-30 18:21:28 +00:00
Daniel Zheng
6f213b2c79
Added some error logs to wipe
...
Changed so if we call wipe on a partition that doesn't exist we'll get
some helpful error messages.
Test: tested wipe test
Bug: 194686221
Change-Id: I19dc0396a7a98d0b2be7859edbffeb8acdc9850a
2023-03-30 18:19:04 +00:00
Daniel Zheng
e33e8a8685
Added check to copy AVB footer
...
is_logical shouldn't work in bootloader for some devices, so we also need to check
using should_flash_in_userspace to see if partition is dynamic
Test: tested to flash {partition} on raven and checked to see avb
footers are not copied from dynamic partitions
Change-Id: Iabb3ea535fa80b26cf1c08040beb3d4ea5e8c2ae
2023-03-30 18:19:04 +00:00
Ayushi Khopkar
33ff88f9c3
Updated fuzz_config in Android.bp file
...
Added new fields in fuzz_config like - hotlists,
description, vector, service_privilege, users, fuzzed_code_usage, etc.
Bug: 271384401
Test: Build fastboot_fuzzer
Change-Id: I7799ffcb7f11202711b19cf40e8c05e050d3b519
2023-03-23 16:06:24 +05:30
David Anderson
ecdbbbda82
Merge changes Ie68aed2f,Ic40696b3
...
* changes:
fastboot: Handle libsparse failures better.
libsparse: Fix allocation failures on 32-bit systems.
2023-03-22 00:02:13 +00:00
David Anderson
74c7807af1
fastboot: Handle libsparse failures better.
...
sparse_file_len is not actually infallible; on Windows it's pretty easy
to make it fail by embedding large files in the stream. fastboot didn't
handle this anywhere, leading to bad sparse images when libsparse
runs out of address space.
Bug: 273933042
Bug: 268872725
Test: fastboot flashall on Windows
Change-Id: Ie68aed2f1970e820350d9f97aa89a6c0242229b8
2023-03-20 15:55:57 -07:00
Daniel Zheng
0bf3b71fbb
Updating Flashall to work off tasks
...
Test: testing fastboot flashall on raven
Bug: 194686221
Change-Id: I82ac2392686775b57c3d98ea003ab30b48f1ab0f
2023-03-20 20:21:31 +00:00
Daniel Zheng
85c0f3e567
Updated location of initialization
...
Test: tested flashall on raven
Bug: 194686221
Change-Id: Ie0dd7acd65833a938623e374e2b21e6bd6079d08
2023-03-20 20:21:31 +00:00
Daniel Zheng
f1ddba9dfd
Updating FlashTask to require img-name
...
Test: tested flash {partition} on pixel
Bug: 194686221
Change-Id: I8018e48f68606ec9c559d06973154d79e7c0634a
2023-03-20 20:20:43 +00:00
Daniel Zheng
980985af6e
Removed hardcoded check to copy AVB Footer
...
Test: tested flashall on raven
Bug: 194686221
Change-Id: Iaca03bde51fcd6b2886dc8ba84da4f67174a9c3f
2023-03-20 16:24:40 +00:00
Daniel Zheng
403657d998
Changing FlashTask to take in apply_vbmeta
...
Test: tested on Raven
Change-Id: I709842d87aa4ad6a7772e4f441886d127c3028a7
2023-03-13 18:28:14 +00:00
Daniel Zheng
15e7783263
Added support for Wipe Task
...
Test: tested wipe on Raven
Bug: 194686221
Change-Id: I582800a279cbe8a3e733a1e75447e5b5142d4120
2023-03-13 17:37:31 +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