whitequark,
@whitequark@mastodon.social avatar

waiting for brunch (i am building android again)

whitequark,
@whitequark@mastodon.social avatar

oh my goddess it has rust in it now. i think i need to budget like extra 25 GB for the build then :s

whitequark,
@whitequark@mastodon.social avatar

this is your computer on android

niconiconi,
PeterCxy,

@niconiconi @whitequark Wait until one actually starts compiling. This is why I have stopped building AOSP on my daily computer and instead do that on my NAS / home server.

whitequark,
@whitequark@mastodon.social avatar

@PeterCxy @niconiconi i start a build and go sleep lol

niconiconi,

@whitequark @PeterCxy ​:blobcatsleep3:​

niconiconi,

@whitequark CC @PeterCxy@comfy.social

trcwm,
@trcwm@mastodon.social avatar

@whitequark Parents, teach your kids about Android before it's too late!

whitequark,
@whitequark@mastodon.social avatar

I haven't even started to build it and I already know I will be out of disk space

the source checkout alone has consumed, uh, ...
(waits)
(waits)
(waits)
153 GB

cvtsi2sd,
@cvtsi2sd@hachyderm.io avatar

@whitequark 153 GB of source tree is something I can hardly wrap my head around... I mean, there's lot of stuff in Android but how can there be so much of it?

