Commit graph

2123 commits

Author SHA1 Message Date
Yabin Cui
25dd0386fe uncrypt: generate map file by renaming tmp file.
Writing map file directly can break consistency in map file if
it fails in the middle. Instead, we write a temporary file and
rename the temporary file to map file.

Bug: 26883096
Change-Id: I5e99e942e1b75e758af5f7a48f8a08a0b0041d6a
2016-02-01 14:43:14 -08:00
Tao Bao
9fcb016109 Merge "Fix build." am: 9d72d4175b
am: 2ab24d36b9

* commit '2ab24d36b91e28416a85e2c56442c22c984903ea':
  Fix build.
2016-01-29 06:09:04 +00:00
Tao Bao
2ab24d36b9 Merge "Fix build."
am: 9d72d4175b

* commit '9d72d4175b06a70c64c8867ff65b3c4c2181c9a9':
  Fix build.
2016-01-29 06:06:58 +00:00
Tao Bao
9d72d4175b Merge "Fix build." 2016-01-29 06:01:32 +00:00
Tao Bao
8b0db11eba Fix build.
Disable libimgpatch for non-Linux host.

Change-Id: Ib3615204b76564c691ddafaa29e59fef334d9d36
2016-01-28 21:59:09 -08:00
Tao Bao
484c49e99e resolve merge conflicts of 725833e024 to master.
Change-Id: I68b8737e3bc2bd7bffd7625114723bc1efa47398
2016-01-28 20:58:59 -08:00
Sen Jiang
725833e024 Merge "applypatch: Compile libimgpatch for target and host."
am: 1f3616f3fd

* commit '1f3616f3fd6c0e5cbbc3e490c216db9f758aeb28':
  applypatch: Compile libimgpatch for target and host.
2016-01-29 04:38:56 +00:00
Sen Jiang
1f3616f3fd Merge "applypatch: Compile libimgpatch for target and host." 2016-01-29 04:35:05 +00:00
Sen Jiang
0cce9cda0c applypatch: Compile libimgpatch for target and host.
update_engine need it for the new IMGDIFF operation.

Also removed __unused in ApplyImagePatch() as I got error building it
for the host, and I think it's dangerous not checking the size of the
input.

Test: mma
Bug: 26628339

Change-Id: I22d4cd55c2c3f87697d6afdf10e8106fef7d1a9c
2016-01-28 13:26:25 +08:00
Yabin Cui
a7e7cef949 Merge "edify: accept long string literal." am: d379b4410b
am: bb0e2754ac

* commit 'bb0e2754ac40dfceaee670e1214dce0c70fc5c51':
  edify: accept long string literal.
2016-01-27 23:25:44 +00:00
Yabin Cui
bb0e2754ac Merge "edify: accept long string literal."
am: d379b4410b

* commit 'd379b4410b6f7c7f08751709d08ba6f819acf69d':
  edify: accept long string literal.
2016-01-27 23:23:53 +00:00
Yabin Cui
d379b4410b Merge "edify: accept long string literal." 2016-01-27 23:05:57 +00:00
Yabin Cui
12f499e86d edify: accept long string literal.
Bug: 24717917
Change-Id: I134cf00ae7efbc3703f976459a1b9f9a197e495d
2016-01-27 12:26:18 -08:00
Tao Bao
59f2815145 Merge "Change BCB to perform synchronous writes." am: 5797bf9c90
am: e51d0b4d38

* commit 'e51d0b4d3867e740cb86e4830cdbcb3d4be473e8':
  Change BCB to perform synchronous writes.
2016-01-22 18:46:07 +00:00
Tao Bao
e51d0b4d38 Merge "Change BCB to perform synchronous writes."
am: 5797bf9c90

* commit '5797bf9c90055b9ebbc5fe29e9542a798f359bc7':
  Change BCB to perform synchronous writes.
2016-01-22 17:27:38 +00:00
Tao Bao
5797bf9c90 Merge "Change BCB to perform synchronous writes." 2016-01-22 17:23:17 +00:00
Tao Bao
bd82b27341 Change BCB to perform synchronous writes.
Also some trivial clean-ups in bootloader control block (BCB) code.

Change-Id: I42828954caa4d08998310de40fd0391f76d99cbe
2016-01-21 14:49:13 -08:00
Tao Bao
b595e1722c Merge "recovery: Fork a process for fuse when sideloading from SD card." am: 37e3c71da3
am: ce46828e08

* commit 'ce46828e08281dc507d4e40ba9e8b770bc21cf0b':
  recovery: Fork a process for fuse when sideloading from SD card.
2016-01-14 20:19:31 +00:00
Tao Bao
ce46828e08 Merge "recovery: Fork a process for fuse when sideloading from SD card."
am: 37e3c71da3

