Commit graph

2629 commits

Author SHA1 Message Date
Elliott Hughes
d71cf2eee3 Merge \\"Remove an abused global so we can actually see logging.\\" am: 37450d7f42
am: 4692e5d8c8

Change-Id: Idf78bf71a0670997da754d0de93691db313aed57
2016-06-15 23:18:43 +00:00
Elliott Hughes
a087302da7 Merge \\"init now uses libprocessgroup, so set up /acct.\\" am: 279876c932
am: c58d7dda8c

Change-Id: I8398a7b4b95979d6502545dcfd931a5ce0d28069
2016-06-15 23:18:42 +00:00
Elliott Hughes
4692e5d8c8 Merge \"Remove an abused global so we can actually see logging.\"
am: 37450d7f42

Change-Id: Id9c78be08f2822ec92d54ba11693d3e5adb7b5aa
2016-06-15 23:16:14 +00:00
Elliott Hughes
c58d7dda8c Merge \"init now uses libprocessgroup, so set up /acct.\"
am: 279876c932

Change-Id: I32a89d5d0b41311775dacea1f7d44fe1f6654d2d
2016-06-15 23:16:13 +00:00
Treehugger Robot
37450d7f42 Merge "Remove an abused global so we can actually see logging." 2016-06-15 23:10:32 +00:00
Elliott Hughes
279876c932 Merge "init now uses libprocessgroup, so set up /acct." 2016-06-15 23:09:19 +00:00
Elliott Hughes
eaddde6888 resolve merge conflicts of 179c0d8 to stage-aosp-master
am: 274d17dc0f

Change-Id: I356adf332d5749a6d3f3e29b99bf3fca35de349a
2016-06-15 22:28:05 +00:00
Elliott Hughes
274d17dc0f resolve merge conflicts of 179c0d8 to stage-aosp-master
Change-Id: Iba5aec266444cabf83f600f2bdb45a3c027e5995
2016-06-15 15:22:17 -07:00
Elliott Hughes
48ebb07211 init now uses libprocessgroup, so set up /acct.
Change-Id: Iec1492dfaf2ceae6f4d8618dd725d07316ee960b
2016-06-15 15:15:15 -07:00
Elliott Hughes
59bf0da22f Remove an abused global so we can actually see logging.
Change-Id: Ib97440bc0542003b84c45cb05f194ba20104dad6
2016-06-15 15:14:04 -07:00
Elliott Hughes
179c0d80bc Merge "Remove obsolete MTD support." 2016-06-15 21:55:15 +00:00
Tao Bao
2fc7cd69fd Merge \\"Add bootloader_message_ab struct.\\" am: 59f04b9982
am: f57d7f02c9

Change-Id: Ie2407db5b16f90cbd07ada2d96441aba4055e6c9
2016-06-14 16:22:55 +00:00
Tao Bao
f57d7f02c9 Merge \"Add bootloader_message_ab struct.\"
am: 59f04b9982

Change-Id: I9c3a816243a03dc2723679ef6efa241361446b96
2016-06-14 16:18:22 +00:00
Tao Bao
59f04b9982 Merge "Add bootloader_message_ab struct." 2016-06-14 16:09:16 +00:00
Tao Bao
38afad46d8 resolve merge conflicts of 490fad6 to nyc-dev-plus-aosp
Change-Id: I299fe15977c1a59d0c784728872c3a7f63c95e56
2016-06-13 19:12:46 -07:00
Tao Bao
490fad6791 applypatch: Don't call inflate() when it expects zero-length output.
We may have expanded_len == 0 when calling inflate(). After switching to
using std::vector, it passes a nullptr buffer to inflate() and leads to
Z_STREAM_ERROR.

Bug: 29312140
Change-Id: Iab7c6c07a9e8488e844e7cdda76d02bd60d2ea98
2016-06-13 16:42:52 -07:00
Tao Bao
1e67422f37 Merge \\"updater: Fix the broken ReadFileFn.\\" am: 4ddd5edf31
am: 89dfe730d4

Change-Id: Ia465c92d341da4681d3490151a20e1e117271e52
2016-06-11 18:53:14 +00:00
Tao Bao
89dfe730d4 Merge \"updater: Fix the broken ReadFileFn.\"
am: 4ddd5edf31

Change-Id: Id73ccb86a3869198baf84b7978054b174c281c79
2016-06-11 18:49:21 +00:00
Tao Bao
4ddd5edf31 Merge "updater: Fix the broken ReadFileFn." 2016-06-11 18:42:53 +00:00
Tao Bao
efacd80364 updater: Fix the broken ReadFileFn.
Was accidentally broken by the CL in [1].

[1]: commit d6c93afcc2

