yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Techguy777:
This is not a good guide on to build twrp I can't learn nothing off this and no one else can either. This guide is for someone that already has building knowledge. I'm sure a bunch of people are going to respond with it's a good guide this developer is the best. Thats because on xda people like ass kissing they say good rom thanks before they even flash it do you know there opinion doesn't count. Maybe developers like being lied to but me I'm going to keep it honest not good. And yes if developers want to build ask for donations and give out free software then once in awhile they should have to answer questions or give etas. It's the right thing to do people shouldn't be left like gee what's going to happen?
[Android Software Development] Ssssss8622:
It's told that it's not a step by step guide. You need to be a developer to follow it
[Android Software Development] ashyx:
XDA IS a forum for developers, always has been.

It is NOT and NEVER has been intended for spoon feeding anyone or as a support forum with guides and tutorials for noobs like some of the other less technical forums out there.

It is extremely exhausting and frustrating for devs when they have to explain every little detail for noobs when much of what's required can be learned elsewhere first.

Lots of devs spend hours, nay days or even weeks bringing development to XDA. The last thing any dev wants to do is write another edition of war and peace just because someone cannot be bothered to do a little Googling/searching to fill in the blanks.

Many years ago when I first found XDA it bamboozled me also. However I went away gained knowledge, learned things, did research, tried things out and eventually gained enough knowledge to start sharing my own work.

This basic understanding allowed me to learn from other developers here over the years and become a competent developer myself.

Your comments are what makes many devs leave XDA and then the whole community loses out.

Be thankful that this developer has even bothered taking the time to create a guide to follow their work.

Most devs are extremely helpful even when repeatedly been asked the same questions umpteen times over.

Everything that's required is there. You have powerful tools at your disposal. They are called fingers and a mind.

Use them to your advantage and quit the negativity.
[Android Software Development] Techguy777:
With all do respect that doesn't make sense xda is the main source of information for Android development as a developer your view is an inside view of your personal agenda. The xda YouTube channel and much of the articles writien are for noobs not developers only developers think xda is meant for advanced developers it's really meant for upcoming developers. Show me where it says xda is for developers that already have knowledge of everything. Xda YouTube shows you apps to download for God's sake that's noobs not developers. You are confused about xda there out for money and with more people they make more money so xda is for noobs and anyone with an email. You also need to consider what good would asking for donations do if it was all developers they aren't going to pay you for information they know or work they can do. I understand what xda started as but xda as shifted gears and it's not what it was 10 years ago. Spoon feed is how you teach that's really the point you can't except a baby to feed it's self right lol.

---------- Post added at 08:09 PM ---------- Previous post was at 08:06 PM ----------

I've heard a million times this guide sucks off xda and I understand why now if your a developer that can build the open source project page and GitHub should be good enough right? There should be a noob quide somewhere I've read 5 guides now and they all skip 1 important step that's how to download your vendor, device tree, and kernel they all skip it that's the main part. Pointless I always spoon feed people if I know the answer because it shows the person you are.
[Android Software Development] Android-Andi:
Guess it's mentioned in OP already

Guess it's clear for which kind of people THIS thread is made.

Not sure what's wrong here on XDA and what kind changed within last 2 years here... I've closed 2 of my threads thanks to some people and in the end I also lost interest on sharing stuff here... And Android development in general.

What I can see in many threads:

Question Nr. 1: ETA?

Big Nr. 2: User who think devs owe them something.

Big Nr. 3: for free, NOW!!! ASAP!!!

Big Nr. 4: I've not read the OP

Don't get me wrong, feedback is great if you can help making threads and stuff you get here better. But complaining about a thread not being noobfriendly because it's mentioned to have some basic knowledge?

Edit:

There's threads like https://www.xda-developers.com/xda-university-building-your-own-android-rom/ or https://xdaforums.com/android/software/guide-to-to-build-android-scratch-t3862893

You'll get your basics there.
[Android Software Development] ashyx:
My view isn't skewed at all. Ask any senior mod/admin what XDA is all about and they will all give the same answer.

