I BUILT THIS FUCKING ROM TODAY, AMA

I am now officially an honorary Pajeet
Ask me whatever you want to know about building ROMs or open defecation or using wrong British grammars.

Other urls found in this thread:

wiki.lineageos.org/devices/shamu/build
twitter.com/SFWRedditVideos

How the heck do you add features to a ROM? How do you tell it to have shit like weather on the status bar, quick PIN unlock and such?

I want to update a discontinued ROM and add the latest security patches in.

I know very little about Android compilation.

Could you give me some pointers?
I only want to update the security level, no other modifications.

How hard is it to get started on building ROMs for a not overly popular phone? All the guides/wiki I can find assume you have been making ROMs for the past 3 years.

I would want to continue support of aosp Extended for the LG g3 (support dropped after 7.1.2)
How would I approach this?

For someone who has no experience in ROM building and writing for linux kernel? Impossible. I weren't kidding when I was saying 99% of Sup Forums is dumber than pajeets, this shit is anything but intuitive.

What do I need to do to port lineage to the Huawei MediaPad X2?

Congrats op, is it an official release ? If no, do you want to be an official maintainer ?
Wich phone ?
Don't forget to share your works for other users.

It's shit quality but it doesn't mean that it's easy work. Pajeets have a hard time for sure.

Depends on what you want to add but the easiest way would be to simply roll in your own apks. So far I've only done a vanilla build though. Doing that much was a fucking struggle in itself, especially on low tier hardware but I did it.
Is the source available, is it lineage or aosp? As long as you can pull the source in from a repo somewhere it shouldn't be too hard.
Dude wat
That is simply untrue. I had never tried or even wanted to build a ROM before last week. It took me about 30 mins of reading and tbfh the major struggle for me was building on underpowered hardware, even then I made it work.
I stared with the Jewgle instructions at source.android. com and quickly moved to the lineage wiki, which *mostly *, though that wiki does feel out of date and a bit wrong in places. It does actually get you a working rom though.
I'm also looking at getting AOSP 8.0 onto my device (Nexus6) and the approach I decided to take was to first gitgud at Lineage and use what I learn to build aosp. It's nearly bedtime here, I spent hours today just getting the fucking Jack VM to stop crashing. Its a great feeling when the fucker builds successfully though.
Its not at all impossible. How hard can it be to follow a fucking wiki page?

It’s an AOSP based ROM.

All the source is on github

>Find favorite ROM a few updates in
>Spend a month with it, it's really good
>No new updates
>4 months later
>Completely abandoned
>Still runs really good but it's time to move on
>Try to find ROMs
>It's all Lineage, garbage here and there, most if not all have the same stupid bug
>Finally get to that sweet one which happens to be unofficial, doesn't have OTA updates and you don't even know who the maintainer is at all but you put it in there anyways because it manages to be just slightly better than the rest in terms of speed, stability, battery life and features
>Doesn't get any more updates, thread stays there for a good while with only like 4 responses and 0 support

God dammit why does this always happen

>How hard can it be to follow a fucking wiki page?
All wiki info is obsolete and from CM age. And it's only for already supported phones. For not supported phones. If you're trying to port to a new phone prepare to have only the kernel and adb booting, at most. And that's if you have working kernel sources. To get get the rest of the stuff working you'll have to write driver shims, which requires a fair bit of revers engineering.

Lineageos 15 is still unofficial so far but I wouldn't mind being an official maintainer if no one else stepped up.
I might share it but I don't like my nick being in the kernel build signature.

Here's the wiki I followed btw
wiki.lineageos.org/devices/shamu/build

Dude just say the device name, who cares
Regardless, I'm in a slightly similar position. My nexus6 is stuck on 7.1.1 and what I plan to do to get it to a basic AOSP 8.0 is to first build AOSP 8.0 as normal but to roll in the binaries (I.e. the drivers) and see how it goes if I flash it.

No CarbonROM, no ParanoidAndroid for Moto G4. I swear I'm going to step in.

Nexus 7 2012
PureNexus 6.0.1

It must be good despite being obsolete then because it worked in building L15 for my nexus 6.
All I had to do different was to kill the jack VM manually between crashes and restart it manually.
I'm not sure what a driver shim is though I have a rough idea but I'm willing to get my hands a bit dirty (goes with the poojeet territory)
Do it, just use what info is out there. The process isn't going to be that much different from device to device, the drivers will be the major difference I'm thinking.
I actually have a Nexus 7 2012 too, that was my next task after getting 8.0/8.1 on my nexus 6. Aosp 7.1.2 is good enough at the moment on the n7 that I don't mind too much.

