Commit Graph

4249 Commits

Author SHA1 Message Date
Tao Bao 64eb3a6a39 Fix the double free in verify_package_compatibility().
"""
void* cookie;
std::unique_ptr<void, decltype(&EndIteration)> guard(cookie, EndIteration);
  ...
EndIteration(cookie);
"""

The above pattern is buggy that frees 'cookie' twice.

Bug: 37413730
Test: Build new recovery and adb sideload a previously crashed package
      that contains 'compatibility.zip'.
Change-Id: I183c33827fb28a438ebaedda446e84cabe7cb92d
(cherry picked from commit f978278995)
2017-04-17 13:16:51 -07:00
Tao Bao 235cc8c7a4 Add the missing LOCAL_CFLAGS for librecovery.
The -DAB_OTA_UDPATER part was missing when separating the librecovery
module (commit 62e0bc7586).

Bug: 37300957
Test: Build sailfish recovery image and sideload full OTA.
Change-Id: Idd25662f6bc812c1aca95b096802f59b051f8d63
(cherry picked from commit 25dbe1717e)
2017-04-13 13:40:19 -07:00
gitbuildkicker b4f3c7c6be merge in oc-release history after reset to oc-dev 2017-04-13 00:07:10 -07:00
Tao Bao 62e0bc7586 Verify the package compatibility with libvintf.
verify_package_compatibility() is added to parse the compatibility entry
(compatibility.zip) in a given OTA package. If entry is present, the
information is sent to libvintf to check the compatibility.

This CL doesn't actually call libvintf, since the API there is not
available yet.

Bug: 36597505
Test: Doesn't break the install with existing packages (i.e. w/o the
      compatibility entry).
Test: recovery_component_test
Change-Id: I3903ffa5f6ba33a5c0d761602ade6290c6752596
2017-04-12 14:52:00 -07:00
gitbuildkicker 1a2d160b77 merge in oc-release history after reset to oc-dev 2017-04-04 00:06:49 -07:00
TreeHugger Robot 5d9fb40ef7 Merge "update_verifier: correct group in rc file" into oc-dev 2017-04-04 03:22:07 +00:00
Tom Cherry 031f40704a update_verifier: correct group in rc file
update_verifier should be in the cache group, not 'class'.

Also use PLOG instead of LOG if care_map.txt cannot be opened.

Bug: 36818743
Test: boot sailfish
Test: fake OTA on sailfish and verify update_verifier reads care_package

(cherry picked from commit 3a8002f8c0)

Change-Id: I7e4cccd457ee84054164077c81d04ad7cb394c7a
2017-04-03 18:14:42 -07:00
Wei Wang 98beba314b update_verifier: tweak priority of update_verifier for quick boot
Highest ioprio is 0 for CFQ and we should run update_verifier with that.
Tested on device and showing boottime decreased.

Bug: 36511808
Bug: 36102163
Test: Boot marlin
Change-Id: Iddd925951d976e21014b61e5590bcdae3cea8470
(cherry picked from commit a015cd1d7a)
2017-04-04 00:49:07 +00:00
gitbuildkicker 0e2cbf8e8b merge in oc-release history after reset to oc-dev 2017-04-03 00:06:26 -07:00
gitbuildkicker 2bdb6618f1 merge in oc-release history after reset to oc-dev 2017-04-02 00:07:14 -07:00
Tianjie Xu 8dcbd1b399 Merge "Use regular check for partition name instead of CHECK()" am: 76cb4eeda6 am: cd66e52573
am: 705a4d72c8

Change-Id: Ie1f8e1c6ab9fddf1b355287f0c4e5fc0b2631441
(cherry picked from commit 2e797d9905)
2017-04-02 05:00:50 +00:00
Tianjie Xu 253e223799 Merge "Update_verifier should read blocks in EIO mode" am: 21d481c81e am: 89559e3cfe
am: 81f5b04df2

Change-Id: I20f459c3403ec0e120769bd805b9508dbe11b989
(cherry picked from commit e3ea825181)
2017-04-02 03:02:57 +00:00
Tianjie Xu d8df5485eb Merge "Log temperature during OTA update" am: bc2c51a97f am: 1d7e500bfc
am: 556ca4e301

