Commit graph

186 commits

Author SHA1 Message Date
Yi Kong
bbb5b84c51 Merge "Use non-LTO variant of libhwbinder" into pi-dev
am: 7fdb6355e4

Change-Id: Ib78dee41815c782e0377d2e1fcb3754010ec8bb2
2018-04-06 13:36:38 -07:00
Yi Kong
10b3faa10d Use non-LTO variant of libhwbinder
... as a workaround for build system does not currently infer non-LTO
usage from Android.mk.

Test: m
Bug: 77320844
Change-Id: I6e9954b895051cc20408a30d0761e164e4c5bfd9
2018-04-03 12:45:45 -07:00
Tao Bao
8c749a39bd Merge "Move a few modules to Soong." am: d408a865af
am: 47be7bcdba

Change-Id: Iba006e5a0df67382f258d1ba60728f4c54003360
2018-04-02 18:14:21 +00:00
Treehugger Robot
d408a865af Merge "Move a few modules to Soong." 2018-04-02 16:05:37 +00:00
Jiachen Zhao
4e12cd95be Merge "Create folder for SystemUpdate sample app." am: f0e2811092
am: c6152041fd

Change-Id: I48ec477c7e4bc0dea32bfe89032fefee75d30c16
2018-03-31 15:48:35 +00:00
Jiachen Zhao
051b968d7b Create folder for SystemUpdate sample app.
Test: no functional changes.

Change-Id: I2e8c654086ca49063c59ae0529e190323c84d6ad
2018-03-30 18:22:36 -07:00
Tao Bao
d2f2ad6a3c Move a few modules to Soong.
libmounts
librecovery_ui_default
librecovery_ui_wear
librecovery_ui_vr
libverifier
recovery-persist
recovery-refresh

They are all trivially converted.

Test: mmma -j bootable/recovery
Change-Id: Id783b3eec32bd15e74f42df17053732db5666675
2018-03-26 21:35:41 -07:00
Tao Bao
f6d25962bb Specify a default module for TARGET_RECOVERY_UI_LIB.
This aligns the logic between {default,wear,vr}_device.cpp. They all
implement their default make_device() functions, but using different
RecoveryUI variants.

This CL creates a new module librecovery_ui_default that uses
ScreenRecoveryUI, which serves as the default value for
TARGET_RECOVERY_UI_LIB.

Test: lunch aosp_{angler,marlin,dragon,walleye}-userdebug;
      `mmma -j bootable/recovery` respectively.
Change-Id: I6755b09d96e4809bb1c17142895fe1cad95e5a02
Merged-In: I6755b09d96e4809bb1c17142895fe1cad95e5a02
2018-03-26 19:45:06 -07:00
Tao Bao
f7e8012be3 Specify a default module for TARGET_RECOVERY_UI_LIB.
This aligns the logic between {default,wear,vr}_device.cpp. They all
implement their default make_device() functions, but using different
RecoveryUI variants.

This CL creates a new module librecovery_ui_default that uses
ScreenRecoveryUI, which serves as the default value for
TARGET_RECOVERY_UI_LIB.

Test: lunch aosp_{angler,marlin,dragon,walleye}-userdebug;
      `mmma -j bootable/recovery` respectively.
Change-Id: I6755b09d96e4809bb1c17142895fe1cad95e5a02
(cherry picked from commit 73fd036be8c7563423be0c3adbd4205c4f1bc2f5)
2018-03-26 15:26:34 -07:00
Tianjie Xu
5fe5eb67ef Factor out a menu class for screen ui
Also consolidate the duplicate codes to draw the menu in ScreenRecoveryUI
and WearRecoveryUI. This helps us to support text icons as menu in the
future.

Bug: 74397117
Test: Check the menu under recovery on bullhead and a wear device.
Change-Id: Iba9b646c3828670f0e78a7e07d1a94a44e96bb0b
Merged-In: Iba9b646c3828670f0e78a7e07d1a94a44e96bb0b
2018-03-23 23:57:29 -07:00
Tianjie Xu
ba0460c981 Factor out a menu class for screen ui
Also consolidate the duplicate codes to draw the menu in ScreenRecoveryUI
and WearRecoveryUI. This helps us to support text icons as menu in the
future.

Bug: 74397117
Test: Check the menu under recovery on bullhead and a wear device.
Change-Id: Iba9b646c3828670f0e78a7e07d1a94a44e96bb0b
(cherry picked from commit 2b3f80068e)
2018-03-24 01:20:10 +00:00
Yifan Hong
91b48f9161 recovery: add libhidl-gen-utils depedency
introduced as a depedency to libvintf.