>I'm not sure what a driver shim is though I have a rough idea but I'm willing to get my hands a bit dirty (goes with the poojeet territory)

A driver shim is a compatibility layer added in between a blob and the kernel, it's used to make older drivers work with newer kernel versions. If you don't have access to the source you can't recompile them and the kernel ABI is not stable in between versions which means you have to write your own compatibility code to interface with the closed source blob.

is there an easy way to add microg into lineageos?

Nanomod.

Hmm that's what I've been wondering, I.e. how well the existing official binaries for N6 will interface with 8.0. I didn't expect it to be an easy thing to "rewire" shit to get it to work with 8.0 but then it won't be impossible either. I look at devices like the Note 2 which work fine on Android versions which are literally half a decade out from the original Note 2 Android version so there's a way to make shit work, just depends on how gud I am at figuring it out. Considering this took me about 30 minutes to learn (the major trouble I had was building on a 4gb machine) I'm hoping it won't be impossible, plus there's a shit ton of documentation out there on how to update driver compatibility (hopefully)
I'm using opengapps, but as long as its compatible with the Lineage version then I don't see why not. I haven't really looked into microg yet, I hear its good though.

Also gonna add, run this on a bare metal OS (Ubuntu 16.04 or even 14.04 recommended), don't do it on a VM unless you can dedicate like 16GB RAM and even then the IO might suffer.

The entire initial build (you can cache the intermediary shit which is fucking sweet) took about 1.5 hours. Doing a follow-up build which used the cache (you need to set up ccache which is easy on Ubuntu) took 20 minutes which is very decent when you want to pull a few changes in a basically roll in the diffs.

Probably anyone who has the will to put up with the effort of doing a good job is trying to learn something useful to get a better job/position.

>They get a job and don't have the time to tinker around anymore.

OP here, not gonna lie, the thought crossed my mind, you can't blame anyone with enough smarts to do this to think along similar lines. I'm already doing okay money wise and taking a short career break anyway (I do programming but in a slightly different context,) so this will be a nice thing to add to the armory and it's just a fun little project which hopefully will come in useful in a practical sense since I want to keep using my n6 for a while.

I wanna build a rom for my galaxy s5 that relies more on battery life (this idiotic phone eats a lot of battery bechause of the 2.5ghz clocked cpu), from where should i start? I know nothing about android developement and shit...

Start with the Lineage wiki, even though it may be a bit outdated like some anons are saying it will still have enough relevant info to get you going. I *only* used the wiki to build the N6 ROM, and other than "out of memory" bullshit which I solved with a bit of help from XDA pajeets it was fine.
Also this may be obvious but XDA is very useful, disregarding all the usual memes.
If your CPU is locked at 2.5ghz you may have larger problems, are you sure it is? If you install something like Kernel Adiutor or CPUZ, does it actually show the CPU locked at full frequency? If it's fluctuating, that's normal.

Think he means the cpus max clock is 2.5ghz and wants to look into a governor that’s more battery-friendly.

There’s guides on XDA on every governor, I think there’s 60 odd of them.

Could you post the guides you used mate?

Linked it here

Nice one mate

