[Miscellaneous Android Development] shoxxy:
;)

First :cool: !!!!

Everytime afraid to see your detailed , and good to follow tutorials......

will start now ;) to show my way for lg msm8226 device ;)

THX MY FRIEND

***************************************************************************************************************************************

Here is my way to compile Philz Touch for LG L90 (w7) (D405EU) using yuwengs Cm-11 parted_source.

This Method should be similar for other LG Devices, like: "G2" + "G2 Mini" and other.... NOT TESTED !!!

let"s go:

To the point: "Syncing Part-source" you can follow the instructions of yuwengs tutorial from this thread.

additionally for our Lg Device we need mkbootimg from THIS link. developed by xiaolu ( thx for this)....

in our case we unpack the downloaded zip to Home so we have a new folder now. Named " mkbootimg_tools-master "

Copy stock boot.img or recovery.img from your device to your Home folder.

Open Terminal, and type :

cd ~/cm11
build/tools/device/mkvendor.sh lge w7 ~/boot.img
[COLOR="Blue"]or[/COLOR]
build/tools/device/mkvendor.sh lge w7 ~/recovery.img

[COLOR="Blue"]then[/COLOR]

cd ~/mkbootimg_tools-master
chmod 777 mkboot
./mkboot ~/boot.img stockboot[/QUOTE]

in your [B]mkbootimg_tools-master[/B] folder is a new folder named [B]stockboot[/B], copy the file [B]dt.img[/B] from there to:
~/cm11/device/lge/w7

[B]Open & edit the files as listed below
Put all PhilZ Touch build flags at the bottom of the BoardConfig.mk under a heading of #PhilZ Touch build flags for easy reference[/B]

~/cm11/device/lge/w7/[COLOR="Blue"]BoardConfig.mk[/COLOR]

[code]USE_CAMERA_STUB := true

# inherit from the proprietary version
-include vendor/lge/w7/BoardConfigVendor.mk

TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_ARCH := arm
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := unknown <- Non_Critical
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := krait [COLOR="Red"]<- Critical, either cortex-a5, cortex-a7, cortex-a8, cortex-a9, cortex-a15, krait, scorpion or generic[/COLOR]
ARCH_ARM_HAVE_TLS_REGISTER := true

TARGET_BOOTLOADER_BOARD_NAME := w7

# Kernel Prebuilt
TARGET_PREBUILT_KERNEL := device/lge/w7/kernel
BOARD_MKBOOTIMG_ARGS := --dt device/lge/w7/dt.img [COLOR="Red"]<- VERY IMPORTANT !!! otherwise recovery won"t boot[/COLOR]
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 msm_rtb.filter=0x37 androidboot.hardware=w7
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 2048

# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000 [COLOR="Red"]<- Change this accordingly to your recovery size so that build will error when its oversize[/COLOR]
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072

BOARD_HAS_NO_SELECT_BUTTON := true

#Recovery
BRIGHTNESS_SYS_FILE := "/sys/class/leds/lcd-backlight/brightness"
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/virtual/android_usb/android0/f_mass_storage/lun%d/file"
TARGET_NO_BOOTLOADER := true
TARGET_RECOVERY_FSTAB := device/lge/w7/rootdir/fstab.w7
RECOVERY_FSTAB_VERSION := 2
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_10x18.h\"
HAVE_SELINUX := true
BOARD_HAS_NO_MISC_PARTITION := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TARGET_USERIMAGES_USE_F2FS := true
TARGET_SCREEN_HEIGHT := 960
TARGET_SCREEN_WIDTH := 540
TARGET_COMMON_NAME := LG L90

~/cm11/device/lge/w7/cm.mk

## Specify phone tech before including full_phone
$(call inherit-product, vendor/cm/config/gsm.mk)

# Release name
PRODUCT_RELEASE_NAME := w7

# Inherit some common CM stuff.
[COLOR="Red"]#[/COLOR]$(call inherit-product, vendor/cm/config/common_full_phone.mk) [COLOR="Red"]<- Disable it[/COLOR]

# Inherit device configuration
$(call inherit-product, device/lge/w7/device_w7.mk)

## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := w7
PRODUCT_NAME := cm_w7
PRODUCT_BRAND := lge
PRODUCT_MODEL := w7
PRODUCT_MANUFACTURER := lge

~/cm11/device/lge/w7/recovery.fstab

# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=sdcard1:auto,noemulatedsd
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,check
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard,data=ordered,errors=continue wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults

~/cm11/device/lge/w7/device_w7.mk

$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)

# The gps config appropriate for this device
[COLOR="Red"]#[/COLOR]$(call inherit-product, device/common/gps/gps_us_supl.mk) [COLOR="Red"]<- Disable it[/COLOR]

$(call inherit-product-if-exists, vendor/lge/w7/w7-vendor.mk)

DEVICE_PACKAGE_OVERLAYS += device/lge/w7/overlay

LOCAL_PATH := device/lge/w7
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := $(LOCAL_PATH)/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif

PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel

$(call inherit-product, build/target/product/full.mk)

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_NAME := full_w7
PRODUCT_DEVICE := w7

#PhilZ Touch
PRODUCT_COPY_FILES +=
$(LOCAL_PATH)/recovery.fstab:recovery/root/fstab.w7 [COLOR="Red"]<- adb shell getprop ro.hardware to identify it.[/COLOR]

LG L90 Device Specific. (maybe other LG Devices to):

Our L90 have no Hardware Key Combo to boot direct into recovery, we only could get into the LG internal " Factory data reset " menue with the Volume - & Power Key Combo

if we both ask confirm with yes, Recovery will boot and do automatic a factory reset and reboot. If we Softbricked now by an accident, we get into a "Loop". because theres no working system that can be factory reseted :)

and we have to manual reflash the device.

For this reason we change = ~/cm11/bootable/recovery/recovery.c

1176 case 's': send_intent = optarg; break;
1177 case 'u': update_package = optarg; break;
1178 case 'w': wipe_data = wipe_cache = 0; break; [COLOR="Red"]<- Change 1 to 0[/COLOR]
1179 case 'm': wipe_media = 1; break;
1180 case 'c': wipe_cache = 1; break;

now recovery boots up " Normal " when we choose Factory Reset by LG Hardware Combo ;)

Note: its

Highly Recommend

to activate fastboot mode on LG L90 so you could reach your device in every case....

THX Phil3759 for the Help here...

FROM NOW WE FOLLOW AGAIN YUWENGS TUTORIAL FROM POINT: Start Building it !

THX yuweng ;)