ChanServ changed the topic of #robotnix to: Robotnix: https://github.com/danielfullmer/robotnix || Channel logs: https://logs.nix.samueldr.com/robotnix
ajs124 has quit [Quit: Bridge terminating on SIGTERM]
ajs124 has joined #robotnix
<matthewcroughan> did you say this was an example of adding support for a non-upstream phone?
<danielrf[m]> matthewcroughan: Yep, that should work
<matthewcroughan> danielrf[m]: so the only thing I require is source.dirs overrides, you think?
<matthewcroughan> If other people have gotten my device to work, (aosp, etc) do you think this is all that's needed?
<danielrf[m]> It should be enough. But given that I haven't done this myself for non-pixel devices on vanilla aosp, I there might be other issues I'm not thinking of currently
<matthewcroughan> danielrf[m]: it would be really cool if all we have to do to port devices is make a <device-name>.nix and have a bunch of source.dirs overrides.
<danielrf[m]> definitely. I'd be interested to hear how well it works for you
<matthewcroughan> danielrf[m]: what is `apv.buildID` supposed to be?
<danielrf[m]> apv is for "android-prepare-vendor" which generates `vendor/*` source dirs based on the upstream google images
<danielrf[m]> the `buildID` is used to select which google image to use
<matthewcroughan> is it relevant to the aosp build process? Or only the lineageos one?
<danielrf[m]> So, it's unneeded if you are using some other source for your `vendor/` dirs
<danielrf[m]> Just relevent to pixel phones
<matthewcroughan> ah! is mako a pixel device?
<danielrf[m]> Although I like the approach much better of extracting vendor files from official sources
<danielrf[m]> compared with getting them from repos like TheMuppets
<danielrf[m]> mako is Nexus 4
<danielrf[m]> But mako isn't actually supported by android-prepare-vendor
<danielrf[m]> So that line in hmenke's config setting `apv.buildID` doesn't actually have any effect here
<matthewcroughan> danielrf[m]: so, to build an android pi from scratch.. first you need to make the universe
<matthewcroughan> afterwards, we need the kernel, and what else?
<matthewcroughan> you have 3 source.dirs defined in mako. L27-34 is the kernel. But what is 36-43 and 18-25?
<danielrf[m]> Yeah, typically devices need source directories under "device/" e.g. L18-25 and under "vendor/" e.g. L36-43
<danielrf[m]> You'd need to find someone who's made those source directories that work for the latest version of android
<matthewcroughan> danielrf[m]: can you show me a device/ directory? I lack examples :D
<danielrf[m]> hmenke's config also has https://github.com/voron00/android_device_lge_mako
<matthewcroughan> hmm
<matthewcroughan> see the "source code" bit of this post?
<matthewcroughan> none of those source dirs on github have any device/ directory, what is it exactly that I'm looking for?
<danielrf[m]> This is the device directory: https://github.com/ggow/android_device_amazon_suez
<danielrf[m]> You'd set `source.dirs."device/amazon/suez".src = fetchFromGitHub ...`
<matthewcroughan> oh, the root of it
<matthewcroughan> how can you tell? What is the landmark?
<matthewcroughan> Btw, look at the specifications in the README.md of that repo. What the hell? lol.
<danielrf[m]> I just looked at the url
<danielrf[m]> lots of repos start with "android_"
<danielrf[m]> and then just replace "_" with "/"
<matthewcroughan> This $30 secondhand amazon tablet can decode h265 at 4k, and has a better processor than any sbc I can buy today.
<matthewcroughan> It's just insane haha
<danielrf[m]> sorry I mean "/" with "_"
<samueldr> drive-by dumping a TIL fact
<danielrf[m]> wow, yeah for $30 that's quite good
<samueldr> how lineageos generates the scripts for installable zips
<samueldr> (I've been looking and getting to know about installable zips today)
<matthewcroughan> what is the sha256 of the git again?
<danielrf[m]> TIL too :)
<danielrf[m]> matthewcroughan: basically, just enter a wrong one first, try to build and then nix will tell you the right one
<samueldr> danielrf[m]: you'll be interested in my upcoming PR that will add support for generating installable zips for Mobile NixOS I figure :)
<danielrf[m]> definitely
<samueldr> it's way simpler than it looks
<samueldr> btw, I don't recommend anyone buys amazon devices with the intent of running something else than FireOS
<samueldr> while it works, due to SoC flaws
<matthewcroughan> samueldr: why don't you recommend it?
<matthewcroughan> seems like a good deal
<samueldr> it's really not a good experience in the end
<matthewcroughan> wat? It's the best android device I've had with the exception of the oneplus one lol
<samueldr> it's complicated
<samueldr> with android, it'll be fine
<samueldr> but already, you're probably using ggow's kernel fork
<samueldr> and for austin at least
<samueldr> it's scarily scary
<matthewcroughan> scary in what regard?
<samueldr> (talking about mobile nixos for me) I haven't taken a look _yet_ at amazon's kernel sources, but they may be extremely customized towards FireOS
<samueldr> oh, rootkit scary
<samueldr> things for hiding `su`
<samueldr> and things like that
<samueldr> and poor code quality
<matthewcroughan> poor quality code is the scariest.
<danielrf[m]> samueldr: by amazon, or by custom ROM developers?
<samueldr> I still haven't takne a look at amazon's
<matthewcroughan> danielrf[m]: Ah I see now, so you have kernel/ device/ and vendor/
<samueldr> but ggow's tree is AFAIUI made from a random alternate equivalent mediatek SoC kernel source tree, with amazon stuff merged in
<samueldr> given the quantity of kernels I've had to put my nose deeply into, I can guesstimate some smells, and ggow's kernel fork for austin smells bad
<samueldr> though I _think_ it's not from ggow's work, but from the source it was taken from
<danielrf[m]> matthewcroughan: You'll likely run into problems if you try to build a very old version of android with robotnix, like the LineageOS-12.1 base of that link you sent earlier
<danielrf[m]> Robotnix has only been tested working on >= Android 9
<matthewcroughan> Ah crap ;D
<danielrf[m]> that said, I would be open to adding support for older versions of android
<matthewcroughan> I really just want to build Lineage for my main device, the Xiaomi Mi 9 Lite, Pyxis.
<samueldr> yeah, that's something else, austin is limited to LineageOS 12.x, not ideal given things started dropping those SDK versions
<matthewcroughan> I figured trying to get that working would be good practice, but will avoid it based on this.
<samueldr> (but I agree, with FireOS, amazon tablets even at full price have great value considering the hardware)
<samueldr> too bad they are locked-down
<samueldr> but to run anything else than the OS it ships with, not recommended imo :)
<matthewcroughan> This guy got LineageOS 17.1 working. So I should be able to take that somehow and make 18.x work right?
<samueldr> genreally it'll always be about the size of the developers community
<samueldr> updating to the next android version is not a given
<samueldr> that's because android stuff depends on kernel things acting a specific way
<samueldr> and across android upgrades it may change
<samueldr> so unless the OEM made the changes to be compatible with that equivalent android version, OR the community synthesized something from similar devices, it's not a given
<matthewcroughan> Well I'm running LineageOS 17.1, the rom I linked.
<samueldr> ugh, given their "source code" links point to generic lineageos github org, and toa 404, I wouldn't be so sure
<matthewcroughan> I just want to; 1. Compile it myself, 2. Add fdroid and chromium and random apks, 3. Have the OTA updater.
<matthewcroughan> AOSP rather, since I know LineageOS updating isn't supported with Robotnix yet.
<samueldr> yeah, if you have their device trees they used to build their rom, it might just work
<samueldr> assuming they actually share the code
<matthewcroughan> Well, resurrection remix officially support it
<samueldr> XDA has this notive about respecting the GPL, but does not enforce it
<samueldr> even when flagging :(
<matthewcroughan> does the fact that resurrection remix supports it help me at all? They're a pretty big community
<samueldr> maybe
<samueldr> though some roms give the official tag easily
<matthewcroughan> yeah I figured ;D
<samueldr> so it's not a given that it's not the work of one developer for the specific device
<matthewcroughan> I really hate the fact I can't just slap the latest upstream kernel on android
<matthewcroughan> hate it so much
<matthewcroughan> vendor kernels why
<samueldr> how the $expletive are they linking to 404 repos
<samueldr> and not getting banned from XDA?
<matthewcroughan> XDA is buckling under its own weight.
<samueldr> looks like for your xiaomi-pyxis the harder part will be figuring out where the different repos are
<matthewcroughan> crap ;D
<samueldr> and many ROM "developers", it feels like, try to hide how they build their ROMs
<samueldr> good luck :)
<matthewcroughan> I think I'll just put it off forever.
<matthewcroughan> Until lineageos has official support or something.
<matthewcroughan> I don't want to develop dick.
<matthewcroughan> android is just torture
<matthewcroughan> when riscv is a thing and devices aren't so blobbed and things aren't hidden, maybe I'll attempt this
<matthewcroughan> or maybe I'll just get really curious and spend a whole week on this, :D
<matthewcroughan> how do devces end up getting support in things like aosp/lineageos?
<danielrf[m]> Maybe someday we can get all these ROM devs to publish known working .nix files to reproduce their ROMs :)
<samueldr> by then my project will have overtaken android
<danielrf[m]> when we reach the "nix singularity" :)
<samueldr> whew, LineageOS' logic for installable zips is a lot, but understandable as it's generic across devices
<samueldr> luckily I don't have to do any of this