06:07
<
Miyu-saki >
Hiii, I'm back, with a personal question this time. \o
06:10
<
Miyu-saki >
How do I have a rooted device?
06:16
<
Miyu-saki >
Rather, how do I build an image with root?
06:17
<
Miyu-saki >
Oh, I guess I can just sideload it through recovery
06:18
<
Miyu-saki >
"it" being Magisk.
06:38
<
samueldr >
though I remembered it was about rooting too, but it is not
06:38
<
samueldr >
I also didn't remember that someone answered with possible clues to build it into the ro
06:44
<
Miyu-saki >
Yep! I'll try to integrate that if I do find the time to.
06:44
<
Miyu-saki >
One other thing. How do you install LineageOS? Is boot.img + OTA all I need?
06:45
<
samueldr >
I don't exactly know!
06:45
<
samueldr >
I would assume the ota zip is enough by itself
06:45
<
samueldr >
I mean, that's what I know, but if you're asking maybe there is an issue?
06:45
<
samueldr >
ah, yes, boot.img for a way to do the initial adb sideload
06:46
<
samueldr >
those instructions are more for AOSP on pixel devices though AFAIK
06:47
<
samueldr >
(the 7 and 8 shouldn't have any differences that matter for the general instructions)
06:47
<
Miyu-saki >
Right. I'm flashing with boot.img + OTA right now. Hope that's all I have to do!
06:47
<
samueldr >
I don't know if with robotnix you get the custom recovery though
06:48
<
samueldr >
>> In some cases slot b can be unpopulated or contain much older firmware than slot a, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of slot a to slot b. This step is NOT optional.
06:48
<
samueldr >
ah, so it's not a motorola-only issue
06:48
<
samueldr >
interesting
06:49
<
Miyu-saki >
Yep, I was reading up on this last night too. Seems like it also happens on Sony/pioneer.
06:49
<
Miyu-saki >
Though, what exactly does hard-brick mean here?
06:49
<
samueldr >
hard brick in theory should mean it's irrecoverable
06:49
<
samueldr >
it won't boot anything useful
06:50
<
samueldr >
that's what bricked once meant
06:50
<
samueldr >
and it seems "hard bricked" now is slowly meaning what "bricked" now means
06:50
<
samueldr >
but if you see hard bricked, assume that it means completely unable to boot anything anymore
06:50
<
Miyu-saki >
Yeah, it's a bit interesting too because etymology-wise, it's called a brick because it's as useful as a brick kinda thing lol.
06:51
<
samueldr >
for oneplus, though, hard bricks
*should* be fixable by the end users, unverified what's the status with oneplus 8
06:51
<
Miyu-saki >
Or rather, it's functionally a brick.
06:51
<
samueldr >
oh, interesting, I think that bit must be part of their A/B termplate
06:51
<
samueldr >
template*
06:51
<
Miyu-saki >
Thanks. I'm like, not really familiar with the Android booting process.
06:53
<
samueldr >
basically, it goes this way: SoC boot rom verifies and boots the firmware. In recent android devices it's XBL, a minimal EFI implementation
06:53
<
samueldr >
XBL then starts ABL, an EFI implementation of aboot
06:53
<
samueldr >
before XBL existed, the firmware was something more bespoke, and loaded aboot
06:54
<
samueldr >
aboot (and ABL) loads the kernel from the boot partition, and also implements the fastboot protocol bits
06:54
<
samueldr >
ABL and aboot are also verified
06:54
<
samueldr >
so bricking generally happens when either the firmware (e.g. XBL) or the bootloader (aboot, ABL) either does not verify, or is bad
06:55
<
samueldr >
when this happens, generally the device is toast...
06:55
<
samueldr >
except for EDL mode on qualcomm devices, there are equivalents with mediatek and spreadtrum
06:55
<
samueldr >
EDL mode stands for emergency download
06:56
<
samueldr >
except, this requires a signed (by the vendor) program to boot something
06:56
<
samueldr >
and generally vendors do not publish those programs
06:56
<
Miyu-saki >
Oh that's actually pretty cursed, and firmware is writable by your vendor through updates, right?
06:56
<
samueldr >
what happens when A/B is empty
06:56
<
samueldr >
well, when B is empty
06:56
<
samueldr >
is that there is no XBL, no ABL!
06:56
<
samueldr >
in theory the bootrom is supposed to switch back ot A
06:57
<
samueldr >
except it's been shown to not do that
06:57
<
samueldr >
at least, for some vendors
06:57
<
Miyu-saki >
Right, so partition selecting happens very early
06:57
<
samueldr >
yes, this allows shipping updates in a safe fashion
06:57
<
samueldr >
*assuming it can recover at the earliest part!
06:58
<
samueldr >
but I guess they never tested the case where A/B users got a fresh device,
*never* ran an update, then switched slots!
06:58
<
Miyu-saki >
Yep. So theoretically, the first-stage bootloader should also realize that XBL/ABL is empty, and select the other partition
06:58
<
samueldr >
that's the basic idea
06:58
<
Miyu-saki >
But not all(any?) devices do this
06:59
<
samueldr >
you got the (any?) right!
06:59
<
samueldr >
at least verified that motorola-def will fail that way
06:59
<
samueldr >
though, luckily, motorola implemented something custom to recover their devices
06:59
<
samueldr >
so that user (not using robotnix) was able to restore their devices to working
07:00
<
Miyu-saki >
First thing I disable on any new device is to disable the system update lol. I should keep this in mind.
07:44
<
Miyu-saki >
Moment of truth in a few minutes.
07:45
<
Miyu-saki >
I added a patch to my kernel
07:45
<
Miyu-saki >
I'd be like
07:45
<
Miyu-saki >
very happy
07:49
<
Miyu-saki >
Welps, it didn't work. I'm pretty sure I patched the wrong file though.
13:39
<
Miyu-saki >
Yep, it works now!
17:19
mcint has quit [*.net *.split]
17:19
mcint has joined #robotnix
17:24
colemickens has quit [Ping timeout: 240 seconds]
17:25
danielrf[m] has quit [Ping timeout: 260 seconds]
18:47
colemickens has joined #robotnix
18:50
danielrf[m] has joined #robotnix
19:31
<
Miyu-saki >
Does signing work with LineageOS?
19:35
<
danielrf[m] >
Miyu-saki: Yep. It should work
19:35
<
Miyu-saki >
Thanks. I'm testing something rn, and wondering if it'd refuse to boot if I unpack and repack boot.img.
19:36
<
ajs124 >
If you haven't re-locked the device, fastboot boot basically always works, in my experience.
19:45
<
Miyu-saki >
Oh okay, thanks.
20:10
<
Miyu-saki >
Uhh, I need an opinion here.
20:10
<
Miyu-saki >
On recovery mode, it presents itself as /dev/.../modem_a and /dev/.../modem_b.
20:10
<
Miyu-saki >
Should I change the fstab do reflect that?
20:11
<
danielrf[m] >
I don't believe so
20:12
<
danielrf[m] >
I'd expect there is some mechanism that provides the partitions corresponding to the slot you are currently in.
20:13
<
Miyu-saki >
Right. Turns out we were looking at the wrong directory.
20:26
<
samueldr >
yeah, under /dev/block/bootdevice links are made for the correct slot
20:26
<
samueldr >
active slot*
20:27
<
samueldr >
but IIRC that's only done by android's thing that does what udev does... so don't go looking for it in a non-android system
20:29
<
Miyu-saki >
Right, thanks. Both slots are visible, and contain the firmware, so we're kinda ??? right now.
20:29
<
Miyu-saki >
s/visible/mountable/
20:29
<
Miyu-saki >
Maybe it's something else which is preventing it to mount?
20:39
<
samueldr >
you'd need to look at the logs to know, I guess
20:39
<
samueldr >
one thing to consider is that maybe this is not a robotnix issue, but outright LineageOS 18.1 still being in development
22:27
<
Miyu-saki >
Finally got binfmt_misc to work.
22:28
<
Miyu-saki >
@s9lavender:/ # hello
22:28
<
Miyu-saki >
Hello, world!
22:28
<
Miyu-saki >
lavender:/ # file $(which hello)
22:28
<
Miyu-saki >
/system/xbin/hello: ELF executable, 64-bit LSB x86-64, static, not stripped
22:28
<
Miyu-saki >
Time to run steam on my phone (unironically)
22:34
<
Miyu-saki >
Thanks! I appreciate the links.
22:35
<
Miyu-saki >
Though, that aside. I actually really wanted to compile a custom kernel for my phone for more productivity tasks (e.g. NixOS container, instead of just using a chroot), and robotnix makes that so easy, so I'm pretty glad.