Commit Graph

3699 Commits

Author SHA1 Message Date
Tao Bao 21b5268fbd Merge "updater: Clean up LoadSrcTgtVersion2()." am: f037b7b535
am: 51159a069d

Change-Id: Ia542c58abd931af5f2b0bc089ff2b67886c91070
2017-03-28 05:51:11 +00:00
Tao Bao 51159a069d Merge "updater: Clean up LoadSrcTgtVersion2()."
am: f037b7b535

Change-Id: I6e2488d12fadebb5b17949b5fbecbaee335700af
2017-03-28 05:46:42 +00:00
Tao Bao f037b7b535 Merge "updater: Clean up LoadSrcTgtVersion2()." 2017-03-28 05:40:20 +00:00
Tao Bao d2aecd465b updater: Clean up LoadSrcTgtVersion2().
Rename to LoadSourceBlocks() by moving the target blocks parsing part
into the caller. This allows detecting whether the target blocks have
already had the expected data before loading the source blocks. It
doesn't affect anything when applying an update package for the first
time, but it skips loading the unneeded source blocks when resuming an
update. It additionally avoids unnecessarily dumping the "corrupt"
source/stash blocks when resuming an update.

Bug: 33694730
Test: Apply an incremental update with the new updater.
Test: Resume an incremental update with the new updater.
Change-Id: I794fd0d1045be7b3b7f8619285dc0dade01398d0
2017-03-27 16:21:55 -07:00
Tao Bao e65835d5ac Merge "Revert "libbootloader_message: use different fstab paths for normal/recovery boot"" am: 27c3e47853
am: b0e768e269

Change-Id: I87d8040917dcd2fc6e233458c8b14f4cdb15e457
2017-03-27 19:32:06 +00:00
Tao Bao b0e768e269 Merge "Revert "libbootloader_message: use different fstab paths for normal/recovery boot""
am: 27c3e47853

Change-Id: Ie55f8cbbcec911192d9fd3b92f32731721dba36f
2017-03-27 19:29:34 +00:00
Tao Bao 27c3e47853 Merge "Revert "libbootloader_message: use different fstab paths for normal/recovery boot"" 2017-03-27 19:23:12 +00:00
Bowgo Tsai 4508f23884 Revert "libbootloader_message: use different fstab paths for normal/recovery boot"
This reverts commit 37bd44174b.

The logic here is better to be moved into fs_mgr, not fs_mgr clients.

Bug: 35811655
Bug: 36502022

Change-Id: Iae79bd8f7131516ad223f3323f1bc1d805206d51
Test: normal boot sailfish, go to Settings > System & tap 
      on "Factory Data reset"
Test: recovery boot sailfish
2017-03-27 17:47:21 +00:00
Tianjie Xu 334850c9fe Merge "Skip logging the warning for uncrypt_status for devices w/o /cache" am: df0619edea -s ours
am: a97b0712d8  -s ours

Change-Id: I94338224aa3f9b7b88518527f14dd51f7ce62b22
2017-03-27 05:40:27 +00:00
Tianjie Xu 898fa718a9 Skip logging the warning for uncrypt_status for devices w/o /cache
am: 340e6762f8

Change-Id: I05e9925238255de835b8a9317a74f9d199cef494
2017-03-27 05:40:15 +00:00
Tianjie Xu a97b0712d8 Merge "Skip logging the warning for uncrypt_status for devices w/o /cache"
am: df0619edea  -s ours

Change-Id: I997f1ad6197e8a92530f50ed7fc002b972681407
2017-03-27 05:37:19 +00:00
Tianjie Xu 340e6762f8 Skip logging the warning for uncrypt_status for devices w/o /cache
This warning may cause confusion for users.

Bug: 36590598
Test: Warning line no longer shows for sailfish.
Change-Id: I277c87a50a72fdb499be790ee25b97f815d980be
(cherry picked from commit bcb5b18630f518835a0768535b43ccfe91683fc9)
2017-03-27 05:36:48 +00:00
Tianjie Xu df0619edea Merge "Skip logging the warning for uncrypt_status for devices w/o /cache" 2017-03-27 05:15:40 +00:00
Tianjie Xu 49420e6c3d Merge "Skip logging the warning for uncrypt_status for devices w/o /cache" into nyc-mr2-dev-plus-aosp 2017-03-27 02:56:28 +00:00
Tao Bao dcbabd5932 Merge "applypatch: Drop the support for patching non-EMMC targets." am: b4c4f8c494
am: 351f69e64a

Change-Id: I83220c87347e6f4fe76b73924347b55a9c9e18ff
2017-03-26 18:06:09 +00:00
Tao Bao 351f69e64a Merge "applypatch: Drop the support for patching non-EMMC targets."
am: b4c4f8c494

