Skip to content

Commit

Permalink
judyln: Initial TWRP device tree
Browse files Browse the repository at this point in the history
Made with SebaUbuntu's TWRP device tree generator
Arch: arm64
Manufacturer: lge
Model: lineage_judyln
Script version: 3.0.0
  • Loading branch information
SebaUbuntu committed Jan 12, 2025
0 parents commit 49f04ed
Show file tree
Hide file tree
Showing 14 changed files with 377 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Copyright (C) 2025 The Android Open Source Project
// Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
//
// SPDX-License-Identifier: Apache-2.0
//

soong_namespace {
}
12 changes: 12 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#

LOCAL_PATH := $(call my-dir)

ifeq ($(TARGET_DEVICE),judyln)
include $(call all-subdir-makefiles,$(LOCAL_PATH))
endif
14 changes: 14 additions & 0 deletions AndroidProducts.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#

PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/omni_judyln.mk

COMMON_LUNCH_CHOICES := \
omni_judyln-user \
omni_judyln-userdebug \
omni_judyln-eng
99 changes: 99 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#

DEVICE_PATH := device/lge/judyln

# For building with minimal manifest
ALLOW_MISSING_DEPENDENCIES := true

# A/B
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS += \
system \
vendor
BOARD_USES_RECOVERY_AS_BOOT := true

# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_VARIANT_RUNTIME := kryo385

TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic
TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385

# APEX
DEXPREOPT_GENERATE_APEX_IMAGE := true

# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := sdm845
TARGET_NO_BOOTLOADER := true

# Display
TARGET_SCREEN_DENSITY := 560

# Kernel
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_CMDLINE := msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 loop.max_part=7 androidboot.boot_devices=soc/1d84000.ufshc androidboot.hardware=judyln androidboot.fstab_suffix=judyln
BOARD_KERNEL_PAGESIZE := 4096
BOARD_RAMDISK_OFFSET := 0x01000000
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
BOARD_MKBOOTIMG_ARGS += --ramdisk_offset $(BOARD_RAMDISK_OFFSET)
BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
BOARD_KERNEL_IMAGE_NAME := Image
TARGET_KERNEL_CONFIG := judyln_defconfig
TARGET_KERNEL_SOURCE := kernel/lge/judyln

# Kernel - prebuilt
TARGET_FORCE_PREBUILT_KERNEL := true
ifeq ($(TARGET_FORCE_PREBUILT_KERNEL),true)
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/kernel
endif

# Partitions
BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor

# Platform
TARGET_BOARD_PLATFORM := sdm845

# Recovery
TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true

# Security patch level
VENDOR_SECURITY_PATCH := 2021-08-01

# Verified Boot
BOARD_AVB_ENABLE := true
BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3

# Hack: prevent anti rollback
PLATFORM_SECURITY_PATCH := 2099-12-31
VENDOR_SECURITY_PATCH := 2099-12-31
PLATFORM_VERSION := 16.1.0

# TWRP Configuration
TW_THEME := portrait_hdpi
TW_EXTRA_LANGUAGES := true
TW_SCREEN_BLANK_ON_BOOT := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_USE_TOOLBOX := true
TW_INCLUDE_REPACKTOOLS := true
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Android device tree for lge lineage_judyln (judyln)

```
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#
```
35 changes: 35 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#

LOCAL_PATH := device/lge/judyln
# A/B
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true

# Boot control HAL
PRODUCT_PACKAGES += \
[email protected] \
[email protected]

PRODUCT_PACKAGES += \
bootctrl.sdm845

PRODUCT_STATIC_BOOT_CONTROL_HAL := \
bootctrl.sdm845 \
libgptutils \
libz \
libcutils

PRODUCT_PACKAGES += \
otapreopt_script \
cppreopts.sh \
update_engine \
update_verifier \
update_engine_sideload
61 changes: 61 additions & 0 deletions extract-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#

set -e

DEVICE=judyln
VENDOR=lge

# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi

ANDROID_ROOT="${MY_DIR}/../../.."

HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"

# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true

KANG=
SECTION=

while [ "${#}" -gt 0 ]; do
case "${1}" in
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
-k | --kang )
KANG="--kang"
;;
-s | --section )
SECTION="${2}"; shift
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
;;
esac
shift
done

if [ -z "${SRC}" ]; then
SRC="adb"
fi

# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"

extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"

"${MY_DIR}/setup-makefiles.sh"
29 changes: 29 additions & 0 deletions omni_judyln.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Inherit some common Omni stuff.
$(call inherit-product, vendor/omni/config/common.mk)

# Inherit from judyln device
$(call inherit-product, device/lge/judyln/device.mk)

PRODUCT_DEVICE := judyln
PRODUCT_NAME := omni_judyln
PRODUCT_BRAND := lge
PRODUCT_MODEL := lineage_judyln
PRODUCT_MANUFACTURER := lge

PRODUCT_GMS_CLIENTID_BASE := android-om-lg

PRODUCT_BUILD_PROP_OVERRIDES += \
PRIVATE_BUILD_DESC="judyln_lao_com-user 10 QKQ1.191222.002 8450100201101 release-keys"

BUILD_FINGERPRINT := lge/judyln_lao_com/judyln:10/QKQ1.191222.002/8450100201101:user/release-keys
Binary file added prebuilt/kernel
Binary file not shown.
20 changes: 20 additions & 0 deletions recovery.fstab
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/system ext4 /dev/block/by-name/system flags=display=system;slotselect
/vendor ext4 /dev/block/by-name/vendor flags=display=vendor;slotselect
/mnt/vendor/persist-lg ext4 /dev/block/by-name/drm flags=display=persist-lg
/oem/OP ext4 /dev/block/by-name/OP flags=display=OP;slotselect
/metadata ext4 /dev/block/by-name/persdata flags=display=metadata
/data ext4 /dev/block/bootdevice/by-name/userdata flags=display=data
/data f2fs /dev/block/bootdevice/by-name/userdata flags=display=data
/vendor/firmware_mnt vfat /dev/block/bootdevice/by-name/modem flags=display=firmware_mnt;slotselect
/vendor/dsp ext4 /dev/block/bootdevice/by-name/dsp flags=display=dsp;slotselect
/mnt/vendor/persist ext4 /dev/block/bootdevice/by-name/persist flags=display=persist
/boot emmc /dev/block/bootdevice/by-name/boot flags=display=boot
/recovery emmc /dev/block/bootdevice/by-name/recovery flags=display=recovery
/misc emmc /dev/block/bootdevice/by-name/misc flags=display=misc
/ftm emmc /dev/block/bootdevice/by-name/ftm flags=display=ftm
/mnt/vendor/sns ext4 /dev/block/bootdevice/by-name/sns flags=display=sns
/mnt/vendor/power ext4 /dev/block/bootdevice/by-name/power flags=display=power
auto auto /dev/cnas flags=display=auto
auto auto /devices/platform/soc/8804000.sdhci/mmc_host* flags=display=auto
auto auto /devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto/usb* flags=display=auto
none swap /dev/block/zram0 flags=display=none
36 changes: 36 additions & 0 deletions recovery/root/init.recovery.judyln.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) 2009-2012, 2014-2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice

on init
setprop sys.usb.configfs 1
# Don't lose recovery logs- keep warm reset for coming out of recovery.
write /sys/module/msm_poweroff/parameters/warm_reset 1
# Enable thermal mitigation
write /sys/devices/virtual/thermal/tz-by-name/backup-charge/mode enabled
6 changes: 6 additions & 0 deletions recovery/root/servicemanager.recovery.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service servicemanager /system/bin/servicemanager
disabled
group system readproc
user root
onrestart setprop servicemanager.ready false
seclabel u:r:servicemanager:s0
36 changes: 36 additions & 0 deletions setup-makefiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#

set -e

DEVICE=judyln
VENDOR=lge

# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi

ANDROID_ROOT="${MY_DIR}/../../.."

HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"

# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"

# Warning headers and guards
write_headers

write_makefiles "${MY_DIR}/proprietary-files.txt" true

# Finish
write_footers
10 changes: 10 additions & 0 deletions vendorsetup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (C) 2025 The Android Open Source Project
# Copyright (C) 2025 SebaUbuntu's TWRP device tree generator
#
# SPDX-License-Identifier: Apache-2.0
#

add_lunch_combo omni_judyln-user
add_lunch_combo omni_judyln-userdebug
add_lunch_combo omni_judyln-eng

0 comments on commit 49f04ed

Please sign in to comment.