Change-Id: I851e13ccea6f5be6fcd47f712cc95867245f9934
2016-06-11 03:59:56 -07:00
Elliott Hughes
63a319201f Remove obsolete MTD support.
Bug: http://b/29250988
Change-Id: Ia97ba9082a165c37f74d6e1c3f71a367adc59945
2016-06-10 13:45:35 -07:00
Tianjie Xu
9d2657fbb7 Log source/target build version to last_install
am: b0ddae55e5

Change-Id: Ifd9e006588de8bea233a4e90a5c80ed6b894054a
2016-06-10 17:21:40 +00:00
Elliott Hughes
21c4f4e6e6 Merge \\"Remove etc/META-INF/com/google/android/update-script.\\" am: 5b2191a9d6
am: 5be6ae12b5

Change-Id: Ia2aace34275d4ef517b0bf47a8c9ae04f47a3f05
2016-06-10 16:30:34 +00:00
Elliott Hughes
5be6ae12b5 Merge \"Remove etc/META-INF/com/google/android/update-script.\"
am: 5b2191a9d6

Change-Id: Ie27f4c9d78de710eb45a87fed9c0aaf6b71404b6
2016-06-10 16:27:49 +00:00
Elliott Hughes
5b2191a9d6 Merge "Remove etc/META-INF/com/google/android/update-script." 2016-06-10 16:20:42 +00:00
Tao Bao
9fb2b592e2 Add bootloader_message_ab struct.
Move A/B-specific fields, effectively slot_suffix as in this CL, out of
bootloader_message struct. Those A/B-specific fields are expected to be
managed by the A/B-bootloader or boot control HAL, which shouldn't be
cleared by recovery or uncrypt.

Round up the bootloader_message struct to 2-KiB. Round up the
bootloader_message_ab struct to 4-KiB.

Bug: 29193360
Change-Id: I5740a612456da6d4d3b00e49a202d8f689d32690
2016-06-09 21:46:13 -07:00
Elliott Hughes
ad29b10c00 Remove etc/META-INF/com/google/android/update-script.
Bug: http://b/29250988
Change-Id: I61f8c6717b38de2242e4ea8e0913237c1ce5bfea
2016-06-09 18:03:05 -07:00
Tianjie Xu
b0ddae55e5 Log source/target build version to last_install
Parse the build.version.incremental from the metadata of the update
package; and log it to last_install.
Example:
In metadata we read:
post-build-incremental=2951741
pre-build-incremental=2943039

In last install we log:
source_build: 2943039
target_build: 2951741

Bug: 28658632
Change-Id: I0a9cc2d01644846e18bda31f4193ff40e8924486
2016-06-09 17:29:04 -07:00
Alain Vongsouvanh
2a697feb39 resolve merge conflicts of 6aa6ddb to nyc-dev
am: 771b6eb8d9

Change-Id: Ie0dabf5fb0930b75117193ae31e73df62d885903
2016-06-08 15:46:40 +00:00
Alain Vongsouvanh
771b6eb8d9 resolve merge conflicts of 6aa6ddb to nyc-dev
Change-Id: I3696fe3e86e0222c7c26b0aa2bf1dd8e03ac5315
2016-06-08 08:30:48 -07:00
Alain Vongsouvanh
6aa6ddb3c5 recovery: Make wear recovery more customizable.
am: 5b00110e3d

Change-Id: I88ab75e875cea8813ab4bdc9f099c31609ace6fd
2016-06-08 15:10:54 +00:00
Alain Vongsouvanh
5b00110e3d recovery: Make wear recovery more customizable.
Making animation_fps protected and adding support for 0 frames intro.

BUG: 29085786
Change-Id: I07b44570022bad89661973178d453592c01f3f10
2016-06-07 10:05:29 -07:00
Tianjie Xu
64f46fb16c resolve merge conflicts of 7ce287d to nyc-dev-plus-aosp
Change-Id: I2194d1170281f58eb508f2ef63b39c8729125f76
2016-06-03 15:44:52 -07:00
Tao Bao
ba33da2884 resolve merge conflicts of fe8e356 to nyc-dev-plus-aosp
Change-Id: I18ecc333a76860405028b90b0baf2fba78d3942e
2016-06-03 14:57:34 -07:00
Tao Bao
fe8e356b7d Merge "recovery: Add support to brick a device."
am: 0ab866b354

* commit '0ab866b3544ff999293b2c296908e969d72b5799':
  recovery: Add support to brick a device.

Change-Id: I4a106a6780b48f32d2776a436cc6445b3746fcc0
2016-06-03 21:51:13 +00:00
Tao Bao
0ab866b354 Merge "recovery: Add support to brick a device." 2016-06-03 21:35:06 +00:00
Tianjie Xu
7ce287d432 Call ioctl before each write on retry
If the update is a retry, ioctl(BLKDISCARD) the destination blocks before
writing to these blocks.

