Conversation

anyone looking for a christmas project? here's an idea...

once https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5920 is merged it won't be necessary have a fat32 boot partition for anymore, just a root partition.

this means that for a buuuunch of Android devices it would be super easy to install postmarketOS from a rooted Android install (e.g. lineageOS) just by

  • flashing the boot image + erasing dtbo
  • mounting the root partition image and cp -a'ing the whole thing to userdata
  • patch the UUID of the userdata partition to match the one in /etc/fstab using tune2fs, OR patching the cmdline (in the boot image) and the fstab to have the correct UUID

Then you can just run (from your rooted Android phone)

curl switch.pmos.org | sh

4
2
1

like to be clear you wouldn't even need to bother nuking the userdata partition, you can just extract the rootfs into it probably

though maybe you'd want to guide users to delete stuff after they reboot into the new install to save space.

for bonus points you could even copy all their photos/music/documents over :D

1
0
0

and yes we do own pmos.org, if you make this real we absolutely could host it there :D

1
0
0
@cas one caveat may be that rooted doesn't necessarily mean it's unlocked to boot arbitrary boot images, whether possible or not. This might require a bit of a think to help not put systems in awkward situations boot-wise.
1
0
0

@samueldr it would have to be based on an allow-list anyway so i don't think this is an issue in practise

2
0
0

@cas I am so tempted to make this now 😭

on the other hand... feels like every cool idea gets thrown at me while I'm trying to focus on mediaberry...

1
0
0

@hexaheximal hehe well if you get bored and have a free afternoon :P

0
0
0

@cas
You and I have very different definitions of "easy"!

Thanks for all the hard work on pmOS. It's something I keep checking on from time to time, as I lack the skills to do the what you can at that low of a hardware level.

1
0
0

@DefectiveWings well hey most of the people working on postmarketOS are not embedded developers. The majority of it is just packaging stuff and middleware (certainly no piece of cake, but usually easier to get into at least).

0
0
0

@cas that was considering "known unlockable devices". (Which is not a given with carrier-locked systems identifying the same as non-locked systems.)

It is possible to put some devices in a state where they won't boot to a useful system, which would be needed to be able to toggle OEM unlock, to then be able to unlock in fastboot. Even if the system can be unlocked. Some devices will not accept a fastboot flash if the device is locked, even for signed OEM images. Early boot with android systems is a mess... ugh...

So that's the “thinking about” I was thinking about.

1
0
0

@samueldr well to get into the weeds, my train of thought was

1. almost no modern devices can be rooted without unlocking the bootloader and modifying the boot partition. therefore
2. if pmOS can be installed, the bootloader can be unlocked. unless
3. on the extremely slim chance that some device winds up being supported where it is possible(??) that someone might root it without unlocking the bootloader, it would be trivial to check if the bootloader is unlocked as part of the scripts init/sanity check

so im not really worried

0
0
1

@cas I've only used postmarketOS as a user so feel free to correct me if it is not possible but Android has a feature called Dynamic System Upgrade(DSU) where you can easily run a GSI(or a non-generic system image) as a 2nd install on an unlocked system

The general user experience with that is pretty good - download a DSU manager like DSU Sideloader, flash the system image and it works(without losing your normal data or anything like that, and android handles the rest)

Is it somehow possible to move all the postmarketOS stuff to system.img and boot from a modified/unmodified android–bootable boot.img?

This will more or less allow users to "dual-boot" Android and Mobile Linux.

1
0
0

@sounddrill this isnt really possible since postmarketOS is a totally different OS, it cant be used with the vendor kernel or other android components

1
0
0

@cas what about a very, very, very minimal GSI android container that passes through everything he side to postmarketOS?

Though that sounds like a lot of work...

(wait, isn't that what halium tries to do but without the container? We've come full circle)

But yeah, gotcha. Thanks for the response

1
0
0
@cas @sounddrill I have some Lenovo a2016 and Honor 6 here. I guess that's too old to play with Termux?
0
0
0