[Android General] AlaskaLinuxUser:
Because I created the video series on how to build custom roms and kernels, I get a lot of questions. Most of those questions are exactly the same. One of the most common questions that I get alot in regards to building custom roms for Android phones goes something like this:

"Where do I start? My device doesn't have anything, no custom rom, no TWRP, nothing."

I'm hoping that I can write one answer here and point people to it, to help them know what to do.

I like to tell these individuals that my first recommendation is to watch some of my Youtube videos, and then download the Android source code and build for a known device that already has a working device tree and custom rom(s). This allows them to ensure that they have properly set up their system, and if their computer is capable of building. It will also give them valuable experience of what right should look like. You can check out my threads with links and helpful information on that here:

https://xdaforums.com/t/guide-video...custom-roms-and-kernels-10-p-o-n-m-l.3814251/

Most don't do this, but even if they do, then comes the next quesiton:

"Where do I start? My device doesn't have anything, no custom rom, no TWRP, nothing."

Yes, we are right back to where we started. Where do they start?

Yesterday, I decided to build something for my new phone, a CAT S42G. To the best of my knowledge, there is no custom rom or custom recovery, such as LineageOS and TWRP, available for this phone. In fact, there is no record of it being rooted (that I could find). The only reference to flashing this phone with a GSI is in my own blog, where I managed to do so, after much experimentation, since it didn't work right the first several times through.

So here it is, the definitive guide to go from zero to TWRP with an unrooted phone that has no device tree, custom rom, or TWRP built for it. Maybe later I can write the guide from TWRP to custom rom, but we'll take this one step at a time.

Spoiler content hidden.

See post #9 for more info on extracting an OTA zip to get your boot image:

[Guide] Zero to Hero, what to do when your phone has nothing, no TWRP, no custom roms....

Because I created the video series on how to build custom roms and kernels, I get a lot of questions. Most of those questions are exactly the same. One of the most common questions that I get alot in regards to building custom roms for Android...

xdaforums.com

Then, once you have your OTA zip, you can use aospdtgen to create a LineageOS device tree automatically:

[Guide] Zero to Hero, what to do when your phone has nothing, no TWRP, no custom roms....

Because I created the video series on how to build custom roms and kernels, I get a lot of questions. Most of those questions are exactly the same. One of the most common questions that I get alot in regards to building custom roms for Android...

xdaforums.com

And the final products:

[Guide] Zero to Hero, what to do when your phone has nothing, no TWRP, no custom roms....

Because I created the video series on how to build custom roms and kernels, I get a lot of questions. Most of those questions are exactly the same. One of the most common questions that I get alot in regards to building custom roms for Android...

xdaforums.com

Hopefully that helps answer that "Where do I start?" question....

Linux - keep it simple.