Bug: 28990135
Change-Id: I1e703808e68ebb1292cd66afd76be8fd6946ee59
2016-06-03 12:12:50 -07:00
Tao Bao
862a4c1119 recovery: Add support to brick a device.
When recovery starts with --brick, it tries to brick the device by
securely wiping all the partitions as listed in /etc/recovery.brick.

This is designed to support bricking lost devices.

Bug: 27253717
Change-Id: Ib0bd4f0a3bdaca4febc91fce6b682e3ec74354e2
2016-06-03 11:01:41 -07:00
Tao Bao
e13a690c16 Merge "Revert "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector."" am: c96c9881a6
am: a7fca9402d

* commit 'a7fca9402d9ee6dae80cae8bdafe9f7e0ed5e5e1':
  Revert "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector."

Change-Id: I4075fd84e12f48c2178ab21b78dc3efc7621a6c8
2016-06-01 21:50:49 +00:00
Tao Bao
a7fca9402d Merge "Revert "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector.""
am: c96c9881a6

* commit 'c96c9881a628caea9cc88d1c1fbf4d2988999712':
  Revert "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector."

Change-Id: Ie4f6b07f8526232b77e240fff37d73b3e35642cd
2016-06-01 21:44:07 +00:00
Tao Bao
c96c9881a6 Merge "Revert "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector."" 2016-06-01 21:32:15 +00:00
Tao Bao
a0c4011028 Revert "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector."
This reverts commit 50a6f8c833.

A mix of new and free leads to memory corruptions.
2016-06-01 13:15:44 -07:00
Adam Buchbinder
23bb1d210d Merge "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector." am: a8850710e5
am: 11c794b1a7

* commit '11c794b1a7b02d074367f4c8d1f2017f8ac7d8e9':
  Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector.

Change-Id: Ie3b21e9b2288011bcf9d3bac12aed3db831b410e
2016-06-01 19:03:06 +00:00
Adam Buchbinder
11c794b1a7 Merge "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector."
am: a8850710e5

* commit 'a8850710e588e7c6c0003066bae6edd426558059':
  Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector.

Change-Id: I8363d2f5adbabc5c4a43d23aa7c2e6979ffd1bb5
2016-06-01 18:48:55 +00:00
Treehugger Robot
a8850710e5 Merge "Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector." 2016-06-01 18:24:15 +00:00
Adam Buchbinder
50a6f8c833 Fix memory/resource handling in imgdiff.cpp, using unique_ptr and vector.
This fixes the following cppcheck reports:
[imgdiff.cpp:197]: (error) Memory leak: img
[imgdiff.cpp:386]: (error) Memory leak: img
[imgdiff.cpp:656]: (error) Memory leak: data
[imgdiff.cpp:664]: (error) Memory leak: data
[imgdiff.cpp:668]: (error) Memory leak: data
[imgdiff.cpp:668]: (error) Resource leak: f
[imgdiff.cpp:820]: (error) Memory leak: bonus_data
[imgdiff.cpp:824]: (error) Memory leak: bonus_data
[imgdiff.cpp:824]: (error) Resource leak: f
[imgdiff.cpp:847]: (error) Memory leak: bonus_data
[imgdiff.cpp:851]: (error) Memory leak: bonus_data
[imgdiff.cpp:856]: (error) Memory leak: bonus_data
[imgdiff.cpp:860]: (error) Memory leak: bonus_data
[imgdiff.cpp:227]: (error) Memory leak: temp_entries

Change-Id: I06f878d0b677a25328e0deb84f65f3b7212e24b1
(cherry picked from commit 51dc9444bc)
2016-06-01 10:28:45 -07:00
Tao Bao
d8a518d711 Merge "Revert "imgdiff: Generate statically linked imgdiff."" am: 59203510eb
am: fd49adbdaf

* commit 'fd49adbdaf3639b7e4565c6ef67bb060612e26c4':
  Revert "imgdiff: Generate statically linked imgdiff."

Change-Id: Id391b970b3f7cda5ead0cb469b2d09379059e89d
2016-06-01 00:19:34 +00:00
Tao Bao
fd49adbdaf Merge "Revert "imgdiff: Generate statically linked imgdiff.""
am: 59203510eb

* commit '59203510eb5827ec36078e54076c809f82641821':
  Revert "imgdiff: Generate statically linked imgdiff."

Change-Id: I5671a20ed1f01a61dfb36ecd0ad4db3002ca5045
2016-06-01 00:16:24 +00:00
Tao Bao
59203510eb Merge "Revert "imgdiff: Generate statically linked imgdiff."" 2016-06-01 00:09:19 +00:00
Tao Bao
16e3861c84 Revert "imgdiff: Generate statically linked imgdiff."
This reverts commit b4422bd769.

Bug: 28941046
Change-Id: Ic3c7439c64b8e55832252850514f721a944993d6
2016-06-01 00:08:40 +00:00