klte-common: Add support for TWRP

* To build:
  * Clone https://github.com/LineageOS/android_external_busybox
    to external/busybox
  * Clone https://github.com/omnirom/android_bootable_recovery/
    to bootable/recovery-twrp
  * WITH_TWRP=true mka recoveryimage

Change-Id: I2dc2138dedc66042834a104a37da9496e708c1d8
This commit is contained in:
Kevin F. Haggerty 2016-11-19 08:58:10 -07:00 committed by Kevin F. Haggerty
parent b7ad52fa70
commit d8ff0658d0
3 changed files with 50 additions and 0 deletions

View File

@ -90,6 +90,11 @@ BOARD_SEPOLICY_DIRS += \
# Sensors
TARGET_NO_SENSOR_PERMISSION_CHECK := true
# TWRP Support - Optional
ifeq ($(WITH_TWRP),true)
-include $(LOCAL_PATH)/twrp.mk
endif
# Wifi
BOARD_HAVE_SAMSUNG_WIFI := true
BOARD_WLAN_DEVICE := bcmdhd

13
recovery/twrp.fstab Normal file
View File

@ -0,0 +1,13 @@
/modem vfat /dev/block/platform/msm_sdcc.1/by-name/modem /dev/block/platform/msm_sdcc.1/by-name/mdm flags=backup=1;display="Modem";fsflags=ro,context=u:object_r:firmware_file:s0
/firmware vfat /dev/block/platform/msm_sdcc.1/by-name/apnhlos flags=backup=1;subpartitionof=/modem;mounttodecrypt;fsflags=ro,context=u:object_r:firmware_file:s0
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
/misc emmc /dev/block/platform/msm_sdcc.1/by-name/fota
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata flags=encryptable=footer;length=-16384
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
/efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=backup=1;display="EFS"
/modemst1 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst1 flags=backup=1;subpartitionof=/efs
/modemst2 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst2 flags=backup=1;subpartitionof=/efs
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usbstorage vfat /dev/block/sda1 /dev/block/sda flags=display="USB Storage";storage;wipeingui;removable

32
twrp.mk Normal file
View File

@ -0,0 +1,32 @@
# Copyright (C) 2017 The LineageOS 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.
PRODUCT_COPY_FILES += \
device/samsung/klte-common/recovery/twrp.fstab:recovery/root/etc/twrp.fstab
RECOVERY_SDCARD_ON_DATA := true
RECOVERY_VARIANT := twrp
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_RECOVERY_QCOM_RTC_FIX := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/msm_dwc3/f9200000.dwc3/gadget/lun%d/file"
TW_BRIGHTNESS_PATH := "/sys/devices/mdp.0/qcom\x2cmdss_fb_primary.191/leds/lcd-backlight/brightness"
TW_DEFAULT_BRIGHTNESS := 162
TW_EXCLUDE_SUPERSU := true
TW_HAS_DOWNLOAD_MODE := true
TW_INCLUDE_CRYPTO := true
TW_MAX_BRIGHTNESS := 255
TW_MTP_DEVICE := "/dev/mtp_usb"
TW_NO_EXFAT_FUSE := true
TW_NO_REBOOT_BOOTLOADER := true
TW_THEME := portrait_hdpi