Commit Graph

6254 Commits

Author SHA1 Message Date
Tao Bao ae3e472a43 Merge "updater: Defer the creation of the new data writer."
am: ddc81680e6

Change-Id: Ibfcc5b765103b41316549ee45636ebf4c377cf84
2018-06-20 09:28:19 -07:00
Tao Bao ddc81680e6 Merge "updater: Defer the creation of the new data writer." 2018-06-20 16:20:46 +00:00
Zhomart Mukhamejanov 9b4d364409 Merge "updater_sample: add privileged system app docs"
am: 4a2c2d8102

Change-Id: If55faff049dccc585b0dc1db6c4b795d7b93ea9e
2018-06-19 19:14:52 -07:00
Zhomart Mukhamejanov 4a2c2d8102 Merge "updater_sample: add privileged system app docs" 2018-06-20 02:05:50 +00:00
Tao Bao a855c33880 Merge "Drop the dependency on AB_OTA_UPDATER flag."
am: 9fb0d89583

Change-Id: Id57bbf9ba9d8e4fe905dc183f0655f1b24db89fd
2018-06-19 13:05:24 -07:00
Tao Bao 9fb0d89583 Merge "Drop the dependency on AB_OTA_UPDATER flag." 2018-06-19 19:43:43 +00:00
Tao Bao cf60a44bd4 Drop the dependency on AB_OTA_UPDATER flag.
This shortens the gap between A/B and non-A/B builds, by replacing the
dependency on build-time flag with runtime detection instead. It also
allows building and testing both paths regardless of the target OTA
type.

The size increase to /sbin/recovery looks negligible (< 0.01%).
 - marlin: increased from 2084928 to 2085024;
 - angler: increased from 2084776 to 2084896.

Test: Run recovery_component_test on angler and marlin.
Test: Sideload an A/B OTA package on marlin.
Test: Sideload a non-A/B OTA package on angler.
Change-Id: I1d927d1ede9713fb42f73b4fe324aa5705ee6f99
2018-06-19 10:50:43 -07:00
Zhomart Mukhamejanov bb1c6bf7cc Merge "updater_sample: run as a systemp app"
am: 6b788b1848

Change-Id: Iddfce3b5302faa4489ee6c0ca9518f4acf39c75b
2018-06-19 09:18:04 -07:00
Zhomart Mukhamejanov 6b788b1848 Merge "updater_sample: run as a systemp app" 2018-06-19 16:11:49 +00:00
Zhomart Mukhamejanov 468ad1d965 Merge "updater_sample: add proguard.flags"
am: 5af63a45d9

Change-Id: I6221824507bf889f11ebab5aea10aaf2f9205a4a
2018-06-18 17:13:27 -07:00
Zhomart Mukhamejanov 5af63a45d9 Merge "updater_sample: add proguard.flags" 2018-06-19 00:04:44 +00:00
Tao Bao 0a883c18f6 updater: Defer the creation of the new data writer.
This avoids leaving the created new data writer thread unjoined, in the
presence of transfer list parsing errors, or the early exit case on
`total_blocks == 0`.

Also fix a minor issue when dumping the errno on pthread_create error
(pthread_create returns the error number, as opposed to setting errno).

Test: Run recovery_component_test on marlin.
Change-Id: Icfac27fef0c64736eb8c76264da73c223b4960cb
2018-06-18 13:00:43 -07:00
Zhomart Mukhamejanov 65dcf32274 updater_sample: add privileged system app docs
README.md: add instructions

Test: on device
Bug: 80250430
Change-Id: I2e04fdefda2b73d01dfa0a8e684542feb2ed6c61
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-06-18 10:31:18 -07:00
Zhomart Mukhamejanov 2d9ffb62a3 updater_sample: run as a systemp app
Android.mk: remove local tags, make privileged module
AndroidManifest.xml: add access cache filesystem

Test: on device
Test: junit4
Change-Id: I611970747b7b630520249dd53105b9a2f7f76355
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-06-18 10:29:47 -07:00
Zhomart Mukhamejanov aa7abc0359 updater_sample: add proguard.flags
Test: on device
Change-Id: Ia8582053b7330d06e618f2555332cfb2a89b3df8
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-06-18 10:16:19 -07:00
Zhomart Mukhamejanov c48f0b6923 Merge "updater_sample: add metadata mismatch error code"
am: 9ed4b41478