The fact that XDA has in itself developed over the last few years and the developers within in it have become accustomed to noobs and providing guides to help them it still does not mean you or anyone else has any right whatsoever to demand anything.

You say there is stuff missing from this guide. In fact there is nothing missing from this guide. Everything you need to know to compile TWRP is there.

What's missing is your willingness to learn to walk before running.

Compiling software from source requires knowledge of other important basics.

This gives you an understanding of what you are doing instead of mindlessly following a guide and then wondering why it went wrong.

Those basics are not and should not be included here.

Those basics are there for you to embrace any time you choose to learn them.

For starters your build environment needs to be set up. That info is everywhere.

At the very least a Linux environment is needed. Which also needs certain tools and other utilities installed before you can even think of compiling from source code.

None of this is related to this guide. Maybe this guide should also tell you where to buy your PC from or what keyboard to use? How far back do you want a guide to go so every base is covered?

All this is up to you to get yourself in a position ready to move on to the next step of following this guide and for that matter any other.

You'll thank yourself if you take the time to read, research and understand before embarking on any project.
[Android Software Development] Techguy777:
Well you have your opinion that's fine. I just got my first pc ever 2 weeks ago. I have already learned how to run windows and dual boot Linux, I have setup a build environment I am learning as fast as I can. I have every intention of learning all the basics without a doubt this is not the only page I'm reading. I think I understand that in twrp.fstabs you add flags to give your twrp more options and stuff I'm not great at wording things. Honestly xda should have multiple areas one for developers that have advanced knowledge such as yourself I've looked around xda a lot as for Samsung devices your probably the best I've read all your forums just to pick up extra knowledge for devices I don't even own. I agree people should do some really work and I also think people should offer some noobs something. Basically I've looked high and dry and xda is the only place with any information up to date and that's important. If you have a another website or place for noobs please share. I plan on reading everything to learn development but I have a Nexus 6 and that should be the easiest phone in the world for development so I just wanted to copy a twrp that's already been made to walk through the steps get my confidence up then break it down to learn across multiple devices. I have 12 taps open right now looking everything up I can. Trust me I'm going to out work anyone else I'll be on this pic from 5am to 12pm or 1am for the next year.
[Android Software Development] ashyx:
The best advice I can give you to get a kick start is to Google github for a similar or same device.

In fact there are several such Nexus 6 github repositories.

This is where developers put their source code.

You can copy and download this anytime and tweak it as you need to.

Alternatively go to the TWRP Web page. All builds of TWRP posted there have links to the source code used on Github.

You can find a basic twrp device tree for a device similar to yours, change the kernel and dtb, modify a few flags, documented here, then compile and bam your first source built project.
[Android Software Development] Techguy777:
Well I'm not 100 percent sure if I did it right but I found GitHub device tree for Shamu it's 7.1 it's the device tree that twrp directly links you to. So I downloaded the zip from the clone or download and look in it seen that it looked correct so I put it into my twrp directory that I setup with the build environment and changed the name to devices hoping it would allow me to run the lunch_omnishamu-eng and download the correct files. It's downloading or running right now it's so slow I have 100mbps internet normally get 40mbps on the terminal and it's going at 60kbs it's going to take 8 or more hours and Is that normal? If this isn't right feel free to comment. Any help is welcomed. When I ran the lunch omni_shamu yesterday it couldn't find anything now it's working is that because I put the device tree into the directory I was using.
[Android Software Development] ashyx:
There is nothing to download once the device tree is setup, or there shouldn't be unless the dev has included other sources such as for the kernel in the dependencies.

Have you downloaded the minimal twrp sources?
[Android Software Development] Techguy777:
If thats repo init GitHub minimal manifest twrp Omni twrp 7.1 yes I did the whole thing to not the depth 1 for shallow clone.

Ok I just got board waiting so I hit Ctrl z to stop the process and then i was typing CD to get back into my twrp when the process started again and went to 30mbs and finished.
[Android Software Development] Techguy777:
How to compile source and build

Step 1 learn to speak a new language you need to speak Arabic or Chinese to watch YouTube videos explaining.

Step 2 divorce your wife and leave your kids behind it's going to be awhile you don't need a family.

Step 3 quit your day job

