From c99dbeb11a16f2286ef1ee4ecf978ce201a5f517 Mon Sep 17 00:00:00 2001 From: Simon Sickle Date: Mon, 4 Dec 2017 23:50:51 -0600 Subject: [PATCH] encryption fixes Signed-off-by: Simon Sickle --- Android.mk | 5 ++--- BoardConfig.mk | 8 +++++--- cryptfs_hw/Android.mk | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Android.mk b/Android.mk index b9e4b8d..06e7b8d 100644 --- a/Android.mk +++ b/Android.mk @@ -1,6 +1,5 @@ - # -# Copyright 2014 The Android Open Source Project +# Copyright 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. @@ -26,7 +25,7 @@ LOCAL_PATH := $(call my-dir) -ifneq ($(filter mata, $(TARGET_DEVICE)),) +ifeq ($(TARGET_DEVICE),dumpling) include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/BoardConfig.mk b/BoardConfig.mk index 3da24c2..c4be108 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -73,6 +73,10 @@ TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_USE_F2FS := true +# Crypto +TARGET_HW_DISK_ENCRYPTION = true +TW_INCLUDE_CRYPTO := true + # TWRP specific build flags BOARD_HAS_NO_REAL_SDCARD := true RECOVERY_SDCARD_ON_DATA := true @@ -81,9 +85,6 @@ TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness" TW_EXCLUDE_DEFAULT_USB_INIT := true TW_EXCLUDE_SUPERSU := true TW_EXTRA_LANGUAGES := true -TW_INCLUDE_CRYPTO := true -TARGET_HW_DISK_ENCRYPTION = true -TARGET_CRYPTFS_HW_PATH := device/oneplus/dumpling/cryptfs_hw TW_INCLUDE_NTFS_3G := true TW_INPUT_BLACKLIST := "hbtp_vm" TW_MAX_BRIGHTNESS := 255 @@ -94,3 +95,4 @@ TW_THEME := portrait_hdpi # Workaround for error copying vendor files to recovery ramdisk BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 TARGET_COPY_OUT_VENDOR := vendor +TW_IGNORE_MISC_WIPE_DATA := true diff --git a/cryptfs_hw/Android.mk b/cryptfs_hw/Android.mk index 0054cb5..353e5f4 100755 --- a/cryptfs_hw/Android.mk +++ b/cryptfs_hw/Android.mk @@ -1,3 +1,28 @@ +# +# Copyright 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. +# + +# This contains the module build definitions for the hardware-specific +# components for this device. +# +# As much as possible, those components should be built unconditionally, +# with device-specific names to avoid collisions, to avoid device-specific +# bitrot and build breakages. Building a component unconditionally does +# *not* include it on all devices, so it is safe even with hardware-specific +# components. + ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) -- 2.20.1