Commit Graph

3539 Commits

Author SHA1 Message Date
Tao Bao b97f06a5dd Merge "recovery: Move a few int to bool."
am: cbb2bcf541

Change-Id: I73b44ccf00d361ca3dfa47832ef8a4cb253c83ff
2017-03-08 01:11:59 +00:00
Tao Bao cbb2bcf541 Merge "recovery: Move a few int to bool." 2017-03-08 01:07:13 +00:00
Tao Bao fc5499f22b recovery: Move a few int to bool.
Most of the changes are trivial.

Also update a dead reference to device_handle_key() in device.h comment,
and add some comments to get_menu_selection() function.

Test: `mmma bootable/recovery`
Change-Id: I59ef9213ec88ab35c0e7b8a7813ccf9c56dbd5c5
2017-03-07 15:35:12 -08:00
Tao Bao d988b56999 Merge "recovery: Add the missing #include."
am: b7f56f9b91

Change-Id: I2d1801e9bbbea854ef3a81b02514a79adf7a3003
2017-03-07 21:45:47 +00:00
Tao Bao b7f56f9b91 Merge "recovery: Add the missing #include." 2017-03-07 21:37:54 +00:00
Tao Bao ed4a537bf0 recovery: Add the missing #include.
Although I checked there's no reference to 'stage' in device-specific
recovery codes (for commit a8d72bc3b4),
it's insufficient to capture the missing #include issue.

Test: lunch aosp_dragon-userdebug; mmma bootable/recovery
Change-Id: I4c5dbe9acf38918491c3aa776ce358be03f9ecca
2017-03-07 13:33:27 -08:00
Tao Bao ecf5467a82 Merge "recovery: Drop the "--stages" / '-g' argument."
am: 9bd1dced90

Change-Id: I2110aaac69dfe017281924426486dc821da10b49
2017-03-07 20:35:11 +00:00
Tao Bao 9bd1dced90 Merge "recovery: Drop the "--stages" / '-g' argument." 2017-03-07 20:28:06 +00:00
Tao Bao e303128144 Merge "recovery: Add SetStage() into 'Run graphics test'."
am: 1a575f8d5f

Change-Id: Ic9195fcbce64b811ab71fc6873147db8f2308f4a
2017-03-07 20:06:40 +00:00
Tao Bao 1a575f8d5f Merge "recovery: Add SetStage() into 'Run graphics test'." 2017-03-07 20:02:15 +00:00
Tao Bao 4a2bde2d26 Merge "recovery: Minor clean up to choose_recovery_file()."
am: 73d21d1c1c

Change-Id: I06d44be6abee33c6760bd3e9bf8a5d0945c6e442
2017-03-07 19:49:40 +00:00
Tao Bao 73d21d1c1c Merge "recovery: Minor clean up to choose_recovery_file()." 2017-03-07 19:45:40 +00:00
Tao Bao 08fc6beef8 recovery: Minor clean up to choose_recovery_file().
Test: 'View recovery logs' on bullhead and sailfish.
Change-Id: I53272b121e3e55e6fe4c77b71e3c2e819e72cb64
2017-03-07 00:57:08 -08:00
Tao Bao a8d72bc3b4 recovery: Drop the "--stages" / '-g' argument.
This was introduced in commit c87bab1018.
But the stage info should be passed through BCB only (there's a
dedicated field in struct bootloader_message).

This CL removes it from recovery arguments, and also moves 'stage'
variable to std::string.

Test: 'stage' variable is not used by any device-specific recovery code.
Test: Code search shows no hit of '--stages' use.
Change-Id: Iccbde578a13255f2b55dd4a928e9ecf487f16b97
2017-03-07 00:12:06 -08:00
Tao Bao db7e898080 recovery: Add SetStage() into 'Run graphics test'.
This allows a quicker test for stage UI.

Bug: 27804510
Test: 'Run graphices test' with the new recovery image.
Change-Id: I47689ae8e4cac6d7e5d1f6a10b9e393d50d713f3
2017-03-06 23:53:16 -08:00
Tianjie Xu 68571e27d8 Merge "Refractor the code for imgdiff"
am: a2e7a07031

Change-Id: Ic183461ff0f29d73b2baee2f28fa7a580f01d5c7
2017-03-07 03:10:43 +00:00
Treehugger Robot a2e7a07031 Merge "Refractor the code for imgdiff" 2017-03-07 03:06:09 +00:00
Tianjie Xu 1ea84d6da9 Refractor the code for imgdiff
Put ImageChunk and some helper functions into a class. Also switch to
using std::vector instead of malloc.

