Files
hpr-knowledge-base/hpr_transcripts/hpr2244.txt

154 lines
14 KiB
Plaintext
Raw Normal View History

Episode: 2244
Title: HPR2244: building lineageOS
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2244/hpr2244.mp3
Transcribed: 2025-10-18 23:36:33
---
This is HPR episode 2244 entitled Building Lineage OS, it is hosted by Brian and is about 20 minutes long, and Karim and exquisite flag.
The summary is, I try my hand at Building Lineage OS for my device.
This episode of HPR is brought to you by an Honesthost.com.
Get 15% discount on all shared hosting with the offer code HPR15, that's HPR15.
Better web hosting that's Honest and Fair at An Honesthost.com.
Hello Hacker Public Radio, this is Brian. Today I was going to talk about Lineage OS.
It's the fork of Siannage and Mod that's just disappeared, the Android operating system for mobile devices.
Well, I guess that's not entirely true because there's the X86 also and whatnot, but it's the new third
party I guess you would call it distribution of Android. Runs really well,
currently running it on one of my old devices that I noticed the development stopped on.
They pulled that device, there were three different models from the manufacturer that one device
disappeared, development kept rolling on the other two devices, but not the one that I have.
So I was kind of left with a, now don't get me wrong, I can run some other people are doing
development and I can just keep following them and getting what's available from these developers
because I really don't understand these devices all that well. But I figured if it's already being built,
learning how to go through this process is something that I'd be willing to do and definitely feel
the knowledge is useful. So I figured I'd build my own, I went to LineageOS.org, I believe, and I pull up my,
I look in there and I've noticed that my devices and in there anymore, but the other two model
versions are. So I figure I'm going to follow this instruction,
but just substitute my device code name for the other one. And first of all, I had some problems
when that happened because the device was dropped for every reason. I don't know what the reason is.
So because it was, it's not there, I don't know what I'm missing. There's something that I need to
either just move a file or merge something that I didn't, that I did run, but I decided I have another
device, Motorola Droid Razer. It's, I want to say 2012, it could be 2011. It's a nice little phone,
it's got a completely shattered screen. The microphone doesn't work well, the speaker doesn't
work well, the headphone jack doesn't work well. So it's kind of a media device that works really
well otherwise. So I don't need a lot of the stuff that goes along with it. I run it without a
SIM card. It's not a phone. It's just this device. So I decided, well, I'm going to try to build
for that phone because there's some developers on XDA forms. And I have an unofficial version
of the new Linear Joe S14.1, which is the Android 7.1.1. And it runs pretty well. And apparently,
the issues that most people have with the ROM, I don't experience mainly because I'm not using most
of that stuff. So in its current state, it's totally fine for me. That developer has a great
attitude that he's not going to make it stable if all this stuff's broken. So the official version
for that phone, the phone's codename spider, the official version is 13, rather than 14.1.
But reading through other build pages, like for the other phone I was trying to work with,
I noticed that things are different. The build process changed, apparently, between 13 and 14. So
I don't want to learn part of a development cycle that's already out of date, just to have a
more stable operating system on my device. I'd rather learn what's at least up to date because this
moves so fast that there's no way that I would ever be up to date if I start just going with
the solid known what works. As a reference, I run Debian. I run Debian SID. I find that it has
the latest software. In fact, I have an arch machine in my living room and I have my Debian SID box
here. And many times I'll get a piece of software coming through Debian SID before it comes through
Arch. And I've had very, very, very few issues with any sort of broken upgrades. Many less than I've
had with Arch. I really like Arch. I love it. But the public sentiment is that Arch is a rolling
release that is really easy and doesn't break on you. And Debian is really old, solid, and the
rolling parts break all the time. Well, the rolling parts break all the time if you don't look into
the issues with your upgrades. Same as if you go through Arch and you just hit go anyway even when
it warned you. So I run Debian because it's easy. And it has, there's a lot of other reasons. And
that's not what this episode's about. So back to the episode, I do tend to blather. So I get this
device spider. I don't want to build the old one. That's what's official. So I kind of correlate
and I just substitute 14.1 for the 13 in the wiki page telling me to sync the repo. And I just
build it with the spider for 14.1 because I know it will work. So it's pretty simple.
This is basically what I did. I came up with a location for my project.
The lineage wiki I think says to give yourself about 100 gigs. That's probably a good idea.
After my repo sync, I used 50 gigs. And then there's the caching and there's a bunch of stuff
going on. So my process was to make a directory put my build set up in there. And I initiate
my repo. I wonder if, okay, I wonder if I should give the commands. I noticed my show notes.
I got some ribbing for that too on the latest community news for my clay episode that they were
incomplete. And I am well aware of that. I'm well aware that my episodes are very difficult to
follow if you're, say, deaf because you can't listen to it. And I know the usefulness of the
show notes. So that goes conversely with the blind is they don't read the show notes necessarily
as well as they can listen to the audio, although screen readers and all that stuff work out.
So I began on the lineage wiki instructions. Now they have you downloading ADB fastboot repo,
Open JDK 8, I think, for 14.1. And they have you getting all those from Google. So I just got
those all from the repos from the Debian repos. And because I installed all of those just with that,
I could ignore the creation of they want you to create a local home bin folder. They want you to
download these, the SDK, the repo. And then you have to extract whatever you have to put them in
your places. You have to schmod them for executable. You have to add them to your path. You can just
ignore all of that if you install ADB fastboot repo with your package manager. Then they give a big
list of like dependencies. You're going to need this during the build. The build processes
uses these tools. And I just grabbed them all from in the terminal said in apt install.
And there were a bunch that it couldn't find. So I had to do a little bit of a search in
the Debian packages to find out what they were named. Substituted them in, installed them fine,
went through the rest of their tutorial. They have you do in, you make a couple directories,
Android slash system, wherever you put it. That was kind of funny in their instructions. They
have you make their dash P, which makes a parent directory also. And then you can make multiple
directories with one command rather than giving it for each one. But they give a make their dash P
until the slash bin, which is kind of funny because you're telling it to make the parent your
home folder. You already have a home folder. That's that was kind of funny little typo.
No big deal. Maybe somebody will change that or maybe I will edit their Wiki one day, but I doubt I will.
So, after that, what I do, I create the folders, a repo in it, and then give it the, there was
a switch. I can't remember what it is, but there was the repo for the lineage, the GitHub.
And I recall at the end, there was a dash B, CM141, which tells it to only pull in that branch
rather than the whole thing, which is nice. So I repo in it, and then I repo sync. Now repo sync.
I had to do it three times before it finished without errors. It was getting 404 errors,
and that's just my own network connectivity here. I was doing it over Wi-Fi. It was a busy time.
But after three times it worked, I had an extra 50 gigs of stuff on my drive.
I repo, repo in it. Next was to, oh, the proprietary blobs. They say they extract proprietary blobs,
and that's a neat step where you plug your phone in to your computer, and you run a script that ADB
pulls the right files out and puts them into your repo. And that's all the proprietary crap.
I found some information elsewhere on XDA, basically, that pointed me to ignoring that step.
And instead adding this other GitHub, a couple proprietary vendor repos,
that into my room service file, which is kind of funny because the Android build process,
you have breakfast and brunch, and they read the room service file, and of course, standard kind of
geeky stuff. So once I added them, right, once I added those to my room service file, I sync my
repos again. I don't know if I needed to do that or not. It wasn't in the information that I'd
gathered elsewhere, but I figured it wouldn't hurt. Then I ran the environment setup script,
and I believe I followed their instructions, which had me run breakfast on my device, breakfast
fighter, before the exporting of a few variables. So there was the export command to tell it to use
C-Cash. There's C-Cash command to tell how much to use, which I believe I gave it 50 gigs. This
was all recommended and in the wiki, which makes subsequent builds that much faster.
Then it has me exporting some jack arguments because it has problems with using too much memory.
And I actually ran into that even after adding this. But then the last one that I added, I know I
added an export, and I can't remember exactly what the wording is, is something about
using SU because the new linear just 14 does not ship with SU installed. So to compile it with SU
installed, you just give it some, I think it's with root or with SU true or something like that.
I'll make sure to get this stuff in the show notes. All these commands that I'm very generalizing
here, I'll look them up when I get home and make that happen. So let's see, I export with SU true,
then that was not in their instructions. They don't tell you how to do that specifically. I found
that elsewhere. They do tell you, but not on the build page. Then I see root and branch spider.
Now that ran, I want to say 99 percent. And then it gave me an error telling me that XML
lint command not found. And that kind of sucked because it took a really long time when all the way
through this build. So I do a quick little searching, where do I find this XML lint and it's in some
live XML tools package from Debian. So I find it, I install it, I run the build again.
And I just, I kind of walk away. I come back to the computer and it's got an out of memory error.
So I take a screenshot, go to bed, figure out, try it again tomorrow.
Shut the machine down. Tomorrow I get up, I sift through a bunch of information about this out of
memory error. I find a few things telling me to edit some files, some jack server files,
and I find that this new version has not only different file names and different file locations,
but uses different wording internally on the files. So after a little bit, I find the right file.
And I tell it rather than using four threads to use two threads, I give it the rest of the
the other recommended argument for jack to tell it to use a larger block size for the memory thing.
And I start over again and it completes. And then I CD to my out folder where everything's
sitting, my recovery, my boot, my ROM. And I boot my phone into recovery,
side load the file. I wipe my, I think I wiped the whole thing. I'm using safe straps. So I have
multiple ROM slots. So I'm really not concerned of screwing it up. And I wiped my system data,
Dalvik cache, just to make sure this is a fresh ROM that I built. And I want to know that
everything in there is coming off of it and not residuals. And I install it. It works. Wonderful.
This is great. The only other thing that I did one more time, I said, okay, now that that's happened,
I don't need a bunch of these programs. I don't need the cyanogen file manager. I don't need the
browser. I don't need the voice recorder because I would use you record anyway. I certainly don't
use Google. So I do need eftroid. So I just unzip it. I remove the APKs I don't want. I put in the
eftroid APK. I zip it back up and I reflash that one to my device. And it works. So this is great.
Now I'm not very apt at knowing what it is that I did. But I do know the steps that I took.
So now I can learn. And my goal is actually to get it onto this other device that I can use,
that has a less shattered screen. And actually has working speakers, headphone jack, and whatnot.
So I got some more searching to do. And you guys have a good day.
You've been listening to Hacker Public Radio at Hacker Public Radio dot org.
We are a community podcast network that releases shows every weekday, Monday through Friday.
Today's show, like all our shows, was contributed by an HPR listener like yourself.
If you ever thought of recording a podcast, then click on our contribute link to find out how
easy it really is. Hacker Public Radio was founded by the digital dog pound and the
infonomican computer club. And it's part of the binary revolution at binwave.com.
If you have comments on today's show, please email the host directly, leave a comment on the website
or record a follow-up episode yourself. On this otherwise status, today's show is released on
the Creative Commons' App Tribution, share a light 3.0 license.