Change-Id: I8873a4bff0dcfaa17acce762df5687c5ebe4aa96
2018-06-14 10:22:44 -07:00
Zhomart Mukhamejanov 9ed4b41478 Merge "updater_sample: add metadata mismatch error code" 2018-06-14 17:15:58 +00:00
Tao Bao c7b4418a80 Merge "tests: Skip ScreenRecoveryUITest on gr_init failure."
am: c53639d5e3

Change-Id: Ia0c825cc4a74c8f6d06f09eb3ac8cdade60fc427
2018-06-14 10:12:54 -07:00
Tao Bao c53639d5e3 Merge "tests: Skip ScreenRecoveryUITest on gr_init failure." 2018-06-14 17:03:06 +00:00
Ian Pedowitz 888dae6c13 Merge "Revert "updater_sample: add proguard.flags""
am: ac752b3ed8

Change-Id: I3a309959425ca71c22643229a6e32151408e8cb5
2018-06-13 23:46:28 -07:00
Ian Pedowitz ac752b3ed8 Merge "Revert "updater_sample: add proguard.flags"" 2018-06-14 06:37:10 +00:00
Ian Pedowitz c02fb99e1d Revert "updater_sample: add proguard.flags"
This reverts commit 8c3af4aa8c.

Reason for revert: Broke Master

Change-Id: I37bceeea630fb7db39efa25d03ababe3d84cdfbf
2018-06-14 06:35:18 +00:00
Tao Bao 51f16ec76d tests: Skip ScreenRecoveryUITest on gr_init failure.
It addresses the ScreenRecoveryUITest failures on gce targets which
don't have any graphics backend. Probing for all backend devices in
tests could work, but would duplicate codes. This CL relies on the
result of gr_init().

As a side effect, it may give false negatives if gr_init() is supposed
to work but silently broken. But such issues are beyond
ScreenRecoveryUITest's concern, which should be captured by the tests
for minui or graphics backends instead.

Fixes: 79616356
Test: Run recovery_unit_test on marlin.
Test: Run recovery_unit_test on gce.
Change-Id: I121aacc61c8a614447509506057ecfd8d86163e4
2018-06-13 23:28:21 -07:00
Tao Bao 2a3c46a068 Merge "screen_ui: Move the call to gr_init() into Init()."
am: 4264ee890e

Change-Id: Ibc9c227d25a0b67ccfc97cf075de9314a2732c71
2018-06-13 21:12:35 -07:00
Tao Bao 4264ee890e Merge "screen_ui: Move the call to gr_init() into Init()." 2018-06-14 04:03:24 +00:00
Tao Bao 52a702181e Merge "screen_ui: Call gr_exit() from dtor."
am: 4cd2cf96a0

Change-Id: Ib3fba135cfcb1345d17a22b6ba12d03728ebd4c8
2018-06-13 18:37:20 -07:00
Treehugger Robot 4cd2cf96a0 Merge "screen_ui: Call gr_exit() from dtor." 2018-06-14 01:27:30 +00:00
Jiyong Park 93ea306913 Merge "Recovery image is self-contained"
am: 397e8f2279

Change-Id: Ieb43e946cb694635b3b4aad91e7874f87ae39b47
2018-06-13 16:40:33 -07:00
Zhomart Mukhamejanov 9b6a9aceae Merge "updater_sample: add proguard.flags"
am: 5ced47d120

Change-Id: Ib5d900fa689fe391148b6da6dc6c0e14d94f6119
2018-06-13 16:40:14 -07:00
Tao Bao cc08655e65 Merge "minui: Add constness to GRSurface* in gr_get_{width,height}."
am: 6dbdbbc8fe

Change-Id: I21e6912c33464647b490b6baeea7bf52f2f457af
2018-06-13 16:38:04 -07:00
Tao Bao ba4edb3e82 screen_ui: Move the call to gr_init() into Init().
gr_init() does general initialization works, in addition to loading font
file. InitTextParams() handles text related works.

Also check the font initialization result before using, as gr_init()
would ignore font initialization failures.

Test: recovery_unit_test on marlin.
Test: Boot into recovery. Run graphics test.
Change-Id: I12da22dfe8d13448cfbc83dbc51cd96f23c2deee
2018-06-13 16:18:46 -07:00
Zhomart Mukhamejanov ebee98df6f updater_sample: add metadata mismatch error code
Update util/UpdateEngineErrorCodes.java

