Commit Graph

7123 Commits

Author SHA1 Message Date
Tianjie Xu de5ba7ab97 Merge "Add a new entry in wipe package to list all wipe partitions"
am: a8969842ae

Change-Id: I436eebb747d7474c5cae754e6c1d2f6ad0546b56
2019-03-07 16:51:46 -08:00
Tianjie Xu a8969842ae Merge "Add a new entry in wipe package to list all wipe partitions" 2019-03-07 22:14:43 +00:00
xunchang e0d991ceca Add a new entry in wipe package to list all wipe partitions
This gives us finer control over the partitions to wipe on the host
side.

Bug: 127492427
Test: unit tests pass, install a wipe package on sailfish
Change-Id: I612f8bac743a310f28e365b490ef388b278cfccb
2019-03-06 15:37:28 -08:00
Tao Bao 4e95d7503e Merge "Use O_CLOEXEC at a few places."
am: e3857ca43e

Change-Id: If5b1622ca66d0722107bdac5daef1eda823cdf20
2019-03-01 16:14:07 -08:00
Treehugger Robot e3857ca43e Merge "Use O_CLOEXEC at a few places." 2019-03-02 00:04:26 +00:00
Tao Bao b549243b27 Use O_CLOEXEC at a few places.
Found these FDs unintentionally propagated into forked processes (e.g.
updater) during my local debugging. Use O_CLOEXEC to avoid that.

Test: Dump open FDs in updater process.
Test: Sideload a package on taimen (which uses framebuffer).
Test: Run graphics test on taimen.
Change-Id: I1fb65dd4a103c47d28b15973def9e9359c251ca3
2019-03-01 14:24:41 -08:00
Tao Bao a04a7d89c2 Merge "Use android::base::Pipe."
am: 21cfc8b6f4

Change-Id: Ic7c2cb62062710984fa3fbd5ed3c577cd84cd926
2019-02-28 18:29:35 -08:00
Treehugger Robot 21cfc8b6f4 Merge "Use android::base::Pipe." 2019-03-01 02:17:24 +00:00
Tao Bao 6fcd208db4 Use android::base::Pipe.
Also clean up the comments regarding updater/recovery protocol.

Test: Sideload a package on taimen. Check that /tmp/recovery.log
      contains the log from update_engine_sideload.
Test: Factory reset on taimen. Check that log file has the info from
      mke2fs.
Change-Id: If560269ce7007769fc85a63bd228813bdd75bebd
2019-02-28 15:53:28 -08:00
Zhomart Mukhamejanov 2ee3614be3 Merge "Updater updater_sample/README.md - build instructions."
am: 52db3dc12e

Change-Id: I71784d07fc6952377c5a06116f2aa0850d613ee3
2019-02-25 20:57:58 -08:00
Zhomart Mukhamejanov 52db3dc12e Merge "Updater updater_sample/README.md - build instructions." 2019-02-26 04:00:52 +00:00
Zhomart Mukhamejanov 011b5bbc06 Updater updater_sample/README.md - build instructions.
Change-Id: Icbd577e3ceeec2766eca690b529b31f562df6fb2
Test: docs only
2019-02-25 16:19:55 -08:00
Xin Li d429ddca6b Merge "DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master" into stage-aosp-master 2019-02-21 07:04:42 +00:00
David Anderson dbefca86b8 Merge "Add a logo to the fastbootd screen."
am: d294935bf7

Change-Id: I1cbd17fbd7636c1e5779b376c01984e9986bbcec
2019-02-20 20:18:05 -08:00
David Anderson d294935bf7 Merge "Add a logo to the fastbootd screen." 2019-02-21 04:07:29 +00:00
Xin Li 6b72e3f03b DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Bug: 120848293
Change-Id: I4ac749387dca39a09e96ea5588b651d06728033b
2019-02-20 16:17:20 -08:00
David Anderson 983e2d5718 Add a logo to the fastbootd screen.
fastbootd looks too much like recovery, even if you're carefully reading
the menu. It's not obvious the device is in a flashing mode, and it's
too tempting to reboot or unplug the device in this state.

As a first step, this patch adds a big red "fastbootd" logo so it's less
obviously in recovery mode.

Bug: 120429730
Test: manual test
Change-Id: I73359f1fdfdc0b1694993f760fe7f35c5713b24e
2019-02-11 19:22:03 -08:00
Xin Li c98e5d4ad1 DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into stage-aosp-master
Bug: 124234733
Change-Id: Ice617995cbe56d367124b3a3420a2caad300acb1
2019-02-11 15:54:16 -08:00
android-build-team Robot 96f7786965 Snap for 5180536 from 8b508c984d to pi-platform-release
Change-Id: I18ffadbdab03199e33f4476135b95da658880541
2019-02-09 02:15:09 +00:00
Daniel Rosenberg 5837eba8ed Merge "Defer marking boot successful when checkpointing"
am: 90edbb17f8