* commit '37e3c71da32f476e2658c57d0576e8f94e696ba1':
  recovery: Fork a process for fuse when sideloading from SD card.
2016-01-14 18:29:05 +00:00
Tao Bao
37e3c71da3 Merge "recovery: Fork a process for fuse when sideloading from SD card." 2016-01-14 18:25:54 +00:00
Tao Bao
cdcf28f54f recovery: Fork a process for fuse when sideloading from SD card.
For applying update from SD card, we used to use a thread to serve the
file with fuse. Since accessing through fuse involves going from kernel
to userspace to kernel, it may run into deadlock (e.g. for mmap_sem)
when a page fault occurs. Switch to using a process instead.

Bug: 23783099
Bug: 26313124
Change-Id: Iac0f55b1bdb078cadb520cfe1133e70fbb26eadd
2016-01-13 21:29:20 -08:00
Tao Bao
811353ab0f Merge "uncrypt: avoid use-after-free" am: 0305fcecc5
am: 4edfeb84dd

* commit '4edfeb84ddd8fe93d3dcb028fc1f0a7c12f21271':
  uncrypt: avoid use-after-free
2016-01-14 02:09:00 +00:00
Tao Bao
4edfeb84dd Merge "uncrypt: avoid use-after-free"
am: 0305fcecc5

* commit '0305fcecc5b1a9f8172ca1753a29b6963e7bb474':
  uncrypt: avoid use-after-free
2016-01-14 02:05:31 +00:00
Tao Bao
0305fcecc5 Merge "uncrypt: avoid use-after-free" 2016-01-14 00:41:04 +00:00
Andriy Naborskyy
0a8762e50c Revert "Byte swap to support BGRA in recovery mode" am: a5d5082222 am: 40cce13094
am: 2d127a1d4a

* commit '2d127a1d4ab9717c8460e6a508bd5e893013e8fa':
  Revert "Byte swap to support BGRA in recovery mode"
2016-01-13 18:50:21 +00:00
Ying Wang
fcf142be17 Merge "Rename .l/.y to .ll/.yy" am: ab9db5284e
am: f607e5a0bc

* commit 'f607e5a0bc1c1481331dc32ac203fc66770dec71':
  Rename .l/.y to .ll/.yy
2016-01-13 18:45:22 +00:00
Ying Wang
c577660702 Rename .l/.y to .ll/.yy
Now to generate .cpp you need to use .ll/.yy.

Bug: 26492989
Change-Id: Ib078e03b3b0758f7a62595c343e52ae856bcb33f
2016-01-12 21:09:10 -08:00
Daniel Micay
c5631fc096 uncrypt: avoid use-after-free
The `std::string package` variable goes out of scope but the input_path
variable is then used to access the memory as it's set to `c_str()`.

This was detected via OpenBSD malloc's junk filling feature.

Change-Id: Ic4b939347881b6ebebf71884e7e2272ce99510e2
2016-01-12 14:08:34 -08:00
Andriy Naborskyy
2d127a1d4a Revert "Byte swap to support BGRA in recovery mode" am: a5d5082222
am: 40cce13094

* commit '40cce13094cc7cabebe9577f6bb849dcb46b9d81':
  Revert "Byte swap to support BGRA in recovery mode"
2016-01-12 20:42:52 +00:00
Andriy Naborskyy
40cce13094 Revert "Byte swap to support BGRA in recovery mode"
am: a5d5082222

* commit 'a5d5082222b7420801cdb77f09305dd4c3afb4db':
  Revert "Byte swap to support BGRA in recovery mode"
2016-01-12 19:16:25 +00:00
Ying Wang
f607e5a0bc Merge "Rename .l/.y to .ll/.yy"
am: ab9db5284e

* commit 'ab9db5284ec6113c7d84f70f805dca21c3e6efd7':
  Rename .l/.y to .ll/.yy
2016-01-12 18:57:20 +00:00
Ying Wang
ab9db5284e Merge "Rename .l/.y to .ll/.yy" 2016-01-12 17:35:33 +00:00
Ying Wang
c8abc4ec45 Rename .l/.y to .ll/.yy
Now to generate .cpp you need to use .ll/.yy.

Bug: 26492989
Change-Id: Ib078e03b3b0758f7a62595c343e52ae856bcb33f
2016-01-11 18:14:17 -08:00
Jed Estep
b1cc5d8434 Merge "IO fault injection for OTA packages" 2016-01-08 23:28:32 +00:00
Andriy Naborskyy
a5d5082222 Revert "Byte swap to support BGRA in recovery mode"
This reverts commit e5879c3639.