Test: n/a
Change-Id: I7250b1198b1d5ff0e38b7d4effe61eebd114a44f
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-06-13 16:18:38 -07:00
Tao Bao 60ac622245 screen_ui: Call gr_exit() from dtor.
ScreenRecoveryUI calls gr_init() during Init(), and should release any
allocated resource upon destructing. It's a no-op to call gr_exit() if
gr_init() was not called or didn't finish successfully.

Test: recovery_unit_test on marlin.
Test: Boot into recovery. Run graphics test.
Change-Id: Ib9632170174cdacd51d382f23c8daf6a9bc59f7a
2018-06-13 16:17:53 -07:00
Treehugger Robot 397e8f2279 Merge "Recovery image is self-contained" 2018-06-13 23:14:29 +00:00
Zhomart Mukhamejanov 5ced47d120 Merge "updater_sample: add proguard.flags" 2018-06-13 23:11:54 +00:00
Tao Bao 6dbdbbc8fe Merge "minui: Add constness to GRSurface* in gr_get_{width,height}." 2018-06-13 22:55:47 +00:00
Tao Bao 9f4263346b minui: Add constness to GRSurface* in gr_get_{width,height}.
Also free gr_font in gr_exit(), as it's owned by minui.

Test: mmma -j bootable/recovery system/core/healthd
Test: recovery_unit_test on marlin
Test: Boot into recovery. Run graphics test.
Change-Id: I00457bb97ed3dc95ef5aad493827fb5a62a258dc
2018-06-13 13:24:58 -07:00
Zhomart Mukhamejanov 8c3af4aa8c updater_sample: add proguard.flags
Test: junit
Change-Id: I0175271935fdd87dd49ad9936d0e1b550d164e05
Signed-off-by: Zhomart Mukhamejanov <zhomart@google.com>
2018-06-13 09:53:29 -07:00
Tao Bao 941d3ab754 Merge "updater: Drop the 'overlap' parameter in LoadSrcTgtVersion3()."
am: 0eb10b382a

Change-Id: I0bba5a09ac62b7c152d22d72f0432868008592cc
2018-06-08 16:50:38 -07:00
Xin Li d8a411c90a Merge "Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master" into stage-aosp-master 2018-06-08 23:09:59 +00:00
Tao Bao 0eb10b382a Merge "updater: Drop the 'overlap' parameter in LoadSrcTgtVersion3()." 2018-06-08 23:01:59 +00:00
Tao Bao 4a13508f0b updater: Drop the 'overlap' parameter in LoadSrcTgtVersion3().
Test: Run recovery_component_test on marlin.
Change-Id: I93afca891c5c9c1a351c907b023cd20c4704a66a
2018-06-08 12:53:31 -07:00
Tao Bao 165a197cdf Merge "updater: Remove the redundant check on line count."
am: 4a8f5ec06d

Change-Id: Iabb63de552d823305fd6330d9819d5ec32718ebc
2018-06-08 12:44:00 -07:00
Tao Bao 4a8f5ec06d Merge "updater: Remove the redundant check on line count." 2018-06-08 19:29:45 +00:00
Xin Li b5c2c714f0 Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307
Change-Id: Iaf450edb8262cef5465f06309556ab24a08222b4
2018-06-08 11:06:44 -07:00
Zhomart Mukhamejanov c54885f8a1 Merge "updater_sample: update README.md" am: 1cb7222784
am: fc824cb998

Change-Id: If5ec06c7974cf6c174ce812e49b20d6dc67c1181
2018-06-07 18:07:06 -07:00
Zhomart Mukhamejanov 31b517c510 Merge "updater_sample: fix payload spec tests" am: 684d7216e6
am: 7c8e5b6ee8

Change-Id: I2a413794f315f53000f937760595d5ba99c1755f
2018-06-07 17:25:33 -07:00
Zhomart Mukhamejanov fc824cb998 Merge "updater_sample: update README.md"
am: 1cb7222784

Change-Id: I4347b45f3d0abc9fa93bc70b42ec6df94be595e4
2018-06-07 16:39:05 -07:00
Zhomart Mukhamejanov 7c8e5b6ee8 Merge "updater_sample: fix payload spec tests"
am: 684d7216e6

Change-Id: I2aac8aa24dd5d4287010ea2b8e70828671858864
2018-06-07 16:38:08 -07:00
Zhomart Mukhamejanov 1cb7222784 Merge "updater_sample: update README.md" 2018-06-07 22:50:09 +00:00