Change-Id: Ic211f79ddd70dd4dcf6c7de7336d5ec98f7b46d6
2019-02-07 17:49:46 -08:00
Daniel Rosenberg 90edbb17f8 Merge "Defer marking boot successful when checkpointing" 2019-02-08 01:40:54 +00:00
Daniel Rosenberg 15f22bddfb Defer marking boot successful when checkpointing
This moves actually marking the slot as successful to a later point
so that on devices with checkpointing enabled we can still roll back to
the previous version if we fail to boot to the point that the checkpoint
is marked as successful.

Test: When taking an update on a checkpoint enabled device, it
      defers marking the slot as successful instead of directly
      marking it. Visible in logs.
Bug: 123260515

Change-Id: I7ed3595c1b0904ddbfe20d1cad4f69ecbf1ea351
2019-02-07 13:26:05 -08:00
Tianjie Xu 644e290d2d Merge "Recovery test: Fix an parameter issue in string construction"
am: e13b39bbb1

Change-Id: I4cafef20f443adc11776587028b176dfcb75becd
2019-02-05 17:07:13 -08:00
Tianjie Xu e13b39bbb1 Merge "Recovery test: Fix an parameter issue in string construction" 2019-02-06 00:53:25 +00:00
xunchang 7b08a5a6eb Recovery test: Fix an parameter issue in string construction
The intended string constructor is supposed be
basic_string(size_type count, CharT ch). But the parameter is
accidentally reversed when calling the constructor in install_test.

Test: A failed unit test pass
Change-Id: Id9765bfa7d2368ff0d7fbeea45c9c8357864e060
2019-02-05 12:44:53 -08:00
Tom Cherry 9594188eea Merge "Add android::fs_mgr namespace for new Fstab code"
am: 990807a95f

Change-Id: I215dd9dd7336953f65abbde5a0b8ef47b6407326
2019-01-31 11:50:09 -08:00
Tom Cherry 990807a95f Merge "Add android::fs_mgr namespace for new Fstab code" 2019-01-31 19:35:54 +00:00
Tom Cherry 72a114a3e1 Add android::fs_mgr namespace for new Fstab code
Also add libfstab dependencies where needed.  Previously the
`typedef struct FstabEntry Volume;` line served to both define a
`struct FstabEntry` as well as alias Volume to it.  With the new
namespace for android::fs_mgr::FstabEntry, `struct FstabEntry` isn't
compatible anymore, so we need to alias Volume to the real
android::fs_mgr::FstabEntry.

In doing so, we need to include <fstab/fstab.h> and this requires
libfstab as a library, which a few modules did not have before.

Test: treehugger
Change-Id: I655209a0efb304b3e0568db0748bd5cf7cecbdb7
2019-01-31 09:00:40 -08:00
Tianjie Xu cc025b2b4a Merge "Fix potential size overflow in blockimg.cpp"
am: 9a54dd3bf9

Change-Id: I0b19ace59a023380c2db175123f93205e3405aee
2019-01-29 15:33:54 -08:00
Tianjie Xu 9a54dd3bf9 Merge "Fix potential size overflow in blockimg.cpp" 2019-01-29 23:08:58 +00:00
Suren Baghdasaryan 2b8e48240e [automerger skipped] Merge "DO NOT MERGE: Revert "Revert "Add libprocessgroup dependency"""
am: 5342de92e0 -s ours
am skip reason: subject contains skip directive

Change-Id: I27e126950c7a76f473e5450451e12d36eaa92ad5
2019-01-25 09:18:11 -08:00
Suren Baghdasaryan 5342de92e0 Merge "DO NOT MERGE: Revert "Revert "Add libprocessgroup dependency""" 2019-01-25 17:09:02 +00:00
Suren Baghdasaryan 0ca607c4cd DO NOT MERGE: Revert "Revert "Add libprocessgroup dependency""
This reverts commit 9ce1d14ef6.

Reason for revert: AOSP is fixed with new vendor image

Change-Id: Ie5a9748acdae22a2b9862cb2ecedda7031f77264
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-25 05:43:59 +00:00
Suren Baghdasaryan 56d6cf2c94 [automerger skipped] Merge "DO NOT MERGE: Revert "Add libprocessgroup dependency""
am: 7548e0d6fa -s ours
am skip reason: subject contains skip directive