Change-Id: If2eadfe81c5a7942c2709a548dcd3957323e3436
2017-03-26 18:03:10 +00:00
Tao Bao b4c4f8c494 Merge "applypatch: Drop the support for patching non-EMMC targets." 2017-03-26 18:00:20 +00:00
Tianjie Xu a286778762 Skip logging the warning for uncrypt_status for devices w/o /cache
This warning may cause confusion for users.

Bug: 36590598
Test: Warning line no longer shows for sailfish.
Change-Id: I277c87a50a72fdb499be790ee25b97f815d980be
Merged-In: I277c87a50a72fdb499be790ee25b97f815d980be
2017-03-26 05:24:57 +00:00
Tianjie Xu d08893c053 Skip logging the warning for uncrypt_status for devices w/o /cache
This warning may cause confusion for users.

Bug: 36590598
Test: Warning line no longer shows for sailfish.
Change-Id: I277c87a50a72fdb499be790ee25b97f815d980be
(cherry picked from commit bcb5b18630f518835a0768535b43ccfe91683fc9)
2017-03-26 05:20:22 +00:00
Tianjie Xu 5f9617a51f Merge "Don't fail ReadArgs if length to parse is 0" am: f4c949a41e
am: e102ea13ee

Change-Id: I56740f678375ad00f3ae90125c610c8f5003290e
2017-03-25 23:59:37 +00:00
Tianjie Xu e102ea13ee Merge "Don't fail ReadArgs if length to parse is 0"
am: f4c949a41e

Change-Id: Ic6daca7eb24b121058c7e9075d5719fcdada37ae
2017-03-25 23:57:08 +00:00
Tianjie Xu f4c949a41e Merge "Don't fail ReadArgs if length to parse is 0" 2017-03-25 23:53:31 +00:00
Tao Bao cf219a93c6 Merge "updater: Remove some redundant arguments." am: 5212a00588
am: 4ae56a3586

Change-Id: I2fd18158ad74770e4a372b6288e65ceabfc18297
2017-03-25 23:19:05 +00:00
Tao Bao 4ae56a3586 Merge "updater: Remove some redundant arguments."
am: 5212a00588

Change-Id: I74ae1b87579bec0f1008b38e5ca913ef7c355238
2017-03-25 23:16:35 +00:00
Tao Bao 5212a00588 Merge "updater: Remove some redundant arguments." 2017-03-25 23:11:37 +00:00
Bowgo Tsai ec96346b84 Merge "libbootloader_message: use different fstab paths for normal/recovery boot" am: 5f98326c1e
am: 85882b0779

Change-Id: Ie7f75589e4ec7a3da4bc8cb31f0630837cbea4f4
2017-03-25 17:13:13 +00:00
Bowgo Tsai 85882b0779 Merge "libbootloader_message: use different fstab paths for normal/recovery boot"
am: 5f98326c1e

Change-Id: Ie5061ac357ee86a2192e8e1c1ab9e49a00fc1df0
2017-03-25 17:11:15 +00:00
Treehugger Robot 5f98326c1e Merge "libbootloader_message: use different fstab paths for normal/recovery boot" 2017-03-25 17:06:33 +00:00
Bowgo Tsai 37bd44174b libbootloader_message: use different fstab paths for normal/recovery boot
libbootloader_message is used by both normal boot and recovery boot.
It needs to use different fstab paths, respectively. Otherwise, factory
reset will fail when we move /fstab.{ro.hardware} to /vendor/etc/.

  Recovery boot: fs_mgr_read_fstab_with_dt("/etc/recovery.fstab")
  Normal boot: fs_mgr_read_fstab_default()

Bug: 35811655
Bug: 36502022

Test: normal boot sailfish, go to Settings > System & tap on
      "Factory Data reset"
Test: recovery boot sailfish

Change-Id: I253f5bdfb9be8a01f80856eb1194f85cdf992bbd
2017-03-25 19:25:43 +08:00
Tao Bao 0ec16d8831 Merge "updater: Drop the support for BBOTA v1 and v2." am: 5479506c9c
am: 7b82ad12f6

Change-Id: I7404ce4db28555a98a24fd5020712edda84b04d5
2017-03-24 23:14:39 +00:00
Tao Bao 7b82ad12f6 Merge "updater: Drop the support for BBOTA v1 and v2."
am: 5479506c9c

Change-Id: If0f6acf7120c6bc4b4644a12aa83939b52ad48c5
2017-03-24 23:12:39 +00:00
Tao Bao 5479506c9c Merge "updater: Drop the support for BBOTA v1 and v2." 2017-03-24 23:06:56 +00:00
Tao Bao d51bd8770a Merge "Const modifiers" am: 4efd353d8f
am: 92d8772c49

