Commit Graph

2984 Commits

Author SHA1 Message Date
Adam Buchbinder 51dc9444bc 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
2016-05-26 14:06:10 -07:00
Elliott Hughes 08e5801c01 Disable the meaningless parts of the UI for A/B. am: 01fcbe160b
am: 994bacf549

* commit '994bacf5496ba07240f70611b6c565f0dc24ca0c':
  Disable the meaningless parts of the UI for A/B.

Change-Id: Iee8df4e288d3909612a71e6af062af7fa8c4b934
2016-05-24 17:19:28 +00:00
Elliott Hughes 994bacf549 Disable the meaningless parts of the UI for A/B.
am: 01fcbe160b

* commit '01fcbe160bd49891c0680b80c5688cd4feb2adbc':
  Disable the meaningless parts of the UI for A/B.

Change-Id: I86466cac3623b62db07bf48a38428be715ac3d3a
2016-05-24 17:12:58 +00:00
Tianjie Xu 918add26fe resolve merge conflicts of 50f6417 am: 3f6eb86390
am: f51e507fa7

* commit 'f51e507fa714c7e00c70539d9c57723fc2ea060a':
  resolve merge conflicts of 50f6417

Change-Id: I2f44ff16dd4471d7944371f94508637171b80a6e
2016-05-24 01:19:37 +00:00
Jeremy Compostella be04a5efa2 Merge "slot_metadata: add verity_corrupted field" am: 3788001b2c am: 1ae2434c11 am: f5e2831bf3
am: 1afd591a09

* commit '1afd591a09cee35d0cafac3c1d7f236fe28cf274':
  slot_metadata: add verity_corrupted field

Change-Id: Ic61d0514a8f224f35fe172b1056c6adb8bbc253c
2016-05-24 01:19:36 +00:00
Tianjie Xu 9bedd1a003 resolve merge conflicts of 84478e8 to nyc-mr1-dev-plus-aosp
am: 79c13cee26

* commit '79c13cee260ebca72752439353fa739aa6f3230f':

Change-Id: Ie0322322b0ff1768bb6b4c85c4d0c638a1a850ab
2016-05-24 01:19:35 +00:00
Tianjie Xu f51e507fa7 resolve merge conflicts of 50f6417
am: 3f6eb86390

* commit '3f6eb86390e27707d1204e60e33b6a41e88f0dc8':
  resolve merge conflicts of 50f6417

Change-Id: Id8410b617d811dccfa0979cf82859c4880d216d5
2016-05-24 01:17:02 +00:00
Jeremy Compostella 1afd591a09 Merge "slot_metadata: add verity_corrupted field" am: 3788001b2c am: 1ae2434c11
am: f5e2831bf3

* commit 'f5e2831bf32fe1c0069c3c7bbeda876dbb83fe0a':
  slot_metadata: add verity_corrupted field

Change-Id: I3a2c24a80e53a28fa7b56c64df5fc10ee7414f24
2016-05-24 01:17:01 +00:00
Tianjie Xu 79c13cee26 resolve merge conflicts of 84478e8 to nyc-mr1-dev-plus-aosp
Change-Id: I84ed9e14d3103e5497a6d57fde0abafe9265a148
2016-05-23 18:13:58 -07:00
Elliott Hughes 01fcbe160b Disable the meaningless parts of the UI for A/B.
Bug: http://b/28748484
Change-Id: Ie86a265f4699503471e7c717d65677a916dbd25b
2016-05-24 00:44:50 +00:00
Tianjie Xu 3f6eb86390 resolve merge conflicts of 50f6417
Fix a typo for ota_fclose().

Change-Id: Ia93e911aa5391afc604874fc3a09c5a45c094c80
2016-05-23 14:58:53 -07:00
Tianjie Xu 8a43084979 resolve merge conflicts of 3aabd77 to nyc-mr1-dev-plus-aosp
am: 549745cc87

* commit '549745cc8778f806e46809e472fbcf3c7f066b83':
  Allow recovery to return error codes

Change-Id: I474bc0afb4e92ffafec9de60e1665e3aa3c2cf10
2016-05-23 21:28:44 +00:00
Jeremy Compostella f5e2831bf3 Merge "slot_metadata: add verity_corrupted field" am: 3788001b2c
am: 1ae2434c11

* commit '1ae2434c117a3cd0b504e3f3ad24730577836a69':
  slot_metadata: add verity_corrupted field