Test: builds
Bug: 73556059
Change-Id: Ia51ba81ef462879481dcacb80d9ea9ea35e8b0bb
Merged-In: Ia51ba81ef462879481dcacb80d9ea9ea35e8b0bb
2018-03-13 10:56:51 -07:00
Yifan Hong
584c52a0a1 Merge "recovery: add libhidl-gen-utils depedency" am: fc39f3ffd7
am: da5bb13507

Change-Id: I9811a65335a51006593a332f276deddf1bbf1864
2018-03-12 21:13:58 +00:00
Yifan Hong
fc39f3ffd7 Merge "recovery: add libhidl-gen-utils depedency" 2018-03-12 20:50:25 +00:00
Yifan Hong
495c521ed3 recovery: add libhidl-gen-utils depedency
introduced as a depedency to libvintf.

Test: builds
Bug: 73556059
Change-Id: Ia51ba81ef462879481dcacb80d9ea9ea35e8b0bb
2018-03-07 18:35:15 -08:00
Tao Bao
399febd111 Merge "Export fuse_sideload.h for libfusesideload." am: ddf93c0055
am: 9b0c133ff5

Change-Id: I9576800cae927de195baddef2141f7e1ef01082b
2018-03-07 22:24:13 +00:00
Tao Bao
15bc28727a Merge "minadbd: Move to Soong." am: 56160b2b03
am: 734f76fc38

Change-Id: Ic7c86ba406ab051ddb0da32544290196e1d4d779
2018-03-07 19:18:19 +00:00
Tao Bao
4b51c3ab40 Export fuse_sideload.h for libfusesideload.
Move the module into a separate directory so that we can export only the
expected header.

With this change, minadbd no longer needs to include bootable/recovery.

Test: mmma -j bootable/recovery
Change-Id: I69b888ceb160a33a67d79c5bda208dc17ad6ed86
2018-03-07 10:01:51 -08:00
Tao Bao
8c7761edec minadbd: Move to Soong.
Test: mmma -j bootable/recovery
Change-Id: Ic4cd676a842f0e8c4735cc6731fcbf13b844510c
2018-03-06 20:36:35 -08:00
Hridya Valsaraju
bd84bd438a Statically link with libhealthstoragedefault
This is to add empty implementations of Health
HAL methods to report storage info.

Bug: 68388678
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: I4f093903f485519e16f39384f5c96fcd031438ba
2018-01-11 17:48:09 -08:00
Jaegeuk Kim
a296fea692 Merge "add sload.f2fs for recovery format" am: 4eaf7a157d am: 3d4359d3ae
am: adb8f660a2

Change-Id: I551f6fe2e040720ea02cbdacfc73bc3aaa5b2e3d
2017-12-08 17:00:50 +00:00
Jaegeuk Kim
c1c7311b8a add sload.f2fs for recovery format
Change-Id: Iddfe54b2b36f2d531925cbe61c98dbfb4903c0d1
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-12-04 20:27:49 -08:00
Yifan Hong
e8e4c40246 is_battery_ok use health 2.0 HAL
Test: call is_battery_ok in graphics test, and test manually
Bug: 69268160
Bug: 63702641

Change-Id: Ifcf4d2e2cb459689c11fc5d1b880bb053aaae8ae
2017-11-14 11:29:53 -08:00
Tao Bao
a2a68a522e uncrypt: Move to Soong.
Test: mmma -j bootable/recovery
Change-Id: I405f2a70f51904c02c49a287c23cbc115a4c5132
2017-11-09 12:34:00 -08:00
Jin Qian
000148dbc9 recovery: fix library dependency
After removing some deadcode from libext4_utils, libz is optimized
out by linker. However, it's still required by libvintf. Moving libz
down the list fixed the build.

Bug: 64395169
Change-Id: I23ecd70c83af83a219faced59d8227dc3c4e43d5
2017-11-03 13:43:48 -07:00
Tao Bao
b058c5c481 Merge "applypatch: Move to Soong." 2017-10-12 16:12:48 +00:00
Tao Bao
99f0d9e52b Drop -Wno-unused-parameter.
The only one left is libedify. Will handle that in a separate CL.

Test: mmma bootable/recovery
Change-Id: I732a5f85229da90fd767bee2e46c5c95f529c396
2017-10-11 16:56:12 -07:00
Tao Bao
582b67850f applypatch: Move to Soong.
Test: mmma bootable/recovery
Change-Id: Ie163aff1c4c2b3b15bb705825779ada6bc38ad67
2017-10-11 16:26:06 -07:00
Tao Bao
09e468f84c Move rangeset.h and print_sha1.h into otautil.
Also drop the "bootable/recovery" path in LOCAL_C_INCLUDES from
applypatch modules.

