Commit Graph

4017 Commits

Author SHA1 Message Date
Tao Bao b1fc62065b Merge "updater: Minor clean up to EnumerateStash()." am: 4fc7659612 am: 8209daeff1
am: 8da15d10da

Change-Id: I7912d4d125d1b9660497660d42a2130b26374e09
2017-03-16 23:29:12 +00:00
Tao Bao 8da15d10da Merge "updater: Minor clean up to EnumerateStash()." am: 4fc7659612
am: 8209daeff1

Change-Id: I1a6540650a9a7f9b4252bf20e6ac2eb8c59e5642
2017-03-16 23:26:42 +00:00
Tao Bao 8209daeff1 Merge "updater: Minor clean up to EnumerateStash()."
am: 4fc7659612

Change-Id: I2e51c81a9742dd71e487784eb51d472ee8a9fd04
2017-03-16 23:24:12 +00:00
Tao Bao 4fc7659612 Merge "updater: Minor clean up to EnumerateStash()." 2017-03-16 23:15:06 +00:00
Tao Bao ec8272f6e3 updater: Minor clean up to EnumerateStash().
Test: Apply an incremental BBOTA package with the new updater.
Test: Resume an interrupted BBOTA (so it cleans up the partial stash).
Change-Id: I620cc57ee6366845bcffbc19210f7a01e2196052
2017-03-16 00:00:46 -07:00
Tao Bao fa81303409 Merge "Revert "Print SHA-1 in hex for corrupted blocks"" am: 06f6227f1d am: 8acce85be8
am: 7a57bb564a

Change-Id: Ic860f7de6d4134875b28fec9709e9a3069f5d67d
2017-03-15 18:45:00 +00:00
Tao Bao 7a57bb564a Merge "Revert "Print SHA-1 in hex for corrupted blocks"" am: 06f6227f1d
am: 8acce85be8

Change-Id: Idfa1fa66a81fa8282737258bc846cce0a4919b4a
2017-03-15 18:40:23 +00:00
Tao Bao 8acce85be8 Merge "Revert "Print SHA-1 in hex for corrupted blocks""
am: 06f6227f1d

Change-Id: I8a7a1653cdadf4748508d38b69da51fa5d5be877
2017-03-15 18:35:51 +00:00
Tao Bao 06f6227f1d Merge "Revert "Print SHA-1 in hex for corrupted blocks"" 2017-03-15 18:31:21 +00:00
Tao Bao 90eff6a340 Revert "Print SHA-1 in hex for corrupted blocks"
This reverts commit bb0cd75a0e.

Broke the 'free' command that deletes a stash.

Bug: 36242722
Test: The previously failed incremental applies successfully.
Change-Id: I1237cb0a33adfbeea57e0465b629704862ba13aa
2017-03-15 09:57:06 -07:00
Tao Bao 175a033e80 Merge "updater: Remove some obsoleted functions for file-based OTA." am: 342717d148 am: 000f364c19
am: 1fc6e95672

Change-Id: I3e01f0bbcbe9233b2c0ed8088fc3cf1781a4baf3
2017-03-14 17:21:32 +00:00
Tao Bao 1fc6e95672 Merge "updater: Remove some obsoleted functions for file-based OTA." am: 342717d148
am: 000f364c19

Change-Id: If8fc89d7a6e6111bb3ed51f888fa5303914aebd8
2017-03-14 17:17:02 +00:00
Tao Bao 000f364c19 Merge "updater: Remove some obsoleted functions for file-based OTA."
am: 342717d148

Change-Id: I773ec06188a884ebdefe5194ede39974a4b1f419
2017-03-14 17:12:31 +00:00
Tao Bao 342717d148 Merge "updater: Remove some obsoleted functions for file-based OTA." 2017-03-14 17:08:02 +00:00
Tianjie Xu 798edff15a Merge "Print SHA-1 in hex for corrupted blocks" am: 59383b383c am: 821592aff4
am: 51c6b7079e

Change-Id: Iaa03517eaed640c4f8e6ee44bffdd0539f748853
2017-03-13 20:34:18 +00:00
Tianjie Xu 51c6b7079e Merge "Print SHA-1 in hex for corrupted blocks" am: 59383b383c
am: 821592aff4