Change-Id: Ib75bdbee801b1caa2ff7b94b174feae1f7d85688
(cherry picked from commit 6ccd0b780f)
2017-03-31 18:59:08 +00:00
Bowgo Tsai 930247241f recovery: switch to fs_mgr_read_fstab_default()
fs_mgr_read_fstab_default() is now aware of recovery mode so it's ok to
switch to this new API.

Bug: 35811655
Test: recovery boot sailfish
Change-Id: I1025b606fd96e74a893ae99cefc1da01e4b27a23
(cherry picked from commit 84a06485a9)
2017-03-31 11:01:06 +08:00
gitbuildkicker eea0bd6cb6 merge in oc-release history after reset to oc-dev 2017-03-30 00:06:47 -07:00
Tom Cherry beaa39bc23 update_verifier: raise priority and ioprio and start with exec_start
Raise the priority and ioprio of update_verifier and launch with
exec_start.  This saves ~100ms of time before `class_start main` is executed.

Bug: 36511808
Bug: 36102163
Test: Boot bullhead
Test: Verify boottime decrease on sailfish
Change-Id: I944a6c0d4368ead5b99171f49142da2523ed1bdd
(cherry picked from commit 545317f4fb)
2017-03-29 13:36:58 -07:00
gitbuildkicker 62a442bce8 merge in oc-release history after reset to oc-dev 2017-03-29 07:46:43 -07:00
gitbuildkicker a7d5dede0e merge in oc-release history after reset to 4762bce4c4 2017-03-29 07:14:51 -07:00
gitbuildkicker bda4ad2a96 merge in oc-release history after reset to oc-dev 2017-03-29 00:06:47 -07:00
Tianjie Xu 0a599567ce Merge "Add the missing sr-Latn into png files and rename the png locale header" am: 713d915636 am: dc235b5ab9
am: 5ec12126f0

Change-Id: Ia6b861c91958d3be23a4a7456d6d5d8e4a1607c8
(cherry picked from commit 9166f66eee)
2017-03-28 22:23:40 +00:00
gitbuildkicker 4762bce4c4 merge in oc-release history after reset to master 2017-03-28 00:06:53 -07:00
Tao Bao 055703e26a Merge "tests: Construct signature-boundary.zip at runtime." 2017-03-27 23:04:51 +00:00
Bowgo Tsai f18e639ce8 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
(cherry picked from commit 4508f23884)
2017-03-27 14:25:39 -07:00
Tao Bao 6ff8c6ac18 Merge "Revert "libbootloader_message: use different fstab paths for normal/recovery boot"" am: 27c3e47853 am: b0e768e269
am: e65835d5ac

Change-Id: I518933a6b2f9bd03653924bda5511f7d4a3b15f1
2017-03-27 19:37:04 +00: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
gitbuildkicker 19cea4264a merge in oc-release history after reset to master 2017-03-27 00:06:37 -07:00
Tao Bao 056e2da679 tests: Construct signature-boundary.zip at runtime.
Test: Observe the same failure with recovery_component_test ("signature
      start: 65535 is larger than comment size: 0").
Change-Id: I98c357b5df2fa4caa9d8eed63af2e945ed99f18a
2017-03-26 23:34:13 -07:00
Tianjie Xu f5c40b2eaf Merge "Skip logging the warning for uncrypt_status for devices w/o /cache" am: df0619edea -s ours am: a97b0712d8 -s ours
am: 334850c9fe  -s ours

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

Change-Id: I36a404a8b09ee22e1a113bfeb890baa3468727cb
2017-03-27 05:42:16 +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 e9d200fc3a Merge "Skip logging the warning for uncrypt_status for devices w/o /cache" into nyc-mr2-dev-plus-aosp
am: 49420e6c3d

Change-Id: Ice77b003eb914b615f7380b80e75fda998a903f5
2017-03-27 02:58:38 +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 e55215ffd5 Merge "applypatch: Drop the support for patching non-EMMC targets." am: b4c4f8c494 am: 351f69e64a
am: dcbabd5932

Change-Id: Ia8ff537f0c503fec5602ae6ad6677c8b427d0806
2017-03-26 18:08:40 +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
gitbuildkicker 815f259b7b merge in oc-release history after reset to master 2017-03-26 00:07:30 -07: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 5d1e7fbadd Merge "Don't fail ReadArgs if length to parse is 0" am: f4c949a41e am: e102ea13ee
am: 5f9617a51f

Change-Id: I674484fcdde5d9b7f847d6efef667638a8da6936
2017-03-26 00:02:08 +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