The swap in page flip code is not needed any more.
New changes take care of ABGR and BGRA formats swapping bytes in
png and drawing routines

See commit fd778e3e40

Bug: 26243152
Change-Id: I313ee41bee2c143b4e5412515285a65ac394ec77
2016-01-08 10:15:57 -08:00
Tianjie Xu
cb93b61578 Merge "updater: Add a function to check first block" am: 6f8b9b60db
am: a3c89623e7

* commit 'a3c89623e765a7d91d781cbd83dd8e50c6c865c9':
  updater: Add a function to check first block
2016-01-08 00:30:45 +00:00
Tianjie Xu
a3c89623e7 Merge "updater: Add a function to check first block"
am: 6f8b9b60db

* commit '6f8b9b60dbf2d73e0ee6e757d565035f017e1ccd':
  updater: Add a function to check first block
2016-01-08 00:28:42 +00:00
Tianjie Xu
6f8b9b60db Merge "updater: Add a function to check first block" 2016-01-08 00:23:50 +00:00
Tianjie Xu
57bed6d8c9 updater: Add a function to check first block
Add and register a function to check if the device has been remounted
since last update during incremental OTA. This function reads block 0
and executes before partition recovery for version >= 4.

Bug: 21124327
Change-Id: I8b915b9f1d4736b3609daa9d16bd123225be357f
(cherry picked from commit 30bf476559)
2016-01-07 11:19:48 -08:00
Tianjie Xu
c94a4f5371 Merge "updater: Add a function to check first block" 2016-01-07 01:33:13 +00:00
Jed Estep
f1fc48c6e6 IO fault injection for OTA packages
Bug: 25951086
Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c
2016-01-06 12:23:42 -08:00
David Riley
085fc1361f Merge "imgdiff: skip spurious gzip headers in image files" am: 8e150a5b24
am: c1de9837e3

* commit 'c1de9837e3bdb64bc1f5d9779df7a944326f5f2b':
  imgdiff: skip spurious gzip headers in image files
2016-01-04 18:07:54 +00:00
David Riley
c1de9837e3 Merge "imgdiff: skip spurious gzip headers in image files"
am: 8e150a5b24

* commit '8e150a5b240833ddf54cbc572cea30ab18e06d86':
  imgdiff: skip spurious gzip headers in image files
2016-01-04 18:05:34 +00:00
David Riley
8e150a5b24 Merge "imgdiff: skip spurious gzip headers in image files" 2016-01-04 18:02:04 +00:00
David Riley
0779fc9814 imgdiff: skip spurious gzip headers in image files
dragon kernel is compressed via lz4 for boot speed and bootloader
support reasons and recent prebuilts happen to include the gzip header
sequence which is causing imgdiff to fail.

Detect a spurious gzip header and treat the section as a normal section.

Bug: 26133184
Change-Id: I369d7d576fd7d2c579c0780fc5c669a5b6ea0d3d
(cherry picked from commit 0f2f6a746af517afca9e5e089a4a17be0a9766d6)
Signed-off-by: David Riley <davidriley@google.com>
2015-12-23 09:43:59 -08:00
Tao Bao
2538b952b8 Merge "res: Embed FPS into icon_installing.png." am: 29b0fbe160
am: ef911716b0

* commit 'ef911716b04a773bcba1e693638cfd9cbb9e4ddc':
  res: Embed FPS into icon_installing.png.
2015-12-18 22:32:36 +00:00
Tao Bao
ef911716b0 Merge "res: Embed FPS into icon_installing.png."
am: 29b0fbe160

* commit '29b0fbe160f815a142fa0d056c1ce10186cea516':
  res: Embed FPS into icon_installing.png.
2015-12-18 22:30:28 +00:00
Tao Bao
29b0fbe160 Merge "res: Embed FPS into icon_installing.png." 2015-12-18 22:20:20 +00:00
Tianjie Xu
30bf476559 updater: Add a function to check first block
Add and register a function to check if the device has been remounted
since last update during incremental OTA. This function reads block 0
and executes before partition recovery for version >= 4.

Bug: 21124327
Change-Id: I8b915b9f1d4736b3609daa9d16bd123225be357f
2015-12-18 13:35:35 -08:00
Tao Bao
b723f4f38f res: Embed FPS into icon_installing.png.
We allow vendor-specific icon installing image but have defined private
animation_fps that can't be overridden. This CL changes the image
generator to optionally embed FPS (otherwise use the default value of
20) into the generated image.

For wear devices, they are using individual images instead of the
interlaced one. Change the animation_fps from private to protected so
that it can be customized.

Bug: 26009230
Change-Id: I9fbf64ec717029d4c54f72316f6cb079e8dbfb5e
2015-12-16 11:35:52 -08:00