Test: lunch aosp_{angler,bullhead,fugu,dragon,sailfish}-userdebug;
      mmma bootable/recovery
Change-Id: Idd602a796894f971ee4f8fa3eafe36c42d9de986
2017-10-10 15:52:11 -07:00
Tao Bao
e6f7f95d34 edify: Export the header and move to Soong.
Also make matching changes to applypatch modules which include
edify/expr.h.

Test: mmma bootable/recovery
Change-Id: Ia72be3caa010d7f56a70add2da345e631b306378
2017-10-09 14:08:00 -07:00
Tao Bao
cfe53c2c01 otautil: Export headers.
Test: mmma bootable/recovery
Change-Id: Ic01b68e2a394d578fc9fc09da2dabe9061b98122
2017-10-03 14:41:32 -07:00
Tao Bao
a26e32d2a3 otafault: Move to soong.
Test: mmma bootable/recovery
Change-Id: I5f2520ea457ba66743aa3aa1d5b3b488a93084a3
2017-09-29 11:05:24 -07:00
Tianjie Xu
11f68b6b69 Merge "Turn on -Wall for recovery modules" 2017-08-29 17:21:09 +00:00
Tianjie Xu
c89d1e7e2a Turn on -Wall for recovery modules
Turn on -Wall for all modules. Also remove the obsolete file_cmp() in
apply_patch test and now() in wear_ui.

The only exception is lib_edify due to the unused functions in the
intermediate cpp files generated from the lex files. It will be handled
in a seperate CL.

Bug: 64939312
Test: mma, unit tests pass
Change-Id: Ic53f76b60b6401ab20db3d98130d674c08e3702f
2017-08-28 21:56:33 -07:00
Treehugger Robot
d179c923d8 Merge "Add libasyncio." 2017-08-29 03:28:25 +00:00
Tao Bao
eea3af3f91 wear_ui: Expose menu_unusable_rows via Makefile var.
This variable is useful on small screens (e.g. on watches) to handle
long menus. We should have better way to handle this value smartly.
Prior to that, expose the value to be overridable by using the generic
wearable UI module (librecovery_ui_wear).

Bug: 64307776
Test: Define the variable, build and boot into recovery image and check
      the UI menu.
Change-Id: I5d7a6baa8bb4cc852bfcc2a7b3cc9686c1c8817e
2017-08-11 13:53:58 -07:00
Tao Bao
0470ceea38 Allow customizing WearRecoveryUI via Makefile variables.
With the following Makefile variables, we can reduce the work of writing
(copy/pasting) device-specific WearRecoveryUI classes.

The list of Makefile variables (the ones useful for Wear devices):
- TARGET_RECOVERY_UI_MARGIN_HEIGHT (default: 0)
- TARGET_RECOVERY_UI_MARGIN_WIDTH (default: 0)
  Specify the margin space that we don't want to display texts. They
  replace the former outer_width and outer_height.

- TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD (default: 50)
- TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD (default: 90)
  Specify the sensitivity of recognizing a swipe. Devices give absolute
  positions, so for some devices we need to adjust the thresholds.

- TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE
  Specify the progress bar vertical position, which should be adjusted
  to the actual height of a device. It replaces the former
  progress_bar_y.

- TARGET_RECOVERY_UI_ANIMATION_FPS (default: 30)
  Specify the animation FPS if using device-specific animation images.
  It replaces the former animation_fps.

Devices can specify "TARGET_RECOVERY_UI_LIB := librecovery_ui_wear",
with optionally defined Makefile vars above, in BoardConfig.mk to
customize their WearRecoveryUI.

Also remove the obsolete wear_touch.{cpp,h}, which has been merged into
ui.cpp in commit 5f8dd9951d.

Bug: 64307776
Test: Change the device BoardConfig.mk and test recovery image.
Change-Id: Id0fb2d4e3977ab5ddd31e71f9535470cab70e41b
2017-08-10 09:31:17 -07:00
Tao Bao
5f8dd9951d ui: Move the support for touch inputs into RecoveryUI.
- Added detection for EV_ABS events in minui/events.cpp, if it's
  allowed;
- Added listening and processing touch inputs in ui.cpp;
- Fixed an issue in recognizing swipe with multi-touch protocol A;
- Changed the logic in RecoveryUI::ProcessKey() to be swipe-aware. It
  now allows turning on text mode with <power> + <swipe-up>.

The last change also fixed an issue on devices with protocol A: prior
to this CL, user may accidentally toggle the text mode during an OTA.
Because it was considered as a single-button device, a long tap that
sent BTN_TOUCH event would turn on text mode.

