diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-08-12 05:02:54 +0200 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-08-12 05:02:54 +0200 |
commit | 08ab2407ab7fc1d82ebfd988931e449f2b4ced23 (patch) | |
tree | cd183da114f3af7beb7195b6b3aa4e171e8a7564 | |
parent | Snap for 4942340 from d7859b1cb0d18b5c8ea44e4168177a06545409ab to qt-release (diff) | |
parent | Merge "Build boot control HAL with Android.bp" am: bbe881693a am: b5e9049476 am: 1303267b32 (diff) | |
download | android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.tar android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.tar.gz android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.tar.bz2 android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.tar.lz android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.tar.xz android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.tar.zst android_bootable_recovery-08ab2407ab7fc1d82ebfd988931e449f2b4ced23.zip |
-rw-r--r-- | Android.bp | 14 | ||||
-rw-r--r-- | Android.mk | 45 | ||||
-rw-r--r-- | boot_control/Android.bp | 37 | ||||
-rw-r--r-- | boot_control/Android.mk | 33 | ||||
-rw-r--r-- | fuse_sideload/Android.bp | 2 | ||||
-rw-r--r-- | minui/Android.bp | 1 | ||||
-rw-r--r-- | otautil/Android.bp | 17 | ||||
-rw-r--r-- | updater_sample/Android.bp | 35 | ||||
-rw-r--r-- | updater_sample/Android.mk | 35 | ||||
-rw-r--r-- | updater_sample/README.md | 2 | ||||
-rw-r--r-- | updater_sample/tests/Android.bp | 40 | ||||
-rw-r--r-- | updater_sample/tests/Android.mk | 36 |
12 files changed, 167 insertions, 130 deletions
diff --git a/Android.bp b/Android.bp index 22c90bd3e..97126f5b1 100644 --- a/Android.bp +++ b/Android.bp @@ -16,6 +16,11 @@ cc_defaults { name: "recovery_defaults", cflags: [ + "-D_FILE_OFFSET_BITS=64", + + // Must be the same as RECOVERY_API_VERSION. + "-DRECOVERY_API_VERSION=3", + "-Wall", "-Werror", ], @@ -24,6 +29,7 @@ cc_defaults { // Generic device that uses ScreenRecoveryUI. cc_library_static { name: "librecovery_ui_default", + recovery_available: true, defaults: [ "recovery_defaults", @@ -37,6 +43,7 @@ cc_library_static { // The default wear device that uses WearRecoveryUI. cc_library_static { name: "librecovery_ui_wear", + recovery_available: true, defaults: [ "recovery_defaults", @@ -50,6 +57,7 @@ cc_library_static { // The default VR device that uses VrRecoveryUI. cc_library_static { name: "librecovery_ui_vr", + recovery_available: true, defaults: [ "recovery_defaults", @@ -62,6 +70,7 @@ cc_library_static { cc_library_static { name: "libverifier", + recovery_available: true, defaults: [ "recovery_defaults", @@ -72,10 +81,13 @@ cc_library_static { "verifier.cpp", ], - static_libs: [ + shared_libs: [ "libbase", "libcrypto", "libcrypto_utils", + ], + + static_libs: [ "libotautil", ], } diff --git a/Android.mk b/Android.mk index b25c1f07a..447041617 100644 --- a/Android.mk +++ b/Android.mk @@ -125,31 +125,32 @@ health_hal_static_libraries := \ libbatterymonitor librecovery_static_libraries := \ - libbootloader_message \ libfusesideload \ libminadbd \ libminui \ libverifier \ libotautil \ $(health_hal_static_libraries) \ + libvintf_recovery \ + libvintf \ + +librecovery_shared_libraries := \ libasyncio \ - libcrypto_utils \ + libbase \ + libbootloader_message \ libcrypto \ + libcrypto_utils \ + libcutils \ libext4_utils \ libfs_mgr \ - libpng \ - libsparse \ - libvintf_recovery \ - libvintf \ libhidl-gen-utils \ - libtinyxml2 \ - libziparchive \ - libbase \ - libutils \ - libcutils \ liblog \ + libpng \ libselinux \ + libtinyxml2 \ + libutils \ libz \ + libziparchive \ # librecovery (static library) # =============================== @@ -173,6 +174,9 @@ LOCAL_MODULE := librecovery LOCAL_STATIC_LIBRARIES := \ $(librecovery_static_libraries) +LOCAL_SHARED_LIBRARIES := \ + $(librecovery_shared_libraries) + include $(BUILD_STATIC_LIBRARY) # recovery (static executable) @@ -200,6 +204,7 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \ librecovery_ui \ + $(librecovery_shared_libraries) LOCAL_HAL_STATIC_LIBRARIES := libhealthd @@ -219,7 +224,8 @@ endif # e2fsck is needed for adb remount -R. ifeq ($(BOARD_EXT4_SHARE_DUP_BLOCKS),true) ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) -LOCAL_REQUIRED_MODULES += e2fsck_static +LOCAL_REQUIRED_MODULES += \ + e2fsck_static endif endif @@ -235,15 +241,26 @@ LOCAL_REQUIRED_MODULES += \ # TODO(b/110380063): Explicitly install the following shared libraries to recovery, until `recovery` # module is built with Soong (with `recovery: true` flag). LOCAL_REQUIRED_MODULES += \ + libasyncio.recovery \ libbase.recovery \ + libbootloader_message.recovery \ + libcrypto.recovery \ + libcrypto_utils.recovery \ + libcutils.recovery \ + libext4_utils.recovery \ + libfs_mgr.recovery \ + libhidl-gen-utils.recovery \ liblog.recovery \ libpng.recovery \ + libselinux.recovery \ + libsparse.recovery \ + libtinyxml2.recovery \ + libutils.recovery \ libz.recovery \ + libziparchive.recovery \ include $(BUILD_EXECUTABLE) include \ - $(LOCAL_PATH)/boot_control/Android.mk \ $(LOCAL_PATH)/tests/Android.mk \ $(LOCAL_PATH)/updater/Android.mk \ - $(LOCAL_PATH)/updater_sample/Android.mk \ diff --git a/boot_control/Android.bp b/boot_control/Android.bp new file mode 100644 index 000000000..7720ead50 --- /dev/null +++ b/boot_control/Android.bp @@ -0,0 +1,37 @@ +// +// Copyright (C) 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +cc_library_shared { + name: "bootctrl.default", + recovery_available: true, + relative_install_path: "hw", + + srcs: ["boot_control.cpp"], + + cflags: [ + "-D_FILE_OFFSET_BITS=64", + "-Werror", + "-Wall", + "-Wextra", + ], + + shared_libs: [ + "libbase", + "libbootloader_message", + "libfs_mgr", + "liblog", + ], +} diff --git a/boot_control/Android.mk b/boot_control/Android.mk deleted file mode 100644 index 9814d7122..000000000 --- a/boot_control/Android.mk +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH := $(my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := bootctrl.bcb -LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_SRC_FILES := boot_control.cpp -LOCAL_CFLAGS := \ - -D_FILE_OFFSET_BITS=64 \ - -Werror \ - -Wall \ - -Wextra -LOCAL_SHARED_LIBRARIES := liblog -LOCAL_STATIC_LIBRARIES := libbootloader_message libfs_mgr libbase -LOCAL_POST_INSTALL_CMD := \ - $(hide) mkdir -p $(TARGET_OUT_SHARED_LIBRARIES)/hw && \ - ln -sf bootctrl.bcb.so $(TARGET_OUT_SHARED_LIBRARIES)/hw/bootctrl.default.so -include $(BUILD_SHARED_LIBRARY) diff --git a/fuse_sideload/Android.bp b/fuse_sideload/Android.bp index 76bc16df9..b7f9c039a 100644 --- a/fuse_sideload/Android.bp +++ b/fuse_sideload/Android.bp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -cc_library_static { +cc_library { name: "libfusesideload", cflags: [ diff --git a/minui/Android.bp b/minui/Android.bp index 31022e1d6..fff3a8ec9 100644 --- a/minui/Android.bp +++ b/minui/Android.bp @@ -14,6 +14,7 @@ cc_library { name: "libminui", + recovery_available: true, defaults: [ "recovery_defaults", diff --git a/otautil/Android.bp b/otautil/Android.bp index b058f7b35..56c7c9e89 100644 --- a/otautil/Android.bp +++ b/otautil/Android.bp @@ -16,6 +16,11 @@ cc_library_static { name: "libotautil", host_supported: true, + recovery_available: true, + + defaults: [ + "recovery_defaults", + ], // Minimal set of files to support host build. srcs: [ @@ -23,16 +28,10 @@ cc_library_static { "rangeset.cpp", ], - static_libs: [ + shared_libs: [ "libbase", ], - cflags: [ - "-D_FILE_OFFSET_BITS=64", - "-Werror", - "-Wall", - ], - export_include_dirs: [ "include", ], @@ -46,9 +45,9 @@ cc_library_static { "thermalutil.cpp", ], - static_libs: [ - "libselinux", + shared_libs: [ "libcutils", + "libselinux", ], }, }, diff --git a/updater_sample/Android.bp b/updater_sample/Android.bp new file mode 100644 index 000000000..0d209bbd3 --- /dev/null +++ b/updater_sample/Android.bp @@ -0,0 +1,35 @@ +// Copyright (C) 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +android_app { + name: "SystemUpdaterSample", + sdk_version: "system_current", + privileged: true, + + srcs: ["src/**/*.java"], + + static_libs: [ + "guava", + ], + + optimize: { + // TODO(b/112462307): proguard_flags_files is not picked up by Soong. + // proguard_flags_files: [ + // "proguard.flags", + // ], + enabled: false, + }, + + resource_dirs: ["res"], +} diff --git a/updater_sample/Android.mk b/updater_sample/Android.mk deleted file mode 100644 index cff5b0c1f..000000000 --- a/updater_sample/Android.mk +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_PACKAGE_NAME := SystemUpdaterSample -LOCAL_SDK_VERSION := system_current -LOCAL_PRIVILEGED_MODULE := true - -LOCAL_PROGUARD_FLAG_FILES := proguard.flags - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -LOCAL_STATIC_JAVA_LIBRARIES += guava - -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res - -include $(BUILD_PACKAGE) - -# Use the following include to make our test apk. -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/updater_sample/README.md b/updater_sample/README.md index 306e71e5b..69e8e244f 100644 --- a/updater_sample/README.md +++ b/updater_sample/README.md @@ -227,7 +227,7 @@ privileged system app, so it's granted the required permissions to access 1. Build `mmma bootable/recovery/updater_sample/` 2. Install app - `adb install $OUT/system/app/SystemUpdaterSample/SystemUpdaterSample.apk` + `adb install $OUT/system/priv-app/SystemUpdaterSample/SystemUpdaterSample.apk` 3. Install tests `adb install $OUT/testcases/SystemUpdaterSampleTests/SystemUpdaterSampleTests.apk` 4. Run tests diff --git a/updater_sample/tests/Android.bp b/updater_sample/tests/Android.bp new file mode 100644 index 000000000..c2783ef88 --- /dev/null +++ b/updater_sample/tests/Android.bp @@ -0,0 +1,40 @@ +// Copyright (C) 2018 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +android_test { + name: "SystemUpdaterSampleTests", + sdk_version: "system_current", + + libs: [ + "android.test.base.stubs", + "android.test.runner.stubs", + "SystemUpdaterSample", + ], + + static_libs: [ + "android-support-test", + "mockito-target-minus-junit4", + "guava", + ], + + instrumentation_for: "com.example.android.systemupdatersample", + + optimize: { + enabled: false, + }, + + resource_dirs: ["res"], + + srcs: ["src/**/*.java"], +} diff --git a/updater_sample/tests/Android.mk b/updater_sample/tests/Android.mk deleted file mode 100644 index 415760454..000000000 --- a/updater_sample/tests/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (C) 2018 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_PACKAGE_NAME := SystemUpdaterSampleTests -LOCAL_SDK_VERSION := system_current -LOCAL_MODULE_TAGS := tests -LOCAL_JAVA_LIBRARIES := \ - android.test.base.stubs \ - android.test.runner.stubs -LOCAL_STATIC_JAVA_LIBRARIES := android-support-test \ - mockito-target-minus-junit4 \ - guava -LOCAL_INSTRUMENTATION_FOR := SystemUpdaterSample -LOCAL_PROGUARD_ENABLED := disabled - -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_SRC_FILES := $(call all-java-files-under, src) - -include $(BUILD_PACKAGE) |