[Android Software Development] Desmanto:
Hello everyone, I am trying to compile TWRP for my device, Pureshot HS-L671, which use snapdragon 415. This is the first time I am trying to compile TWRP from source.

I am doing this in order to root my phone via TWRP (flash SuperSU.zip). Currently there is no way to get the stock recovery, as I have asked in another thread.

http://xdaforums.com/general/help/how-to-enter-qualcomm-mmc-storage-diag-t3253478

I use BBQLinux 64 bit (bbqlinux-2015.09.15-x86_64-mate) in Virtualbox, emulated using 2 CPU from 4 CPU i5 4590, 4 GB RAM (16 GB at host), setup with JDK 1.6, Python 2.

I use the repo from marduk191 (android 5.1 branch) and TWRP source from ZTE blade S6, aka P839F30.

I try to compile the blade S6 first, to make sure it can compile. Later I will modify the mk file to match my phone.

When typing lunch, it give error

WARNING: device/ZTE/P839F30/omni.dependencies file not found

When I try to make recoveryimage, it will always give me

bootable/recovery/gui/Android.mk:141: * TW_THEME () is not valid.

From the Blade S6 Boardconfig.mk, there is TW_THEME already.

https://github.com/Lightwars/android_device_P839F30-TWRP

# TWRP

RECOVERY_GRAPHICS_USE_LINELENGTH := true

TARGET_RECOVERY_QCOM_RTC_FIX := true

TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file

TW_BRIGHTNESS_PATH := /sys/class/leds/lcd-backlight/brightness

TW_INCLUDE_CRYPTO := true

TW_THEME := portrait_hdpi

TW_TARGET_USES_QCOM_BSP := true

TW_NEW_ION_HEAP := true

I check at /omni/bootable/recovery/gui/devices, there is 1080x1920 and its files, which apply for portrait_hdpi. Googling the error, someone told that i must comment out the TW_THEME. I tried it, and same error. It seems the android.mk cannot get the TW_THEME parameter from the boardconfig.mk.

The full command I executed and the result is below

[pureshot@pureshot-pc omni]$ . build/envsetup.sh
including device/ZTE/P839F30/vendorsetup.sh
including sdk/bash_completion/adb.bash
[pureshot@pureshot-pc omni]$ lunch omni_P839F30-userdebug
build/core/product_config.mk:227: *** _nic.PRODUCTS.[[device/ZTE/P839F30/omni_P839F30.mk]]: "device/zte/P839F30/full_P839F30.mk" does not exist. Stop.
WARNING: Trying to fetch a device that's already there
WARNING: device/ZTE/P839F30/omni.dependencies file not found
build/core/product_config.mk:227: *** _nic.PRODUCTS.[[device/ZTE/P839F30/omni_P839F30.mk]]: "device/zte/P839F30/full_P839F30.mk" does not exist. Stop.

** Don't have a product spec for: 'omni_P839F30'
** Do you have the right repo manifest?

[pureshot@pureshot-pc omni]$ make recoveryimage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=5.1.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.1.6-1-ARCH-x86_64-with-glibc2.2.5
HOST_BUILD_TYPE=release
BUILD_ID=LYZ28J
OUT_DIR=/home/pureshot/omni/out
============================================
including ./abi/cpp/Android.mk ...
including ./bionic/Android.mk ...
including ./bootable/recovery/Android.mk ...
bootable/recovery/gui/Android.mk:140: ****************************************************************************
bootable/recovery/gui/Android.mk:141: * TW_THEME () is not valid.
bootable/recovery/gui/Android.mk:142: * Please choose an appropriate TW_THEME or create a new one for your device.
bootable/recovery/gui/Android.mk:143: * Valid options are portrait_mdpi portrait_hdpi watch_mdpi
bootable/recovery/gui/Android.mk:144: * landscape_mdpi landscape_hdpi
bootable/recovery/gui/Android.mk:145: ****************************************************************************
bootable/recovery/gui/Android.mk:146: *** stopping. Stop.

#### make failed to build some targets (1 seconds) ####

I have tried to delete the whole repo and resync both project again. And still same result.

I tried to download 720x1280 theme and paste it just like 1080x1920 in /omni/bootable/recovery/gui/devices, still the same.

Is there anything that I miss? Thanks in Advance for the enlightment.