(now I feel the need to do a checkout myself and run filelight on it... luckily probably I don't have enough free space for that)

whitequark,
@whitequark@mastodon.social avatar
whitequark,
@whitequark@mastodon.social avatar

deletes some bioinformatics files (+200 GB free) ahhh yes much nicer

whitequark,
@whitequark@mastodon.social avatar

"PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS" how about you product enforce deez nuts

whitequark,
@whitequark@mastodon.social avatar

it has been more than a hour and i haven't even managed to start a build

whitequark,
@whitequark@mastodon.social avatar

only 8 hours and an average of 2 to 5 inscrutable problems to go

tedmielczarek,
@tedmielczarek@mastodon.social avatar

@whitequark are you targeting a different OS/CPU than the build expects or is the build system just horribly broken?

whitequark,
@whitequark@mastodon.social avatar

@tedmielczarek i am running a completely normal aosp build (lineage 20) for pixel 6

android is just... like this

whitequark,
@whitequark@mastodon.social avatar

@tedmielczarek (i have some extremely minor customizations, like enabling AVB and building f-droid kernel extension as a part of system image)

tedmielczarek,
@tedmielczarek@mastodon.social avatar

@whitequark I remember building ChromeOS a few years ago and while it did require a huge amount of disk space and the build took forever, it was at least straightforward.

whitequark,
@whitequark@mastodon.social avatar

every. single. time. i upgrade android to the next major version they change the build system, the partition layout, or both

words cannot express how consistently disorienting it is

whitequark,
@whitequark@mastodon.social avatar

hisssssssssssss

like, i am reading the docs, i understand the motivation, i get why these changes are made and they are clearly necessary

however

i do not enjoy doing a speedrun of being an android vendor every time i need to run the goddamn thing on my phone

whitequark,
@whitequark@mastodon.social avatar

scroll through this section on partitioning and tell me you don't feel delirious trying to understand it https://source.android.com/docs/core/architecture/partitions

mifune,
@mifune@mastodon.social avatar

@whitequark I feel my brain actively protecting myself by refusing to absorb any of the information on the page.

whitequark,
@whitequark@mastodon.social avatar

just discovered that my OS was configured to cap the CPU frequency multiplier to 23x, effectively preventing it from boosting up. i wonder why! i removed that and it boosted up to 31x before being thermally limited at 29x

i have no idea why i capped the multiplier. i suppose if the machine crashes i will learn

maybe the bottom just got too hot?

whitequark, (edited )
@whitequark@mastodon.social avatar

on careful examination, this laptop's cooling system lets it consistently boost all 16 cores up to no more than 28x, at which point they all sit at a comfortable 90-95 degC without getting noticeably thermally limited, so maybe i should just leave it at that

whitequark,
@whitequark@mastodon.social avatar

failed to build some targets (04:06:15 (hh:mm:ss))

at least this was definitely my fault this time (wrong key size generated or something)

whitequark,
@whitequark@mastodon.social avatar

the android build system has spent the last 31 minutes linking the kernel, presumably with LTO. it has consumed 16 GB of real memory thus far

everythingalsocan,
@everythingalsocan@blackrock.city avatar

@whitequark That seems just a tad excessive.
I used to compile kernels on a system with 4MB of RAM.
Then again, the kernel is probably more than 4,000 times as big as it was back then.

I kind of understand the rationale behind adding more features that need more RAM, but I can't get my head around that scale.

whitequark,
@whitequark@mastodon.social avatar

@everythingalsocan but you didn't use LTO, did you? that's kind of the important thing here. even ThinLTO requires a fraction of the ~24 GB of memory that a full LTO build of Linux requires

whitequark,
@whitequark@mastodon.social avatar

@everythingalsocan usually this is done to get anywhere between 5-20% of performance, but in Android's case, it wants to build a table of every legitimate indirect call to prevent kernel exploits from making indirect calls that weren't supposed to be done; so while I could turn this off, I didn't, it's a rather useful mitigation

whitequark,
@whitequark@mastodon.social avatar

i don't often worry about running out of RAM on this laptop but when i do it's usually because of Android

ShinyQuagsire,
@ShinyQuagsire@mastodon.social avatar

@whitequark I was disappointed the Rosetta-on-Ubuntu thing didn't work for the Android build process (somehow, but lol not surprised), bc my MacBook is the first machine I've had w/ 64GiB :(

whitequark,
@whitequark@mastodon.social avatar

i love seeing "TypeError: cannot use a string pattern on a bytes-like object" at the end of a 15 minute long process that I can't restart except from the beginning

whitequark,
@whitequark@mastodon.social avatar

also the backtrace points entirely into an ELF executable with embedded Python code inside

whitequark,
@whitequark@mastodon.social avatar

as far as i can tell this is just a bug in otatools, let's see if i can rebuild it...

whitequark,
@whitequark@mastodon.social avatar

is hit by a sudden realization

the "brunch" alias in the build system does the same thing as "breakfast" + "lunch"

whitequark,
@whitequark@mastodon.social avatar

you run "breakfast" and the build system responds to you with "regenerating globs shard 1/990". i do not want globs in my breakfast!

whitequark,
@whitequark@mastodon.social avatar

2023-12-27 11:03:27 - add_img_to_target_files.py - INFO : done.

holy shit it's done!! IT'S DONE!!!!

let's see if it flashes and boots

mxk,
@mxk@hachyderm.io avatar

@whitequark all fingers crossed, and don't get too nervous, when ART takes 10 minutes to do the compilation 😋

whitequark,
@whitequark@mastodon.social avatar

... the standard lineageos recovery allows installing ota updates without a valid signature? this seems... wrong

whitequark,
@whitequark@mastodon.social avatar

astonishingly, the firmware i just built not only boots and functions, but it even has Verified Boot with my own keys in it working; I relocked the bootloader and it's now in the YELLOW status (as it should be)

gd2,
@gd2@chaos.social avatar

@whitequark Could you share your patches for that? I'd like to sanity check that my attempts to enable dm-verity actually do anything 😅

whitequark,
@whitequark@mastodon.social avatar

@gd2 yeah in a bit

whitequark,
@whitequark@mastodon.social avatar
Di4na,
@Di4na@hachyderm.io avatar

@whitequark i still think that we, as a field, have never invested enough in build systems. Even less build systems and compilers adapted to infrastructure projects like the linux kernel, android, c compilers themselves, virtual machines and interpreters like ghc, beam or various jvm, etc

It always feel like we are still in the 80s and using the same tools. And the only people trying to "work on it" generate... Well. points to Bazel and Nix

Di4na,
@Di4na@hachyderm.io avatar

@whitequark and don't even start me on the lack of observability and debuggability of build systems.

I have to frigging patch make heavily just to get a graph of the targets that ran. And then run a broken, unmaintained, massive python script on top of it to get something useable. And then use a function tracing graph visualizer to observe it, not adapted to what I need but far better than anything else than exist.

Screams into the void

Di4na,
@Di4na@hachyderm.io avatar

@whitequark and i would love to work on it, i know some of the problem enough and i have some ideas we could experiment with.

But no-one will ever fund me. We already got lucky that Mozilla, of all improbable one, funded Rust for a decade to the point it became useable before firing everyone.

Otherwise even our compilers would still be in the 80s.

Di4na,
@Di4na@hachyderm.io avatar

@whitequark We need an intervention at the infra level with a 10 to 20 years vision quickly. It would not even be that expensive. Like 10M per year divided over 10 to 20 projects for 10 years would probably double productivity in software. If not also purely eliminate most of our security problems and reduce the entry cost of building a good software product.

But nah. Let's just build another chat app

Di4na,
@Di4na@hachyderm.io avatar

@whitequark do you mind if I use your thread about rebuilding Android as a starting point and example for a blogpost? Basically just a rant on how broken it is as shown here, how it costs so much hours especially to FOSS weekend warriors and how we need help for it instead of random "we need to know who you are" infosec supply chain stuff?

whitequark,
@whitequark@mastodon.social avatar

@Di4na sure

Di4na,
@Di4na@hachyderm.io avatar

@whitequark thanks

mxk,
@mxk@hachyderm.io avatar

@whitequark I like python, but the conversions between string and byte are really one of the parts that got me smashing my head pretty often.

whitequark,
@whitequark@mastodon.social avatar

@mxk I'm not sure what's so difficult about them. are you holding an implicit assumption that random byte sequences are valid text?

mxk,
@mxk@hachyderm.io avatar

@whitequark some silly language invented by Kernighan and Ritchie placed this mind bug in my brain...

cvtsi2sd,
@cvtsi2sd@hachyderm.io avatar

@whitequark wow it's like building LLVM on steroids... I was like "I didn't ever think I'd get to thrashing on a machine with 32 GB of RAM, yet here we are"

whitequark,
@whitequark@mastodon.social avatar

@cvtsi2sd YEP

cvtsi2sd,
@cvtsi2sd@hachyderm.io avatar

@whitequark the urge to say "hey lld don't sweat it too much, I'm OK just with compile time optimizations" but then I fear it would be sad to be sidelined and just left to copy bytes around.

whitequark,
@whitequark@mastodon.social avatar

@cvtsi2sd unfortunately it's necessary, android uses control flow integrity in a way that requires the use of LTO :(

tedmielczarek,
@tedmielczarek@mastodon.social avatar

@whitequark I assume the vendors basically just pay Google to do this work because otherwise how would anyone ship a working device?

mxk,
@mxk@hachyderm.io avatar

@tedmielczarek @whitequark it definitely gets easier, the moment you become a Google partner and get their support.
Besides, this whole mess is a good motivation, to change as little as possible, given that everything else will lead to unimaginable pain.

tedmielczarek,
@tedmielczarek@mastodon.social avatar

@mxk @whitequark yeah, I understand the motivation. Much like innumerable other architectural changes I've seen in other software projects—even when well-intentioned, they can have huge knock-on effects in the ecosystem.

mxk,
@mxk@hachyderm.io avatar

@tedmielczarek @whitequark I still hope, Google eventually replaces Linux with Fuchsia under Androids hood, making every single vendor modification obsolete 😬.

mxk,
@mxk@hachyderm.io avatar

@whitequark understanding Android is a full-time job.

petrillic,
@petrillic@hachyderm.io avatar

@whitequark think of it as your contribution to someone’s promo packet

whitequark,
@whitequark@mastodon.social avatar

@petrillic lolsob

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • everett
  • Youngstown
  • khanakhh
  • slotface
  • Durango
  • kavyap
  • InstantRegret
  • thenastyranch
  • JUstTest
  • osvaldo12
  • GTA5RPClips
  • modclub
  • cisconetworking
  • provamag3
  • normalnudes
  • ngwrru68w68
  • tacticalgear
  • tester
  • megavids
  • anitta
  • Leos
  • lostlight
  • All magazines