 Hi Hector, how are you doing? Pretty good, thank you. Thank you for taking our time for this interview and for those who don't know, Hector Martin will be speaking at Academy. He is our keynote speaker and it is a great pleasure that he will be talking about his project, Asahi Linux. Hector, do you want to tell us a little bit about yourself so our audience would know who you are. I can talk a lot about you but it will be great if it comes from you. I am a longtime Linux and KDE user. I have been messing around with computers inside of 7 or something like that. I kind of developed a passion for reverse engineering and sort of weird systems. So I have been doing things like figuring out how to run your own software on lockdown platforms and porting Linux to things for a few years. So when Apple released the M1 series of machines, I thought, hey, why not get Linux running on them? I started the project and that is how I ended up here. That is amazing. Everybody has some story behind how they started. For example, I had interest in building stuff and that is how I figured out what was your question? What was your story? I don't know. Ever since I was really young I have been messing around with electronics. Not knowing how it works but pretending like I did. So when I got my parents they had computers around the house so I got the old computers so when I was like 7 I started programming and I got really into it and I started out with the usual application programming and that kind of stuff but when I got into microcontrollers that sort of got me into it was sort of like the Arduino before Arduino existed that sort of got me into the low level side of things and then I discovered game consoles and it turns out it's a lot of fun to figure out how to make your own software for game consoles when the manufacturer doesn't want you to so I kind of got dragged into that world and did a few things there and yeah that's kind of how I figured out that this is what I really enjoy just sort of figuring out how to tear open black boxes and see what's inside. That's amazing. So I was reading your profile that you are known for hacking multiple generations, the Wii and other devices so what do you like to discuss about that? I mean it was a team effort for one, it wasn't just me but I was one of the people involved so I actually got started with the PlayStation 2 and the Game Boy Advance the Game Boy Advance was the first game console that I owned that I tried writing my own software for so I wasn't like part of the team that did anything interesting on it, it was just like a user but that was kind of what got me started I think it was like a Tetris clone for the Game Boy Advance in C and you know there was like this horrible little parallel port cable you had to use to take download software into it and and then the PlayStation 2 I got more into the low level and I did some reverse engineering there it's still kind of on the sidelines right but then that's sort of when I decided that okay when the next game console comes I want to be part of the team that makes this happen and so that was the Wii and yeah I first started out reverse engineering the Wii remote control this is just Bluetooth so you can use it from Linux if you know how to talk to it and but then you know when there was a group of people actually working on running their own software on the Wii and they did a presentation I wasn't part of the team yet but I'm like oh okay this is interesting I should make friends with them and so eventually I ended up being part of the team and so I worked on releasing the first exploit for the Wii that was publicly released the Twilight Hack that let you run your own software like from an SD card and then the Homebrew Channel which is the sort of most you know most popular way of running your own software on the Wii and then after that there was more stuff for like taking over the boot loader and things like that and you know useful for recovering if you have a problem it was a very long thing it was several years of being a big part of that community and then you know we actually looking at other game consoles and so the PS3 used to be able to run Linux officially and then Sony apparently got scared about that and then like Sable did in the firmware upgrade and so we decided hey why not look into it and see if we can put it back in and we found some interesting bugs and security issues and so that was another interesting adventure and then after that it was also the Wii U and the PlayStation 4 and for the PlayStation 4 I kind of did something different because like for the Wii you could run Linux on it not very well though because it doesn't have a lot of RAM for the Wii U there was sort of a fundamental issue with the CPU that made it quite annoying to actually run a practical Linux on it it was a CPU bug that they didn't care for software like games but Linux does care and but then for the PS4 it's like well this is kind of a PC so instead of focusing on the actual running your own software part which other people were working on why don't you just focus on like seeing how well I can get Linux to run on it and so that was sort of my first like semi-serious I'd done Linux ports before that was like the first trying to get a lot of things working experience for me and we did get it to the point where you could run like Steam games full 3D and everything on the PlayStation 4 and Linux so that was a lot of fun so from your conversation I just got this that maybe you know you had a lot of interest in games so were you a gamer or it just happened to be that you had an interest in on the side I think I'm pretty average as far as playing games go like you know I I don't think I played more games than the average kid in my age I mean I still play games like Mario Kart and stuff like that I did enjoy the Zelda for the Switch a lot but but I'm not like you know a hardcore game or anything like that or like super into any particular series it's just not going to casual that's interesting so in your conversation you mentioned about Sony so on a little bit controversial topic I heard that Sony so do and other hackers as well so what was the story about it so we made it when we found those security flaws we gave a presentation at the Chaos Communication Congress just you know like from the security perspective explaining what we found and what the problems were we didn't really use any encryption keys because that's always controversial because you know they're like DMCA implications and because it's used for like you know protecting games it can be considered to be you know something that enables game piracy and then you know there's laws that get involved in that while sort of just you know describing security flaws is a very interesting so we did that and then like a week later a different person who was not involved with us released a bunch of keys by just applying our methods basically and then Sony sued everyone but the thing is they were very confused as it was actually happening because they thought we were all working together with that guy which we weren't and they also claimed we released the keys our presentation had like Shah hashes of the keys which is you know proof that we have the keys but not the actual keys it can't use it as the keys it's not the keys so they felt like they also just said that those were the keys which they weren't so yeah the lawsuit was very confused and I really liked the last sort of law they claimed we break was trespass like I guess we were trespassing our own playstation that we bought I don't know that was really weird because you know they start off with like computer fraud on abuse act, DMCA all the usual laws that you could kind of sort of see how they were going and then they ended with like trespass what but yeah thankfully nothing much happened to me from that some of my colleagues got more of a scare because of all yours got involved but we got help from the electronic frontier foundation to you know to sort of defend ourselves and figure out what's going on and in the end Sony dropped the lawsuit against us and set up with the other guys so yeah the whole thing was kind of haphazardly thrown together I think it didn't make a lot of sense but it was very scary for a few months while we figured all this out I was about to ask actually that you know if it was so scary for one moment did you think that okay I'm not going to go into this platform again I'm not hacking anymore game consoles um we did like lay low for a while while that was going on and we weren't sure but I mean honestly realistically the only thing Sony is going to achieve by like suing you know hackers is that people are going to stop using their name when releasing this kind of stuff right so like what's the point right I mean there's plenty of anonymous uh you know reverse engineers and hackers and stuff and you know we I use my name and you know because I generally don't think I'm doing anything wrong and I'm very much against empire C and and all that but I mean you know it's not very difficult to be an anonymous person on the internet so yeah so coming back to the new veteran playstation 4 and I hope that you have demonstrated at 33rd chaos communication congress so how was that experience the event and it was people accepted that you know it has been and what was the experience uh that I think all of our presentations were fun they all had their own interesting anecdotes so that one was fun because we had a few moments um one that a lot of people remember is that we were running PCI express over a serial port which is hilarious um but uh but yeah no that was that was pretty fun especially because I did that I did the actual entire presentation like on the ps4 like for the slides with the ps4 like I booted it up at the beginning right I started it up like it's like oh here's the ps4 me oh oops that was Linux right um here's the slides and and then we had a demo at the end uh with uh right just pulled up a game while we were doing the Q&A and just you know just played a bit so it was fun to sort of you know getting everything together like that and showing that like okay this actually works like you can actually just launch the next on this and get a game running and it's you know within the mutations of the hardware it's it's something you can actually use um however um I will say that that work was never upstreamed because it turns out that upstreaming work is a lot less fun and a lot more you know sort of work than doing the actual port in the beginning um and then the other problem with that is that you were still relying on exploits you're still relying on vulnerability that then in that case I was you know I was not uh sort of responsible for that I was just uh deferring to other people for it but still you know it's like okay they patched and then you can't use your Linux walks anymore right so um so you're still kind of in this cat and mouse game and that makes it less appealing because like the worst I get it's sort of you're doing all this work and fewer people can use it because you know it's only people who are really invested into it who would want to uh like take the downsides that come with like trying to stay on all firmware versions and that kind of thing um so that makes it less um you know motivating to to actually turn it into like a policy system and upstream everything into Linux kernel and all that because it's like well I'm going to do all that work but how many people are really going to use this right uh and that's what was very different with uh with the sake Linux so that's why I'm very happy about the project um I also read that you were the first person to write an open source driver for Microsoft Connect and this is something of course for you um it's now I'm talking about something now you're talking about open source because that's what where I come from so what was your experience and um how did you think about it that okay let's go to Microsoft Connect now obviously Sony is another company now comes Microsoft it was another funny anecdote there because um like Adafruit put out a bounty for um the first person to like hack Connect and make a driver for it and it was like a thousand dollars and then Microsoft like put out an official statement saying something like you know we are like against people hacking our hardware and we will you know it was something like you know we'll like uh prosecute to the extent of the law or something like that and and you know it was really funny because we're talking about writing a driver there's no hack like I mean there's hacking in this sort of you know like tinkering sense there's no like breaking cryptography there's no breaking security systems it's just a piece of hardware that plugs in via USB and you write a driver for it right there's not like there's no law being broken there there's nothing bad for Microsoft they just end up with people buying more connects right um doesn't make any sense but clearly the PR people at Microsoft who didn't do what they were doing so they put out that statement and Adafruit said oh is that how you're doing it okay two thousand dollars and then they put another statement that was kind of like back pedaling a little bit on that but not a lot and then Adafruit said three thousand dollars and then he's still putting out statements um but yeah no that that one was also pretty fun because um they um like the reason why the connect was interesting is because we had never had a 3d camera like that out in the market like at you know at a reasonable price and so a lot of people mostly and like um doing like image recognition type stuff or like user interface like input control type stuff or even uh accessibility um you know projects or robotics like all these people especially in um you know academic fields were interested in getting at the raw data from the sensor but Microsoft was only you know letting you use it with an Xbox and uh and yeah so there was you know a lot of interest from a lot of places on around that and the funny thing is that the connect actually came out later in Europe um so I was in Europe at the time and uh so the bounty came out like when the connect came out in the US and actually had a friend um in the US buy one and after a while managed to get me uh like logs of the communications between the connect and the Xbox uh and we had an issue with like we needed some hardware USB analyzer for that and it was like taking a while to ship and like you were kind of rushing um so that part was a team effort right and then when I got the when I got the log from my friend I just said okay I don't have the connect in front of me I'm just gonna look at the log and write a driver blind I'm just gonna write a driver and see you know like I'm I'm guessing this is how this works and I'm just gonna write the driver and um and so then I think the next day was the release day and so I stayed up all night writing the driver and then in the morning I rushed off to the to the supermarket and managed to get my hands on one and then I got home and then I just tried it and I think it worked after like one hour of messing with it and so I just like dumped it on GitHub and said have fun and like went to sleep and uh and then I woke up to like a lot of uh you know messages and emails and things and yeah that's interesting so you just mentioned that um you were doing all of the stuff in Europe and right now I know that you are in Japan so traveling everywhere and is it for work or is it for your own self I'm just talking a little bit now I'm just trying to talk non-technical as well um I ended up living in a bunch of different places I'm Spanish I was born in Spain but then I studied in the US for a few years and I moved back and then I was in Ireland um working for a while and then I moved to Japan um so I don't actually like super enjoy international travel especially over long distances because you know like planes are a hassle and all that um but uh but it's mostly been uh you know just uh just living or working um so right now I'm in Japan and uh yeah it looks like I'm gonna be staying here that's interesting so you like Japan for now yes yeah yeah I enjoy it here so coming now to I think you are an all rounder in terms of hacking so I've also seen that you have actually synchronized data you have created a tool which synchronizes data from iPhone to Linux computers oh that was like a long time ago okay that was a long time ago um that's really funny because um so way back that was like before I moved to Ireland um yeah at one point I was working on the on the tooling to sync music um from you know from from a Linux machine to an iPhone my first smartphone was actually an iPhone the original one the iPhone 2G um guess I got from a friend and um and so yeah I needed something to work on that there were other people working on the protocol because it was related to the stuff that iPods used um and so I remember when I started working on that there was a library for like apps to use to communicate um but you needed a demon that actually invented the USB communications part um so I wrote that part they eventually merged into the same project and um I also think I fixed some stuff in like the ethernet driver for tethering over USB and there was also a cat and mouse game there because for some reason Apple didn't want like the communications is open there's no you know logs or anything but the music syncing for some reason they put these signatures on the music databases so you can't actually sync your own music I don't know why they did that um but they kept like you know changing the algorithm to this was started with the iPods before iPhones even but they kept changing the algorithm to like stop people from syncing music using something that's not iTunes and I don't know why they did that um but I did have some diversion to hearing going on there too just kind of figuring out the new algorithms there was a there was an interesting one where like they did it in a really steady way where if you already had a music database you could just like with a very simple bit of code use the existing signature and like change it for the next you know database so we had some tooling there and actually I think that was the first time that I had a package that I wrote it was called USBMuxD the the USB communication stuff that was included by default in like big Linux distros um because like it would get installed by default on Ubuntu as a dependency if you install the desktop so it was like oh my software is now like every Ubuntu machine so that was that was pretty fun um that was an interesting experience and now the really funny thing is that that same software stack is what you use to restore to flash uh the new M1 Max because that you know there was um there was already software to do that um on for iPhones and Apple just reuse the same thing for M1 Max so we have open tooling for like recovering them if you if you screw up your system like the the machines are don't really have a BIOS like a PC does so if you delete the wrong partitions the whole thing just stops working but you can recover it by plugging it in via USB to another machine and then you need like special doing for that if you don't have another Mac so we have um like Linux versions of that um and this was something that the team team working on that same stuff that I hadn't been involved with in many many years had been working on for a while and then you know these M1s come out it's like well now I need to get this working on the M1s and especially on the newer ones that were coming out and so I sent in like my first patch to that project that I had started and no longer maintained in I don't know how many years it was but it's kind of crazy look at the you know you filter by by my name and they get history and it's like it was like you know like 10 year gap or something like that so that was that was a blast of a blast of the past um working on it again and I need to do it again because now I have the M2 that I haven't tested and I bet it needs at least a few uh a few people are just gonna get working so I need to get around to doing that that's interesting so what I have noticed that you've done so many stuff like uh so if I ask you what's your favorite like you know somebody would I you would say that okay I preferred working on the game consoles or you would say that okay it was more interesting was iPhone or Microsoft Connect so what you think was like the most favorite part of your whole career up to now that's a really hard question because the um everything is so different right and and it's it's not just about the actual like reverse engineering the you know the the actual work so to speak but also sort of the context right so like the Wii stuff was very fun because there were so many people involved in such a big community of homebrew and probably the you know the biggest one for any console but then again you also had to deal with like you know drama and issues in the community stuff um while like stuff like the ps4 was more like I'm just gonna sit down and like hack on this until it all works um but I will say that nothing's being anywhere close to as big as Asahi and and sort of you know both in scope and in how much we've accomplished and um and sort of you know the amount of people involved in all that um and that had that I think I I'm really enjoying you know it's sort of um making it all work with this many people is uh is a really important thing talking about Asahi we are not going to reveal right now because that's your talk at academy but do you want to give a small teaser what is the talk about so that you know people can attend your session yeah so uh I think a lot of people wonder you know like how do you do this right how do you take a machine that is like completely undocumented and you know it's just uh it uh you get you take it out of the box and it says mac OS on it how do you put linux on it and uh you know the answer is is complicated but there's a lot of interesting tricks that you can use and the you know it's not as mysterious as it might sound um so I think I'd like to say is that like you know engineers design this thing so if you can think like an engineer you can figure out how it works and uh and so that's what we do right and uh so I'm going to be talking about sort of the the techniques that we use the interesting things we found the you know that kind of uh you know thing because I think there's not um a lot of projects that uh you know the reverse engineering projects of this kind of scope and I think a lot of people are interested in you know in sort of how do you do it that's interesting actually because you know we announced it yesterday and a lot of people have shown already interest that they are very excited to see your talk um now talking about other than your technical background so what do you do other than you know hacking what's something that's really favorite um so uh my I have a few hobbies besides uh you know technology though they all somehow end up relating to technology in one way or another um but uh but mostly these days what I do is music um I I've been playing the piano for a long time just as a hobby self-taught initially and then um when I came to Japan I got interested in making um like sort of cover versions like fan covers of uh of uh like game music and that kind of stuff and uh so there's like a giant community here that does that uh it's like there's like concerts and it's it's really serious actually um so so yeah I have my own little sort of group um where I make uh you know basically solo um I make the music and then have it some singers sing it and some friends help out with the lyrics in Japanese and that kind of stuff uh and that's sort of that's sort of my personal um hobby project and then um I'm also in like a couple you know like amateur bands let me just kind of jam cover something like that uh so yeah I do enjoy music and uh and sort of the music uh seen in in Tokyo so this is like really interesting um maybe I'm just thinking out loud but maybe in future I'm seeing that you will be launching your own game console you know now you have the music you're hacking as well you know maybe down the maybe after 10 years 5 years I don't know I don't know I don't think making a game console is this is quite where I'd see myself ending up um but I've actually considered um more niche stuff uh things like stage technology you know like open stage technology that kind of stuff actually interests me for uh it's been on my mind for a few years so uh maybe something like that because I also mess around with lasers and other you know like lighting stuff um and it also kind of ties together right the technology and the music and all that so yeah I don't know if it's ever gonna happen but that that's the sort of thing that uh that I could see myself doing uh in a few years that would be actually interesting to see you know that because it's a little different but related okay if you are a good person but still it will be so much interesting and um as I've seen like you know a lot of people as you are so passionate about this uh do you like do you know maybe go to events or do a podcast or do you have a video channel where you talk about this so that people get inspired about it um so I have a youtube channel where I stream uh some of my asahil next work um not everything because there's a lot of you know just talking with people and uh and that kind of stuff but when you sit down to like you know solve a programming problem I usually stream it um so if you go to youtube.com slash markin42 that should take you to um to my channel or you can just google it and uh especially at the beginning of the asahil and xaga there's a lot of interesting content I have um a recap where I explain uh I'll mention this in the talk but um if you if you want to you know get some teasers of what I'm talking about there is a youtube channel that I have um there's a lot of there's many hours of content there though but um but I talk about some of the tools that that I used uh during this project and how I developed them and that kind of stuff um so so yeah if uh you know if you're interested in following uh you know the sort of meat of the development uh I do have that um I think it's pretty much it doesn't have a podcast or anything no that's interesting actually because um my next question was actually quite related to it so for example a lot of people you know they want to pursue careers in hacking and they want to learn about game consoles how they can actually port so for example if a youngster would actually want to pursue this so what would be your advice to them that you know this is something you should follow yeah I get that question a lot and people always expecting to like point the books and things like that uh I'm sure books exist but honestly I just learned this like on my own uh you know dinkering and and through the internet and you know online documentation and that kind of thing um so what I always tell people is find a project that interests you that is not like you know so ambitious that you can't um like tackle it and and like go from there right like you know start with something that already exists the same way I started you know with like the Game Boy Advance that already had a homebrew ecosystem and then PlayStation 2 kind of got there um same thing you know find if you had never done like low level engineering or programming before then like learn some of that try like Arduino but you know don't just use the libraries actually read the documentation for the chip and write your own you know drivers for it write your own uh like low level software for it that kind of thing um because like all of that is very well documented so you can just sit down and read the docs and figure out how it works um and you have the existing open source code as a reference and so once you have an idea for how these things are engineered for how the you know kind of low level hardware works then um you can try a platform that maybe isn't that documented right and you know there's plenty of options but there's like android phones that you know might have interesting things that don't work maybe in like open source um OS's for them or like routers there's you know open WRT and a lot of that is also somewhat reversing to near it's like maybe some features don't work on some model that you want to use maybe figure out how that works um that kind of stuff right like where you take uh something that like there's already an ecosystem for but it's missing bits and pieces and you can help out you can help up with the Sahi Linux there's always things uh we actually have a wiki page on like you know um sort of nice beginner projects um that uh could use some more additions because I think all that pretty sure they can right now but uh but yeah there's always uh you know little things you can help out like um we have a person looking into the keyboard backlight and I told them okay like you know I know I know you already have like this driver that works for it because it's pretty simple but it's based on what macOS does and this is like magic number here right it's like magic number that we don't know what it does figure out what the bits do right and they've been coming up and it's like oh this bit turns out it does this it does that and like yeah that's how you do it um so so yeah that that that sort of approach I think is um is really is really good just kind of you know start um with an existing ecosystem that is not you know too overwhelming and then just dig at something that like nobody else has figured out before because there's always things that nobody else has figured out before even in you know in well documented platforms that's an actually very I would say encouraging advice and I feel that you know people who are already in the field and if they encourage others it just helps them a lot and as you said that they can always come and support you with your project uh you have the wiki page and um what else you think Hector is something which I might have missed out and you would like to tell our audience about it and something which you feel that you know it's very important for this field or maybe for the developers who are actually in this field I think the most important thing is to realize that like we're all just humans you know making hardware or breaking hardware there's no you know there's no magic involved it's just in the end of the day it's just bits and wires and transistors and zeros and ones and all that it's you know you you have a giant stack of hardware and software and things you can always break it down into layers and look at different layers right so you shouldn't feel overwhelmed that like this is too complicated I'm not going to figure it out because like we're ingenious we abstract things right we build things in layers and the idea is that you know a single person can understand a single layer so sorry um so uh you know you just don't don't be afraid and think you know this is this is too much for me right there's always a way of learning there's always a way of getting into the field there's always you know something you can start looking at and understand at some point in this stack so you know don't think that like this is beyond what you can achieve that's so true actually it applies in all the fields like whatever you're doing that's so true and especially in open source it's really nice because like once you have open source code you can look at all the layers right and it's like how does you know Katie on Linux work well you can read the source code all the way from like up widgets down to like assembly code in the kernel context switching it's literally all right there right and I think that's really powerful that is that is thank you so much it was really nice talking to you and we are including me I'm looking forward to your talk and hope to see you again and thank you once again um it was really nice talking to you take care bye same thank you so much see you