Step 4 hope to God when your trying random stuff that you get lucky and it actually works so you can make a YouTube video of you skipping everything except for the make recovery image code at the end and showing off your mad developer skills and acting like you actually know why it finally working.

Step 5 don't respond to any questions on xda , YouTube or anywhere else. You've heard it said better to be thought the fool then to speak and remove all doubt.

People might realize that you don't know what your doing.

Step 6 flash a twrp someone else made call it yours and say you moved on to better things.

?
[Android Software Development] pix106:
Hi,

Hardware : Lenovo Tab2 A710F (MT8127)

Device tree : https://github.com/pix106/android_device_lenovo_Tab2A710F/tree/omnirom-6.0

Kernel is prebuilt 3.10.54 from stock Android 5.0 Rom.

i can build TWRP 3.2.3 using Omnirom 5.1 sources + bootable_recovery from Omnirom 9.0, it boots and works just fine.

I can build TWRP 3.2.3 using Omnirom 6.0 sources + bootable_recovery from Omnirom 9.0, but it does not boot.

Any idea on what the problem is ?

I though about the kernel, Lenovo released a source i try to build, but i could not build a booting kernel.

Thanks :)
[Android Software Development] ashyx:
Earlier Kernel versions are not forward compatible with later branches, your kernel just does not support that branch.

Same as you can't typically boot an Android 6 rom with an android 5 kernel.

However later kernel versions are backwards compatible with earlier branches.

If you want to build on a later branch then you will have to patch your current kernel source.

No point imo.
[Android Software Development] pix106:
Ok thanks.

I understand that there is no point if I only build TWRP, I'd actually like to build roms (I have, but they don't boot on Android > 5.1)

Any hint on the needed patches ?
[Android Software Development] ashyx:
When building an aosp/lineage rom you should choose the right branch to build from as the kernel sources will have patches to enable it to boot later roms.

The patches come from the upstream aosp sources.

If you don't already have lineage/aosp sources to build from your gonna find it quite difficult unless you've done this kind of thing before.

I'm not a rom builder myself, well not any more. You'd be better asking on your own device forum.
[Android Software Development] Techguy777:
Here's my question or questions I downloaded the device tree zip from the GitHub that the official twrp linked to.

So if I have the device tree then I don't need to have kernel and vendor source because the device tree is all ready to go right?

I'm just a little confused on what vendor is for and I kinda know a little on kernel and I know I need to look it up I'll be doing that to. Finally today I started understanding how terminal works a little. I took a the advice of someone and setup user accounts in Ubuntu so I don't screw up the main it might be a little late but if I have to I got my USB stick and will reinstall.
[Android Software Development] pix106:
considering i asked xda admins to create a tag for this device, and i released most of the roms and Twrp it has... this would be like asking myself ;)

i have to look further into kernel building, i already did try, but not hard enough :)

Thanks, end of sliding OT :)
[Android Software Development] Adromir:
I am trying to port TWRP to a device, i have a precompiled boot/recovery image i am using for it. I created a device tree and Using the minimal device tree to build.. It's going to 99% then it stops because the recovery.img size exceeds the Recovery partition size. Well so far so bad.. Is there a way to reduce the TWRP size? Like enabling some compression or Removing some features like repartitioning?
[Android Software Development] Zauq:
Is it possible to port an A/B twrp to my device 'Infinix Note 5 X604' ??

The device has A/B partition scheme.

Help required !!!
[Android Software Development] _that:
Recompile the kernel with a customized config that removed unneeded stuff like networking or drivers.

It is possible if the device allows installing/running unsigned boot images (aka "bootloader unlocked") and if someone has enough info about the device.
[Android Software Development] ashyx:
Depends on your device. Some devices will accept ramdisks using compression other than gzip such as LZMA. Most Samsung kernels will happily accept LZMA and can shave a few mb's off.

Even some devices will accept compressed kernels.

