Commit Graph

1818 Commits

Author SHA1 Message Date
Josh Gao cc07b35565 minadbd: update for adb_thread_create signature change.
Change-Id: Ifa0b4d8c1cf0bb39abac61984ff165e82e41222c
2016-02-12 15:00:52 -08:00
Yabin Cui 71c657a10e Merge "Fix some memory leaks." 2016-02-11 00:41:52 +00:00
Yabin Cui 4425c1d960 Fix some memory leaks.
Bug: 26906328
Change-Id: Iebaf03db0cb3054f91715f8c849be6087d01b27b
2016-02-10 15:32:19 -08:00
Tao Bao 7043206503 Merge "IO fault injection for OTA packages" 2016-02-10 19:00:02 +00:00
Jed Estep a7b9a4660c IO fault injection for OTA packages
Bug: 25951086
Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c
(cherry-picked from commit f1fc48c6e6)
2016-02-10 10:49:38 -08:00
Sen Jiang 6a7bf1d9aa Merge "applypatch: Add a Makefile to build imgdiff in Chrome OS." 2016-02-10 18:21:31 +00:00
Sen Jiang 696692a3c9 applypatch: Add a Makefile to build imgdiff in Chrome OS.
Also fixed some warnings and added check for target_len.

Test: mma; emerge-peppy imgdiff; emerge-nyan imgdiff; sudo emerge imgdiff
Bug: 26866274

Change-Id: Ifbcd3afd6701c769ccf626e33ed94461706f7ee6
2016-02-09 15:26:57 -08:00
Tao Bao c213a7c1d1 Merge "verifier_test: Suppress the unused parameter warnings." 2016-02-09 04:06:18 +00:00
Tao Bao bd39fa7bdb Merge "Change on-device directory for recovery test data" 2016-02-08 19:45:35 +00:00
Yabin Cui 6b89aa7662 Merge "applypatch: fix memory leaks reported by static analysis." 2016-02-05 22:54:36 +00:00
Jed Estep d5a14c6a49 Change on-device directory for recovery test data
Test data needs to go outside the gtest module.

Change-Id: Ic444ca838cbafa651ec97ff8730129da84fafc09
2016-02-05 11:49:20 -08:00
Tao Bao e1a16af3ea verifier_test: Suppress the unused parameter warnings.
Change-Id: I51fec30114c0a31efc9c2ac8472654baf8bb3e84
2016-02-05 10:41:53 -08:00
Tao Bao 38b02cc6a0 Merge "Refactor existing tests to use gtest" 2016-02-05 18:41:01 +00:00
Yabin Cui e50d447692 Merge "updater: fix memory leak based on static analysis." 2016-02-05 02:46:23 +00:00
Yabin Cui d483c20a7e applypatch: fix memory leaks reported by static analysis.
Bug: 26906416
Change-Id: I163df5a8f3abda3ba5d4ed81dfc8567054eceb27
2016-02-04 15:42:02 -08:00
Yabin Cui 64be2135d8 updater: fix memory leak based on static analysis.
Bug: 26907377
Change-Id: I384c0131322b2d12f0ef489735e70e86819846a4
2016-02-04 14:49:06 -08:00
Tao Bao 6e71c90fad Merge "Switch from mincrypt to BoringSSL in applypatch and updater." 2016-02-04 19:16:20 +00:00
Jed Estep 432918603f Refactor existing tests to use gtest
Bug: 26962907
Change-Id: I5f80636af1740badeff7d08193f08e23f4e4fee1
2016-02-04 10:11:30 -08:00
Sen Jiang c48cb5e597 Switch from mincrypt to BoringSSL in applypatch and updater.
Bug: 18790686
Change-Id: I7d2136fb39b2266f5ae5be24819c617b08a6c21e
2016-02-04 16:27:43 +08:00
Yabin Cui e3434279c8 Merge "uncrypt: add options to setup bcb and clear bcb." 2016-02-03 18:52:52 +00:00
Yabin Cui 2d46da57e1 uncrypt: add options to setup bcb and clear bcb.
Bug: 26696173

Change-Id: I3a612f045aaa9e93e61ae45b05300d02b19bb3ad
2016-02-03 10:43:03 -08:00
Tao Bao 351ddbbc0a Merge "recovery: Refactor verifier and verifier_test." 2016-02-03 17:16:56 +00:00
Tao Bao 71e3e09ec2 recovery: Refactor verifier and verifier_test.
Move to using std::vector and std::unique_ptr to manage key
certificates to stop memory leaks.

Bug: 26908001
Change-Id: Ia5f799bc8dcc036a0ffae5eaa8d9f6e09abd031c
2016-02-02 21:51:32 -08:00
Yabin Cui 4c07a7ec05 Merge "uncrypt: generate map file by renaming tmp file." 2016-02-02 00:12:21 +00:00
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 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
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 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 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 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 0305fcecc5 Merge "uncrypt: avoid use-after-free" 2016-01-14 00:41:04 +00: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
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
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
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 29b0fbe160 Merge "res: Embed FPS into icon_installing.png." 2015-12-18 22:20:20 +00: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
Tao Bao 4e72d1a81e Merge "updater: Use O_SYNC and fsync() for package_extract_file()." 2015-12-15 17:55:05 +00:00
Tao Bao d3cac34430 updater: Use O_SYNC and fsync() for package_extract_file().
We are already using O_SYNC and fsync() for the recursive case
(package_extract_dir()). Make it consistent for the single-file case.

Bug: 20625549
Change-Id: I487736fe5a0647dd4a2428845e76bf642e0f0dff
2015-12-14 17:13:34 -08:00
Tao Bao e062645efa Merge "update_verifier: Track the API change for isSlotBootable()." 2015-12-11 04:53:48 +00:00
Tao Bao ca18526760 Merge "uncrypt: Suppress the compiler warnings on LP64." 2015-12-11 00:43:18 +00:00
Tianjie Xu 32f6298742 Merge "updater: Output msg when recovery is called" 2015-12-11 00:23:45 +00:00