Bug: 18606652
Test: imgdiff_test passed on host. Also generate a complete incremental OTA package.
The file content is the same and time consumption is similar.

Change-Id: Id603ada4e130ef521218400761a119001a86ca79
2017-03-06 15:41:02 -08:00
Tianjie Xu 536989892c Merge "Fix an error on bootloadermessager test teardown"
am: b694ba8aab

Change-Id: I9e32f0468e4d5fb22190d9c64b2804666d8202fb
2017-03-03 21:50:09 +00:00
Tianjie Xu b694ba8aab Merge "Fix an error on bootloadermessager test teardown" 2017-03-03 21:43:14 +00:00
Tianjie Xu cace743c4d Fix an error on bootloadermessager test teardown
The test should not clear bcb during teardown on devices without
/misc.

Bug: 35712836
Test: The test tears down without errors after /misc removed from the fstab.
Change-Id: I42df89feb18fac5a435cd17eef97a6bad0f44545
2017-03-03 11:59:28 -08:00
Wei Wang 3d605c54e3 Merge "Recovery Test: add SideloadTest to test FUSE support on target"
am: 53feebea4f

Change-Id: Idc6cf3db83322316f31c99b0e0490f8b0939d8b1
2017-03-03 01:14:57 +00:00
Treehugger Robot 53feebea4f Merge "Recovery Test: add SideloadTest to test FUSE support on target" 2017-03-03 01:10:55 +00:00
Wei Wang b72a15a2ab Recovery Test: add SideloadTest to test FUSE support on target
FUSE FS is required in recovery sideload functionalites.
This CL is to add a native test to flag when FUSE is not
supported in the device kernel.

Bug: 35768196
Test: mma, run recovery_component_test on marlin and pass all
Change-Id: I43b6dbee658010df56ba4d4b0e91baa7fd1c4480
2017-03-02 15:38:22 -08:00
Tianjie Xu 5cce91a95a Merge "Skip BootloaderMessageTest, UncryptTest for devices without /misc"
am: 0f26468eda

Change-Id: Iab64d6894c3d228ce3e4bb9b57db30eecbcb09c5
2017-03-01 03:27:22 +00:00
Treehugger Robot 0f26468eda Merge "Skip BootloaderMessageTest, UncryptTest for devices without /misc" 2017-03-01 03:25:02 +00:00
Tao Bao 6691dacf56 Merge "recovery: Remember the last log position."
am: d549616b24

Change-Id: Ibf3ad2e7dc5c8e1de8f6c5eefe7efec4a2b63a4f
2017-03-01 02:33:48 +00:00
Tao Bao d549616b24 Merge "recovery: Remember the last log position." 2017-03-01 02:26:46 +00:00
Tianjie Xu ca94856416 Skip BootloaderMessageTest, UncryptTest for devices without /misc
Skip these two tests if /misc partition is not found in fstab.

Bug: 35712836
Test: Both test skip correctly if there's no /misc in fstab.${hardware}.
Change-Id: I38417a8677030229a335e43eaef85ae70c4e0845
2017-02-28 17:55:27 -08:00
Tao Bao c9447cc505 recovery: Remember the last log position.
After reading one log entry, it should stay at the same menu position.

Test: 'View recovery logs' -> Read -> Exit
Change-Id: I4b579be4c2fe1e3a1dcc4873e128fd0b2d619ba3
2017-02-28 15:27:08 -08:00
Tao Bao 7c77883b06 Merge "recovery: Don't show "No /cache partition found" on screen."
am: 021304503a

Change-Id: I5bc7cba2eb474faf60212877cd621d8ab06fe00c
2017-02-24 20:01:14 +00:00
Treehugger Robot 021304503a Merge "recovery: Don't show "No /cache partition found" on screen." 2017-02-24 19:54:19 +00:00
Tao Bao f7f1da3fb5 recovery: Don't show "No /cache partition found" on screen.
People have been confused by the message and thought that's an error.

Test: Boot recovery on sailfish; choose 'View recovery logs'.
Change-Id: I2c540f18d6493c1a129233d10ecbc96823dd3601
2017-02-24 10:16:18 -08:00
Elliott Hughes cdfe2895b4 Merge "Add a missing #include for openat(2)."
am: 3ac0dd2a56

