[Q] Building a ROM based on stock factory images

hittingsmoke

Member
Nov 21, 2007
47
32
0
I'd like to create a flashable zip of a full stock ROM with some really basic changes from the stock Nexus 4 4.4 factory image. I know the core of the question doesn't fit this forum section, so please bear with me and read to the end before telling me to take this to the N4 section.

I've been reading guides here on XDA on flashing and porting Android ROMs, as well as the official documentation, for a while today. Some of them are quite good and thorough. All of them seem to focus on AOSP or ROMs like CM being modified or built. There's one thing I'm left a bit unclear on which I would appreciate someone more knowledgeable clearing up for me.

How is it that I get from a factory image to a flashable zip, or from AOSP source to a flashable zip that's identical to the stock factory images Google releases?

I understand that I may need to compile this from source and I'm fairly comfortable compiling source code on Linux. What I'm not completely clear on his how close AOSP is to the stock Google factory binaries and exactly what changes would need to be made to bring it in-line with those releases other than hardware drivers.

This is initially just for my own purposes to have a flashable zip of stock Android the way I like it on my N4. The tweaks are low in number and scale. The LTE hack, the 4.4 tethering fix, and the GEL are the primary things I'd like to incorporate myself.

I'm sure someone has already done something similar to what I'd like but I'd also like to learn this so I'm not really interested in being pointed to ROMs which have already accomplished this. I do appreciate the thought though.