What exactly do I need to build it?
Drivers in /*somewhere* and kernel source only or dominated need something more from my phone?

Part of the build process is to pull your drivers in (either from a repo or connecting your device and letting a script download them over adb).
The kernel source gets downloaded from the lineage repo and compiled with the rest of it.

What are your system specs and how long to compile

Dell Vostro 3300, i5 2.4ghz with 8GB RAM, (had to borrow 4 from a different laptop because 4gb didn't cut it), 500GB HDD and Ubuntu 16.04.3. The build takes about 25gb space, the cached stuff takes about 2gb (it's compressed).
1.5 hrs to do initial build. I did another "cached" build immediately after and that took 20 mins which is decent for the hardware. I had to dedicate 4GB to the Jack VM.
CPU was maxed out most of the time.

So download all the source, make a directory for my ROM, initialise the ROM repo, sync the code, create a local manifest, sync device specific files, then build?

Why do you think successfully following the guide on how to build Lineage OS warranted making a thread on Sup Forums?

No not exactly.
Set up directory,
Set up the repo link,
Sync,
Pull vendor files from device or repo (this is usually easy with Google devices, not sure about others but you might be able to use a script that does this)
Set up ccache + compression
Build

Also follow the wiki guide for your device if there is one. If there isn't one then use a device that is similar.

Check out the catalog and you'll find plenty of threads that have fuck all to do with technology. The Tesla one for example. Go bully them, faggot.
I've seen several threads about lineage os recently so I thought I'd do this and hopefully guide others to make their own ROM for fun.

Hey, that's what happened with the maintainer of the official version of Resurrection Remix for the Xiaomi Mi Note 2.

Question for you:

I know how to compile.
I know how to use git at least on a basic level
Programming knowledge is nil

What do I need to be able to build a version of a ROM like Dirty Unicorns or Lineage for my device if it's officially unsupported?

you can run the microg fork

But I already have the kernel source from my phone manufacturer. I don't need it?

I recommend porting it to Lineage 15 yourself first so you know the general idea of finding and fixing build errors. It really helps you get familiar with GitHub and all that it has to offer

You need some 2012 tier hardware and to be able to read the wiki that I linked and be able to understand why crashes happen
Correct. This doesn't mean you can't find a way to use it later on to bring updates or your own custom features in. But it's best to just go with the packaged kernel to make sure shit just works.

what about privacy? Is anyone even reading the commits? Are they doing shady stuff?
I kinda trust them but i can't assume the rom is safe just because it's open source

True about github, but n6 is already being ported in the development branch by someone who knows their shit more than I do

Yes some of us are reading the commits, and not just us but the other developers on lineage read each others stuff so there is peer review going on, you can read then right now if it bothers you that much.

On which OS did you build it?

Ubungo 16.04

Have a chinkshit android which didnt release anything online. Is there no hope? It's a variant of htc one called m9e (which is so different from m9, which at least had some support) I didn't know shit when I was buying. Apparantly it's a cheapstake version with different specs. I don't think mainline will work with different hardware, but I want to make sure before I throw dish at a different phone.

Did you manage to compile LineageOS 15.0 for shamu?
A couple of weeks ago I gave it a try for oneplus3 but it wasn't working at all.
Had a fuckton of errors, read a couple of threads on XDA where pajets suggested to clone some unknown third party repositories, didn't like that so I gave up.

Nice, I have already built 4 ROMS.
I recommend you to use VPS. 0,2 $ per hour.

I'll probably look into this soon enough as the maintainer for my device just up and disappeared last month. I've been meaning to get zram and f2fs for my aging phone and no-one seems to offer both in the same package. Never realised they had instructions for builds, and it looks simple enough.

Thanks OP for reminding me.

Yep I did, that's what the thread is about. There's already a build on XDA by some fat pajeet that works fine or mostly fine.
You need to log the errors and put them in a paste bin or something so others can try and understand where you're fucking up. I had a few errors but the lineageos-dev irc helped me out a bit.
You don't need 3rd party repos BTW.
I hate oneplus though.
I already paid for this machine and electric here is cheap so its easier to do it this way.
Do you at least have the kernel source available? If not you should talk to people on XDA to petition HTC for the source. They're not allowed to withhold that shit really. It's probably out there and you're not looking hard enough. Basically there is hope but you might need to try harder than if your device had official support. Get a google device or a LG or Sony next time.
Same here, I didn't realise how easy it would be. And it is very simple compared to doing actual systems programming. The hardware req is the worst part. I'm actually looking to get a cheap little PC built from parts so I can do this kind of thing in minutes rather than hours (it only took 1.5 hours but I don't have a lot of patience)

So what is a rom exactly? You take stock android, add some apks, dump an iso and call it a rom?

Do you have to compile the kernel?

Is it like making a Docker image?

>take stock android,
yeah the source for it at least
> add some apks,
if you want to
>dump an iso and call it a rom?
u wut

>Do you have to compile the kernel?
it's compiled during the build process

>Is it like making a Docker image?
dunno, probably not though

I feel your pain. Isn't there a thing coming from Android 8 onwards that basically all ROMs could work on MOST devices natively?

Project Treble. It needs the device maker to open up the drivers enough to be able to work with the new HAL in Android 8.1+ (could be wrong with how I've phrased this)

Bump

.

If you're pulling drivers or sources from your device or using the one OEMs provide, Why is it that the developers usually have a difficult time fixing bugs such as getting the fingerprint sensor or LTE to work? Very common when the OEMs aren't updating the phone so the devs create a rom with a newer version of Android and these two bugs take months to get fixed. Eventually, they come out with a fix. What else do they do in addition that fixes it? I saw someone post the source for the fingerprint fix of one of the devices I own and its written in c++, which brings me to my last question, which programming languages do you have to be decent in to start building roms?

Because the drivers stop getting official updates and the developers are basically patching shit. What theyre doing tends to be varied, read their githubs
You don't need to know programming until you actually need to fix shit, but then the major systems languages (the android ones at least) are requisite, C, Java, Python, bash, sometimes XML, possibly C++ (but sepples is rare)

whats yours specs and how long did it take to build?

I keep hearing this shit about how android kernel needs 8gb+ of ram and it needs day to compile. what the fuck?

also this, i would like to stick to a kitkat rom for my phone (sgs3) but all them have 2015 patches at BEST.
Would be nice if someone just kept a single fucking rom updated but NOPE lets move all development to nougat and marshmallow on a fucking 10 years old phone

the phone needs to be able to boot a pure aosp rom if it wants to be certified from google.
and thats the only way to be allowed to ship your phone with google play so yeah, pretty much every phone is gonna have it.

I did need 8gb ram but it took only 1.5 hours on a 2010-era i5 2.4ghz. According to some pajeets you can get away with 4gb ram but I doubt this. The jack VM is a hungry little bastard and needed about 4gb to do everything smoothly so factor that in also. And if it crashes, kill the jack server and restart it manually. Don't just continue from a crash, this is where I wasted most of my time trying to diagnose why it wouldn't compile after a crash. Fucking java as usual. The disk space is where it gets hairy, you need about 100gb ideally. Luckily I had a empty drive just waiting to be used

>you need about 100gb ideally.
just what the fuck?

25gb for the repo at least and while its building it takes up like 40gb for intermediary build crap. Then there's the ccache and probably other shit that adds up eventually. On my 500gb (465gb) drive I have about 270gb left, but I downloaded the AOSP repo also as I want to get to work on that also.
BTW if you're the guy asking about the build time, then this was on a shitty HDD, not SSD. I didn't want to wear out my SSD but I might try it to see how long it takes, I'm expecting a drastic reduction in the build time. Also downloading on my ADSL connection took a long ass time, like 4 hours but you only do that once so its okay.

Where did you go to start learning?

...

I've also done it once but it really isn't worth the time if there are official Lineage builds for your device.

Keeping the repo, updating the source, compilation times and managing ot myself is something I don't wan't to do monthly (with every new security patch launch). And this is coming from someone that manually compiles his own kernels.

Just official Lineage builds and kernel tweaking is enough for me.

Technically this is actually feasible as long as you're willing to patch the kernel and also the security holes yourself.
Reason most people move to newer versions is the same reason new distros just switch to a newer kernel instead of backporting changes to an older kernel, no one wants to maintain old shit without a good reason. There are probably good reasons people just move to nougat or whatever. I'm looking at porting AOSP 8.1 to the Nexus 6 because I would like to get a few more years out of this amazing device if possible.
Yeah I know that feeling. I did this mainly as a learning exercise and to see how long it took on this shitty unused hardware and also because I was bored. If possible it would be cool to be able to pick up maintenance if the N6 ever gets dropped and also to help out with patches and stuff

Is there a specific way to tweak or patch Android kernels or does the normal kernel stuff apply?

I also just consider it a learning experience. Nice to know it's doable but I wouldn't do it again unless I plan to maintain lot's of devices.

This is one of the cases Gentoo takes less time and autism.

It's still a kernel of course but I wouldn't compile my own for my phone. Some third party kernels like ElementalX for example are alright since they could have their own governors for example but just tweaking a bit with Kernel Auditor or different kernel managers doesn't take long and can make a difference.

>Gentoo takes less time
Someone screencap this thread

There is nothing wrong with running Nougat on a S3, it can handle it well, maybe even better than it handles KitKat.

>How hard can it be to follow a fucking wiki page?

Is it buttery smooth?

Its so buttery that I want to smear it on a 18 yr old qts ass

Me too. The official one for moto g5 plus.
Things that don't work:
Every camera feature
Connecting to 50% of WiFi networks
Video camera
Ugly 5 second warning on boot
Viper4android
USB DAC

You can remove the bootloader warning tho

That's a great opportunity really. You'll be able to see what they're doing and you could build upon that as you learn. Trust me, I've spent a lot of time on the Moto X Pure going through everyone's repositories and cherry-picking fixes. It's really time consuming, but it feels amazing when you botch everything together and it somehow boots.

Is there a way to just build the kernel and not the whole ROM?