Change-Id: I29988a3e7d509587d55c7a821c4ced2e0f32ebe4
2017-02-24 16:59:06 +00:00
Elliott Hughes 3ac0dd2a56 Merge "Add a missing #include for openat(2)." 2017-02-24 16:55:25 +00:00
Elliott Hughes 25a29d452e Add a missing #include for openat(2).
Bug: https://code.google.com/p/android/issues/detail?id=64374
Test: builds
Change-Id: I7d7650463197710657820a1adce51f71c1b01415
2017-02-23 10:45:42 -08:00
Sen Jiang 05087fb83d Merge "Use bspatch from external/bsdiff." am: f9962dbfe2 am: 2c467f6e49
am: 6f06890343

Change-Id: I6e49f937f1145dba2c5500f25db5020fca7ceac0
2017-02-16 21:26:41 +00:00
Sen Jiang 6f06890343 Merge "Use bspatch from external/bsdiff." am: f9962dbfe2
am: 2c467f6e49

Change-Id: Id7641e953d6ca749e20ecfb126a39392b6db3dab
2017-02-16 21:23:12 +00:00
Sen Jiang 2c467f6e49 Merge "Use bspatch from external/bsdiff."
am: f9962dbfe2

Change-Id: I21e6de951b22673fe48ff8f7db418e22d233ee58
2017-02-16 21:18:42 +00:00
Sen Jiang f9962dbfe2 Merge "Use bspatch from external/bsdiff." 2017-02-16 21:14:10 +00:00
Tao Bao b1b8e89db8 Merge "recovery: Clean up browse_directory()." am: 635eb1c83e am: c42d44bbeb
am: 19e7776451

Change-Id: I412a0f3df337c20c89b6168521ac7dd7a8e47ee5
2017-02-14 02:06:42 +00:00
Tao Bao 19e7776451 Merge "recovery: Clean up browse_directory()." am: 635eb1c83e
am: c42d44bbeb

Change-Id: I462259ea96248f253e161065a17b0098add83716
2017-02-14 02:05:12 +00:00
Tao Bao c42d44bbeb Merge "recovery: Clean up browse_directory()."
am: 635eb1c83e

Change-Id: Idf8a4e33a1f7cfd5d5c648aa97e00219828fc58d
2017-02-14 02:03:11 +00:00
Tao Bao 635eb1c83e Merge "recovery: Clean up browse_directory()." 2017-02-14 01:56:24 +00:00
Tao Bao 1cb8964aac Merge "minui: Move graphics_{adf,drm,fbdev} into classes." am: 0d14cc279c am: 6585a3c368
am: b8997adc20

Change-Id: I32adb7cc1bf316e5986308a8863399e5a504e10f
2017-02-13 18:36:46 +00:00
Tao Bao b8997adc20 Merge "minui: Move graphics_{adf,drm,fbdev} into classes." am: 0d14cc279c
am: 6585a3c368

Change-Id: I0484295d4c202f6854968f99bac0b4b0c6928378
2017-02-13 18:32:15 +00:00
Tao Bao 6585a3c368 Merge "minui: Move graphics_{adf,drm,fbdev} into classes."
am: 0d14cc279c

Change-Id: I75c426732188a868f0acb160284a45a19d0b9b1e
2017-02-13 18:29:46 +00:00
Tao Bao 0d14cc279c Merge "minui: Move graphics_{adf,drm,fbdev} into classes." 2017-02-13 18:25:06 +00:00
Tao Bao c4a18efa84 recovery: Clean up browse_directory().
Get rid of the malloc/realloc/free'd menus.

browse_directory() will only be called on devices with SD card. Tested
the CL by temporarily setting SDCARD_ROOT to a different location.

Test: See above.
Change-Id: I935e1bf4bad0273e3dff87fa2536924f1219adb5
2017-02-10 21:21:52 -08:00
Tao Bao 557fa1f45e minui: Move graphics_{adf,drm,fbdev} into classes.
This CL defines minui_backend as an interface, and expresses the three
backends (adf, drm and fbdev) as subclasses to the interface.

Test: 'Run graphics test' on N9, Pixel C and N5X.
Change-Id: I0e23951c7b2e2ff918957a8d9fc8b0085b6e5952
2017-02-10 17:05:15 -08:00