 Hello everybody. I'm going to talk about modern Linux environment and mobile devices today and before I start I have a few questions. First is who has heard of post-marketOS before? Nice, that's about half the room. Who has installed it before on that device? This is also quite a bunch of people. And who has used post-marketOS to call the pizza delivery guy? Okay, it's no one. I expected this because post-marketOS is experimental actually. It's only meant to be used by developers and please don't expect the following things to work on your device right now. So phone calls, text included, the main icon, accelerated graphics and plasma mobile will likely not work on your own device. Also, there are no updates for closed source somewhere Blocks, which is a problem in general because after the two years of support from the renderments out we won't get new versions of the programs running on the cellular modem and on the lifetime modem. So the security issues there won't be fixed. And we have two ideas to fix this. The first one is just replacing the closed source blocks with free software for example, OtmicomDB. And the other idea is just finally patching the blocks with programs like Nexma. So for the first idea with replacing the codes with free software, we have a whole load code if you want to read it. And I will put a link at the end of the talk. So why do we go through all this trouble? What's wrong with Android? I have a few points there. First of all, Android Open Source Project, AOSP is developed behind closed curtains so they only publish the source code together with the binary release. That of course makes it hard to afford the code because whenever you need to rebase you can only rebase after they release the code and then you always run behind. And of course the stock Android version you can use has proprietary components. That's not so nice. And I have a whole list of points here. One important thing is you have a lot of tracking in the default setup. So I experienced this myself because I installed the stock Android lately and it took me about half an hour to go through all the settings and disable all the permissions. And there was something particularly nasty because I was in the permissions menu and I disabled everything like access to contacts and storage and microphone and everything. And then I went to the upper menu and noticed another point saying modify system settings. And some apps which were installed by default had this enabled by default. And this meant everything I said in the earlier menu just was reset instantly. So I went back and checked it and it's really not user friendly. So I had to turn this setting off as well and then go back to the permissions and then turn off everything again. And only after that it seemed like it was disabled. So they are really trying to get all this access and they are not really caring about the users it seems. Same as for the for the app shots. There are a lot of applications in there that are just trying to display your advertisements all the time. For example there are games where you have to tap the screen and when you lose the game they show a big advertisement right in the spot where you need to tap the screen. So you tap it again and it opens in your browser and the vendor of the game gains some money and you are just frustrated but you keep on playing because it's addictive. So I'm comparing this to desktop Linux distributions and you won't find any of that there. So that's my standard basically. And as I said I have a whole list here. A big point is you only have three years of support and that's the maximum. Oftentimes you don't have as much support and yeah of course the security issues for example stage fright and one billion devices is vulnerable at least. And you won't see any purchase for that. So yeah let's move on. There is Android replicant, LineageOS and Hayum of course. And I think these are excellent projects but they only fix the symptoms and not the root cause. And they will always have this upper battle whenever they rebase it takes time and everything. Here's a screenshot from the LineageOS I think you've pronounced it. GitHub project and you can see that I have almost 2,000 repositories and 96 people maintaining those. And this isn't really possible so what happens is you have all these counter repositories for example because each device has their own counter repository from the vendor originally and they all have security issues. So that's not so nice. This is not sustainable and as I said desktop LineageOS distributions don't have these problems. So let's plan the LineageOS distribution to replace Android. How do we do that? Well first of all we need to install a lot of packages on the LineageOS distribution from where we want to install to the phone and it turns out of course on LineageOS distributions the packages have different names so it's not really you can't really make a step-by-step guide that works on every distribution and also the phones themselves they require different flashing applications and even if they have the same flashing application like fastboot for example you will sometimes need special vendor bytes that need to be sent to the device so all in all it's a big mess and there is no standard way to do it all. So what happened was a bunch of set-in shape scripts were written and eventually they turned it to the Python program P and bootstrap. Now what this program does is set up multiple change routes for building and flashing and it even uses a C-cache and this CCU and some clever hacks to make it fast and the flashing is abstracted with simple commands that work for all the devices. Also you have almost zero dependencies so you can just clone it from GitLab and get started. The only things you need is Python 3, OpenSSL and call details and this is almost installed in all Linux distributions and it's also easy to reset these change routes and of course then you can easily reproduce any issues you might have. So we better need a small distribution than if you are going to use change routes. Who knows which distribution we are using? Yeah, Amy? Yeah right, it's Alphan. And the base installation size of Alphan is just 6 megabytes so it's really small. Here's the step. You can use the smart literacy, busybox, OpenRC, ADK and Abel and the ADK from Alphan is not the same as from Android of course it's a bit confusing maybe. And they have stable and rolling releases also which is very useful because on your phone you don't want to have rolling release all the time but then maybe your alarm clock doesn't work or something you want to have stable stuff eventually. And it turns out Plasma was not packaged when this decision was made but I'm here at the academy so I promise you we will have some pictures of running Plasma on it later. Alright here are the blog posts we have so these are basically the milestones to give you an idea of how the project developed and this is the first post it was called Amy for a 10 year life cycle for smartphones on the 26th of May 2017 we had two booting devices, one contributor that's yours truly and the limiter as kernels were used at this point. PM Bootstrike was released and we had Western running on five of our drivers so Western is the reference compositor for WayNet and we had it running without all the Android user-based drivers which almost all other projects at the time were using. Then 50 days later we had eight booting devices and another eight Vulkan Progress devices certain contributors the first non-Android device and the first one with Wi-Fi working it's the Samsung I-9070 this was done by Danieli de Bernalhi I hope I pronounced you right and we had our porting guide so it's allowed to quickly do new parts. Here's a photo of the first non-Android device it's a classic Nokia M900 from 2009 Q-Drive it's showing a console music player and this was done by Marcin Bram and he's also the guy who did a lot of the artwork I'm using in this presentation. So another 50 days later we had 70 booting devices 27 contributors and the first time we had Plasma Mobile and Tilden running actually so you know Plasma obviously and Tilden is the desktop which run on the device I just showed you, the M900 and at this point in time we were running both in QMU and also we had the Android Recovery zip supported, which you can see on the left and this was done by Attila Solosi and yeah, here's a short video of how Plasma looked like at the point so it's a bit buggy and the work for this was done by Bart Rivers and we had a lot of help from Buscha and Char also and we even were able to use KDE patches from Michael Pine who was for some reason developing patches to make a KDE Rhymer model and remember, I know there are a lot of glitches in there but ah hi, nice yeah we used your patches so we had 80 packages to get KDE working and this is a big number and I double checked it but really KDE is kind of big and right now we have about 100 packages next slide, here's the Nokia 900 again this time running the main app already or at least I found it pretty close to it it's 4.12 and the device originally came with our 2.6 or something in the corner so and this was done by this was built building on the work by Sebastian Reiche and Parvill Marcek and a lot of other counter hackers now the next post was for 390 days of post market OS, maybe you can see a better we had 42 booting devices 57 contributors and we had a lot of UIs running on actual fonts this time including Plasma Mobile, Nome, Hilden, Junior SUI Matae, Weston and XFCE4 and this was a collaboration between many developers as you can see from the date we kind of did this in the winter holidays because post market OS is our free time project so we had some time there and also there's a Christmas tree in the background of the project alright so here's how Plasma looked like Plasma Mobile on the Sony Xperia Z2 Tablet this was done by Drake Tatler and it's running close to mainline as well and the graphic stack is done with free Reno in the user space so again we don't need to use Android drivers we can use a free software user space implementation there the free Reno user space driver is mainly developed by Rob Clark and a lot of lightning hands also so I guess we like videos, there's another one this is showing Kirigami UI which is KDE's framework for responsive applications that look good on mobile as well on the desktop and here's Drake playing with some divorce as you can see here's the final blog post it was called one year of post market OS mainline calling and we had 84 booting devices, 106 contributors and we have the Nexus 5 using cellular modem from CLI on mainline here's the Nexus 5 on the left and it's running Firefox and we had a mainline guide so even people who don't really know about kernel hacking can now look at our wiki and they can figure out how they can get started with mainlining they're only ones and the idea of the guide is, of course, kernel hacking is not that easy but we have some experts like Drake who is willing to help if you ask him for help here's another photo running the 4.17 RC3 kernel on the Nexus 5 and this was done by a worker from Bushanshaw then continued by Jonathan Marek and also Drake Tedler had a lot and here you can see the cellular modem signal strength displayed in the platform mobile so as you can see we can talk to the cellular modem also without running any Android code in the user space which was a great achievement and here's even a phone call so underwrite this Android and on the left is post market OS and you can see it runs the terminal and executes our main script and as I said it's not really for the users at this point but it's making a call so it's pretty nice alright, I mentioned the skin bootstrap tool you might want to know how to use it as I mentioned the setup is pretty easy you just run git clone from the gitlab URL and you go into the folder and then you run the init script basically and it will ask you some questions like which device do you want to port and which UI do you want to have Plasma or something else and where do you want to store all the files and everything and then it's set up, that's everything so it's just three steps basically afterwards you can install a treasure to a phone typically this is done with these commands you run installed and it builds the whole root file system then you flash the kernel and finally the root file system on your device and you can also run it in QMU nowadays so you would install it again without full disk encryption and yeah, I didn't mention it yet it can use full disk encryption and we even have this body file but here you can disable it and then you try QMU and that's it it executes a whole QMU instance with most marketers running and you don't need to specify all the parameters as you usually need like where is the image and everything this all goes automatically now you might also wonder how you would modify and fill packages the packages are in the same git repository so you just use your favorite editor and start editing these package builds here's the one for Kaven from KDE and after you have modified it possibly change the sources then you will run the checks and commands so it doubles the sources again and refreshes the checks and basically and then you can build it also with one line we also have some variations for building so if you want to cross compile the package you would just say minus minus arch is arm hf and that's it and then it files out the cross compile and you can even specify a different source folder so if you have Kaven checked out locally and you want to do some peeling edge patches hacking on it you would use this syntax and you can of course combine those and then it builds one instance directly from your source tree so how does the build recipe look like? it's pretty similar to Arch Linux actually it looks like a lot of text but most of it is just some variables describing difficulties and a description and the actual build step is I'll just use few lines here to see my file basically and there's a package file and below are the checks and commands for some security so it's not that complicated it's really easy to contribute I think and you can even generate those with clean bootstrap if you want to alright, so yeah it fits on one slide obviously so it's really not much so thanks to all the contributors who brought this to you and thank you for listening everyone and please, if you have some questions feel free to ask them it's the end of the year and next year and what do we expect from last month or 20 to support more or less other regards to most of our work so the big picture is of course getting a daily driver working that you can use post-market OS on your device every day but as we are doing this in our free time we don't have a strict schedule so we work with whoever contributes and who has the time to do something and from KDE where Usan is already helping a lot I think maybe if more people try it out contributed more maybe developed some apps with Kirigami that's mostly it I think we had a ninth monopoly on the mainframe totally different area and this monopoly was then with IBM and the European Union forced IBM to open up the platform which lead them to clones and retouching other companies and now we have a similar situation with Android Android also is a monopoly in some areas and the EU now just put a fine on Google multi-billion fine because they are using this monopoly and I also see the aspect for the environment it's rather bad that you are actually forced to buy your phone in most cases before the two years because the two years typically is calculated from the day when they issue a phone and release a new phone but it's then produced for something like maybe 10 or 12 months and a lot of people can only afford the phones at the end of the life cycle so they will only have the patches for something like 12 months or so and it poses an increasing risk also on society people running unpatched phones and so I'm wondering if we should go for the political side and maybe again via the European Union to ask for these environmental reasons and for general security reasons and for business reasons of monopoly that if the companies decide to abandon the devices and don't support them anymore and don't provide especially security fixes that they are forced to open up the specification and maybe in some cases also open up the primary firmware so that we can learn from them to write on new free software and would that be helpful? Of course, yeah that's a good point maybe we can look into that this would be really great actually and I didn't know about the European Union complaining but it's right, it's a monopoly and I also think we need to do something about this this huge waste from the two years of support the best case would be if everything was open all the firmware then we could just patch it on our own so thank you OK also presentation also progress if also if you have some people coming to you wanting to do some kitagami application for the phone please send them our way we can also talk a bit about whether how and where send them but yeah, I would like to open that as a kitagami and second question would you recommend it also for somebody looking for an operating system often not necessarily a phone embedded kind of system? Yes, that's another popular thing you can do most marketer as you can just use it as your embedded device so you can transform your old phone into a Raspberry Pi with a lot of sensors basically if that's what you meant or also use it so you were saying if you would recommend it to put it on development board specifically here where you can do that of course much into that yes, but why not it should work yeah, the porting process is really easy, so even if you only have the vendor channel all the infrastructure is in place you just follow the porting guide and in that step I mentioned earlier you say I want a new device type in the name and then you can add the URL to the channel source code and then you have a new device package and then you can run it on your embedded devices right here so does the kivikami site have a homepage or where should we direct people ok, so basically the channel ok good to know Well, I have no question but just to say a big thank you for your efforts to liberate us from the Android thank you Do you guys have any update mechanisms in place for updated software update devices or is that something that you use for the software now? Well, we have the package manager so we don't have a fancy UI or something but basically you can go into the command line and say apk update upgrade and then you get the new packages and we have a script which you would need to call manually that all the updates come smoothly integrated for NJS Yeah, it's not really a normal update so you can just say it again? Yes, but I think that's a feature because if you have a whole system image then we can't really modify your system as much for example we support a bunch of your eyes and then we would need to provide a new system image for each device for each UI so that I have a lot of packages and very small device persistent parts We have time for one last question Other binary blocks which is inside Android is not only the web page and the one part but also for the binaries for the sensors Modern smartphones includes quite a lot of sensors like light sensor or verometer and so on and as far as I support quite a lot of those sensor binaries are also binary blocks Do you have some other problem from your project is doing also doing a walk-on or mutilating both sensors or limits on the foot market when it was in binaries I'm not sure, I understood everything So we are saying if we want to access all the sensors for the user space so well that's yeah why not as long as the support is there in the corner basically and we have maybe three software user space drivers then why not so I think that's sure I don't see why anybody would not want to have to see So for the Nexus 5 port we are actually using open source drivers for the sensors because we are basically using main line kernel and it already has support for the sensors present in the and HZ is already like on the main bridge and it will be a whole pretty much the open source between the end So there's far many devices like this that there are open source replacement for the binary blocks Yeah, but they are in like more up-to-date panels so we need to connect up-to-date panels to the customers Thanks, that's all Thank you all