Commit Graph

4265 Commits

Author SHA1 Message Date
android-build-team Robot 445c948c0a release-request-c72e46fd-06a9-4104-bad3-f7ba8aeb3e1d-for-git_oc-release-4029917 snap-temp-L38800000066299680
Change-Id: I8fd5a0c76fe7275b05cc3fb7713a582920cfe76c
2017-05-21 07:14:42 +00:00
Tianjie Xu 539b08cfcf Fix the input parameter for "set_retry_bootloader_message"
We're not updating argc & argv during get_args(), so some boot
arguments missed when we set the boot message for retry.

Bug: 38383406
Test: boot command sets correctly during retry attempt.
Change-Id: Ie8583a22fad5e0084245e3431d4018518d508dfd
(cherry picked from commit 72449c9f99)
2017-05-17 11:52:17 -07:00
gitbuildkicker 48d8056115 merge in oc-release history after reset to oc-dev 2017-04-30 00:07:33 -07:00
Dmitri Plotnikov ed9db0fd73 Adding support for quiescent reboot to recovery
Bug: 37401320
Test: build and push OTA and hit adb reboot recovery,quiescent. The screen should remain off throughout the upgrade process.

(cherry picked from commit 8706a98aa6)

Change-Id: I79789a151f6faafda8ecc6198c2182cc2a91da70
2017-04-27 16:31:11 -07:00
gitbuildkicker c4ce43eb7f merge in oc-release history after reset to oc-dev 2017-04-25 00:07:02 -07:00
Tao Bao b4c0de6c7b Add more tests for verify_package_compatibility().
This now covers the actual calls to libvintf, and asserts we're getting
identical results through verify_package_compatibility() and by calling
libvintf directly.

We were missing the coverage and introduced the double free bug (fixed
by commit f978278995).

Bug: 37413730
Test: recovery_component_test passes.
Test: recovery_component_test fails w/o commit
      f978278995.
Change-Id: If5195ea1c583fd7c440a1de289da82145e80e23c
(cherry picked from commit f2784b6a43)
2017-04-24 11:10:42 -07:00
gitbuildkicker 2cfbad37d9 merge in oc-release history after reset to oc-dev 2017-04-20 00:07:10 -07:00
Tao Bao da320ac6ab Call libvintf to verify package compatibility.
The libvintf API has landed. Hook up to do the actual verification.

Bug: 36597505
Test: recovery_component_test
Test: m recoveryimage; adb sideload on angler and sailfish, with
      packages that contain dummy compatibility entries.
Test: m recoveryimage; adb sideload on angler and sailfish, with
      packages that don't contain any compatibility entries.
Change-Id: Idbd6f5aaef605ca51b20e667505d686de5ac781f
2017-04-19 13:04:57 -07:00
Tianjie Xu 464c6ba9f8 Merge "Add 'system' to update_verifier's gid" into oc-dev 2017-04-19 18:17:23 +00:00
gitbuildkicker 0643c7afbe merge in oc-release history after reset to oc-dev 2017-04-19 00:07:06 -07:00
Tianjie Xu 128e771503 Add 'system' to update_verifier's gid
This addresses the denial to /dev/cpuset/tasks:
update_verifier: type=1400 audit(0.0:377): avc: denied { dac_override }
for capability=1 scontext=u:r:update_verifier:s0
tcontext=u:r:update_verifier:s0 tclass=capability permissive=1

update_verifier: type=1400 audit(0.0:378): avc: granted { write } for
name="tasks" dev="cgroup" ino=5 scontext=u:r:update_verifier:s0
tcontext=u:object_r:cgroup:s0 tclass=file

Bug: 37358323
Test: denial message gone after adding system group
Change-Id: I66b4925295a13fbc1c6f26a1bb9bd2f9cebcec3d
(cherry-picked from 0ad2de5eab)
2017-04-19 06:44:43 +00:00
Tao Bao a6084f8c9b Merge "Add tests for update_binary_command()." into oc-dev 2017-04-19 04:20:46 +00:00
Tao Bao a233a89d99 Add tests for update_binary_command().
Expose update_binary_command() through private/install.h for testing
purpose.

Also make minor clean-ups to install.cpp: a) adding more verbose logging
on ExtractToMemory failures; b) update_binary_command() taking
std::string instead of const char*; c) moving a few macro and global
constants into update_binary_command().

Bug: 37300957
Test: recovery_component_test on marlin
Test: Build new recovery and adb sideload on angler and sailfish.
Change-Id: Ib2d9068af3fee038f01c90940ccaeb0a7da374fc
Merged-In: Ib2d9068af3fee038f01c90940ccaeb0a7da374fc
(cherry picked from commit bc4b1fe4c4)
2017-04-18 20:35:29 -07:00
Tom Cherry 37ac94978c init.rc: Remove sys.powerctl action
Init now handles this property change directly.

Bug: 37209359
Bug: 37415192

Test: Init reboots normally.
Change-Id: I9a4925897fb83bed180d12c871d9a71126fa4aa8
(cherry picked from commit 4608daf0fe)
2017-04-18 12:23:25 -07:00
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 f978278995 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
2017-04-17 10:44:33 -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
Tao Bao 25dbe1717e 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
2017-04-13 08:00:17 -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