yashsingh1/xdaforums huggingface dataset:
[Android Software Development] mori70:
Thanks this solved my issue. But now that the build is successful, there's no binary file for twrpTarMain in the output directory. The 'Android.mk' file in the 'twrpTarMain' folder indicates that there should be a binary file named 'twrpTar_static' in the PRODUCT_OUT/utilities directory. Do I have to do something else for compiling this module?

I thought this would result in an standalone executable. Here's the Android.mk file:

LOCAL_PATH:= $(call my-dir)

# Build static binary
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
twrpTarMain.cpp \
../twrp-functions.cpp \
../twrpTar.cpp \
../tarWrite.c \
../twrpDU.cpp \
../progresstracking.cpp \
../gui/twmsg.cpp
LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN

LOCAL_C_INCLUDES += bionic
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_C_INCLUDES += external/stlport/stlport bionic/libstdc++/include
endif

LOCAL_STATIC_LIBRARIES := libc libtar_static
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
LOCAL_STATIC_LIBRARIES += libstlport_static
endif
LOCAL_STATIC_LIBRARIES += libstdc++

ifeq ($(TWHAVE_SELINUX), true)
LOCAL_C_INCLUDES += external/libselinux/include
LOCAL_STATIC_LIBRARIES += libselinux
LOCAL_CFLAGS += -DHAVE_SELINUX
endif
ifneq ($(RECOVERY_SDCARD_ON_DATA),)
LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
endif
ifeq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS
else
LOCAL_STATIC_LIBRARIES += libopenaes_static
endif

LOCAL_MODULE:= twrpTar_static
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_TAGS:= optional
LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
include $(BUILD_EXECUTABLE)

# Build shared binary
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
twrpTarMain.cpp \
../twrp-functions.cpp \
../twrpTar.cpp \
../tarWrite.c \
../twrpDU.cpp \
../progresstracking.cpp \
../gui/twmsg.cpp
LOCAL_CFLAGS:= -g -c -W -DBUILD_TWRPTAR_MAIN

LOCAL_C_INCLUDES += bionic external/stlport/stlport
LOCAL_SHARED_LIBRARIES := libc libtar libstlport libstdc++

ifeq ($(TWHAVE_SELINUX), true)
LOCAL_C_INCLUDES += external/libselinux/include
LOCAL_SHARED_LIBRARIES += libselinux
LOCAL_CFLAGS += -DHAVE_SELINUX
endif
ifneq ($(RECOVERY_SDCARD_ON_DATA),)
LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
endif
ifeq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS
else
LOCAL_SHARED_LIBRARIES += libopenaes
endif

LOCAL_MODULE:= twrpTar
LOCAL_MODULE_TAGS:= optional
LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
include $(BUILD_EXECUTABLE)
[Android Software Development] bigsupersquid:
Showed me, that sure does seem to have the static binary setup.

what about cd to that directory and mm instead of doing the whole recovery build?
[Android Software Development] DevUt:
you can run

mka twrpTar

Please click thanks instead of saying it ;)
[Android Software Development] _MU:
So my phone (Galaxy J320M) isn't yet supported by TWRP, but a different version is (J320F). Flashing its TWRP file works on my phone model, but I really want to make my own TWRP version for the right phone model. What files do I need to change into TWRP's source code?
[Android Software Development] Startrek852:
Can I see the device tree?
[Android Software Development] ashyx:
If it works then likely the only thing you need to change is the device model identifier.

You don't need to compile from source for that. Just modify the default.prop

Even then I would bet they share the same device name, so nothing to change really.
[Android Software Development] Hacker432:
Guys I would like to make twrp for my device officially supported.

Just two question

Do I send sources here?

Do I need a stock copy of build.prop or CyanogenMod one is good too?

Inviato dal mio Y550-L01 utilizzando Tapatalk
[Android Software Development] MSF Jarvis:
You don't need build.prop, just your device tree sent via PM to Dees_Troy
[Android Software Development] Hacker432:
Ok thanks

Inviato dal mio Y550-L01 utilizzando Tapatalk
[Android Software Development] Rotkaeqpchen:
I don't even have a clue how to get this device tree. Again, if someone can compile that for me I'll donate 20 dollars. I do have the boot.img and recovery.img of my Moto G4 Play. You can get the files from my post here: http://xdaforums.com/showpost.php?p=68407542&postcount=2219