There are also flags you can add to the twrp config to reduce the image size such as BOARD_HAS_NO_REAL_SDCARD := true if you don't need sdcard partitioning.
[Android Software Development] oF2pks:
If you wish to go further in twrp/Development&Hacking, try to browse http://newandroidbook.com/AIvI-M-RL1.pdf a bit: even if it's outdated, you will find many answers to your legitimate questions. Recovery/twrp is just an independent tiny alphanumeric/touch disconnected os, based on your device's kernel (always needs basic low-level vendor bin(s): screen , usb ...), which only perform file_system operations compatible with .zip(s) & *.img(s), adb or even bash/terminal commands : as example, on many regular old Aonly devices (except samsung), you can fastboot a working recovery.img directly into /boot partition and use it like any rom.zip without any damages.

Finally a misbuilt twrp can completely hard-brick a device. When you download a rom/repo: recovery "code" is always in /bootable section (besides your mandatory /vendor + /device + /kernel). For twrp only, use https://github.com/omnirom/android_bootable_recovery/commits + Omni/mini https://github.com/minimal-manifest-twrp + your specific /vendor + /device + /kernel (more or less ~30GB).

EDIT, more info: https://source.android.com/setup/build/building ; at first you should not need modifications to any http://android.mk/

btw, (for not yet unlocked devices,) I have uploaded a basic floss app (F-Droid), that reports id(s), mounts and all possible specs here : https://xdaforums.com/android/apps-games/appfoss-googleserviceframework-gsf-t3849908 ; if some think about specifics additions useful to twrp compilation setup, let me know (also looking for a tricky solution to Bluetooth exact versioning...)
[Android Software Development] Techguy777:
Thanks for the information yes I was going to do fastboot boot recovery before I ever flashed it. I ain't stupid I haven't been able to to not get an error since I started to try to build. I think what I've noticed is that everyone starts off with roms and my thoughts on roms there all the same and it doesn't matter to me as long as I have root access stock is usually more stable but all my phone's are on custom roms Oreo. I been using the Omni minimal with Google vendor files and properties that ain't the right word I can't remember lol. Anyway the device tree is from the guy that does this thread Dee's Troy for Shamu 7.1 branch and kernel is already in the kernel folder I did download aosp lineage 14.1 kernel for Shamu but it was already in kernel I don't remember doing that. So everything is from good source and still can't build it.
[Android Software Development] turtle_bazon:
Hi. I've successfully compiled TWRP from omni 6.0 source to Huawei Mediapad X1 device. There are no errors during compile. But that compiled recovery doesn't boot. It takes to bootlop. How to know the root cause? May be boot log or something else? Thanks.

PS: I used original prebuilt kernel from firmware recovery and offsets from it.
[Android Software Development] DiamondJohn:
last _kmsg
[Android Software Development] integral_:
Unsure how to build Omni

I'm trying to port TWRP to the Alcatel 5041c. I managed to extract BoardConfig.mk from my phone but I'm not sure how to build Omni. The GitHub repo is massive and I'm not sure which device to choose to base my build off of. I really respect the hard work developers put in so if I'm not too far off from where I need to be I would appreciate some guidance.

Here is my BoardConfig.txt: gist.github ... /IntegralWorks/91ff96accf2b387f05030b332011a306 (I cannot post links due to being too new.)

If my question is unclear, I can gladly clarify.
[Android Software Development] ashyx:
Do you want to compile TWRP or a ROM?

That BoardConfig is useless for compiling twrp.

For buiding TWRP it should be far simpler. Plus there is much missing that is required.

You should search github or the TWRP website for a device similar to yours and use its repo as a template.

I suggest you start with cloning the correct branch of the omni minimal sources for your device.
[Android Software Development] turtle_bazon:
Where can I find it?
[Android Software Development] :
Hello all;

My device is General Mobile 8 Android One Series (Model Code: GM8_sprout) (Android 8.1) (Security Update: 5 November 2018)

There is unofficial TWRP port for this device but it doesnt work with devices that Android update is 5 November 2018

I am not expert in programming. Could anyone check the code and help us?

I can send download links as messages, if you contact with me.

Thanks
[Android Software Development] :
Hello TWRP team and [MENTION=912474]Dees_Troy[/MENTION]

My device is General Mobile GM8 Android One 8.1 Series. (model code: gm8_sprout) AB partition

