[00:00.000 --> 00:13.800] OK, so welcome Oliver, as I said, installing stuff and all the reviewers know first impressions [00:13.800 --> 00:14.800] count. [00:14.800 --> 00:19.800] So whether you have a nice installer or not will make or break your review of the Linux [00:19.800 --> 00:20.800] phone. [00:20.800 --> 00:21.800] So welcome Oliver. [00:21.800 --> 00:22.800] Thank you. [00:22.800 --> 00:28.560] Yeah, so this is called ONDEV2, I'm Oliver Smith. [00:28.560 --> 00:32.240] And as you can see from the number, that's probably also our first version, right? [00:32.240 --> 00:35.160] So I'm going to tell the story of that a bit. [00:35.160 --> 00:40.080] It started with the Pine phone, post marketer as community edition, where we figured, well, [00:40.080 --> 00:45.080] it would be nice if when you bought the phone and you had post marketer pre-installed, that [00:45.080 --> 00:47.480] there would, you would be able to encrypt it actually. [00:47.480 --> 00:52.720] So it's not just installed, but you can encrypt it like a proper phone, yeah. [00:52.720 --> 00:56.120] And that's how the idea for the ONDEV2 installer was born. [00:56.120 --> 01:05.160] It looks like this, yeah, basically a simple UI, you press your continue button at the [01:05.160 --> 01:12.360] welcome page, then you put in a password, a pin for the user, and you can select whether [01:12.360 --> 01:15.680] you want full disk encryption or not. [01:15.680 --> 01:17.200] And that's that. [01:17.200 --> 01:21.760] After we released that, an additional feature came, which is that you can select whether [01:21.760 --> 01:26.240] you want to install to the EMMC from the SD card. [01:26.240 --> 01:30.880] So if you already have a Pine phone where something else is installed or post marketer [01:30.880 --> 01:36.720] as is broken or whatever, then you can just take an SD card, put the ONDEV2 installer [01:36.720 --> 01:39.760] on it, and then you will see this prompt here. [01:39.760 --> 01:45.440] And it asks you, do you want to install to the SD card itself, which works after some [01:45.440 --> 01:47.520] complicated stuff. [01:47.520 --> 01:52.520] And you can also install to the EMMC and override stuff there. [01:52.520 --> 01:56.560] That's what it can do, basically, and this is our cross-district project, so not only [01:56.560 --> 01:59.720] post marketer is using this, but also Mobian. [01:59.720 --> 02:03.320] Looks like this, Mobian already did a talk. [02:03.320 --> 02:07.080] And yeah, they boosted the fund a bit, but it's basically the same. [02:07.080 --> 02:11.920] And they also added that you can choose the file system, which is quite nice. [02:11.920 --> 02:17.240] So I thought to myself, well, it's good that we have this, and it works for what it does, [02:17.240 --> 02:19.120] and it was good as an initial version. [02:19.120 --> 02:22.360] But what would be the perfect version of this, right? [02:22.360 --> 02:26.160] And a lot of people tried this out, and they figured, well, it would be nice if they had [02:26.160 --> 02:31.200] more options, like being able to select a file system or the host name, or what have [02:31.200 --> 02:36.880] you like 100 options like you have in a desktop Linux installer. [02:36.880 --> 02:39.760] And other people were like, well, it's too much options already. [02:39.760 --> 02:42.160] What is this SSH user, which we also removed? [02:42.160 --> 02:44.520] There was a separate user which you could set up. [02:44.520 --> 02:49.360] And so it's a bit conflicting, and it was hard to figure out what would be the perfect [02:49.360 --> 02:51.200] version, right? [02:51.200 --> 02:56.520] And besides that, there would also be, it would be necessary to choose the language and [02:56.520 --> 03:03.360] locale, and it would be nice if it was adaptive, so it doesn't look like a letterbox like this [03:03.360 --> 03:08.040] when you run it on a laptop, which is the case with the first one. [03:08.040 --> 03:12.480] Yeah, and also it would be nice if there was the same keyboard, because the keyboard was [03:12.480 --> 03:17.040] entirely different, and also there was another keyboard in the unlock application, and then [03:17.040 --> 03:21.520] another one when you finally have it installed, so you had three keyboards, which is not [03:21.520 --> 03:23.080] very consistent. [03:23.080 --> 03:29.960] So my plan was to add a simple and advanced mode, so you could deal with that some people [03:29.960 --> 03:35.240] want more options, some people want less options, so the casual users can just go to the simple [03:35.240 --> 03:39.880] installation and have the least questions asked that you need to get it running. [03:39.880 --> 03:43.840] And the advanced mode would be for the nerds, where you can pick everything and have it [03:43.840 --> 03:48.760] encrypted or not, and choose separate passwords if you want, and so on. [03:48.760 --> 03:51.400] Yeah, so I went ahead. [03:51.400 --> 03:55.680] This is the decision tree, which you would have for the simple and advanced mode. [03:55.680 --> 04:00.440] This is the simple path, so it goes through welcome, then you choose your language and [04:00.440 --> 04:05.680] locale, then it asks you simple or advanced, then you say simple, and then you choose the [04:05.680 --> 04:10.440] installation storage if it's possible with your device, and then you would set up one [04:10.440 --> 04:16.000] combined password for full disk encryption and for the user, and it wouldn't even ask [04:16.000 --> 04:19.640] you if you want to encrypt it, because it's just assumed, okay, that's the right thing [04:19.640 --> 04:25.200] to do for normal people who don't care, and then it's ready to install. [04:25.200 --> 04:30.040] And then we have the advanced path, which is more complicated. [04:30.040 --> 04:34.360] You get asked for the storage device, then you can pick the file system, the host name, [04:34.360 --> 04:39.080] the username, and maybe lots of more options we can add later, and you will set the user [04:39.080 --> 04:43.320] password, then it asks you do you want full disk encryption or not, and then it asks you [04:43.320 --> 04:45.280] do you want to use the same password or not. [04:45.280 --> 04:50.320] In the current installer, it didn't work like this, you had to type in the same password [04:50.320 --> 04:54.000] again if you wanted the same password, and that's not very optimal under the tiny phone [04:54.000 --> 04:55.360] screen, you know. [04:55.360 --> 04:59.520] So yeah, after that, you're ready to install. [04:59.520 --> 05:05.600] So as you can see, this is a nightmare of choices, and yeah, it would need a lot of [05:05.600 --> 05:10.520] testing, you would need to test all the code paths every time, and to make this feasible, [05:10.520 --> 05:13.160] it needs to be automated. [05:13.160 --> 05:17.640] And this was not possible with the current code stack. [05:17.640 --> 05:22.160] So I looked elsewhere, so first here's a slide. [05:22.160 --> 05:26.200] We need short test cycles, CI for all paths, and it should be easy to extend that it's [05:26.200 --> 05:30.640] not much effort to add a new option if it's where it makes sense, right? [05:30.640 --> 05:34.200] Of course the idea is not to add endless options that don't make sense at all, but some of [05:34.200 --> 05:37.520] them are really useful for users. [05:37.520 --> 05:41.480] So I looked around and figured what code I could use for the stack, and I found this [05:41.480 --> 05:43.040] nice application. [05:43.040 --> 05:50.600] This is called Unlocker by Johannes Marbach, and it's a replacement for OSK SDL, which [05:50.600 --> 05:56.440] is the unlocking application you use to type in your password after you have installed it. [05:56.440 --> 06:01.440] And yeah, the nice thing about it is it can use the keyboard layout from Fosch, so that's [06:01.440 --> 06:04.080] already pretty consistent then. [06:04.080 --> 06:11.960] And it's very small, it's based on LVGL, yeah, it has a dark mode, and you can, it's [06:11.960 --> 06:17.000] actually adaptive like this, so lots of great potential here. [06:17.000 --> 06:22.680] So I based on Dev2 on this, and behold, on the next slide you will see what it looks [06:22.680 --> 06:30.560] like, looks like this, yeah, it's still like similar format, you will see some description, [06:30.560 --> 06:35.960] and then you, in this case, you select the language and then continue, and then you, [06:35.960 --> 06:40.480] like here are a few example screens which it has, here you can pick whether you want [06:40.480 --> 06:46.280] a simple installation or advanced installation, and where you want to install it on your EMMC [06:46.280 --> 06:51.400] or SD, and here is, here you would set a combined password. [06:51.400 --> 06:55.600] I know the visibility icon is a bit blown up, this needs to be fixed, but that's the [06:55.600 --> 07:00.440] current state, yeah, and here it asks you if you want to use the same password or not, [07:00.440 --> 07:04.280] so basically what I showed in the decision tree earlier. [07:04.280 --> 07:10.000] Meanwhile, while it's displaying all these dialogues, you will see on the serial output [07:10.000 --> 07:15.760] that there's a text interface, and this is useful because, well, it's kind of nice that [07:15.760 --> 07:20.960] you can also type in the answers on your keyboard, but it has some practical use, it can be [07:20.960 --> 07:25.560] used for accessibility when we hook it up with some text-to-speech and speech-to-text [07:25.560 --> 07:31.560] stuff, and then you could actually talk your way through the installation, and it's of [07:31.560 --> 07:38.640] course very useful for testing, because then we can, yeah, just run through the whole thing [07:38.640 --> 07:44.960] in an expect script, and that's, so there's one line which would interact with this dialogue [07:44.960 --> 07:52.000] and there's a function button, and it waits for a page with the title Advanced Options, [07:52.000 --> 07:56.200] then it looks for a button called Simple Installation, and it has to be the first one, all based [07:56.200 --> 08:02.240] on the text output above, and it presses it, and if the dialogue doesn't show up, then [08:02.240 --> 08:08.280] it runs into a timeout and the test fails, and so as you can see, we can add new tests [08:08.280 --> 08:12.280] and extend the tests really easily, that was the goal, that it's super easy to test the [08:12.280 --> 08:14.280] whole thing. [08:14.280 --> 08:20.120] It comes next, yeah, some, oh yeah, the code. [08:20.120 --> 08:25.040] So this is what the code looks like for this Advanced Options page, the idea was to make [08:25.040 --> 08:33.760] it very small, and I believe I've accomplished that, so you set the title, the description, [08:33.760 --> 08:38.600] it can be translated, that's why there's this T around it, and you set the buttons, [08:38.600 --> 08:45.000] and that's how you would add a new page like this, and you don't need to add some XML [08:45.000 --> 08:52.440] file with the layout, or what have you, yeah, so that's quite short, and this is the button [08:52.440 --> 08:57.120] handling, it's also not complicated, you don't need to read it now, but basically it's, that's [08:57.120 --> 09:05.240] my point, that it's easy to extend, okay, and then we have the current state, so it's [09:05.240 --> 09:10.280] still work in progress, what's done is, it runs entirely in the inner drumFS, which was [09:10.280 --> 09:14.760] not the case before, so this is also nice because it saves like 100 megabyte or so [09:14.760 --> 09:21.160] of overhead, there are these abstractions for pages, for installation steps, which also [09:21.160 --> 09:24.600] need to be extended, and I just showed you the decision tree, but that's only the front [09:24.600 --> 09:29.960] end, the back end of course needs to handle all these decisions also, and needs to react [09:29.960 --> 09:36.840] based on what you chose there, test cases are there already for installing from SD to [09:36.840 --> 09:42.360] SD, from SD to EMMC, and these are just examples, we could also add NVME of course, and what [09:42.360 --> 09:46.600] other installation mediums you have, but it's, I think it's useful for the user to be able [09:46.600 --> 09:52.320] to see okay, this is DSD card, and not this is some DEF, MMC, BRK, zero, or what have [09:52.320 --> 09:56.400] you for the normal user, so they know where they are going to install it, so I just called [09:56.400 --> 10:03.200] it SD and setup partner config, and yeah, the test run with LO setup or QMU, you can [10:03.200 --> 10:08.040] use LO setup to run it on your own laptop, and this is, this gives you the fastest test [10:08.040 --> 10:15.280] iteration cycle, you can also run it in QMU, so it, you make sure that you have all the [10:15.280 --> 10:19.680] files in the inner drumFS actually, and that it works after rebooting, that you can properly [10:19.680 --> 10:25.720] boot into the own OS, and so this is the more complete test, and with LO setup I actually [10:25.720 --> 10:31.240] rebooted my own PC once, so you need to look out for that if you run it next to your regular [10:31.240 --> 10:34.400] operating system. [10:34.400 --> 10:41.160] To do what's needed to replace the first on-device installer is some more testing, fix some fix-me's, [10:41.160 --> 10:49.120] and the usual stuff properly integrated into post-market address at least, so yeah, I would [10:49.120 --> 10:52.960] be happy if Mobian also wants to use this, and other distributions are, and we have so [10:52.960 --> 10:59.640] many distributions out there, yeah, but post-market this is probably the first test case because [10:59.640 --> 11:06.720] this was developed in tandem with it, and for the next level, this is the really exciting [11:06.720 --> 11:11.360] stuff, so when once it works and replaces the current one, we could actually support [11:11.360 --> 11:17.360] more devices, Android devices, Chrome OS devices, because for them you can just install it on [11:17.360 --> 11:23.920] the whole storage device, you have to keep in mind that there are already partitions, [11:23.920 --> 11:31.080] and you need to use them in some way, and what's nice is we could download the OS images [11:31.080 --> 11:37.600] with Wi-Fi, so you would only flash this very tiny installer to your SD card, put it up, [11:37.600 --> 11:43.120] and then you could pick any OS image and download it, and you wouldn't need to create a new [11:43.120 --> 11:48.840] SD card every time, and it would be much faster than when you have to flash this whole image [11:48.840 --> 11:54.440] every time, and yeah, even better, we could also construct the OS images on the fly with [11:54.440 --> 11:59.920] the package manager, which is APK in the case of post-market address Alpine, and then we [11:59.920 --> 12:04.400] might be able to get rid of some of the OS images because it takes quite some resources, [12:04.400 --> 12:12.480] resources to generate them every time, so this would be nice also, and yeah, that's [12:12.480 --> 12:17.560] what's the end of my presentation, thanks to all these people who helped out making [12:17.560 --> 12:43.760] this possible, and thank you for listening, of course. [12:43.760 --> 12:49.720] Yes, that's the plan to use Unlocker to replace OSK SDL also, and that's quite far, I believe, [12:49.720 --> 12:54.560] there were some bugs with some very few phones, this is why we didn't roll it out before, [12:54.560 --> 13:02.360] but it should be there sometime soon, yeah. [13:02.360 --> 13:03.360] Any more questions? [13:03.360 --> 13:04.360] Yeah? [13:04.360 --> 13:20.520] Yeah, you could flash the on-device installer to the place where you would install the operating [13:20.520 --> 13:26.680] system, and from there it can expand itself into the installation, so this works by, you [13:26.680 --> 13:29.920] have first the boot partition, then you have a lot of empty space where you will put the [13:29.920 --> 13:35.920] installation, and then you have the on-device installer, and it partitions, it uses the [13:35.920 --> 13:42.000] empty space and creates the look script setup device there, and then shafts the data from [13:42.000 --> 13:46.120] the third partition in there, and then deletes us the third partition and expands it, and [13:46.120 --> 13:50.560] that's how it also currently works. [13:50.560 --> 13:54.200] That's already implemented in the first version already, so, and the second version can do [13:54.200 --> 13:55.200] that too. [13:55.200 --> 14:00.200] Yeah? [14:00.200 --> 14:10.960] I didn't look, but I would expect, I mean, it's AVGL, it's super tiny, maybe 50 megabytes [14:10.960 --> 14:14.360] or 100, it's tiny, really. [14:14.360 --> 14:20.720] You can compile the whole UI thing in like a second or so, so it's really, it's also [14:20.720 --> 14:26.440] fun to develop with this, yeah. [14:26.440 --> 14:31.680] I have a question if there's no more, because it's distro-independent, so what's the way [14:31.680 --> 14:38.400] to handle distro-specific things like configuring repository sources or set different ways to [14:38.400 --> 14:41.440] set host names on different distros, things like that? [14:41.440 --> 14:42.440] Good question. [14:42.440 --> 14:48.040] So that's our config file, and there's actually some distro-specific parts inside the main [14:48.040 --> 14:53.440] repository upstream, and they are separated in a different directory, and there you have [14:53.440 --> 14:58.440] a directory structure for all the operating systems, and my idea is that we test them [14:58.440 --> 15:02.800] in CI all the time, so we ensure that they don't break, so when you make one change that [15:02.800 --> 15:05.160] it still works in all the other distros. [15:05.160 --> 15:09.760] And you have a separate config file, and you can run your own code, there are some hooks, [15:09.760 --> 15:13.520] for example, after you're done with installing and you want to regenerate the, in the drum [15:13.520 --> 15:19.520] of s, then you can put the commands for that in a shell script and run that after the installation. [15:19.520 --> 15:20.520] Okay, cool. [15:20.520 --> 15:21.520] Thank you. [15:21.520 --> 15:22.520] Okay. [15:22.520 --> 15:23.520] No more questions? [15:23.520 --> 15:24.520] Okay. [15:24.520 --> 15:25.520] So thank you very much. [15:25.520 --> 15:26.520] All the best. [15:26.520 --> 15:27.520] Okay. [15:27.520 --> 15:45.280] Thank you very much, Oliver.