Just PM me, I'd be very glad if someone could help. :)
[Android Software Development] _MU:
The only thing I have is the recovery.img file. How can I get the device tree?

---------- Post added at 12:35 ---------- Previous post was at 12:28 ----------

The problem is, when I connect my device to the computer on recovery mode (TWRP launched), the device is recognized as J320F in Windows. I'm unable to use adb and transfer files in MTP mode because Windows seems to be loading the wrong drivers. I guess I need to change something into TWRP settings/compilation files to properly identify my device.
[Android Software Development] ashyx:
The fact that your device is identified as a J20F has absolutely nothing to do with adb or mtp not working.

For ADB to work disable MTP in twrp. If windows still doesn't detect your device as an ADB device in device manager then right click what it does detect it as and manually install the adb driver.

That should get adb working.

For MTP to work it may need kernel support. Samsung's mtp kernel driver doesn't work too well with twrp.
[Android Software Development] Startrek852:
I can try, might take a while though. It would help if I could have your build.prop.
[Android Software Development] Rotkaeqpchen:
Thanks in advance. It doesn't have to be perfect, I just want to use it to install SuperSU.

I attached the build.prop of the Moto G4 Play (XT1602).
[Android Software Development] mustang_ssc:
Guys sorry to ask this stupid question: how you upload all the source at github? When i try to upload it through Chrome it says me that it's too much data.
[Android Software Development] ashyx:
https://desktop.github.com/
[Android Software Development] DavidXanatos:
I would like to build: http://xdaforums.com/oneplus-3/development/recovery-twrp-3-0-2-0-touch-recovery-t3402999 myself

My roomservice.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<manifest>
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<project name="dianlujitao/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" revision="twrp" />
<project name="MoKee/android_bootable_recovery-twrp" path="bootable/recovery-twrp" remote="github" revision="mkm" />

<!-- <project name="CyanogenMod/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" revision="stable/cm-13.0-ZNH5Y" /> -->
<project name="CyanogenMod/android_kernel_oneplus_msm8996" path="kernel/oneplus/msm8996" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<project name="CyanogenMod/android_external_sony_boringssl-compat" path="external/sony/boringssl-compat" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_external_stlport" path="external/stlport" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<!-- <project name="CyanogenMod/android_vendor_nxp-nfc_opensource_Nfc" path="vendor/nxp-nfc/opensource/Nfc" remote="github" revision="stable/cm-13.0-ZNH5Y" /> -->
<!-- <project name="CyanogenMod/android_vendor_nxp-nfc_opensource_frameworks" path="vendor/nxp-nfc/opensource/frameworks" remote="github" revision="stable/cm-13.0-ZNH5Y" /> -->
<!-- <project name="CyanogenMod/android_vendor_nxp-nfc_opensource_libnfc-nci" path="vendor/nxp-nfc/opensource/libnfc-nci" remote="github" revision="stable/cm-13.0-ZNH5Y" /> -->
</manifest>

as you see I try to build using the cm13 sources.

after I run

repo sync --force-sync

and than:

make clean

make recoveryimage

it just sais:

make: Nothing to be done for 'recoveryimage'.

what am I doing wrong?
[Android Software Development] _that:
You probably forgot to run envsetup and lunch.
[Android Software Development] travis82:
how do we get the partition address like 0x000000?
[Android Software Development] MSF Jarvis:
I don't think you even need that for TWRP...
[Android Software Development] DavidXanatos:
yea I skipped lunch

I managed to get it to build using a local_manifest file that makes stable/cm-13.0, with only the twrp source repo added, and the boardconfig file on the device tree modifyed accordingly.

Unfortunately it does not work properly, it crashed once I enter the encryption password.

repo init -u https://github.com/CyanogenMod/android.git -b stable/cm-13.0-ZNH5Y

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<project name="MoKee/android_bootable_recovery-twrp" path="bootable/recovery-twrp" remote="github" revision="mkm" />

<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_kernel_oneplus_msm8996" path="kernel/oneplus/msm8996" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<project name="CyanogenMod/android_external_sony_boringssl-compat" path="external/sony/boringssl-compat" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_external_stlport" path="external/stlport" remote="github" revision="stable/cm-13.0-ZNH5Y" />