Security Update: 5 November 2018

Tech details

generalmobile.com/products/gm8/specifications

It is project treble compatible and Google certified device.

I kindly ask you compile TWRP for my device. If you compile, i can test it on my device.

You can see screenshots and device configurations.

Screenshots

photos.app.goo.gl/3BqtrmdZggSkTktz5

You can see my device rom files in the links.

Could you please help me?

8.1 Qfil Flash Rom

mega.nz/#!TThznCrA!lNFrNSL-91RYF9JCdkYz7Tgs1WAGpXRNiNkYj9YLaQQ

You can see recovery.img files. Because it's project treble compatible, they merged recovery.img with boot files

boot_a > https://drive.google.com/file/d/1ORLkl8mTPjKYiTb33d3pG-1kpx8y4lyG/view?usp=sharing

boot_b > https://drive.google.com/file/d/1apt-ps1yQYklot4iXqykMWHfqcl99LRV/view?usp=sharing

8.1 Fastboot Flash Rom

mega.nz/#!ZiZkkCLJ!1agcfXmP53XKCgxAQVq4TABKi6u_VwND3kbGKnX eupk

8.1 UMT Dongle Rom

drive.google.com/file/d/1dU0OQND30HINX8sxx_dpgKXuRWYw87CN/view?usp=sharing

Thanks
[Android Software Development] ashyx:
OK 2 things.

First this is NOT a TWRP request thread and you will not get a response regarding this request.

Second, post your request below or in your device forum (if it has one)

https://xdaforums.com/android/apps-games/twrpbuilder-t3744253
[Android Software Development] :
Thanks. :)
[Android Software Development] jamesjacklawson:
This is absolute madness - I am a very experienced Linux and Android user, and the individual parts of the "guide" make sense but there is so much missing for people wanting to learn how to do this. Like "Find the BoardConfig.mk for your device. The BoardConfig.mk is in your devices/manufacturer/codename folder" - I dont have a devices/manufacturer/codename folder! But i did find an alternative but then he states "Your board config will need to include architecture and platform settings" which it does not! Now were stuck because we don't what arch and platform setting to use! And even if we did know, where do we put devices/manufacturer/codename folder within our source tree..

This is frustrating the life out of me!! I am having trouble finding any other reliable guides to build TWRP. And everywhere I go I find back links to this "guide" [AND EVEN WORSE THE MORE I LOOK - NEARLY ALL GUIDES ARE JUST PLAGIARISED FROM THIS ONE]. Even the most experienced SuperUsers/sysadmins/programmers need to know certain things to get going on any project, this is basically a fact of "here is where to find the source code, and here are some irrelevant build flags , off you go!" I just don't get it???
[Android Software Development] DiamondJohn:
If you do not understand what creates "devices/manufacturer/codename" folder, I think you need to re-read all the guides carefully. It is created (one way) by your local manifest. search github for your device. Creating a new device tree is beyond the scope of this thread and as such I think it's an assumed pre-requisite.
[Android Software Development] _that:
This guide has pretty much all you need to know about building TWRP - IF you already know about building Android in general. The real guide starts here: https://source.android.com/setup/build/requirements

The big thing that everybody is missing is how to *port* Android or TWRP to a new device, in other words how to build a device tree. Unfortunately there are so many variations of devices out there that it is impossible to give general guidelines. The best advice seems to be "find a similar device, copy its device configuration and modify as needed". As already mentioned in the OP, you can find the device trees for supported devices here: https://github.com/TeamWin
[Android Software Development] alecthenice:
Have a look at my log please

I was wondering if someone with a little bit of time and interest can let me know if my twrp is sufficient or what I can do to get it correct for my thread. The only thing I believe to be wrong is the touch and button interface (I have been using a mouse). I hope I can flash this twrp and trust it enough to use it for flashing .zips and making a reliable backup. thank you xda community log.txt found in attachmentshttps://drive.google.com/file/d/1rF_cWSIKVLGjgMIv2MY02N3Hp9rKOWrx/view?usp=sharing

I modified from an existing device in attempts to port to a new one as suggested in the post above as suggested by _that