Change-Id: I8c7bca4f0bb41268904d09309ef1b94215c24bc8
2016-05-23 21:22:07 +00:00
Jeremy Compostella 1ae2434c11 Merge "slot_metadata: add verity_corrupted field"
am: 3788001b2c

* commit '3788001b2c8a37e4111c9bc584a18a52664c2a88':
  slot_metadata: add verity_corrupted field

Change-Id: Ib8c0ad4f7bb605b1b7420affcd102bf1eb9f47db
2016-05-23 21:18:55 +00:00
Treehugger Robot 3788001b2c Merge "slot_metadata: add verity_corrupted field" 2016-05-23 21:10:16 +00:00
Tianjie Xu 549745cc87 resolve merge conflicts of 3aabd77 to nyc-mr1-dev-plus-aosp
Change-Id: I834aba65cb29102055ff9e70969973a7870d0e60
2016-05-23 12:30:42 -07:00
Tianjie Xu 84478e8823 resolve merge conflicts of 50f6417 to nyc-dev-plus-aosp
Change-Id: I42c127f7946e678acf6596f6352f090abc0ca019
2016-05-23 12:24:28 -07:00
Tianjie Xu 3aabd770d9 Merge "Allow recovery to return error codes" into nyc-dev
am: 50f6417317

* commit '50f6417317f9e327ed76abaf34512370f8376245':
  Allow recovery to return error codes

Change-Id: I4613291b3b4a0c34d5e6999f240465237472302e
2016-05-23 18:15:40 +00:00
Tianjie Xu 50f6417317 Merge "Allow recovery to return error codes" into nyc-dev 2016-05-23 18:03:41 +00:00
Jeremy Compostella e77a68f67f slot_metadata: add verity_corrupted field
In rootfs context, the verity mode must be supplied by the bootloader
to the kernel.  This patch creates a new verity_corrupted field in the
slot metadata structure to remind that this slot is corrupted from a
dm-verity point of view.

If the bootloader receives the "dm-verity device corrupted" reboot
target, it should set this bit to 1.  If this bit value is 1, the
bootloader should set the veritymode to "eio".

Change-Id: I9335a39d7d009200318c58c53a3139d542788a9b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
2016-05-23 13:10:23 +02:00
Tianjie Xu 162558382b Allow recovery to return error codes
Write error code, cause code, and retry count into last_install. So we
can have more information about the reason of a failed OTA.

Example of new last_install:
@/cache/recovery/block.map     package name
0                              install result
retry: 1                       retry count (new)
error: 30                      error code (new)
cause: 12                      error cause (new)

Details in:
go/android-ota-errorcode

Bug: 28471955
Change-Id: I00e7153c821e7355c1be81a86c7f228108f3dc37
2016-05-20 13:56:53 -07:00
Matt Sarett c466c70ddf resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1 am: b02b2fe392 am: 75dea9ca3a am: bd43d7e92b
am: 9ca6bac199

* commit '9ca6bac1996e2210f35202b0d05738e8d0d951c0':

Change-Id: I965414ad387bffd703e8c3bedc523beee43456c4
2016-05-20 00:07:29 +00:00
Matt Sarett cfb45bd7b9 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1 am: b02b2fe392 am: 75dea9ca3a am: 8a55c65345
am: b898481de7

* commit 'b898481de7f2d3d7617da04a58aa320e58aa72a4':
  DO NOT MERGE Use updated libpng API

Change-Id: I5cdfad96ed0a6ffde2c197ef7957192d9b0c1a16
2016-05-20 00:07:25 +00:00
Matt Sarett 9ca6bac199 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1 am: b02b2fe392 am: 75dea9ca3a
am: bd43d7e92b

* commit 'bd43d7e92bec3b69f8318d74cd11936a622efef4':

Change-Id: I4c8ed47e3a5ca4dba3e423332bc6252e9ec92e43
2016-05-19 23:34:16 +00:00
Matt Sarett b898481de7 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1 am: b02b2fe392 am: 75dea9ca3a
am: 8a55c65345

* commit '8a55c653458c2d33af506b193e658faf8f88bfa3':
  DO NOT MERGE Use updated libpng API

Change-Id: Id8a3a6a56edc5fbc9a10e08d9c09f47850964612
2016-05-19 23:31:23 +00:00
Matt Sarett 8a55c65345 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1 am: b02b2fe392
am: 75dea9ca3a

* commit '75dea9ca3aabe23bed2d9f15b70dbdd5efb18cd1':
  DO NOT MERGE Use updated libpng API