<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_Nfc" path="vendor/nxp-nfc/opensource/Nfc" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_frameworks" path="vendor/nxp-nfc/opensource/frameworks" remote="github" revision="stable/cm-13.0-ZNH5Y" />
<project name="CyanogenMod/android_vendor_nxp-nfc_opensource_libnfc-nci" path="vendor/nxp-nfc/opensource/libnfc-nci" remote="github" revision="stable/cm-13.0-ZNH5Y" />

</manifest>

The authors thread http://xdaforums.com/oneplus-3/development/recovery-twrp-3-0-2-0-touch-recovery-t3402999

gives me a small device tree to use: https://github.com/dianlujitao/android_device_oneplus_oneplus3/tree/twrp

but with it (instead of CyanogenMod/android_device_oneplus_oneplus3) the brunch oneplus3 command fails with build errors :/

Now I don't know what repo the author initialized with, I would guess since he works on CM13 for OP3 it would have been op3 but i may be wrong.

I tried to init with the minimalistic omni repo from the first post in this thread with a local_manifest like:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="dianlujitao/android_device_oneplus_oneplus3" path="device/oneplus/oneplus3" remote="github" revision="twrp" />
<project name="MoKee/android_bootable_recovery-twrp" path="bootable/recovery-twrp" remote="github" revision="mkm" />
</manifest>

but that fails already on breakfast oneplus3 saying that it does not know any op3 despite there being an a directory device/oneplus/oneplus3

So What now? How do I get a working TWRP for my OP3 compiled?
[Android Software Development] celoxocis:
[MENTION=912474]Dees_Troy[/MENTION]

I got confussed by that message here https://gerrit.omnirom.org/#/c/18954/

Can i use the TWRP (bootable recovery) Android-7.0 branch on an Omni Android-6.0 tree branch without problems?
[Android Software Development] czarsuperstar@gmail.com:
Im compiling twrp also and you can use a prebuilt kernel and dt.img to compile. Also there's a script for mtk devices for BBQ Linux just edit it to get the specific files needed and remove mtk specific flags and it will give you a base to really work with.
[Android Software Development] Only4givenOnceOfficial:
PC, Windows 7 Trying to build for SM-G530T1 Metro Pcs Qualcomm SD410 Device

Is there a way that I can do this from a Windows 7 platform? I need the TWRP for my phone pretty bad. New t this whole source building thing and would really appreciate help. CM made one for 2.8.7.0 but I would like to get something up to date, I found a J510 port tht was 3.0.2.0 I know that the J510 runs the same processor for my phone so I was wondering if someone could either help me get a up to date TWRP for my device or maybe make it for me since I am limited. I do not own this pc so I can not get it up for dual booting or anything to run linux. I can supply any files you need just tell me what you need and I can get it. I use a kitchen for windows currently made by ASSAYED to get some things done. I only have this computer another 2 days if I'm lucky. Please help, I will give you a shout out on youtube. lol I'm trying to get my phone to the point I can use XPOSED and be rooted stable finally. Need the help. Thanks for reading. Vince from CM thread made a seems to be stable so far twrp for my phone that is the 2.8.7.0. http://grandprime.ddns.net/builds/recovery/gprimeltemtr/ if you need anything let me know or feel free to email me to help. Only4givenOnce@gmail.com again thx
[Android Software Development] travis82:
I have a new ver since i can build the kernel now via cm sources. If anyone wants to test feel free to pm me.

source: https://github.com/travismills82/twrp_device_SMG9350

Should I use subpartition flag or just strait partition?

/efs emmc /dev/block/bootdevice/by-name/efs flags=backup=1;display=EFS

/modemst1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;subpartitionof=/efs

/modemst2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs

or

/efs emmc /dev/block/bootdevice/by-name/efs flags=backup=1;display=EFS

/modemst1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=Modemst1

/modemst2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;display=Modemst2

I would think separate partition names to prevent restores going wrong or efs restoring errors.
[Android Software Development] shoey63:
I use 7 branch on Omni 5.1 and there are no issues
[Android Software Development] celoxocis:
Thanks for the info.

I used to build twrp branch 6 on Omni 5.1.

