OK, so welcome Oliver, as I said, installing stuff and all the reviewers know first impressions
count.
So whether you have a nice installer or not will make or break your review of the Linux
phone.
So welcome Oliver.
Thank you.
Yeah, so this is called ONDEV2, I'm Oliver Smith.
And as you can see from the number, that's probably also our first version, right?
So I'm going to tell the story of that a bit.
It started with the Pine phone, post marketer as community edition, where we figured, well,
it would be nice if when you bought the phone and you had post marketer pre-installed, that
there would, you would be able to encrypt it actually.
So it's not just installed, but you can encrypt it like a proper phone, yeah.
And that's how the idea for the ONDEV2 installer was born.
It looks like this, yeah, basically a simple UI, you press your continue button at the
welcome page, then you put in a password, a pin for the user, and you can select whether
you want full disk encryption or not.
And that's that.
After we released that, an additional feature came, which is that you can select whether
you want to install to the EMMC from the SD card.
So if you already have a Pine phone where something else is installed or post marketer
as is broken or whatever, then you can just take an SD card, put the ONDEV2 installer
on it, and then you will see this prompt here.
And it asks you, do you want to install to the SD card itself, which works after some
complicated stuff.
And you can also install to the EMMC and override stuff there.
That's what it can do, basically, and this is our cross-district project, so not only
post marketer is using this, but also Mobian.
Looks like this, Mobian already did a talk.
And yeah, they boosted the fund a bit, but it's basically the same.
And they also added that you can choose the file system, which is quite nice.
So I thought to myself, well, it's good that we have this, and it works for what it does,
and it was good as an initial version.
But what would be the perfect version of this, right?
And a lot of people tried this out, and they figured, well, it would be nice if they had
more options, like being able to select a file system or the host name, or what have
you like 100 options like you have in a desktop Linux installer.
And other people were like, well, it's too much options already.
What is this SSH user, which we also removed?
There was a separate user which you could set up.
And so it's a bit conflicting, and it was hard to figure out what would be the perfect
version, right?
And besides that, there would also be, it would be necessary to choose the language and
locale, and it would be nice if it was adaptive, so it doesn't look like a letterbox like this
when you run it on a laptop, which is the case with the first one.
Yeah, and also it would be nice if there was the same keyboard, because the keyboard was
entirely different, and also there was another keyboard in the unlock application, and then
another one when you finally have it installed, so you had three keyboards, which is not
very consistent.
So my plan was to add a simple and advanced mode, so you could deal with that some people
want more options, some people want less options, so the casual users can just go to the simple
installation and have the least questions asked that you need to get it running.
And the advanced mode would be for the nerds, where you can pick everything and have it
encrypted or not, and choose separate passwords if you want, and so on.
Yeah, so I went ahead.
This is the decision tree, which you would have for the simple and advanced mode.
This is the simple path, so it goes through welcome, then you choose your language and
locale, then it asks you simple or advanced, then you say simple, and then you choose the
installation storage if it's possible with your device, and then you would set up one
combined password for full disk encryption and for the user, and it wouldn't even ask
you if you want to encrypt it, because it's just assumed, okay, that's the right thing
to do for normal people who don't care, and then it's ready to install.
And then we have the advanced path, which is more complicated.
You get asked for the storage device, then you can pick the file system, the host name,
the username, and maybe lots of more options we can add later, and you will set the user
password, then it asks you do you want full disk encryption or not, and then it asks you
do you want to use the same password or not.
In the current installer, it didn't work like this, you had to type in the same password
again if you wanted the same password, and that's not very optimal under the tiny phone
screen, you know.
So yeah, after that, you're ready to install.
So as you can see, this is a nightmare of choices, and yeah, it would need a lot of
testing, you would need to test all the code paths every time, and to make this feasible,
it needs to be automated.
And this was not possible with the current code stack.
So I looked elsewhere, so first here's a slide.
We need short test cycles, CI for all paths, and it should be easy to extend that it's
not much effort to add a new option if it's where it makes sense, right?
Of course the idea is not to add endless options that don't make sense at all, but some of
them are really useful for users.
So I looked around and figured what code I could use for the stack, and I found this
nice application.
This is called Unlocker by Johannes Marbach, and it's a replacement for OSK SDL, which
is the unlocking application you use to type in your password after you have installed it.
And yeah, the nice thing about it is it can use the keyboard layout from Fosch, so that's
already pretty consistent then.
And it's very small, it's based on LVGL, yeah, it has a dark mode, and you can, it's
actually adaptive like this, so lots of great potential here.
So I based on Dev2 on this, and behold, on the next slide you will see what it looks
like, looks like this, yeah, it's still like similar format, you will see some description,
and then you, in this case, you select the language and then continue, and then you,
like here are a few example screens which it has, here you can pick whether you want
a simple installation or advanced installation, and where you want to install it on your EMMC
or SD, and here is, here you would set a combined password.
I know the visibility icon is a bit blown up, this needs to be fixed, but that's the
current state, yeah, and here it asks you if you want to use the same password or not,
so basically what I showed in the decision tree earlier.
Meanwhile, while it's displaying all these dialogues, you will see on the serial output
that there's a text interface, and this is useful because, well, it's kind of nice that
you can also type in the answers on your keyboard, but it has some practical use, it can be
used for accessibility when we hook it up with some text-to-speech and speech-to-text
stuff, and then you could actually talk your way through the installation, and it's of
course very useful for testing, because then we can, yeah, just run through the whole thing
in an expect script, and that's, so there's one line which would interact with this dialogue
and there's a function button, and it waits for a page with the title Advanced Options,
then it looks for a button called Simple Installation, and it has to be the first one, all based
on the text output above, and it presses it, and if the dialogue doesn't show up, then
it runs into a timeout and the test fails, and so as you can see, we can add new tests
and extend the tests really easily, that was the goal, that it's super easy to test the
whole thing.
It comes next, yeah, some, oh yeah, the code.
So this is what the code looks like for this Advanced Options page, the idea was to make
it very small, and I believe I've accomplished that, so you set the title, the description,
it can be translated, that's why there's this T around it, and you set the buttons,
and that's how you would add a new page like this, and you don't need to add some XML
file with the layout, or what have you, yeah, so that's quite short, and this is the button
handling, it's also not complicated, you don't need to read it now, but basically it's, that's
my point, that it's easy to extend, okay, and then we have the current state, so it's
still work in progress, what's done is, it runs entirely in the inner drumFS, which was
not the case before, so this is also nice because it saves like 100 megabyte or so
of overhead, there are these abstractions for pages, for installation steps, which also
need to be extended, and I just showed you the decision tree, but that's only the front
end, the back end of course needs to handle all these decisions also, and needs to react
based on what you chose there, test cases are there already for installing from SD to
SD, from SD to EMMC, and these are just examples, we could also add NVME of course, and what
other installation mediums you have, but it's, I think it's useful for the user to be able
to see okay, this is DSD card, and not this is some DEF, MMC, BRK, zero, or what have
you for the normal user, so they know where they are going to install it, so I just called
it SD and setup partner config, and yeah, the test run with LO setup or QMU, you can
use LO setup to run it on your own laptop, and this is, this gives you the fastest test
iteration cycle, you can also run it in QMU, so it, you make sure that you have all the
files in the inner drumFS actually, and that it works after rebooting, that you can properly
boot into the own OS, and so this is the more complete test, and with LO setup I actually
rebooted my own PC once, so you need to look out for that if you run it next to your regular
operating system.
To do what's needed to replace the first on-device installer is some more testing, fix some fix-me's,
and the usual stuff properly integrated into post-market address at least, so yeah, I would
be happy if Mobian also wants to use this, and other distributions are, and we have so
many distributions out there, yeah, but post-market this is probably the first test case because
this was developed in tandem with it, and for the next level, this is the really exciting
stuff, so when once it works and replaces the current one, we could actually support
more devices, Android devices, Chrome OS devices, because for them you can just install it on
the whole storage device, you have to keep in mind that there are already partitions,
and you need to use them in some way, and what's nice is we could download the OS images
with Wi-Fi, so you would only flash this very tiny installer to your SD card, put it up,
and then you could pick any OS image and download it, and you wouldn't need to create a new
SD card every time, and it would be much faster than when you have to flash this whole image
every time, and yeah, even better, we could also construct the OS images on the fly with
the package manager, which is APK in the case of post-market address Alpine, and then we
might be able to get rid of some of the OS images because it takes quite some resources,
resources to generate them every time, so this would be nice also, and yeah, that's
what's the end of my presentation, thanks to all these people who helped out making
this possible, and thank you for listening, of course.
Yes, that's the plan to use Unlocker to replace OSK SDL also, and that's quite far, I believe,
there were some bugs with some very few phones, this is why we didn't roll it out before,
but it should be there sometime soon, yeah.
Any more questions?
Yeah?
Yeah, you could flash the on-device installer to the place where you would install the operating
system, and from there it can expand itself into the installation, so this works by, you
have first the boot partition, then you have a lot of empty space where you will put the
installation, and then you have the on-device installer, and it partitions, it uses the
empty space and creates the look script setup device there, and then shafts the data from
the third partition in there, and then deletes us the third partition and expands it, and
that's how it also currently works.
That's already implemented in the first version already, so, and the second version can do
that too.
Yeah?
I didn't look, but I would expect, I mean, it's AVGL, it's super tiny, maybe 50 megabytes
or 100, it's tiny, really.
You can compile the whole UI thing in like a second or so, so it's really, it's also
fun to develop with this, yeah.
I have a question if there's no more, because it's distro-independent, so what's the way
to handle distro-specific things like configuring repository sources or set different ways to
set host names on different distros, things like that?
Good question.
So that's our config file, and there's actually some distro-specific parts inside the main
repository upstream, and they are separated in a different directory, and there you have
a directory structure for all the operating systems, and my idea is that we test them
in CI all the time, so we ensure that they don't break, so when you make one change that
it still works in all the other distros.
And you have a separate config file, and you can run your own code, there are some hooks,
for example, after you're done with installing and you want to regenerate the, in the drum
of s, then you can put the commands for that in a shell script and run that after the installation.
Okay, cool.
Thank you.
Okay.
No more questions?
Okay.
So thank you very much.
All the best.
Okay.
Thank you very much, Oliver.