Change-Id: Id23a9528e6413e40cd3249e0143c02798dcec4cc
2016-05-19 23:28:21 +00:00
Matt Sarett bd43d7e92b resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1 am: b02b2fe392
am: 75dea9ca3a

* commit '75dea9ca3aabe23bed2d9f15b70dbdd5efb18cd1':
  DO NOT MERGE Use updated libpng API

Change-Id: I75e0414350115ec133d9905263c01c3b385512b3
2016-05-19 23:28:20 +00:00
Matt Sarett 75dea9ca3a resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d am: fc1d9a49d1
am: b02b2fe392

* commit 'b02b2fe392827a423c7783522edc5b9ad3d4f130':
  DO NOT MERGE Use updated libpng API

Change-Id: Ie6e8c5118687f0d34fc4acffdcb1d784e71e411f
2016-05-19 23:25:43 +00:00
Matt Sarett b02b2fe392 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55 am: 300af0779d
am: fc1d9a49d1

* commit 'fc1d9a49d1e33c133c96cf6b04d6f47d3cfaa496':
  DO NOT MERGE Use updated libpng API

Change-Id: Id9da4d3980f394bf19032581629d0baf9c30e0fc
2016-05-19 23:22:55 +00:00
Matt Sarett fc1d9a49d1 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad am: aa02888e55
am: 300af0779d

* commit '300af0779de3c2658f32e3de40adc41dae92df1e':
  DO NOT MERGE Use updated libpng API

Change-Id: Iac60caa51e747fcde2c08ddf06323e8b1e98f36a
2016-05-19 23:20:22 +00:00
Matt Sarett 300af0779d resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27 am: 8a1d4e97ad
am: aa02888e55

* commit 'aa02888e55147ec78fa5636a87e2447bda136d68':
  DO NOT MERGE Use updated libpng API

Change-Id: I10705dd579623e4b208093cfc4839aad496081c8
2016-05-19 23:17:52 +00:00
Matt Sarett aa02888e55 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630 am: ca45737e27
am: 8a1d4e97ad

* commit '8a1d4e97ad3b748a06db618f9d7ccf5114ea16d0':
  DO NOT MERGE Use updated libpng API

Change-Id: I09e8917976c05beec8bf881140539948c323ce58
2016-05-19 23:14:39 +00:00
Matt Sarett 8a1d4e97ad resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e am: 1f814d7630
am: ca45737e27

* commit 'ca45737e272aeefd657451a6faaa088d1903378c':
  DO NOT MERGE Use updated libpng API

Change-Id: Ia9c36583c9d60d01fec7ee9aefc973dabb1c07d3
2016-05-19 23:12:10 +00:00
Matt Sarett ca45737e27 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f am: 36acff7d7e
am: 1f814d7630

* commit '1f814d7630c56cc9e825ed411e068414c97acb6c':
  DO NOT MERGE Use updated libpng API

Change-Id: Ib381e8ccefe9181911a2144d7255ecadefb42b5c
2016-05-19 23:08:54 +00:00
Matt Sarett 1f814d7630 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f
am: 36acff7d7e

* commit '36acff7d7e88549bbeab6a08488ab48596d7fbc5':
  DO NOT MERGE Use updated libpng API

Change-Id: I7f01d932235ef69640ed4859d0e62344b3b774de
2016-05-19 23:06:06 +00:00
Matt Sarett 36acff7d7e resolve merge conflicts of 86a28d0 to klp-modular-dev
am: a5bc59620f

* commit 'a5bc59620fd43c99621eb98ac84cbeea867d0c93':
  DO NOT MERGE Use updated libpng API

Change-Id: I3d8d27b08fd1fd89c6b8d9c39b883a45aecb83ce
2016-05-19 23:03:35 +00:00
Matt Sarett a5bc59620f resolve merge conflicts of 86a28d0 to klp-modular-dev
Change-Id: Ic0b085e008155da3718dab8fd5a36be6d4059aee
2016-05-19 15:47:25 -04:00
Matt Sarett 86a28d0aaf DO NOT MERGE Use updated libpng API
am: 839b4e592a

* commit '839b4e592a7c81bdebe08fae4eef6e909c89acd6':
  DO NOT MERGE Use updated libpng API

Change-Id: I7bbece70a4129554d953fd22c71527b2ca11262e
2016-05-19 19:26:12 +00:00
Tianjie Xu ccf1b95c08 Add time and I/O info to last_install am: dd874b1c87 am: 142b864ba1
am: 46aa5911d8