Do you know if branch 7 on Omni 6.1 works?
[Android Software Development] shoey63:
I don't have Omni 6.1 synced, but 7 should build on all trees all the way back to kk.
[Android Software Development] czarsuperstar@gmail.com:
http://xdaforums.com/showpost.php?p=66030554&postcount=11
[Android Software Development] Startrek852:
DELETE.
[Android Software Development] Startrek852:
There is no Omni 6.1, only 6.0.
[Android Software Development] celoxocis:
obviously it's a typo i meant the android version of Omni which is "6.0.1"
[Android Software Development] DeckerSU:
Hi, all. May be somebody helps with data decryption in TWRP 3.0.2-0 builded from sources (OmniROM) for device on MSM8952? Little brief to situation. TWRP was succefully compiled and started on device which uses hardware encryption. See last 16384 of /userdata footer:

00000000: C4 B1 B5 D0-01 00 03 00-10 09 00 00-00 10 00 00 ı��
00000010: 10 00 00 00-03 00 00 00-AF 6D 49 01-00 00 00 00 �mI
00000020: 00 00 00 00-61 65 73 2D-78 74 73 00-65 73 73 69 aes-xts essi
00000030: 76 3A 73 68-61 32 35 36-00 00 00 00-00 00 00 00 v:sha256
00000040: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000050: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000060: 00 00 00 00-00 00 00 00-B0 74 2C 44-0C C3 03 A4 �t,D � �
00000070: 53 A4 3A 89-99 F9 66 3C-00 00 00 00-00 00 00 00 S�:���f<
00000080: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000090: 00 00 00 00-00 00 00 00-8B AB 6D D4-8E 16 3A 20 ��mԎ :
000000A0: 9C 88 33 49-8A D4 E7 AD-00 6E DB 92-02 00 00 00 ��3I���� nے
000000B0: 00 7E DB 92-02 00 00 00-00 10 00 00-05 0F 03 01 ~ے
000000C0: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
000000D0: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
000000E0: 00 00 00 00-00 00 00 00-69 62 A1 E3-FA 95 FF 0B ib�����
000000F0: 52 6F 49 08-0F 84 41 24-64 17 97 63-B8 82 E2 A4 RoI �A$d �c����
00000100: 43 A8 A7 89-9B FE 9C B4-20 00 00 00-00 00 00 00 C�������
00000110: 02 00 00 00-40 00 00 00-00 00 00 00-10 00 00 00 @
00000120: 00 00 00 00-00 00 00 00-10 00 00 00-00 00 00 00
00000130: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000140: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000150: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000160: 00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
00000170: 00 00 00 00-00 00 00 00-91 61 AB 5E-3F 02 97 D6 �a�^? ��
00000180: 32 7E 98 0D-07 F0 25 30-00 00 00 00-00 00 00 00 2~� �%0

As we see it uses aes-xts essiv:sha256. Userdata partition is crypted and there is a PIN setted, decryption in TWRP failed. Initially in logs i was see information about no keymaster modules found: "could not find any keystore module". I tried to build TWRP with BOARD_NEEDS_VENDORIMAGE_SYMLINK := true flag, because device haven't vendor partition, all needed libs is in /system/vendor/lib & /system/vendor/lib64 (i mean libQSEEComAPI.so, of course i build with TARGET_HW_DISK_ENCRYPTION and TW_INCLUDE_CRYPTO flags and use cryptfs_hw.c for building) ... Than i create needed symlink manually:

ln -s /system/vendor /vendor

And it starts to see keystore modules, this is from log:

Attempting to decrypt data partition via command line.
crypt_ftr->fs_size = 21589423
Using scrypt with keymaster for cryptfs KDF
Invalid hex string
Failed to convert passwd from hex, using passwd instead
keymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.

But after that UI hangs ... no any additional info in log after found keymaster1 module. Anybody have same problem? How it solved?

Device Tree on GitHub: https://github.com/DeckerSU/idol4_6055k_device_tree