Change-Id: I6ccebe2066001865d5d57b3e11f8b72827fd4e4d
2019-01-23 23:05:33 -08:00
Suren Baghdasaryan 7548e0d6fa Merge "DO NOT MERGE: Revert "Add libprocessgroup dependency"" 2019-01-24 06:57:55 +00:00
Ng Zhi An a04ff295cf Merge "Check that install file exists before unlink"
am: 05d48050c1

Change-Id: I2a216be7e2f055cc520405bd49f67c3dc18bc542
2019-01-23 21:47:17 -08:00
Treehugger Robot 05d48050c1 Merge "Check that install file exists before unlink" 2019-01-24 05:35:51 +00:00
Suren Baghdasaryan 9ce1d14ef6 DO NOT MERGE: Revert "Add libprocessgroup dependency"
This reverts commit 62d0c7873c.

Reason for revert: Broke AOSP

Change-Id: I88ef00ebce797f7fdca3678ab93fcae364453a8c
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-23 20:46:46 -08:00
Ng Zhi An 14417a5d2a Check that install file exists before unlink
This will remove spurious error messages in logcat such as:

08-02 00:27:21.580   600   600 E /system/bin/recovery-persist: Failed to
unlink /data/misc/recovery/last_install: No such file or directory

since the install file doesn't exist in the first place.

Bug: None
Test: m
Change-Id: Ifaa95729c50efae4e641286dfbe1718aceb5f50a
2019-01-23 15:16:29 -08:00
Suren Baghdasaryan bd36c3a8ec Merge "Add libprocessgroup dependency"
am: 4475f7330a

Change-Id: Ia7d2a6c5d4bfb511e6417eaf1e81f76108415c6f
2019-01-22 13:04:21 -08:00
Suren Baghdasaryan 4475f7330a Merge "Add libprocessgroup dependency" 2019-01-22 20:58:15 +00:00
Suren Baghdasaryan 62d0c7873c Add libprocessgroup dependency
Because set_sched_policy is moved into libprocessgroup an additional
dependency is requred for recovery_component_test to build.

Exempt-From-Owner-Approval: janitorial

Bug: 111307099
Test: builds, boots

Merged-In: I7cf75e473ee1e2837940606c71d15be26db0c3f2
Change-Id: I7cf75e473ee1e2837940606c71d15be26db0c3f2
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-01-20 22:04:43 +00:00
xunchang 53158e51d0 Fix potential size overflow in blockimg.cpp
Switch to 64 bit integers since the size of the entire src/tgt images may
not fit in size_t of ILP32.

There are other theoretical overflow cases in memory allocation and I/O
functions. However, they reside within a single transfer command and are
less likely to happen. I will evaluate and address them in separate
cls.

Test: unit tests pass
Bug: 122461124
Change-Id: Ib719ee695920877458fcfaa25c6ac058a5bbabf2
2019-01-17 09:26:12 -08:00
Hridya Valsaraju f1fd5ec266 Merge "e2fsck_static is no longer needed for remount"
am: 725d7f8dfd

Change-Id: Ie67ab328d10aebd078a1a41fe48b79f6d4467ebe
2019-01-16 17:58:41 -08:00
Treehugger Robot 725d7f8dfd Merge "e2fsck_static is no longer needed for remount" 2019-01-17 01:43:33 +00:00
Hridya Valsaraju 6f44c11357 e2fsck_static is no longer needed for remount
Remount will instead use overlayfs. If the device is not configured
to use overlayfs or if the device does not support dynamic partitions
but has chosed to setup an ext4-dedupe filesystem, e2fsck_static must
then be included in recovery.

Bug: 122115286
Test: fastboot flashall
Change-Id: I931282dbc67ff4ef53291bcbc5a078b500e5e807
2019-01-16 23:42:55 +00:00
Tao Bao fadc163b60 Merge "screen_ui: Trivial fix to append newline when logging."
am: 594a63cc9d

Change-Id: Ib2c433d68cbb38627b1b40919428ba337f617fe6
2019-01-16 15:27:44 -08:00
Tao Bao 594a63cc9d Merge "screen_ui: Trivial fix to append newline when logging." 2019-01-16 23:14:09 +00:00
Tao Bao a00b449e1f screen_ui: Trivial fix to append newline when logging.
Noticed while debugging other issues.

Test: Boot and check recovery.log.
Change-Id: Id92265cff287b9de89efe5eea85581e63e31aeb2
2019-01-16 09:31:12 -08:00
Yifan Hong dc97097fc0 Merge "updater: add functions to modify dynamic partition metadata" am: 27aa9404fc
am: 4def1e8a54

Change-Id: I6d9d00e94329b69ab13a526a83fe9ffb47b46978
2019-01-15 16:42:36 -08:00