* commit '46aa5911d810e09e2a90492dd5865cfe25c31b6d':

Change-Id: Idd29ee0695656527fff8d8eda32f777e84b42193
2016-05-18 18:54:59 +00:00
Tianjie Xu 0f85209b2e Add time and I/O info to last_install am: dd874b1c87 am: 027b403e8a
am: fb5d7f6172

* commit 'fb5d7f6172f88a9e26ef554ef56717798f83522d':
  Add time and I/O info to last_install

Change-Id: I3e80f862aff97a2fbbd2324cbbc5d16aede196f3
2016-05-18 18:54:59 +00:00
Tianjie Xu 46aa5911d8 Add time and I/O info to last_install am: dd874b1c87
am: 142b864ba1

* commit '142b864ba1121365f8bc95075cb05495c351194e':

Change-Id: I5b817e54c97bd67109e8269c93c3a1c14c0a3b86
2016-05-18 18:50:03 +00:00
Tianjie Xu fb5d7f6172 Add time and I/O info to last_install am: dd874b1c87
am: 027b403e8a

* commit '027b403e8aa90ddc533e39e623df09fc319bb6ee':
  Add time and I/O info to last_install

Change-Id: I04c368dd551946427f683df906eb42e0f2f740e9
2016-05-18 18:47:31 +00:00
Tianjie Xu 142b864ba1 Add time and I/O info to last_install
am: dd874b1c87

* commit 'dd874b1c87eb04f28db0db2629df0adde568a74c':
  Add time and I/O info to last_install

Change-Id: I02aa858d5ce488d3acbf5400811e2565cf7d9c75
2016-05-18 18:44:31 +00:00
Tianjie Xu 027b403e8a Add time and I/O info to last_install
am: dd874b1c87

* commit 'dd874b1c87eb04f28db0db2629df0adde568a74c':
  Add time and I/O info to last_install

Change-Id: I487bdc54897816fe8ed24b441a848cac1dc29389
2016-05-18 18:44:31 +00:00
Matt Sarett 839b4e592a DO NOT MERGE Use updated libpng API
BUG:23265085
Change-Id: Ibc521fae11dad22283d8469329326ef79525b414
2016-05-17 20:28:54 +00:00
Tianjie Xu dd874b1c87 Add time and I/O info to last_install
One example of last_install is:

/sideload/package.zip
1
time_total: 101
bytes_written_system: 14574000
bytes_stashed_system: 100
bytes_written_vendor: 5107400
bytes_stashed_vendor: 0

Bug: 28658632
Change-Id: I4bf79ea71a609068d38fbce6b41bcb892524aa7a
2016-05-16 14:54:37 -07:00
Jonathan Hamilton 027c1334e6 Merge "Keep ADF device alive for the lifetime of the minui backend" am: 14352497f0 am: 32c2e78726 am: 0cc7e28ffd
am: 856ba940b7

* commit '856ba940b75cf4cf0ab81319443d82fef40ada2f':
  Keep ADF device alive for the lifetime of the minui backend

Change-Id: Ic43fc26c107b99b4caf1bd18832ee03e00f1799c
2016-05-12 17:45:08 +00:00
Jonathan Hamilton 856ba940b7 Merge "Keep ADF device alive for the lifetime of the minui backend" am: 14352497f0 am: 32c2e78726
am: 0cc7e28ffd

* commit '0cc7e28ffd00cff661d0120e9365b7bfa9bec533':
  Keep ADF device alive for the lifetime of the minui backend

Change-Id: I3ff57ca546aa6d88a73d9ccf986af8e08fa4ee6e
2016-05-12 17:39:20 +00:00
Jonathan Hamilton 0cc7e28ffd Merge "Keep ADF device alive for the lifetime of the minui backend" am: 14352497f0
am: 32c2e78726

* commit '32c2e78726fe9c7cdc927c8435352b2f8e824735':
  Keep ADF device alive for the lifetime of the minui backend

Change-Id: If28a4b4c7098f1a5fcf8e46e03d0df575fc68fce
2016-05-12 17:36:44 +00:00
Jonathan Hamilton 32c2e78726 Merge "Keep ADF device alive for the lifetime of the minui backend"
am: 14352497f0

* commit '14352497f02c38d4f9df46820284c100a1fb58d3':
  Keep ADF device alive for the lifetime of the minui backend

Change-Id: I454b5dcae5bd2ee2e17d607ba70c6c020c76f387
2016-05-12 17:33:19 +00:00