Thx in advance for any help.
[Android Software Development] DeckerSU:
I have a similar problem day ago. Unfortunatelly i don't know how to include qcom_common in local_manifest :( Is it a reason because after repo sync i don't have cryptfs_hw.c, cryptfs_hw.h . To avoid this problem i simply use external cryptfs_hw ... and in BoardConfig.mk use TARGET_CRYPTFS_HW_PATH. You can look at the example on my previous post in this thread. Download my device tree and put cryptfs folder in your tree. It should compile succefull.
[Android Software Development] ashyx:
Try using the qcom_common CM sources they are more complete.
[Android Software Development] celoxocis:
Yes figured that out after finding out that "#include <string.h>" was completly missing (memset) from the Omnirom tree.

Used CM sources for qcom_common and it went through without complaints.

Thanks anyway!

---------- Post added at 17:45 ---------- Previous post was at 17:38 ----------

its easy just go into your android/system folder. there is a folder named ".repo" go into there and in its subfolder "local_manifest".

create a file called "manifest.xml" and include the following:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="CyanogenMod"
fetch="https://github.com/CyanogenMod" />
<project path="device/qcom/common" name="android_device_qcom_common" remote="CyanogenMod" revision="cm-13.0"/>
<remove-project path="bootable/recovery" name="android_bootable_recovery" remote="omnirom" revision="android-6.0" groups="pdk-cw-fs"/>
<project path="bootable/recovery" name="android_bootable_recovery" remote="omnirom" revision="android-7.0" groups="pdk-cw-fs"/>
</manifest>

Note: you can remove the past two lines if you want to stick with TWRP on android-6.0 tree.

Go back into your "android/system" folder. do a "repo sync --force-sync -f"
[Android Software Development] DeckerSU:
2celoxocis: Thx. Already solved by adding following:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-13.0" />
</manifest>

In ~/omni/.repo/local_manifestsidol4_6055k.xml . Now it succefully builds with external cryptfs_hw folder.

But still have described problem with userdata decrypting. Here is some logs:

recovery.log

dmesg.txt

logcat.txt

After writing "Found keymaster1 module, using keymaster1 API." in log decryption process hangs.
[Android Software Development] DeckerSU:
Thx for all for replies. Now problem with userdata encryption was solved. Problem was in qseecomd that wouldn't start, now it fixed.
[Android Software Development] ashyx:
Which device is this?
[Android Software Development] DeckerSU:
Alcatel Idol 4 6055K. My device tree for building TWRP is avilable here.
[Android Software Development] ashyx:
Pity I was kind of hoping it was a Samsung device. [emoji53]

Thanks anyway.
[Android Software Development] Azuritko:
Hi, is there someone who can make TWRP for CAT S30 please, and maybe for Sony XPERIA Z1 compact? I am not familiar with LINUX.
[Android Software Development] MSF Jarvis:
Maybe now is the time to?
[Android Software Development] czarsuperstar@gmail.com:
Xda labs app

Does the recovery affect how it's shown? When I go to device menu it shows as M1 but takes me into the LG G2 forum. If it's recovery related I know the fix but was just wondering before compiling a new recovery for naught. Thanks in advance.
[Android Software Development] :
I'm going to attempt to compile TWRP for a new device. It's a Chinese tablet that has absolutely nothing for it, no ROMs, nothing. It does have fastboot on it but i don't know if the bootloader on it can be unlocked. How difficult would y'all guess it would be to get it working? This tablet doesn't even have a Stock ROM from the manufacturer so It's gonna be hard getting the boot image and whatnot. I mainly want to do it to learn.
[Android Software Development] ashyx:
If there is no firmware available, source code or the device can't be rooted then it's a non starter I'm afraid.
[Android Software Development] :
I've already rooted the device. That part was easy.
[Android Software Development] ashyx:
Then extract the recovery.img and you're on your way.
[Android Software Development] :
Thanks. How would I do that? I'm good at flashing ROMs and recoveries and somewhat debugging them but I've never actually got a recovery.img from a device before. I've always just used a update zip to get it but in this instance I can't do that sadly.

EDIT: Never mind. I figured it out.
[Android Software Development] TimSchumi:
Hey Guys!

Short question: How can I generate a empty device tree from a boot.img with just the TWRP minimal sources synced? The script build/tools/device/mkvendor.sh does not exist like in CyanogenMod. The reason for this is, that I want to clean up my device repositories and want to store TWRP stuff extra. I already tried generating a tree with CyanogenMod sources and then renaming all cm to omni and removing CM specific stuff, but it still fails to recognize the makefiles.