Change-Id: I453dbfb45e3f70586e77cb28207c164fe9cb72fa
2017-03-24 20:34:37 +00:00
Tao Bao 6b3df6486e Merge "Removed C-style casts" am: 110155a604
am: 6a831e02b6

Change-Id: If512cbe096ad18388fea2800d12182832d0ecda8
2017-03-24 20:34:27 +00:00
Tao Bao 92d8772c49 Merge "Const modifiers"
am: 4efd353d8f

Change-Id: I8ae993749d5f2c58cc5ef23f90845cf5a0bf756d
2017-03-24 20:32:39 +00:00
Tao Bao 6a831e02b6 Merge "Removed C-style casts"
am: 110155a604

Change-Id: I363e172a8f7f9e67dfc9474e0e10463690cdd833
2017-03-24 20:32:29 +00:00
Tao Bao 4efd353d8f Merge "Const modifiers" 2017-03-24 20:28:09 +00:00
Tao Bao 110155a604 Merge "Removed C-style casts" 2017-03-24 20:28:00 +00:00
Tao Bao be4578f009 Merge "Fix the wrong parameter when calling read_metadata_from_package()." am: 6014db5da6
am: 5da7e41ec8

Change-Id: I56222c4a4bf245ca7c5a9506750125f23bed443f
2017-03-24 20:18:27 +00:00
Tao Bao 5da7e41ec8 Merge "Fix the wrong parameter when calling read_metadata_from_package()."
am: 6014db5da6

Change-Id: I55b44f34491f8103487bcd7b871d3615666b45d9
2017-03-24 20:16:26 +00:00
Tao Bao 6014db5da6 Merge "Fix the wrong parameter when calling read_metadata_from_package()." 2017-03-24 20:11:53 +00:00
Tao Bao 1b2a98bda3 Fix the wrong parameter when calling read_metadata_from_package().
The call to read_metadata_from_package() is broken due to being passed
an invalid pointer (ZipArchiveHandle vs ZipArchiveHandle*). It's
introduced when switching from minzip to libziparchive. Compiler didn't
complain, because ZipArchiveHandle is typedef'd as void*, which legitly
accepts a void**.

Also clean up secure_wipe_partition() logs a bit by using android-base
logging.

Bug: 36427762
Test: Send a wipe package.
Change-Id: I791a0f09a066f1c257dae890e7ae13d02a02e78b
2017-03-24 11:02:05 -07:00
Tao Bao bcf464988e updater: Remove some redundant arguments.
Clean up a few functions that take CommandParameters& as the first
parameter. We don't need to take duplicate arguments if they always come
from CommandParameters. This redundancy came from the point we replaced
strtok()s (commit baad2d454d).

Test: Apply an incremental update with the new updater.
Change-Id: I2912b8ce6bc7580bf7f566e125f12270e679e155
2017-03-24 00:34:36 -07:00
Tao Bao 3356777cae updater: Drop the support for BBOTA v1 and v2.
The script support for BBOTA v1 and v2 has been dropped in commit
8fad03e7712082eb880ffaaffb69eb13252ce220 (platform/build).

Bug: 33694730
Test: Apply an incremental with the new updater.
Test: recovery_component_test
Change-Id: I038b1bf8d10f030cab8ec0aa6ee565c5a9545dfd
2017-03-23 23:58:02 -07:00
Paul Crowley 25bf90201c Merge "Reword the wipe warning message to be more comprehensible." am: f09efaff89
am: eddc9a15f9

Change-Id: I41c7a52fda6b0df63869640193a198a98801ed75
2017-03-23 23:41:41 +00:00
Paul Crowley eddc9a15f9 Merge "Reword the wipe warning message to be more comprehensible."
am: f09efaff89

Change-Id: I4078499b8019361979a8d47cf9205e1ee865303c
2017-03-23 23:39:43 +00:00
Treehugger Robot f09efaff89 Merge "Reword the wipe warning message to be more comprehensible." 2017-03-23 23:36:42 +00:00
Tianjie Xu bf607c4a28 Don't fail ReadArgs if length to parse is 0
Test: recovery component tests pass
Change-Id: I0946ba498d845ec552ae7e4c79dc94618b2fdf6d
2017-03-23 15:12:22 -07:00
Paul Crowley 31ac0c61fe Reword the wipe warning message to be more comprehensible.
Test: My device was crashing anyway, so observed message on crash.
Bug: 34669779
Change-Id: Ib85d1d137139f5e14f735c972c2312acce2caf5f
2017-03-23 14:54:20 -07:00
Tao Bao bc3d2ee5e5 Merge "Redundant checking of STL container element" am: b56a3c2e3a
am: 9e05f26e1a

Change-Id: I269ff1530179a77f38d824f67a219adb7c666271
2017-03-23 21:36:58 +00:00