Change-Id: I7555a81c640bee3c8bb165fe712d5d55cb94d6fe
2017-03-13 20:29:47 +00:00
Tianjie Xu 821592aff4 Merge "Print SHA-1 in hex for corrupted blocks"
am: 59383b383c

Change-Id: Ib1e6c3c853a52e619f053996c45913cfc9a70703
2017-03-13 20:25:18 +00:00
Tianjie Xu 59383b383c Merge "Print SHA-1 in hex for corrupted blocks" 2017-03-13 20:18:12 +00:00
Tianjie Xu bb0cd75a0e Print SHA-1 in hex for corrupted blocks
It will be helpful for debug if we know which blocks are corrupted after
a verification failure. This CL prints the SHA-1 for each source block
in a transfer command if these blocks don't have an expected hash. And
along with the correct SHA-1, we will catch the corrupted blocks.

Bug: 21124445
Test: Printed the mismatched SHA-1 for bullhead during an update.
Change-Id: I683d4bdaf9a335035045b3f532b3a265b2fcbbfc
2017-03-13 11:32:56 -07:00
Tao Bao 63d786cf22 updater: Remove some obsoleted functions for file-based OTA.
This CL removes the updater support for delete(), symlink(), rename(),
set_metadata() and set_metadata_recursive(). Such functions have been
removed from the generation script in commit
f388104eaacd05cfa075d6478369e1d0df5ddbf3 (platform/build).

Note: This CL also removes delete_recursive() which seems to have never
been supported in generation script.

Bug: 35853185
Test: recovery_component_test passes.
Change-Id: I51e1ec946fa73761118fa1eaa082423df6d588e9
2017-03-13 10:02:08 -07:00
Tao Bao afc60a1081 Merge "update_verifier: Set the success flag if dm-verity is not enabled." am: a7211b3c16 am: 6c6861d7c5
am: 390ae4c660

Change-Id: I61026e9987d434fc8ccccfa7e7913e4d9e4b0020
2017-03-11 01:45:10 +00:00
Tao Bao 390ae4c660 Merge "update_verifier: Set the success flag if dm-verity is not enabled." am: a7211b3c16
am: 6c6861d7c5

Change-Id: I93a04b0b60ee1b18554c4d2bf993084d16f6a039
2017-03-11 01:42:08 +00:00
Tao Bao 6c6861d7c5 Merge "update_verifier: Set the success flag if dm-verity is not enabled."
am: a7211b3c16

Change-Id: I4e516463fe7a7a7f97e7bb6c7c7c42f5f320f7ef
2017-03-11 01:38:39 +00:00
Tao Bao a7211b3c16 Merge "update_verifier: Set the success flag if dm-verity is not enabled." 2017-03-11 01:32:44 +00:00
Tao Bao db57f0d7f4 update_verifier: Set the success flag if dm-verity is not enabled.
For devices that are not using dm-verity, update_verifier can't verify
anything, but to mark the successfully booted flag unconditionally.

Test: Successfully-booted flag is set on devices w/o dm-verity.
Test: Successfully-booted flag is set after verification on devices w/
      dm-verity.
Change-Id: I79ab2caec2d4284aad0d66dd161adabebde175b6
2017-03-10 15:16:27 -08:00
Bowgo Tsai 1bd484f941 Merge "recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIs" am: 7a0dfec771 am: 1a23257214
am: 1a76f4a3bc

Change-Id: I8869ddf69589c2a1bb0e8dd493df67f9126db585
2017-03-10 16:17:39 +00:00
Bowgo Tsai 1a76f4a3bc Merge "recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIs" am: 7a0dfec771
am: 1a23257214

Change-Id: Ie60bf8b6b9e55c91770df218e02383dc4adb20cd
2017-03-10 16:13:07 +00:00
Bowgo Tsai 1a23257214 Merge "recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIs"
am: 7a0dfec771

Change-Id: I99394806f787e6a6acc55d240720fd22f57ac523
2017-03-10 16:09:44 +00:00
Treehugger Robot 7a0dfec771 Merge "recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIs" 2017-03-10 16:06:01 +00:00
Bowgo Tsai d13b6cf29c recovery: replacing fs_mgr_read_fstab() with new fs_mgr APIs
The fstab settings of early-mounted partitions (e.g., /vendor) will be in
kernel device tree. Switch to the new API to get the whole settings with
those in device tree:

    fs_mgr_read_fstab_with_dt("/etc/recovery.fstab")

