summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorexperience7 <alexander.zandt@googlemail.com>2017-02-16 09:55:26 +0100
committer5x <droidfivex@gmail.com>2017-03-09 15:24:19 +0000
commitb9e84dd62c417339826d03a496b93fd6cb1ca91e (patch)
tree490ab2c94a1a57da98340aef2683808a7bb16c16
parent0807b75afbe73979a9606124f4f7b6c605b53be4 (diff)
hammerheadcaf: Add TWRP support
To build TWRP, successively run the following commands from the top of your LineageOS root / source directory: * git clone https://github.com/LineageOS/android_external_busybox external/busybox * git clone https://github.com/OmniROM/android_bootable_recovery bootable/recovery-twrp * source build/envsetup.sh * breakfast hammerheadcaf * export WITH_TWRP=true * mka recoveryimage Obviously, the first two commands only need to be executed once. You can also add both projects to your '.repo/local_manifests/roomservice.xml' file. Change-Id: I254ba6d94208fd3499e1b382430098fc17cf05d9
-rw-r--r--BoardConfig.mk5
-rw-r--r--rootdir/etc/twrp.fstab18
-rw-r--r--twrp.mk30
3 files changed, 53 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 1f21468..e2d813b 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -136,6 +136,11 @@ TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
BOARD_NO_SECURE_DISCARD := true
+# Recovery: TWRP support
+ifeq ($(WITH_TWRP),true)
+-include $(PLATFORM_PATH)/twrp.mk
+endif
+
# SELinux
include device/qcom/sepolicy/sepolicy.mk
diff --git a/rootdir/etc/twrp.fstab b/rootdir/etc/twrp.fstab
new file mode 100644
index 0000000..b712fae
--- /dev/null
+++ b/rootdir/etc/twrp.fstab
@@ -0,0 +1,18 @@
+/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
+/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata flags=encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
+/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
+/persist ext4 /dev/block/platform/msm_sdcc.1/by-name/persist flags=display=Persist
+/firmware vfat /dev/block/platform/msm_sdcc.1/by-name/modem flags=display=Firmware
+/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/misc
+/radio emmc /dev/block/platform/msm_sdcc.1/by-name/modem
+/sbl1 emmc /dev/block/platform/msm_sdcc.1/by-name/sbl1
+/tz emmc /dev/block/platform/msm_sdcc.1/by-name/tz
+/rpm emmc /dev/block/platform/msm_sdcc.1/by-name/rpm
+/sdi emmc /dev/block/platform/msm_sdcc.1/by-name/sdi
+/aboot emmc /dev/block/platform/msm_sdcc.1/by-name/aboot
+/imgdata emmc /dev/block/platform/msm_sdcc.1/by-name/imgdata
+/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
+/efs1 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst1 flags=backup=1;display=EFS
+/efs2 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst2 flags=backup=1;subpartitionof=/efs1
diff --git a/twrp.mk b/twrp.mk
new file mode 100644
index 0000000..1c95585
--- /dev/null
+++ b/twrp.mk
@@ -0,0 +1,30 @@
+#
+# 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/lge/hammerheadcaf/rootdir/etc/twrp.fstab:recovery/root/etc/twrp.fstab
+
+BOARD_HAS_NO_REAL_SDCARD := true
+BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
+RECOVERY_GRAPHICS_USE_LINELENGTH := true
+RECOVERY_SDCARD_ON_DATA := true
+RECOVERY_VARIANT := twrp
+TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
+TW_BRIGHTNESS_PATH := "/sys/devices/mdp.0/qcom\x2cmdss_fb_primary.179/leds/lcd-backlight/brightness"
+TW_INCLUDE_CRYPTO := true
+TW_MAX_BRIGHTNESS := 255
+TW_NO_USB_STORAGE := true
+TW_THEME := portrait_hdpi