Test: Allow detecting touch inputs. Swiping (up, down, enter) works on
      angler, angelfish, dorado respectively.
Bug: 36169090
Change-Id: I4bc882b99114ce4ab414f8bdb8f4f7a525b8a8fd
2017-08-01 18:30:48 -07:00
Jin Qian
ded2dac082 recovery: replace make_ext4 with e2fsprogs
Execute mke2fs to create empty ext4 filesystem.
Execute e2fsdroid to add files to filesystem.

Test: enter recovery mode and wipe data
Bug: 35219933
Change-Id: I10a9f4c1f4754ad864b2df45b1f879180ab33876
(cherry picked from commit ac31808cd3)
2017-07-20 11:42:17 -07:00
Jerry Zhang
d428e79139 Add libasyncio.
libadbd_usb depends on libasyncio.

Bug: 37916658
Test: Use adb in recovery on bullhead/marlin
Change-Id: I77ac3bb2a580d29551e7b5c471bc3cfbf1a3219d
2017-07-18 11:42:59 -07:00
Treehugger Robot
f9fe6a705d Merge "Add missing libziparchive dependency." 2017-06-28 16:35:39 +00:00
Elliott Hughes
e1bb7a5752 Add missing libziparchive dependency.
Bug: http://b/37560614
Test: builds even after removing system/core/include/ziparchive
Change-Id: Ib7ed45cafe83d24ed55aac28b4f41a073c371bc2
2017-06-28 08:00:17 -07:00
Luke Song
9d4839c60f Restructure vr_ui
Get rid of pixel offset variables, and use makefile variables in
BoardConfigs.

Bug: 37779982
Test: Verified vr ui has same behavior.
Change-Id: Ifbf44e27d7101aedbe3c0e6db4b8181d56efadfd
(cherry picked from commit 81a8e4cab2)
2017-06-23 16:51:00 -07:00
Tao Bao
4521b7027f Use Makefile variables to specify margin settings.
Instead of defining device-specific UI class, this CL allows using
Makefile variables to specify margin values directly.

Values explicitly defined via TARGET_RECOVERY_UI_MARGIN_HEIGHT and
TARGET_RECOVERY_UI_MARGIN_WIDTH will be used. Otherwise they will
default to zero.

Bug: 62732748
Test: Specify the height and width and check recovery texts.
Change-Id: Icb6f7466c8d407f877b93da38aebfdf7e6b41be7
(cherry picked from commit a92d8fb456)
2017-06-23 09:22:34 -07:00
Luke Song
e2bd876043 Introduce VR recovery ui
A version of screen ui with specific adjustments for vr device
compatibility.

(cherrypick of a44dba7f4e to AOSP)

Bug: 37779982
Test: "adb reboot recovery" to view
Change-Id: If6b0f26c1b587f8d0176060685b5efb6c67593b1
2017-06-16 15:33:02 -07:00
Tom Cherry
600e806384 libbootloader_message: convert to Android.bp
Test: build
Change-Id: Ia0c2e141673e37eea29306817d2f4b2c944213b0
2017-05-17 11:43:29 -07:00
Treehugger Robot
106ca8e93f Merge "otautil: Android.mk -> Android.bp" 2017-05-10 03:05:25 +00:00
Steven Moreland
f3ae55a167 otautil: Android.mk -> Android.bp
Test: flash and boot recovery on internal angler
Change-Id: Id8845b4b422d0078b251333eb6d30ce14771ef10
2017-05-09 16:09:41 -07:00
Tao Bao
b168f5f857 recovery: Use libverifier instead of rebuilding the sources.
Test: mmma bootable/recovery
Change-Id: Ie8cec009b00c121948179518ba9cbc26a82352bf
2017-05-08 11:04:07 -07:00
Tao Bao
ed13819a0d fuse_sideload: Change the minimal block size to 4096.
run_fuse_sideload() is passing the block size as the max_read
option, so it will only handle a request that involves at most two
blocks at a time. However, the minimal allowed value was set to 1024
prior to this CL, which is inconsistent with the kernel code
(fs/fuse/inode.c) that sets it to the greater of 4096 and the passed-in
max_read option. This would fail the calls with a block size / max_read
less than 4096 due to the wrongly computed block indices.

Note that we didn't observe real issue in practice, because we have been
using 64 KiB block sizes for both of adb and sdcard sideload calls. The
issue only shows up in my local CL (to come later) that uses 1024 block
size in run_fuse_sideload() tests.

Test: recovery_component_test
Test: adb sideload with the new recovery image on angler
Change-Id: Id9f0cfea13d0d193dcb7cd41a1553a23739545f2
2017-05-02 15:56:22 -07:00