The original default /fstab.{ro.hardware} might be moved to
/vendor/etc/. or /odm/etc/. Use another new API to get the default fstab
instead of using the hard-coded /fstab.{ro.hardware}. This API also
includes the settings from device tree:

    fs_mgr_read_fstab_default()

Bug: 35811655
Test: boot sailfish recovery
Change-Id: Iaa56ac7f7b4c4dfc7180c65f03e9a37b94f1de09
2017-03-10 17:27:31 +08:00
Tao Bao 2d06e3b360 Merge "recovery: Fix the FIXME in get_menu_selection()." am: f0e8f0727e am: 316610763b
am: 0970c47d74

Change-Id: I7e23bc98c5039060bc8c6d6bec75ca11f6f2d8ff
2017-03-08 19:34:12 +00:00
Tao Bao 0970c47d74 Merge "recovery: Fix the FIXME in get_menu_selection()." am: f0e8f0727e
am: 316610763b

Change-Id: Ie0698991909eb5276be4be9a7e2a65896ff0055a
2017-03-08 19:26:39 +00:00
Tao Bao 316610763b Merge "recovery: Fix the FIXME in get_menu_selection()."
am: f0e8f0727e

Change-Id: Ia944d71ea0ef89d3ed73abf53e1efc740302a630
2017-03-08 19:24:41 +00:00
Tao Bao f0e8f0727e Merge "recovery: Fix the FIXME in get_menu_selection()." 2017-03-08 19:16:19 +00:00
Tao Bao c75033462d Merge "recovery: Move a few int to bool." am: cbb2bcf541 am: b97f06a5dd
am: 25070fcf47

Change-Id: Idfbf4d7031337facb9c8e943aab239aa3c5d89a9
2017-03-08 01:15:59 +00:00
Tao Bao 25070fcf47 Merge "recovery: Move a few int to bool." am: cbb2bcf541
am: b97f06a5dd

Change-Id: I406a6cfffe6bef144d31fb605cd572fd5df6d72b
2017-03-08 01:14:29 +00:00
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 50dd532934 recovery: Fix the FIXME in get_menu_selection().
It used to return a REBOOT action on timeout, until the CL in commit
daefc1d442 that redefined the return value
of get_menu_selection() (changing from action to a menu index).

Prior to this CL, it was returning 0 (i.e. the value of Device::REBOOT)
to trigger the reboot. This CL specifies a return value of -1 to
indicate the timeout.

Test: Boot into a user build recovery; it reboots automatically on
      timeout (120 sec).
Change-Id: I4aedb7a4628bf258017078fe73eb8b48a21d0ea8
2017-03-07 15:35:17 -08: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 9e6c5f9933 Merge "recovery: Add the missing #include." am: b7f56f9b91 am: d988b56999
am: fe380a30a6

Change-Id: Icc449069f386c7ea8d80a18fa95b0061e7baf4f4
2017-03-07 21:50:16 +00:00
Tao Bao fe380a30a6 Merge "recovery: Add the missing #include." am: b7f56f9b91
am: d988b56999

Change-Id: I3d0b551d86c9dbaf2976f9de7e7e712aadf84a1a
2017-03-07 21:47:46 +00: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 0310f4b3e3 Merge "recovery: Drop the "--stages" / '-g' argument." am: 9bd1dced90 am: ecf5467a82
am: 25f8062e35

Change-Id: I7337b380e8539b60df9e03287d51b1176b9528cb
2017-03-07 20:40:12 +00:00
Tao Bao 25f8062e35 Merge "recovery: Drop the "--stages" / '-g' argument." am: 9bd1dced90
am: ecf5467a82

Change-Id: I05e330ba778ab29118cd5e1082a77eb5bf100e26
2017-03-07 20:37:42 +00: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 a2ee86dba1 Merge "recovery: Add SetStage() into 'Run graphics test'." am: 1a575f8d5f am: e303128144
am: f8fddd0341

Change-Id: I81527d626b7608063dd8f7021c833fb2b59023c0
2017-03-07 20:11:40 +00:00